alviandk / django-crm

Automatically exported from code.google.com/p/django-crm
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Not Compatible with Django 1.2 - Patch attached #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
The following fails when running on Django 1.2:
1. ImportError when trying to import email_re
2. CSRF failure when trying to login

email_re ImportError is because email_re was moved in Django 1.2
(http://code.djangoproject.com/ticket/12516)

CSRF failure is due to changes in the CSRF middleware - really only that it
is now enabled by default. All forms which POST data must include a {%
csrf_token %} tag.

Patch attached which resolves the email_re import by trying to import from
the old location, and then trying the new location on ImportError. Patch
adds a {% csrf_token %} only to the login form. Other forms seemed to work
on my install without the token, but login did not work without the tag.

Original issue reported on code.google.com by lawlor.chris on 31 May 2010 at 3:52

Attachments: