You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AttributeError at /djangojs/init.js
'module' object has no attribute 'urlpatterns'
Request Method: GET
Request URL: http://localhost:8000/djangojs/init.js
Django Version: 1.7
Exception Type: AttributeError
Exception Value:
'module' object has no attribute 'urlpatterns'
In order to make it worked, I had to change the _get_urls function in the urls_serializer file.
I test if the module contains an urlpatterns attributes if not I create a new tuple.
Hey Guys,
I'm using Django.js for a lot of my personal project. It's a great package and thanks for this amazing work !
On the new django's version (it seems to be fine until 1.7), I've got this error when I try to load the init.js file:
In order to make it worked, I had to change the _get_urls function in the urls_serializer file.
I test if the module contains an urlpatterns attributes if not I create a new tuple.
It's probably not the best solution but so far it works.
And I don't know if it's important but the module that causes this error is the one detailled below (seems to be related to a string python module)
:
['add', 'class', 'contains', 'delattr', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getitem', 'getnewargs', 'getslice', 'gt', 'hash', 'init', 'le', 'len', 'lt', 'mod', 'mul', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'rmod', 'rmul', 'setattr', 'sizeof', 'str', 'subclasshook', '_formatter_field_name_split', '_formatter_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
The text was updated successfully, but these errors were encountered: