Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1255 closed defect (invalid)

Error in tutorial 2 (part on admin-interface)

Reported by: flo Owned by: adrian
Component: contrib.admin Version: 0.90
Severity: minor Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I got the following error when executing the

python manage.py install admin

command:

Traceback (most recent call last):

File "D:\Python\django-tutorial\myproject\manage.py", line 11, in ?

execute_manager(settings)

File "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\management.py", line 990, i

execute_manager

execute_from_command_line(action_mapping)

File "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\management.py", line 903, i

execute_from_command_line

translation.activate('en-us')

File "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\utils\translation.py", line 192,

in activate

_active[currentThread()] = translation(language)

File "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\utils\translation.py", line 181,

in translation

default_translation = _fetch(settings.LANGUAGE_CODE)

File "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\utils\translation.py", line 164,

in _fetch

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

AttributeError: 'module' object has no attribute 'main'

To resolve this, you have to change the INSTALLED_APPS-tuple in settings.py to this:

INSTALLED_APPS = (

'myproject.polls',
'django.contrib.admin',

)

Reason for the error: the module named main was changed to admin.

Django really shows Python's power, and as a Java Programmer I'm impressed more and more, keep up the good work.

Greetings, Florian.

Change History (1)

comment:1 Changed 9 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top