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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:29:22+00:00 2026-05-29T11:29:22+00:00

Situation in short. For some reason reverse() method does not work. in PROJECT urls.py

  • 0

Situation in short. For some reason reverse() method does not work.

in PROJECT urls.py

url(r'^enrollment/', include('project.enrollment.urls')),

in APP urls.py

url(r'^thanks/$', 'enrollment.views.thanks', name='enroll_thanks'),

and in views.py

from django.core.urlresolvers import reverse
def thanks(request):
    return render_to_response('enrollment/thanks.html', {}, context_instance=RequestContext(request))

def enroll(request):
    ''' some code for handling the form'''
    return HttpResponseRedirect(reverse('enrollment.views.thanks'))

This reverse causes following error:
Could not import project.views. Error was: No module named views

in file ../django/core/urlresolvers.py in _get_callback, line 167

Any idea why this does not work? Next step is to call the thanks-view with a parameter, but that should be easy after this setup works. Should there be something more to be imported in views.py?

  • 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-29T11:29:23+00:00Added an answer on May 29, 2026 at 11:29 am

    From the docs for reverse: “As part of working out which URL names map to which patterns, the reverse() function has to import all of your URLconf files and examine the name of each view. This involves importing each view function. If there are any errors whilst importing any of your view functions, it will cause reverse() to raise an error, even if that view function is not the one you are trying to reverse.”

    Are any of your urls referencing project.views.…?

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

Sidebar

Related Questions

Do T-SQL queries in SQL Server support short-circuiting? For instance, I have a situation
Situation: Site with content protected by username/password (not all controlled since they can be
Situation: I have some persons with certain skills and they can/might belong to more
In my iphone app, I want to provide some sort of app termination handler
For some reason I cannot seem to get IE8 to display my jqgrid right
I'm looking to get some additional performance (FPS) increases on my iPhone App. I'm
I'm having a small web app, which plays really short sound bits on the
The Situation As some of you might already know from my previous questions, I'm
Here is my situation. I am using two java.util.HashMap to store some frequently used
I have the following situation and I'm expecting some expert advise from SO folks.

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.