I noticed that some of my urlpatterns have attributes different from the others. Notably _urlconf_module
and _urlconf_name
are missing. I have been getting a ton of AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'
errors in production and this seems to be the only clue I got.
Does anyone know why the attributes of the urlconf are different and if that is an issue how could one fix it?
One set of urls of the form url(r'^accounts/register/$', RegistrationView.as_view(), name='registration_register'),
has these attributes
{'_callback': <function app1.views.RegistrationView>,
'_regex': '^accounts/register/$',
'_regex_dict': {'en-us': re.compile(r'^accounts/register/$', re.UNICODE)},
'default_args': {},
'name': 'registration_register'}
and the other of the form (r'^activation/', include('activation.urls'))
has these
{'_app_dict': {},
'_namespace_dict': {},
'_regex': '^activation/',
'_regex_dict': {'en-us': re.compile(r'^activation/', re.UNICODE)},
'_reverse_dict': {},
'_urlconf_module': <module 'activation.urls' from '<path to app2>/activation/urls.pyc'>,
'app_name': None,
'callback': None,
'default_kwargs': {},
'namespace': None,
'urlconf_name': <module 'activation.urls' from '<path to app2>/activation/urls.pyc'>}
Note that I had upgraded to django-registration-1.0
when the errors started happening which requires me to use class based view and might be one of the underlying reasons.