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

loaddata error on fixture #1

Open
tony opened this issue Oct 16, 2011 · 2 comments
Open

loaddata error on fixture #1

tony opened this issue Oct 16, 2011 · 2 comments

Comments

@tony
Copy link

tony commented Oct 16, 2011

Hey! Hope you're well! Splendid project if I do say so myself :)

202c088#fixtures/initial_data.json

tony@general:1~/src/django_projects/words/wordconfuse 10:06 AM|$> ls
bin defs.pyc forms.py init.py models.py README templates urls.py views.py
defs.py fixtures forms.pyc init.pyc models.pyc static tests.py urls.pyc views.pyc

tony@general:1~/src/django_projects/words/wordconfuse 10:06 AM|$> python ../manage.py loaddata fixtures/initial_data.json

Problem installing fixture 'fixtures/initial_data.json': Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/loaddata.py", line 169, in handle
for obj in objects:
File "/usr/local/lib/python2.7/dist-packages/django/core/serializers/json.py", line 35, in Deserializer
for obj in PythonDeserializer(simplejson.load(stream), **options):
File "/usr/local/lib/python2.7/dist-packages/django/core/serializers/python.py", line 84, in Deserializer
Model = _get_model(d["model"])
File "/usr/local/lib/python2.7/dist-packages/django/core/serializers/python.py", line 141, in _get_model
raise base.DeserializationError(u"Invalid model identifier: '%s'" % model_identifier)
DeserializationError: Invalid model identifier: 'wordconfuse.Words'

Is there any debug info I can give you to be more helpful?

@jarv
Copy link
Owner

jarv commented Oct 16, 2011

thanks, it looks like it is having difficulty finding the "Words" class in models.py.
If the class is there you might want to make sure you don't have a pathing issue, see if this works:

$ python manage.py shell

from wordconfuse.models import Words

@tony
Copy link
Author

tony commented Oct 18, 2011

I am able to load this class via the shell. I'm a n00b at django still, is there a place I should try to add this in my settings to have this work?

After adding it to settings.py, which may or may not be right, I'm told I don't have DJANGO_SETTINGS_MODULE

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

No branches or pull requests

2 participants