Here's what ended for me:
js_info_dict = { 'domain': 'django', 'packages': None, } urlpatterns = [ url(r'^jsi18n/$', javascript_catalog, js_info_dict, name='javascript-catalog'),
Still not working? Troubleshooting Tips:
I donβt know why this works, but I can tell you how I learned how to make it work. If you use the same troubleshooting method, you may also find a way. I used a Python debugger, for example:
def javascript_catalog_pdb(*args, **kwargs): import pdb pdb.set_trace() return javascript_catalog(*args, **kwargs) url_patterns = [ url(r'^jsi18n/$', javascript_catalog_pdb, js_info_dict, name='javascript-catalog'), ... ]
Then, using PDB, I entered javascript_catalog until I got to the line:
catalog, plural = get_javascript_catalog(locale, domain, packages)
Then I experimented with different values ββfor domain and packages , right there in the debugger, until I found the values ββI needed.
Flimm
source share