interesting idea - but unfortunately, not it. i actually made a copy of admin.contrib.templates and fixed the syntax that its complaining about, and it starts working. it doesn't like the following syntax : {% url name1 as name2 %} - found in 6 places in admin.contrib.templates it also doesn't like {{ field.field }} - found all over the place ;) if i remove those lines, ... presto magic... it works! ;(
also - tested it with manage.py runserver and it produces the same errors. i'm wondering if it could have anything to do with 1: Windows EOL characters in my settings file. or 2: latin character encoding in MySql pretty much grasping at straws now. let me know if you think of anything else. Thx, B On Sep 30, 11:05 am, Steve Holden <holden...@gmail.com> wrote: > 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-9http://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.