Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom User model to app #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add custom User model to app #62

wants to merge 1 commit into from

Conversation

jd7h
Copy link
Owner

@jd7h jd7h commented Oct 29, 2021

Fix for issue #44. Reason: best practice according to the Django docs:
https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#auth-custom-user

Upon this commit, you need to throw away your migrations and start over with a clean slate.
Instructions:

### Source: https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html

# Delete migrations
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc"  -delete

# Drop database
# (delete db.sqlite3 or see https://stackoverflow.com/questions/34576004/simple-way-to-reset-django-postgresql-database

# Create migrations and generate DB schema
./manage.py makemigrations
./manage.py migrate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant