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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:40:43+00:00 2026-05-23T17:40:43+00:00

When I add the following to my site.urls.py file #haystack search url(r’^search/’, include(‘haystack.urls’)), I

  • 0

When I add the following to my site.urls.py file

#haystack search
url(r'^search/', include('haystack.urls')),

I get this error

Caught ImportError while rendering: No module named urls

here

a href="{% url django.contrib.auth.views.logout %}">Logout</a>

or at the first location of the {% url %} tag, when I comment out the haystack url part, the site works fine.

I’m using python2.7, django1.3, and haystack 1.2.4

What am I doing wrong?

Edit: I tried the same setup on a template file without {% urls %} but still get the No module named urls error. I used easy_install django-haystack, added it to my installed_apps, create a HAYSTACK_SITECONF file and its path in settings.py, why is there no urls for haystack?

Thanks!

No sure what happened but I had to go the the python2.7 folder and rm -rf the haystack folders and pip install them again… and it worked… 😐

  • 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-23T17:40:43+00:00Added an answer on May 23, 2026 at 5:40 pm

    Ignore the template code and look at the traceback. I’ve had a few problems where it shows me template code but the error was actually being caused by python code (that you can find in the traceback).

    Ensure that haystack is a valid package in your Python path:

    Comment out the one line that is problematic and diagnose by creating a new view function:

    import sys
    # ...
    def get_sys_path(request):
        return HttpResponse(str(sys.path))
    

    Add this to your urls.py and access it. Ensure that you can see the haystack directory in one of the paths in sys.path (i.e. the output). If you don’t see it, you’ve probably not installed haystack properly.

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

Sidebar

Related Questions

I am trying to add the following code work in a php file but
I am using the following to automatically add tags to any detected URL in
After adding the following .htaccess file to my site I noticed that forms had
I want to make custom urls for my site for example I want url
On the following site: http://htaccess.madewithlove.be/ fill the request url with: http://localhost/prefix/games/u_id/game-name Put this in
I've been trying to make friendly urls for my site and have the following
I have the following URLs for my ASP.Net MVC 2 site: http://localhost:1919/TimeEntry/SummaryForWeek/15/2011 http://localhost:1919/TimeEntry/SummaryForMonth/4/2011 Both
I am passing one of the following URLs to a site an want it
Starting with the following array (of hashes): [ {:name=>site a, :url=>http://example.org/site/1/}, {:name=>site b, :url=>http://example.org/site/2/},
I would like to add the following MIME type to a site run by

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.