willhardy/django-seo — pull request #47 by arpitremarkable (2014-10-21 11:05:44+00:00)
Title: Fixes #36. Unable to use nested namespacing while using metadata for vie...

...ws

Fixes #36. Unable to use namespacing in view names.

Traceback (most recent call last):
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 102, in inner_run
self.validate(display_num_errors=True)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/management/validation.py", line 34, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/db/models/loading.py", line 196, in get_app_errors
self._populate()
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/db/models/loading.py", line 75, in _populate
self.load_app(app_name, True)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/db/models/loading.py", line 99, in load_app
models = import_module('%s.models' % app_name)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/debug_toolbar/models.py", line 9, in
dt_settings.patch_all()
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/debug_toolbar/settings.py", line 215, in patch_all
patch_root_urlconf()
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/debug_toolbar/settings.py", line 203, in patch_root_urlconf
reverse('djdt:render_panel')
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 507, in reverse
app_list = resolver.app_dict[ns]
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 329, in app_dict
self._populate()
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 267, in _populate
for pattern in reversed(self.url_patterns):
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 365, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/Users/arpit/Documents/workplace/glitstreet/glitstreet/urls.py", line 13, in
register_seo_admin(admin.site, MyMetadata)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/src/django-seo-master/rollyourown/seo/admin.py", line 66, in register_seo_admin
class ViewAdmin(view_admin):
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/src/django-seo-master/rollyourown/seo/admin.py", line 67, in ViewAdmin
form = get_view_form(metadata_class)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/src/django-seo-master/rollyourown/seo/admin.py", line 170, in get_view_form
view_choices = [(key, " ".join(key.split("_"))) for key in get_seo_views(metadata_class)]
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/src/django-seo-master/rollyourown/seo/systemviews.py", line 5, in get_seo_views
return get_view_names(metadata_class._meta.seo_views)
File "/Users/arpit/Documents/workplace/glitstreet/.virtualenv/src/django-seo-master/rollyourown/seo/systemviews.py", line 35, in get_view_names
if url.name:
AttributeError: 'RegexURLResolver' object has no attribute 'name'