Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36. Unable to use nested namespacing while using metadata for vie... #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arpitremarkable
Copy link

...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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use namespacing in view names
1 participant