Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

gsquare-org/mv-manager-auth

Repository files navigation

Local Development

  1. The project uses sqlite3 for local development so you don't need any DB configuration ✌️
  2. Create a new virtual env. We use the latest stable version of Python for this project -> 3.9
  3. Install the requirements -> pip install -r requirements.txt
  4. Run the migrations -> python3 manage.py migrate
  5. Generate Google Client ID and Secret -> you can follow this article from Google
  6. Add your Client ID and Secret to the .env file:
DJANGO_GOOGLE_OAUTH2_CLIENT_ID=<your-client-id-here>
DJANGO_GOOGLE_OAUTH2_CLIENT_SECRET=<your-client-secret-here>
  1. We're ready! Run the server -> python3 manage.py runserver
  2. (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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages