On Fri, Nov 02, 2012 at 04:59:35PM +0800, Russell Keith-Magee wrote:
> Can you run:
>
> ./manage syncdb --traceback
>
> so we can get the full context of the error message?
>
Sure, here it is:
:~/www/project$ python manage.py syncdb --traceback
Traceback (most recent call last):
File "/usr/local/bin/django/django/core/management/base.py", line 222, in
run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/bin/django/django/core/management/base.py", line 251, in
execute
self.validate()
File "/usr/local/bin/django/django/core/management/base.py", line 277, in
validate
num_errors = get_validation_errors(s, app)
File "/usr/local/bin/django/django/core/management/validation.py", line 34,
in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/usr/local/bin/django/django/db/models/loading.py", line 165, in
get_app_errors
self._populate()
File "/usr/local/bin/django/django/db/models/loading.py", line 71, in
_populate
self.load_app(app_name, True)
File "/usr/local/bin/django/django/db/models/loading.py", line 95, in load_app
models = import_module('.models', app_name)
File "/usr/local/bin/django/django/utils/importlib.py", line 35, in
import_module
__import__(name)
File "/home/michael/www/project/news/models.py", line 27, in <module>
class News(models.Model):
File "/home/michael/www/project/news/models.py", line 28, in News
author = models.ForeignKey(settings.AUTH_USER_MODEL)
NameError: name 'settings' is not defined
NameError: name 'settings' is not defined
What i forgot in my first post is
that i reference the user model like this:
author = models.ForeignKey(settings.AUTH_USER_MODEL)
So if i remove that line the syncdb command works
just fine.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.