OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Django/Python: Update the relation to point at settings.AUTH_USER_MODEL

  • Thread starter Thread starter atobi
  • Start date Start date
A

atobi

Guest
I'm completely new to Python and Django, but I need to install testbedserver-software (for which I follow this tutorial) on my server. Now I'm running into trouble when running following command:

Code:
python manage.py syncdb

The following error is shown:

Code:
CommandError: One or more models did not validate:
menu.bookmark: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
dashboard.dashboardpreferences: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.

This is my manage.py:

Code:
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "controller.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

This is my settings.py:

Code:
from controller.settings_example import *

# Probably you want to override at least the database configuration:
DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'controller',
    'USER': 'confine',
    'PASSWORD': 'confine',
    'HOST': 'localhost',
    'PORT': '',
}
}

I already found this http://grokbase.com/p/gg/django-use...m-user-model-extends-abstractuser-doesnt-work. But I don't even know where to apply the solution. (I don't even know this problem is PostgreSQL, Python or Django based...)

Can someone help me with this?

Thanks in advance, atobi
<p>I'm completely new to Python and Django, but I need to install testbedserver-software (for which I follow this <a href="http://wiki.confine-project.eu/soft:server-installation" rel="nofollow noreferrer">tutorial</a>) on my server. Now I'm running into trouble when running following command:</p>

<pre><code>python manage.py syncdb
</code></pre>

<p>The following error is shown:</p>

<pre><code>CommandError: One or more models did not validate:
menu.bookmark: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
dashboard.dashboardpreferences: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.
</code></pre>

<p>This is my manage.py:</p>

<pre><code>#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "controller.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)
</code></pre>

<p>This is my settings.py:</p>

<pre><code>from controller.settings_example import *

# Probably you want to override at least the database configuration:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'controller',
'USER': 'confine',
'PASSWORD': 'confine',
'HOST': 'localhost',
'PORT': '',
}
}
</code></pre>

<p>I already found this <a href="http://grokbase.com/p/gg/django-use...m-user-model-extends-abstractuser-doesnt-work" rel="nofollow noreferrer">http://grokbase.com/p/gg/django-use...m-user-model-extends-abstractuser-doesnt-work</a>.
But I don't even know where to apply the solution. (I don't even know this problem is PostgreSQL, Python or Django based...)</p>

<p>Can someone help me with this?</p>

<p>Thanks in advance,
atobi</p>
 
Top