On 9/30/2010 9:50 AM, bobbymanuel wrote: > Hi all - i've got a mysterious problem with my admin templates and I > think its a version problem but can't figure it out. > > The contrib.admin templates seem to be throwing some very crazy > TemplateSyntaxError(s) in many of the admin templates when i moved my > app to my production environment. I'm thinking this must be some kind > of version problem so I removed django completely and reinstalled the > production version and still have the same problems. Now, the same > exact project works perfectly on my development server, but the > service[debian/lighttpd/fcgi] that I set up for production displays > these issues - oddly enough when I first installed it, before taking > the project live, it seemed to work. I'm using the exact same path to > template loaders in production/dev. > > Anyone have any ideas what's going on? Has anyone else experienced > this problem? > > Here are 2 examples of errors being thrown: > --------------------------------------------------------------- > > TemplateSyntaxError at /admin/ > In template /usr/lib/python2.5/site-packages/django/contrib/admin/ > templates/admin/base.html, error at line 31 > Caught SyntaxError while rendering: invalid syntax (views.py, line 52) > 21 <!-- Header --> > 22 <div id="header"> > 23 <div id="branding"> > 24 {% block branding %}{% endblock %} > 25 </div> > 26 {% if user.is_active and user.is_staff %} > 27 <div id="user-tools"> > 28 {% trans 'Welcome,' %} > 29 <strong>{% filter force_escape %}{% firstof > user.first_name user.username %}{% endfilter %}</strong>. > 30 {% block userlinks %} > 31 {% url django-admindocs-docroot as docsroot %} > 32 {% if docsroot %} > 33 <a href="{{ docsroot }}">{% trans > 'Documentation' %}</a> / > 34 {% endif %} > 35 {% url admin:password_change as password_change_url > %} > 36 {% if password_change_url %} > 37 <a href="{{ password_change_url }}"> > > and > > TemplateSyntaxError at /admin/auth/group/add/ > In template /usr/lib/python2.5/site-packages/django/contrib/admin/ > templates/admin/includes/fieldset.html, error at line 18 > Caught SyntaxError while rendering: invalid syntax (views.py, line 52) > 8 {{ line.errors }} > 9 {% for field in line %} > 10 <div{% if not line.fields|length_is:"1" %} > class="field-box"{% endif %}> > 11 {% if field.is_checkbox %} > 12 {{ field.field }}{{ field.label_tag }} > 13 {% else %} > 14 {{ field.label_tag }} > 15 {% if field.is_readonly %} > 16 <p>{{ field.contents }}</p> > 17 {% else %} > 18 {{ field.field }} > 19 {% endif %} > 20 {% endif %} >
Is there any possibility that your server is trying to report a 500 error, and that it's actually the 500 template it's complaining about? regards Steve -- DjangoCon US 2010 September 7-9 http://djangocon.us/ -- 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.