I don't see an obvious problem with your urls.py file. Have you tried checking that you're not mixing tabs and spaces in that file's whitespace?
Brett On 1/6/12 8:48 AM, "MikeKJ" <mike.jo...@paston.co.uk> wrote: >This is probably an oldie and I remember coming across it before but >damned if I remember the solution: > >upgrading an old django site.................... > >Request Method: GET >Request URL: > http://nortonsdairy.paston2.webfactional.com/admin/products/item/ >Django Version: 1.3.1 >Exception Type: TemplateSyntaxError >Exception Value: > >Caught SyntaxError while rendering: invalid syntax (urls.py, line 7) > >Exception Location: /home/paston2/webapps/nortons/lib/python2.7/ >django/utils/importlib.py in import_module, line 35 >Python Executable: /usr/local/bin/python >Python Version: 2.7.1 >Python Path: > >['/home/paston2/webapps/nortons', > '/home/paston2/webapps/nortons/nortons', > '/home/paston2/webapps/nortons/nortons/paston_stuff', > '/home/paston2/webapps/nortons/lib/python2.7', > '/home/paston2/webapps/nortons', > '/home/paston2/webapps/nortons/lib/python2.7', > '/usr/local/lib/python27.zip', > '/usr/local/lib/python2.7', > '/usr/local/lib/python2.7/plat-linux2', > '/usr/local/lib/python2.7/lib-tk', > '/usr/local/lib/python2.7/lib-old', > '/usr/local/lib/python2.7/lib-dynload', > '/usr/local/lib/python2.7/site-packages', > '/usr/local/lib/python2.7/site-packages/PIL'] >In template /home/paston2/webapps/nortons/lib/python2.7/django/contrib/ >admin/templates/admin/change_list.html, error at line 11 >Caught SyntaxError while rendering: invalid syntax (urls.py, line 7) >1 {% extends "admin/base_site.html" %} >2 {% load adminmedia admin_list i18n %} >3 {% load url from future %} >4 {% block extrastyle %} >5 {{ block.super }} >6 <link rel="stylesheet" type="text/css" href="{% admin_media_prefix >%}css/changelists.css" /> >7 {% if cl.formset %} >8 <link rel="stylesheet" type="text/css" href="{% admin_media_prefix >%}css/forms.css" /> >9 {% endif %} >10 {% if cl.formset or action_form %} >11 {% url 'admin:jsi18n' as jsi18nurl %} >12 <script type="text/javascript" src="{{ jsi18nurl|default:'../../ >jsi18n/' }}"></script> >13 {% endif %} >14 {{ media.css }} >15 {% if not actions_on_top and not actions_on_bottom %} >16 <style> >17 #changelist table thead th:first-child {width: inherit} >18 </style> >19 {% endif %} >20 {% endblock %} >21 > >urls.py >from django.conf.urls.defaults import * >from django.conf import settings >from django.contrib import admin > >admin.autodiscover() > >urlpatterns = patterns('', > (r'^r/', include('django.conf.urls.shortcut')), # For the 'View on >site' button in the admin > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > (r'^admin/', include(admin.site.urls)), > (r'^account/', include('accounts.urls')), > (r'^order/', include('order.urls')), > (r'^customer/', include('customers.urls')), > (r'^news/', include('news.urls')), > (r'^', include('smartpages.urls')), >) > >any clues please? > >-- >You received this message because you are subscribed to the Google Groups >"Django users" group. >To post to this group, send email to django-users@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. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.