Problem with admin

50 views
Skip to first unread message

Kolbe

unread,
Jan 31, 2012, 3:04:33 PM1/31/12
to Django users
Hi guys, I created a new app and within that app, I also specified a
new admin.py file. Is that how the admin portion for that app is
managed?

Anyway, after I created my models and syncdb, then run server, I have
been unable to access the admin gui.

I keep getting this error below, but I don't understand it because I
did not edit the admin template files? Am I handling the admin
wrongly? What is the norm for handling multiple apps in the admin?

TemplateSyntaxError at /admin/
Caught IndentationError while rendering: unindent does not match any
outer indentation level (views.py, line 25)
Request Method: GET
Request URL: http://localhost:8000/admin/
Django Version: 1.3
Exception Type: TemplateSyntaxError
Exception Value:
Caught IndentationError while rendering: unindent does not match any
outer indentation level (views.py, line 25)
Exception Location: /Library/Frameworks/Python.framework/Versions/2.7/
lib/python2.7/site-packages/django/utils/importlib.py in
import_module, line 35
Python Executable: /Library/Frameworks/Python.framework/Versions/2.7/
Resources/Python.app/Contents/MacOS/Python
Python Version: 2.7.1
Python Path:
['/Users/max/Documents/Python/djproj3',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/setuptools-0.6c11-py2.7.egg',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/MySQL_python-1.2.3-py2.7-macosx-10.6-x86_64.egg',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-
darwin',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-
mac',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-
mac/lib-scriptpackages',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-
tk',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-
old',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-
dynload',
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages',
'/Library/Python/2.7/site-packages']
Server time: Wed, 1 Feb 2012 03:50:29 +0800
Template error

In template /Library/Frameworks/Python.framework/Versions/2.7/lib/
python2.7/site-packages/django/contrib/admin/templates/admin/
base.html, error at line 31
Caught IndentationError while rendering: unindent does not match any
outer indentation level (views.py, line 25)

Daniel Roseman

unread,
Jan 31, 2012, 3:37:25 PM1/31/12
to django...@googlegroups.com

On Tuesday, 31 January 2012 20:04:33 UTC, Kolbe wrote:
Hi guys, I created a new app and within that app, I also specified a
new admin.py file. Is that how the admin portion for that app is
managed?

Anyway, after I created my models and syncdb, then run server, I have
been unable to access the admin gui.

I keep getting this error below, but I don't understand it because I
did not edit the admin template files? Am I handling the admin
wrongly? What is the norm for handling multiple apps in the admin?

TemplateSyntaxError at /admin/
Caught IndentationError while rendering: unindent does not match any
outer indentation level (views.py, line 25)

Why do you think this has anything to do with template files? The error is quite specific: you have an indentation error in views.py, at or before line 25. Go and have a look at that file.
--
DR.
Reply all
Reply to author
Forward
0 new messages