From 220c5569ec27c2dbb69872d4708a7ebb04c8910b Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:41:00 +0530 Subject: [PATCH 1/9] Fix #1479 --- Setup.md | 35 +++++++++++++++++++++++++++++++++++ local_requirements.txt | 27 +++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 local_requirements.txt diff --git a/Setup.md b/Setup.md index 5bc310c34..f456e00a2 100644 --- a/Setup.md +++ b/Setup.md @@ -114,6 +114,41 @@ from the host machine. python manage.py runserver ``` +## Alternative using Virtualenv +```sh +brew install postgresql + +# Install postgres on ubuntu +sudo apt-get install postgresql + +# Install VirtualEnv +pip install virtualenv + +# Create VirtualEnv env +virtualenv env + +# Activate VirtualEnv +source env/bin/activate + +# Install all packages on Virtual Environment from requirements.txt +pip install -r local_requirements.txt + +# Create tables in the database +python manage.py migrate + +# Load initial data +python3 manage.py loaddata website/fixtures/initial_data.json + +# Create a super user +python manage.py createsuperuser + +# Collect static files +python manage.py collectstatic + +# Run the server +python manage.py runserver +``` + ### Ready to go now Then go to `http://127.0.0.1:8000/admin/socialaccount/socialapp/` and add filler information for social auth accounts. diff --git a/local_requirements.txt b/local_requirements.txt new file mode 100644 index 000000000..9ffc30b83 --- /dev/null +++ b/local_requirements.txt @@ -0,0 +1,27 @@ +django-environ +dj_database_url +django +django-allauth +django-gravatar +django-email-obfuscator +django-gravatar2 +django-import-export +django-annoying +djangorestframework +django-filter +django-mdeditor +django-tz-detect +django-star-ratings +drf-yasg +captcha +dj-rest-auth +tweepy +colorthief +Unidecode +django-simple-captcha +stripe +humanize +bs4 +user-agents +django-debug-toolbar +whitenoise \ No newline at end of file From 450318b735e6f9303c5c89955d8ac9697e44faff Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:42:54 +0530 Subject: [PATCH 2/9] Fix #1479 --- Setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Setup.md b/Setup.md index f456e00a2..74b04e0d1 100644 --- a/Setup.md +++ b/Setup.md @@ -114,7 +114,7 @@ from the host machine. python manage.py runserver ``` -## Alternative using Virtualenv +### Alternative using Virtualenv ```sh brew install postgresql From f816929fea14f57ca7c7c5d4063af5f37f3add1c Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:45:49 +0530 Subject: [PATCH 3/9] Fix #1479 --- Setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Setup.md b/Setup.md index 74b04e0d1..532efffde 100644 --- a/Setup.md +++ b/Setup.md @@ -124,10 +124,10 @@ sudo apt-get install postgresql # Install VirtualEnv pip install virtualenv -# Create VirtualEnv env +# Create a Python Virtual Environment virtualenv env -# Activate VirtualEnv +# Activate Virtual Environment source env/bin/activate # Install all packages on Virtual Environment from requirements.txt From 25c61929a365a9d14095335f576af1fc5415daa1 Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:41:00 +0530 Subject: [PATCH 4/9] Fix #1479 --- Setup.md | 35 +++++++++++++++++++++++++++++++++++ local_requirements.txt | 27 +++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 local_requirements.txt diff --git a/Setup.md b/Setup.md index 5bc310c34..f456e00a2 100644 --- a/Setup.md +++ b/Setup.md @@ -114,6 +114,41 @@ from the host machine. python manage.py runserver ``` +## Alternative using Virtualenv +```sh +brew install postgresql + +# Install postgres on ubuntu +sudo apt-get install postgresql + +# Install VirtualEnv +pip install virtualenv + +# Create VirtualEnv env +virtualenv env + +# Activate VirtualEnv +source env/bin/activate + +# Install all packages on Virtual Environment from requirements.txt +pip install -r local_requirements.txt + +# Create tables in the database +python manage.py migrate + +# Load initial data +python3 manage.py loaddata website/fixtures/initial_data.json + +# Create a super user +python manage.py createsuperuser + +# Collect static files +python manage.py collectstatic + +# Run the server +python manage.py runserver +``` + ### Ready to go now Then go to `http://127.0.0.1:8000/admin/socialaccount/socialapp/` and add filler information for social auth accounts. diff --git a/local_requirements.txt b/local_requirements.txt new file mode 100644 index 000000000..9ffc30b83 --- /dev/null +++ b/local_requirements.txt @@ -0,0 +1,27 @@ +django-environ +dj_database_url +django +django-allauth +django-gravatar +django-email-obfuscator +django-gravatar2 +django-import-export +django-annoying +djangorestframework +django-filter +django-mdeditor +django-tz-detect +django-star-ratings +drf-yasg +captcha +dj-rest-auth +tweepy +colorthief +Unidecode +django-simple-captcha +stripe +humanize +bs4 +user-agents +django-debug-toolbar +whitenoise \ No newline at end of file From 95b129914ad9c4571a38cc79f7289c6340229b49 Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:42:54 +0530 Subject: [PATCH 5/9] Fix #1479 --- Setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Setup.md b/Setup.md index f456e00a2..74b04e0d1 100644 --- a/Setup.md +++ b/Setup.md @@ -114,7 +114,7 @@ from the host machine. python manage.py runserver ``` -## Alternative using Virtualenv +### Alternative using Virtualenv ```sh brew install postgresql From 3248560827aee03033c3f04c54f9c124f18b4c16 Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:45:49 +0530 Subject: [PATCH 6/9] Fix #1479 --- Setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Setup.md b/Setup.md index 74b04e0d1..532efffde 100644 --- a/Setup.md +++ b/Setup.md @@ -124,10 +124,10 @@ sudo apt-get install postgresql # Install VirtualEnv pip install virtualenv -# Create VirtualEnv env +# Create a Python Virtual Environment virtualenv env -# Activate VirtualEnv +# Activate Virtual Environment source env/bin/activate # Install all packages on Virtual Environment from requirements.txt From 808cbad1ec5b606b1fd815005058e1d2f3d49eb9 Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:47:00 +0530 Subject: [PATCH 7/9] fix #1479 --- Setup.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Setup.md b/Setup.md index 532efffde..4d3337f65 100644 --- a/Setup.md +++ b/Setup.md @@ -121,17 +121,12 @@ brew install postgresql # Install postgres on ubuntu sudo apt-get install postgresql -# Install VirtualEnv -pip install virtualenv +# Install Poetry +pip install poetry -# Create a Python Virtual Environment -virtualenv env +poetry shell -# Activate Virtual Environment -source env/bin/activate - -# Install all packages on Virtual Environment from requirements.txt -pip install -r local_requirements.txt +poetry install # Create tables in the database python manage.py migrate From 26bcaafc2be1583968ec758e357dcbfcf2659ebb Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:48:44 +0530 Subject: [PATCH 8/9] Delete local_requirements.txt --- local_requirements.txt | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 local_requirements.txt diff --git a/local_requirements.txt b/local_requirements.txt deleted file mode 100644 index 9ffc30b83..000000000 --- a/local_requirements.txt +++ /dev/null @@ -1,27 +0,0 @@ -django-environ -dj_database_url -django -django-allauth -django-gravatar -django-email-obfuscator -django-gravatar2 -django-import-export -django-annoying -djangorestframework -django-filter -django-mdeditor -django-tz-detect -django-star-ratings -drf-yasg -captcha -dj-rest-auth -tweepy -colorthief -Unidecode -django-simple-captcha -stripe -humanize -bs4 -user-agents -django-debug-toolbar -whitenoise \ No newline at end of file From cd8445f88ac06101c13f552ee09ea48a778ec344 Mon Sep 17 00:00:00 2001 From: Bishal <69814108+CodeWithBishal@users.noreply.github.com> Date: Sat, 21 Oct 2023 14:49:47 +0530 Subject: [PATCH 9/9] fix #1479 --- Setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Setup.md b/Setup.md index 4d3337f65..814d9bbad 100644 --- a/Setup.md +++ b/Setup.md @@ -114,7 +114,7 @@ from the host machine. python manage.py runserver ``` -### Alternative using Virtualenv +### Alternative using Poetry ```sh brew install postgresql