A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/duplxey/django-custom-user/tree/base below:

GitHub - duplxey/django-custom-user at base

This repository is used as a dummy project to demonstrate how to migrate to a custom Django user model mid-project.

The repository is split into two branches:

  1. base - starting point (using Django's default user model)
  2. master - end point (using custom user model)

To learn how it's done check out the article.

Want to use this project?
  1. Fork/Clone (make sure to clone the right branch).

  2. Create and activate a virtual environment:

    $ python3 -m venv venv && source venv/bin/activate
  3. Install the requirements:

    (venv)$ pip install -r requirements.txt
  4. Spin up a Postgres container or use locally installed PostgreSQL:

    $ docker run --name django-todo-postgres -p 5432:5432 \
        -e POSTGRES_USER=django-todo -e POSTGRES_PASSWORD=complexpassword123 \
        -e POSTGRES_DB=django-todo -d postgres

    If you're going to use locally installed PostgreSQL, make sure to go to core/settings.py and change DATABASES credentials accordingly.

  5. Apply the migrations:

    (venv)$ python manage.py migrate
  6. (Optional) Fill the database with sample data:

    $ (venv) python manage.py loaddata fixtures/auth.json --app auth
    $ (venv) python manage.py loaddata fixtures/todo.json --app todo

    These two fixtures also create a superuser with the following credentials:

    username:  admin
    password:  password
    
  7. Run the server:

    (venv)$ python manage.py runserver
  8. Navigate to http://localhost:8000/admin/ in your favorite web browser and login.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4