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 8599111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:19:13+00:00 2026-06-12T01:19:13+00:00

Seeing the following syntax error, but the urls.py file seems to be correct. What

  • 0

Seeing the following syntax error, but the urls.py file seems to be correct. What am I missing?

SyntaxError at /admin/
invalid syntax (urls.py, line 6)
Request Method: GET
Request URL:    http://127.0.0.1:8000/admin/
Django Version: 1.4.1
Exception Type: SyntaxError
Exception Value:    
invalid syntax (urls.py, line 6)
Exception Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 35
Python Executable:  /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.7.2

Here’s the urls.py:

from django.conf.urls.defaults import *
from events import views

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^events/', include('events.urls')),
    (r'^admin/', include(admin.site.root)),
)

…

from django.conf.urls.defaults import *
from events import views

urlpatterns = patterns('',
    url(r'^create/$', views.create, name='ev_create')
    url(r'^tonight/$', views.tonight, name='ev_tonight'),   
)
  • 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-06-12T01:19:15+00:00Added an answer on June 12, 2026 at 1:19 am

    You are missing a comma:

    urlpatterns = patterns('',
        url(r'^create/$', views.create, name='ev_create')     # <-- comma missing
        url(r'^tonight/$', views.tonight, name='ev_tonight'),   
    )
    

    Note that this is on line 5 of your urls.py module, but Python could only discover this on line 6 when it encountered something that doesn’t fit after your url(...) call.

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

Sidebar

Related Questions

I'm getting a syntax error on the following query: SELECT 1,2 WHERE 1=1 But
We are seeing the following error when trying to perform a command-line svn merge
I'm very infrequently seeing the following error logged on a website I manage: Arguments
I am seeing the following in my trace file: Bind#3 oacdty=01 mxl=128(35) mxlc=36 mal=00
I have created a new rails3 project but I am seeing following logs many
I am seeing the following error when trying to search using Lucene. (version 1.4.3).
I am seeing the following error in the event log. It is coming from
I keep seeing the following syntax when looking at C# code (using .NET 4.0
I'm seeing the following error with my Fluent NHibernate map: NHibernate.MappingException: Association references unmapped
I'm seeing the following error when trying to upload a photo for cropping on

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.