Permalink
Browse files

Patch our reverse for Django's

  • Loading branch information...
davedash committed Sep 20, 2011
1 parent c91a30e commit 417040dd0fd3c6265c9f8a2a6353c8b69fad8550
Showing with 7 additions and 0 deletions.
  1. +7 −0 funfactory/manage.py
View
@@ -109,6 +109,13 @@ def setup_environ(manage_file, settings=None):
import djcelery
djcelery.setup_loader()
+ # Monkeypatch our url resolver
+ if ('funfactory.middleware.LocaleURLMiddleware' in
+ settings.MIDDLEWARE_CLASSES):
+ from funfactory.urlresolvers import reverse
+ from django.core import urlresolvers
+ urlresolvers.reverse = reverse
+
def _not_setup():
raise EnvironmentError(

1 comment on commit 417040d

@kumar303

This comment has been minimized.

Show comment Hide comment
@kumar303

kumar303 Sep 20, 2011

Member

R-. This completely obscures all traceability of code execution. Isn't it enough to import funfactory.urlresolvers directly in all views? If there is a 3rd party lib that creates a lot of redirects, can we just patch that one lib or use a wrapper to fix it?

Member

kumar303 commented on 417040d Sep 20, 2011

R-. This completely obscures all traceability of code execution. Isn't it enough to import funfactory.urlresolvers directly in all views? If there is a 3rd party lib that creates a lot of redirects, can we just patch that one lib or use a wrapper to fix it?

Please sign in to comment.