Don't recommend putting important code in #9

merged 1 commit into from Feb 10, 2012


None yet

2 participants

Mozilla member

Currently the django-session-csrf README recommends putting the monkeypatch code in Placing code that your project relies on to function in is an anti-pattern, as there is no reason to believe that will ever be executed in a production deployment of a Django app; in many common deployment setups it is not.

Fortunately there is a simple and equally functional alternative; if the monkeypatch is done in the root before the url patterns are declared, it will still take effect before views are imported. This pull request recommends that instead.

@jbalogh jbalogh merged commit 94e2858 into mozilla:master Feb 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment