alejandro-zapeta / django-rosetta

Automatically exported from code.google.com/p/django-rosetta
MIT License
0 stars 0 forks source link

Disabling Rosetta in settings.py #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice if Rosetta could be disabled through a flag in settings.py, 
which can be customised for different deployments. The flag can be checked in 
urls.py, so rosetta URLs would return 404 instead.

Original issue reported on code.google.com by alass...@gmail.com on 13 Dec 2010 at 4:58

GoogleCodeExporter commented 8 years ago
This could be easily implemented without touching Rosetta itself, or am I 
missing something?

Original comment by mbonetti on 10 Jan 2011 at 2:54

GoogleCodeExporter commented 8 years ago
Kind of, yes. But note that to disable an app you have to modify at least both 
settings.py and urls.py, which adds to complexity when deploying. To avoid 
maintaining another file that is different across sites, we want a check in 
urls.py based on some flag in settings.py. We felt that the second check should 
be in Rosetta's urls.py, rather than the project-wide one.

One way might be to test whether "rosetta" is in settings.INSTALLED_APPS 
(instead of using a separate flag).

Original comment by alass...@gmail.com on 10 Jan 2011 at 4:35