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

  • Home
  • SEARCH
  • 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 502963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:20:45+00:00 2026-05-13T06:20:45+00:00

My Django app started breaking all of a sudden and I cannot understand why.

  • 0

My Django app started breaking all of a sudden and I cannot understand why. I can’t even get it to run now. I’m running revision 11798.

When I use the stand-alone server to test my app, it suddenly started not importing csrf. I previously had it working perfectly. I tried to see what was up by using the shell and here was the result:

$ ./manage.py shell
Python 2.6.3 (r263:75184, Oct  2 2009, 07:56:03) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
>>> import django
>>> from django import middleware
>>> from django.middleware import csrf
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: cannot import name csrf
>>>

I checked the filesystem to see if the file was there and it was (and intact). I am horribly confused. Can anyone help me out?

The Django error follows:

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/servers/basehttp.py", line 279, in run
    self.result = application(self.environ, self.start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/servers/basehttp.py", line 651, in __call__
    return self.application(environ, start_response)

  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/handlers/wsgi.py", line 230, in __call__
    self.load_middleware()

  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/core/handlers/base.py", line 42, in load_middleware
    raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)

ImproperlyConfigured: Error importing middleware django.middleware.csrf: "No module named csrf"
  • 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-13T06:20:45+00:00Added an answer on May 13, 2026 at 6:20 am

    Do you have more than one copy of Django in your python path? Make sure you don’t have any old installs laying around.

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

Sidebar

Related Questions

I'm running a Django app using FastCGI and lighttpd. Can somebody explain me what
I'm trying to get started with EC2 running a django site on a micro-linux
Is there a good Django app out there that can take a list of
I have configured my Django app to run under Apache+FastCGI on Linux (Ubuntu, if
I have a django app which basically is just a photo album. Right now
Guys, I Started playing with django-nonrel, and am trying to run my old django
I am running cherokee to serve a django app using uwsgi. I have been
Am building an app using Django as my workhorse. All has been well so
I have created a django app. Now i want to test the application's performance
I'm trying to create a Django app where the user can make a list

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.