From c623172c30c543e789e0bdf7c37af043c4a79280 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Sun, 1 Nov 2020 18:36:23 -0500 Subject: [PATCH 01/11] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0654570..39907b6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # Django MyProject -This is a boilerplate for a scalable Django project. To use it, just download the source code and globally replace "myproject" with a meaningful project name. Then start building your apps. \ No newline at end of file +This is a boilerplate for a scalable Django project. To use it, just download the source code. + +1 - globally replace "myproject" with a meaningful project name. +2 - create secrets.json in settings directory + From c9c62aa038b90afc83e59259a174df463f7e4af9 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Sun, 1 Nov 2020 18:37:26 -0500 Subject: [PATCH 02/11] Update _base.txt Update to Django 3.1.2 --- requirements/_base.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/_base.txt b/requirements/_base.txt index 3b844b8..8eff402 100644 --- a/requirements/_base.txt +++ b/requirements/_base.txt @@ -1,4 +1,4 @@ -Django~=3.0.0 -psycopg2-binary==2.8.3 -pytz==2019.2 -sqlparse==0.3.0 +Django==3.1.2 +psycopg2-binary==2.8.6 +pytz==2020.1 +sqlparse==0.4.1 From 170239a76c88c97fad74da4143030dab3f7f6fd4 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Sun, 1 Nov 2020 18:38:22 -0500 Subject: [PATCH 03/11] Update LICENSE --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 4e05511..9f3d335 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Aidas Bendoraitis +Copyright (c) 2020 Qian Du Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. From 7f67962604c6b739cd46cffcd56fa9372419156f Mon Sep 17 00:00:00 2001 From: Qian Du Date: Sun, 1 Nov 2020 18:49:29 -0500 Subject: [PATCH 04/11] add how to generate random key to README --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 39907b6..02bf6b0 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,7 @@ This is a boilerplate for a scalable Django project. To use it, just download th 1 - globally replace "myproject" with a meaningful project name. 2 - create secrets.json in settings directory - +```python +from django.core.management.utils import get_random_secret_key +print(get_random_secret_key()) +``` \ No newline at end of file From 5a3f7510844b4b401a390fa50bec1c974aca4d90 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Sun, 1 Nov 2020 18:58:02 -0500 Subject: [PATCH 05/11] changed README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 02bf6b0..3bee703 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ This is a boilerplate for a scalable Django project. To use it, just download the source code. -1 - globally replace "myproject" with a meaningful project name. -2 - create secrets.json in settings directory +1.1 - globally replace "myproject" with a meaningful project name. +1.2 - create secrets.json in settings directory ```python from django.core.management.utils import get_random_secret_key print(get_random_secret_key()) From 46bf8c08f402eea24de2dcbf4831a07dc8c53364 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Sun, 1 Nov 2020 19:02:23 -0500 Subject: [PATCH 06/11] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3bee703..17d9601 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ This is a boilerplate for a scalable Django project. To use it, just download the source code. -1.1 - globally replace "myproject" with a meaningful project name. -1.2 - create secrets.json in settings directory +1. 1 - globally replace "myproject" with a meaningful project name. +1. 2 - create secrets.json in settings directory ```python from django.core.management.utils import get_random_secret_key print(get_random_secret_key()) -``` \ No newline at end of file +``` From 0a1c02b9fe0ea1cae93d243ff4324d37b2ef7506 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Sun, 1 Nov 2020 19:02:57 -0500 Subject: [PATCH 07/11] Fixed numbered list in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 17d9601..d06dfd8 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ This is a boilerplate for a scalable Django project. To use it, just download the source code. -1. 1 - globally replace "myproject" with a meaningful project name. -1. 2 - create secrets.json in settings directory +1. Globally replace "myproject" with a meaningful project name. +1. Create secrets.json in settings directory ```python from django.core.management.utils import get_random_secret_key print(get_random_secret_key()) From 80eb52179ecd7d5184d534af9626d2b7d78a8980 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Mon, 2 Nov 2020 19:44:19 -0500 Subject: [PATCH 08/11] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d06dfd8..f5833d5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ This is a boilerplate for a scalable Django project. To use it, just download the source code. +1. Create a virtualenv +```python +python3 -m venv myprojectvenv +``` + 1. Globally replace "myproject" with a meaningful project name. 1. Create secrets.json in settings directory ```python From 5e1107fa2164a6fd991bbd916934ec31a0b7c61d Mon Sep 17 00:00:00 2001 From: Qian Du Date: Mon, 2 Nov 2020 19:48:39 -0500 Subject: [PATCH 09/11] Update README.md --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f5833d5..48030a0 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,17 @@ This is a boilerplate for a scalable Django project. To use it, just download the source code. -1. Create a virtualenv +* Create a virtualenv ```python python3 -m venv myprojectvenv ``` - -1. Globally replace "myproject" with a meaningful project name. -1. Create secrets.json in settings directory +* Globally replace "myproject" with a meaningful project name. +* Create secrets.json in settings directory ```python from django.core.management.utils import get_random_secret_key print(get_random_secret_key()) ``` +* Modify manage.py to use the right setting file +```python +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings.production') +``` From 87903fbe3ac6c5aaca25e0dd9750ef08b809f037 Mon Sep 17 00:00:00 2001 From: Qian Du Date: Mon, 2 Nov 2020 20:12:03 -0500 Subject: [PATCH 10/11] updated README --- README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 48030a0..1aae7f2 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,24 @@ This is a boilerplate for a scalable Django project. To use it, just download th python3 -m venv myprojectvenv ``` * Globally replace "myproject" with a meaningful project name. + +* Modify manage.py to use the right setting file +```python +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings.production') +``` + +* Install postgresql from official site, download latest version. Default port 5432 + * Log into postgresql shell +``` +CREATE DATABASE myproject; +CREATE USER myprojectuser WITH PASSWORD 'password'; +GRANT ALL PRIVILEGES ON DATABASE myproject TO myprojectuser; +``` * Create secrets.json in settings directory ```python from django.core.management.utils import get_random_secret_key print(get_random_secret_key()) ``` -* Modify manage.py to use the right setting file -```python -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings.production') -``` + +* Run python migration +* Ready to go with http://127.0.0.1:8000/ \ No newline at end of file From 8daa73af39b7d2f46ca59da89d5712753948c93b Mon Sep 17 00:00:00 2001 From: Qian Du Date: Mon, 2 Nov 2020 20:44:09 -0500 Subject: [PATCH 11/11] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 9f3d335..62390a1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Qian Du +Copyright (c) 2019 Aidas Bendoraitis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal