I've been experiencing some strange problems with my admin site. I
defined a few simple models and got Django to talk to an sqlite db
sucessfully, I have no problem adding and removing table entries
through the shell. I then activated the admin site and added my
models. I can manage users and all the standard stuff without any
problems but when it comes to my own models Django complains bitterly.
While my db has no entries I can view all the tables by clicking on
the appropriate links and I have access to the 'add' forms but as soon
as I try to save anything I get an exception with the  value
'unsupported format character 'S' (0x53) at index 1'. So I tried to
see if I could view table entries through the admin site by stopping
the server and adding some random data with the shell, now I get the
same exception just for trying to view a table.

Here's the traceback stuff from when I try to view existing table
entries, the error page says the problem is at the line marked 78:

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/admin/blah/blah/
Django Version: 1.1.1
Python Version: 2.6.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'mySite.feedback',
 'mySite.myFeed',
 'mySite.blah']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Template error:
In template /usr/local/lib/python2.6/dist-packages/django/contrib/
admin/templates/admin/change_list.html, error at line 78
   Caught an exception while rendering: unsupported format character
'S' (0x53) at index 1
   68 :         {% endif %}


   69 :       {% endblock %}


   70 :


   71 :       <form action="" method="post"{% if
cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}>


   72 :       {% if cl.formset %}


   73 :         {{ cl.formset.management_form }}


   74 :       {% endif %}


   75 :


   76 :       {% block result_list %}


   77 :           {% if action_form and actions_on_top and
cl.full_result_count %}{% admin_actions %}{% endif %}


   78 :            {% result_list cl %}


   79 :           {% if action_form and actions_on_bottom and
cl.full_result_count %}{% admin_actions %}{% endif %}


   80 :       {% endblock %}


   81 :       {% block pagination %}{% pagination cl %}{% endblock %}


   82 :       </form>


   83 :     </div>


   84 :   </div>


   85 : {% endblock %}


   86 :

Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
base.py" in get_response
  92.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/
options.py" in wrapper
  226.                 return self.admin_site.admin_view(view)(*args,
**kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/
cache.py" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/
sites.py" in inner
  186.             return view(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/
options.py" in changelist_view
  986.         ], context, context_instance=context_instance)
File "/usr/local/lib/python2.6/dist-packages/django/shortcuts/
__init__.py" in render_to_response
  20.     return HttpResponse(loader.render_to_string(*args,
**kwargs), **httpresponse_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader.py" in render_to_string
  108.     return t.render(context_instance)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  178.         return self.nodelist.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  779.                 bits.append(self.render_node(node, context))
File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py"
in render_node
  71.             result = node.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader_tags.py" in render
  97.         return compiled_parent.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  178.         return self.nodelist.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  779.                 bits.append(self.render_node(node, context))
File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py"
in render_node
  71.             result = node.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader_tags.py" in render
  97.         return compiled_parent.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  178.         return self.nodelist.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  779.                 bits.append(self.render_node(node, context))
File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py"
in render_node
  71.             result = node.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader_tags.py" in render
  24.         result = self.nodelist.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  779.                 bits.append(self.render_node(node, context))
File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py"
in render_node
  71.             result = node.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader_tags.py" in render
  24.         result = self.nodelist.render(context)
File "/usr/local/lib/python2.6/dist-packages/django/template/
__init__.py" in render
  779.                 bits.append(self.render_node(node, context))
File "/usr/local/lib/python2.6/dist-packages/django/template/debug.py"
in render_node
  81.             raise wrapped

Exception Type: TemplateSyntaxError at /admin/blah/blah/
Exception Value: Caught an exception while rendering: unsupported
format character 'S' (0x53) at index 1

Any help would be greatly appreciated

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to