mozilla / playdoh

PROJECT DEPRECATED (WAS: "Mozilla's Web application base template. Half Django, half awesomeness, half not good at math.")
BSD 3-Clause "New" or "Revised" License
709 stars 107 forks source link

Problem with disabling LocateURLMiddleware #141

Open anantagati opened 12 years ago

anantagati commented 12 years ago

I am trying to disable LocateURLMiddleware, so there will not be added en_US to urls on site when only English is used.

MIDDLEWARE_CLASSES = get_middleware(
    exclude=('funfactory.middleware.LocaleURLMiddleware'),
    append=()
)

As soon as funfactory.middleware.LocaleURLMiddleware is disabled it shows error 'gettext' is undefined:

UndefinedError at /
'gettext' is undefined
Request Method: GET
Request URL:    http://33.33.33.24:8000/
Django Version: 1.4.2
Exception Type: UndefinedError
Exception Value:    
'gettext' is undefined
Exception Location: /home/vagrant/project/vendor/src/tower/tower/template.py in _gettext_alias, line 10
...

What is the right way to disable funfactory.middleware.LocaleURLMiddleware ?