No csrf module

I have: Python 2.6 Django 1.1.1 I downloaded Django-cms from git: //github.com/digi604/django-cms-2.0.git I went south / to

I stuck with this:

After turning southback syncdb on:

Synced: > django.contrib.auth > django.contrib.contenttypes > django.contrib.sessions > django.contrib.admin > django.contrib.sites > publisher > mptt > reversion > example.categories > south > example.sampleapp Not synced (use migrations): - cms - cms.plugins.text - cms.plugins.picture - cms.plugins.file - cms.plugins.flash - cms.plugins.link - cms.plugins.snippet - cms.plugins.googlemap - cms.plugins.teaser - cms.plugins.video - cms.plugins.twitter - cms.plugins.inherit (use ./manage.py migrate to migrate these) 

starterver returns (when I open 127.0.0.1:8000 in a browser):

 Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py", line 279, in run self.result = application(self.environ, self.start_response) File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py", line 651, in __call__ return self.application(environ, start_response) File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py", line 230, in __call__ self.load_middleware() File "/usr/lib/pymodules/python2.6/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" [25/Feb/2010 05:49:43] "GET / HTTP/1.1" 500 746 

When I commented out the lines:

 #'django.middleware.csrf.CsrfViewMiddleware', - in MIDDLEWARE_CLASSES #'django.core.context_processors.csrf', - in TEMPLATE_CONTEXT_PROCESSORS 

I can start it now, but when I try to add a page, I see:

 Template error In template /home/gennadich/Documents/django-cms-2.0/cms/templates/admin/cms/page/change_form.html, error at line 97 Invalid block tag: 'csrf_token' 
+4
source share
3 answers

Now that you have disabled CSRF modules, you no longer have CSRF tags available. Either enable CSRF modules, or remove all CSRF tags.

+3
source

disable south or try postgresql. I ended up disconnecting south since I was just messing around with my dev machine

[EDIT]

this also worked on the last pinax bus (March 22, 2010)

[EDIT]

Try also to update the latest version of django, at this time 1.2 beta p>

+1
source

It seems that the standard and correct procedure has not yet been discovered for the new people of the django + django-cms project. I try in the morning of 9. It’s 7:30 in the evening.

0
source

Source: https://habr.com/ru/post/1302473/


All Articles