Opened 8 years ago

Closed 8 years ago

#5235 closed (invalid)

Error with "manag.py sql polls"

Reported by: jtoddm@… Owned by: jacob
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I'm using, http://www.djangoproject.com/documentation/tutorial01/, to learn how to use Django. However, it seems to missing something.

Under the Activating Models section I added the 'mysite.polls' application to the INSTALLED_APPS variable in the 'settings.py' file.

I try to run the command, "python manage.py sql polls", and get the following:

C:\Python25\djangoDev\myssite>manage.py sql polls
Traceback (most recent call last):

File "C:\Python25\djangoDev\myssite\manage.py", line 11, in <module>

execute_manager(settings)

File "C:\Python25\lib\site-packages\django\core\management\init.py", line 180, in execute_manager

utility.execute(argv)

File "C:\Python25\lib\site-packages\django\core\management\init.py", line 124, in execute

command.execute(*args[1:], options.dict)

File "C:\Python25\lib\site-packages\django\core\management\base.py", line 28, in execute

translation.activate('en-us')

File "C:\Python25\lib\site-packages\django\utils\translation\init.py", line 76, in activate

return real_activate(language)

File "C:\Python25\lib\site-packages\django\utils\translation\init.py", line 42, in delayed_loader

return g[caller](*args, kwargs)

File "C:\Python25\lib\site-packages\django\utils\translation\init.py", line 76, in activate

return real_activate(language)

File "C:\Python25\lib\site-packages\django\utils\translation\trans_real.py", line 195, in activate

_active[currentThread()] = translation(language)

File "C:\Python25\lib\site-packages\django\utils\translation\trans_real.py", line 184, in translation

default_translation = _fetch(settings.LANGUAGE_CODE)

File "C:\Python25\lib\site-packages\django\utils\translation\trans_real.py", line 167, in _fetch

app = getattr(import(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:])

ImportError: No module named mysite

I also get the same error when I try to run "manage.py syncdb"

What am I missing here?

Thanks.

Change History (1)

comment:1 Changed 8 years ago by Collin Grady <cgrady@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Your directory name has a typo.

You named it myssite by mistake, instead of mysite - that extra 's' breaks it :)

Note: See TracTickets for help on using tickets.
Back to Top