- The project uses sqlite3 for local development so you don't need any DB configuration ✌️
- Create a new virtual env. We use the latest stable version of Python for this project ->
3.9 - Install the requirements ->
pip install -r requirements.txt - Run the migrations ->
python3 manage.py migrate - Generate Google Client ID and Secret -> you can follow this article from Google
- Add your Client ID and Secret to the
.envfile:
DJANGO_GOOGLE_OAUTH2_CLIENT_ID=<your-client-id-here>
DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET=<your-client-secret-here>
- We're ready! Run the server ->
python3 manage.py runserver - (Optional) If you want to create a new superuser in order to use the Django admin, you can do the following:
- Run
python3 manage.py shell_plus - Execute the following code:
from users.services import user_create_superuser
admin_password = "admin"
# Create a new user using acquired password, stripping any accidentally stored newline characters
user_create_superuser(
email="admin@achilio.com",
password=admin_password.strip(),
access_token="none",
refresh_token="none",
)
- You now have a new superuser! You cann navigate to
http://localhost:8000/admin/in order to use the Django admin.