25๐
After updating my Django version, I got this error and fix as running these two lines:
python manage.py migrate auth
python manage.py migrate
auth_user table inside auth model should run first I guess.
4๐
The problem is avoided when you do as Pedro Wagner suggests (auth_user error with Django 1.8 and syncdb / migrate):
Make sure that for all your apps, there exist initial migrations files by running:
manage.py makemigrations my_app
Iโd do it not only for those that depend on auth because I think the problem is more general.
The root cause for this behaviour seems to me that for some reason
manage.py makemigrations
does not always create the initial migrations if they are not already there, contrary to:
manage.py makemigrations my_app
Unfortunately I cannot fathom the reasons for this asymmetry.
- What is the different between the get logger functions from celery.utils.log and logging?
- A good way to encrypt database fields?
4๐
I think you just forgot to migrate your auth models. However, to do that, just type in the following command on your terminal.
python manage.py migrate
or
python manage.py migrate auth
Hope this settles your error in the program.
- Acessing POST field data without a form (REST api) using Django
- "Lazy load" of data from a context processor
- Django admin not serving static files?
1๐
I think you needed to run:
python manage.py syncdb
and potentially you need to setup some dependencies? Probably not necessary after syncdb.
South 1 style (Django < 1.7)
class Migration:
depends_on = (
("accounts", "0001"),
)
def forwards(self):
....
South 2 style (Django >= 1.7)
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("accounts", "0001")]
- Django error admin.E033: username is not an attribute of users.CustomUser. Why is my custom user admin not working?
- Pointing to multiple S3 buckets in s3boto
0๐
Once you create a migration for your app it will automatically add the necessary dependencies. So in this case just run ./manage.py makemigrations registration
.
Please check the registration/migrations/0001_initial.py file and you should see something like this:
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
This means you need to create migrations for all your apps with any kind of dependency.
0๐
I had this problem too, solved it by replacing old registration with one that includes pull #25:
pip install git+https://github.com/macropin/django-registration.git@v1.2c0
- Django and Shibboleth
- Installing Django with pip
- Django reset_password_confirm TemplateSyntaxError problem
- How to limit query results with Django Rest filters
- Remove padding from matplotlib plotting
0๐
In my case, this has been resolved re-adding some modules in INSTALLED_APPS that had been removed. As a consequence, some tables in the database were confusing the migration scheme and then ruining the test
command because the default database was containing those previous migrations.
Fixed re-adding the modules, allauth
and other related submodules in my case.
- Convert unicode to datetime proper strptime format
- How can I make a fixture out of QuerySet in django?
- Getting error with is_popup variable in django 1.9
- Order queryset by alternating value
-2๐
you have not migrated your models
python manage.py makemigrations my_app_name
for mac os
python3 manage.py makemigrations my_app
- Django test client does not automatically serialize factories
- Django Generic Foreign keys โ Good or Bad considering the SQL performance?