ImproperlyConfigured: Error importing middleware django.middleware.csrf: "No module named csrf"

View: New views
2 Messages — Rating Filter:   Alert me  

ImproperlyConfigured: Error importing middleware django.middleware.csrf: "No module named csrf"

by vl4dt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I get this output from a newly created project with the latest trunk:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Traceback (most recent call last):

  File "E:\Python26\lib\site-packages\django\core\servers
\basehttp.py", line 279, in run
    self.result = application(self.environ, self.start_response)

  File "E:\Python26\lib\site-packages\django\core\servers
\basehttp.py", line 651, in __call__
    return self.application(environ, start_response)

  File "E:\Python26\lib\site-packages\django\core\handlers\wsgi.py",
line 230, in __call__
    self.load_middleware()

  File "E:\Python26\lib\site-packages\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"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

Any suggestions? I suspect the python path is missing something, also
the server stops responding, just sits there and no further requests
are served.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-developers@...
To unsubscribe from this group, send email to django-developers+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: ImproperlyConfigured: Error importing middleware django.middleware.csrf: "No module named csrf"

by Luke Plant-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Saturday 31 October 2009 01:04:09 vl4dt wrote:
> I get this output from a newly created project with the latest
>  trunk:
>
 <snip>
>
> Any suggestions? I suspect the python path is missing something,
>  also the server stops responding, just sits there and no further
>  requests are served.

I started a new project in the normal way, and it works fine for me.  
It sounds like you've configured something wrong, or you're not
actually looking at latest trunk. Maybe your command to start the
project used a 'django-admin.py' that was from trunk, but when running
the server it's looking at different Python sources.

Luke

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-developers@...
To unsubscribe from this group, send email to django-developers+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---