What steps will reproduce the problem?
1. Make an app withou django.contrib.sites
2. Try to create a page in the admin
What is the expected output? What do you see instead?
I expect to be able to create a page with no connection to a site.
TemplateSyntaxError at /admin/pages/page/add/
Caught an exception while rendering: no such table: django_site
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/pages/page/add/
Exception Type: TemplateSyntaxError
Exception Value: Caught an exception while rendering: no such
table: django_site
Exception Location: /home/hans/Code/django/osff/parts/django/django/
template/debug.py in render_node, line 81
Python Executable: /usr/bin/python
Python Version: 2.6.2
Python Path: ['/home/hans/Code/django/osff/eggs/html5lib-0.11.1-
py2.6.egg', '/home/hans/Code/django/osff/eggs/djangorecipe-0.19-
py2.6.egg', '/home/hans/Code/django/osff/eggs/zc.recipe.egg-1.2.2-
py2.6.egg', '/usr/local/lib/python2.6/dist-packages/zc.buildout-1.2.1-
py2.6.egg', '/usr/lib/python2.6/dist-packages', '/home/hans/Code/django/
osff/parts/django', '/home/hans/Code/django/osff', '/home/hans/Code/django/
osff/parts/svn/mptt', '/home/hans/Code/django/osff/parts/svn/pages', '/
home/hans/Code/django/osff/bin', '/usr/local/lib/python2.6/dist-packages/
PasteScript-1.7.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/
PasteDeploy-1.3.3-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/
Paste-1.7.2-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/
ZopeSkel-2.11.1-py2.6.egg', '/usr/local/lib/python2.6/dist-packages/
zc.buildout-1.2.1-py2.6.egg', '/usr/lib/python2.6', '/usr/lib/python2.6/
plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/
usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/
lib/python2.6/dist-packages/Numeric', '/usr/lib/python2.6/dist-packages/
PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/var/lib/python-
support/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/var/lib/
python-support/python2.6/gtk-2.0', '/usr/local/lib/python2.6/dist-
packages']
Server time: søn, 12 Jul 2009 11:48:34 +0200
What version of the product are you using? On what operating system?
Trunk r604, or thereabouts. Problem has been present for some time.
Please provide any additional information below.
This seems to be the relevant piece of code:
pages/admin/__init__.py:
# TODO: find solution to do this dynamically
#if getattr(settings, 'PAGE_USE_SITE_ID'):
general_fields.append('sites')
insert_point = general_fields.index('status') + 1
Removing the comment and indenting seems to solve the problem, but you may
have had a reason for putting it in in the first place.
Original issue reported on code.google.com by han...@gmail.com on 12 Jul 2009 at 10:00
Original issue reported on code.google.com by
han...@gmail.com
on 12 Jul 2009 at 10:00