Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1102381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:10:39+00:00 2026-05-17T01:10:39+00:00

I am getting a TemplateSyntaxError, that is only happening on my dev server, but

  • 0

I am getting a TemplateSyntaxError, that is only happening on my dev server, but works fine on the django testing server locally.

Here’s the error

Caught SyntaxError while rendering: invalid syntax (urls.py, line 1)

and the html:

<li><a href="{% url plan.views.profile %}">Plan Details</a></li>

and here is the profile view:

@login_required
def profile(request):
...

here’s the traceback:

Traceback:
File "/django/lib/python2.5/django/core/handlers/base.py" in get_response
  100.                     response = callback(request, *callback_args, **callback_kwargs)
File "/django/lib/python2.5/django/contrib/auth/decorators.py" in _wrapped_view
  25.                 return view_func(request, *args, **kwargs)
File "/django/myapp/plan/views.py" in profile
  121.             }, context_instance=RequestContext(request) )
File "/django/lib/python2.5/django/shortcuts/__init__.py" in render_to_response
  20.     return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "/django/lib/python2.5/django/template/loader.py" in render_to_string
  186.     return t.render(context_instance)
File "/django/lib/python2.5/django/template/__init__.py" in render
  173.             return self._render(context)
File "/django/lib/python2.5/django/template/__init__.py" in _render
  167.         return self.nodelist.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  796.                 bits.append(self.render_node(node, context))
File "/django/lib/python2.5/django/template/debug.py" in render_node
  72.             result = node.render(context)
File "/django/lib/python2.5/django/template/loader_tags.py" in render
  125.         return compiled_parent._render(context)
File "/django/lib/python2.5/django/template/__init__.py" in _render
  167.         return self.nodelist.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  796.                 bits.append(self.render_node(node, context))
File "/django/lib/python2.5/django/template/debug.py" in render_node
  72.             result = node.render(context)
File "/django/lib/python2.5/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  796.                 bits.append(self.render_node(node, context))
File "/django/lib/python2.5/django/template/debug.py" in render_node
  72.             result = node.render(context)
File "/django/lib/python2.5/django/template/loader_tags.py" in render
  139.             return self.template.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  173.             return self._render(context)
File "/django/lib/python2.5/django/template/__init__.py" in _render
  167.         return self.nodelist.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  796.                 bits.append(self.render_node(node, context))
File "/django/lib/python2.5/django/template/debug.py" in render_node
  72.             result = node.render(context)
File "/django/lib/python2.5/django/template/defaulttags.py" in render
  253.             return self.nodelist_false.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  796.                 bits.append(self.render_node(node, context))
File "/django/lib/python2.5/django/template/debug.py" in render_node
  72.             result = node.render(context)
File "/django/lib/python2.5/django/template/defaulttags.py" in render
  253.             return self.nodelist_false.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  796.                 bits.append(self.render_node(node, context))
File "/django/lib/python2.5/django/template/debug.py" in render_node
  72.             result = node.render(context)
File "/django/lib/python2.5/django/template/defaulttags.py" in render
  251.             return self.nodelist_true.render(context)
File "/django/lib/python2.5/django/template/__init__.py" in render
  796.                 bits.append(self.render_node(node, context))
File "/django/lib/python2.5/django/template/debug.py" in render_node
  72.             result = node.render(context)
File "/django/lib/python2.5/django/template/defaulttags.py" in render
  366.             url = reverse(self.view_name, args=args, kwargs=kwargs, current_app=context.current_app)
File "/django/lib/python2.5/django/core/urlresolvers.py" in reverse
  350.             *args, **kwargs)))
File "/django/lib/python2.5/django/core/urlresolvers.py" in reverse
  271.         possibilities = self.reverse_dict.getlist(lookup_view)
File "/django/lib/python2.5/django/core/urlresolvers.py" in _get_reverse_dict
  193.             self._populate()
File "/django/lib/python2.5/django/core/urlresolvers.py" in _populate
  173.                     for name in pattern.reverse_dict:
File "/django/lib/python2.5/django/core/urlresolvers.py" in _get_reverse_dict
  193.             self._populate()
File "/django/lib/python2.5/django/core/urlresolvers.py" in _populate
  162.         for pattern in reversed(self.url_patterns):
File "/django/lib/python2.5/django/core/urlresolvers.py" in _get_url_patterns
  243.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/django/lib/python2.5/django/core/urlresolvers.py" in _get_urlconf_module
  238.             self._urlconf_module = import_module(self.urlconf_name)
File "/django/lib/python2.5/django/utils/importlib.py" in import_module
  35.     __import__(name)

I’ve check my urls.py file and it is fine. The first line is:

from django.conf.urls.defaults import *
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:10:40+00:00Added an answer on May 17, 2026 at 1:10 am

    In your urls.py use named urls via url function ie.

    urlpatterns = patterns('your_app.views',
        url(r'^somehiing/$', 'your_view_function', name='my_view'),
    )
    

    Then in your template use {% url my_view %}.

    If it will not help, paste here your urls.py – maybe it’s just some tiny syntax error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting a TemplateSyntaxError, that is only happening on my dev server, but
I'm getting a strange error that only occurs on the live server. My Django
Getting this. Site works fine locally, but up on production server I get this
I keep getting this error when using django templates in Google App Engine: TemplateSyntaxError:
Getting started with Django 1.3 here. Loving the system so far, but struggling on
Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:
Getting Invalid Application Path error. Here are the steps I've taken. Right click on
Getting this error when I follow the simple code example from jsoncpp, that basically
Getting an error is usually unpleasant, but sometimes it is also unpleasant when you
Getting the following error, which I understand and have seen before. But one thing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.