django-rosetta

Cannot access rosetta

筅森魡賤 提交于 2020-01-06 06:08:05
问题 Versions: Python 3.5.1 Django 1.10 django-rosetta 0.7.13 The installation guide tells you to add the following to your project's settings.py : from django.conf import settings if 'rosetta' in settings.INSTALLED_APPS: urlpatterns += patterns('', url(r'^rosetta/', include('rosetta.urls')), ) However, this just results in an error: NameError: name 'patterns' is not defined 回答1: Searching for that problem reveals that one apparently has to import it: from django.conf.urls import patterns But

Cannot access rosetta

こ雲淡風輕ζ 提交于 2020-01-06 06:08:02
问题 Versions: Python 3.5.1 Django 1.10 django-rosetta 0.7.13 The installation guide tells you to add the following to your project's settings.py : from django.conf import settings if 'rosetta' in settings.INSTALLED_APPS: urlpatterns += patterns('', url(r'^rosetta/', include('rosetta.urls')), ) However, this just results in an error: NameError: name 'patterns' is not defined 回答1: Searching for that problem reveals that one apparently has to import it: from django.conf.urls import patterns But

Django CMS and Rosetta: Can't get template messages translated

萝らか妹 提交于 2019-12-13 16:52:32
问题 Is there any know issue about using Django CMS and Django Rosetta together. I cant get the "static" template messages translated although it appears correctly translated in the Rosetta interface. All the dynamic content is correctly translated. Only the one I´ve set up around the `{% trans 'blabla' %} does not work. 回答1: Gotcha! Just add in settings.py LOCALE_PATHS = (BASE_DIR + "/locale/",) It worked for me. 来源: https://stackoverflow.com/questions/24439031/django-cms-and-rosetta-cant-get