nimbis / cmsplugin-newsplus

An improved version of cmsplugin-news
BSD 2-Clause "Simplified" License
5 stars 10 forks source link

NoReverseMatch #2

Closed viatoriche closed 10 years ago

viatoriche commented 10 years ago

Environment:

Request Method: GET Request URL: http://127.0.0.1:8000/ru/admin/r/50/1/

Django Version: 1.6.5 Python Version: 2.7.6 Installed Applications: ('djangocms_admin_style', 'djangocms_text_ckeditor', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'django.contrib.sitemaps', 'django.contrib.staticfiles', 'django.contrib.messages', 'cms', 'mptt', 'menus', 'south', 'sekizai', 'djangocms_style', 'djangocms_column', 'djangocms_file', 'djangocms_flash', 'djangocms_googlemap', 'djangocms_inherit', 'djangocms_link', 'djangocms_picture', 'djangocms_teaser', 'djangocms_video', 'reversion', 'web', 'aldryn_blog', 'aldryn_common', 'django_select2', 'djangocms_text_ckeditor', 'easy_thumbnails', 'filer', 'taggit', 'cmsplugin_newsplus') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.toolbar.ToolbarMiddleware', 'cms.middleware.language.LanguageCookieMiddleware')

Traceback: File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1. response = wrapped_callback(request, _callback_args, *_callback_kwargs) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/contrib/admin/sites.py" in wrapper
  2. return self.admin_view(view, cacheable)(_args, *_kwargs) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  3. response = view_func(request, _args, *_kwargs) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4. response = view_func(request, _args, *_kwargs) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  5. return view(request, _args, *_kwargs) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/contrib/contenttypes/views.py" in shortcut
  6. absurl = get_absolute_url() File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/utils/functional.py" in _curried
  7. return _curriedfunc((args + moreargs), *_dict(kwargs, **morekwargs)) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/db/models/base.py" in get_absolute_url
  8. return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.model_name), func)(self, _args, *_kwargs) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/cmsplugin_newsplus/models.py" in get_absolute_url
  9. 'slug': self.slug}) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse
  10. return iri_to_uri(resolver._reverse_with_prefix(view, prefix, _args, *_kwargs)) File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/core/urlresolvers.py" in _reverse_with_prefix
  11. (lookup_view_s, args, kwargs, len(patterns), patterns))

Exception Type: NoReverseMatch at /ru/admin/r/50/1/ Exception Value: Reverse for 'news_detail' with arguments '()' and keyword arguments '{'year': '2014', 'slug': u'news', 'day': '03', 'month': '07'}' not found. 0 pattern(s) tried: []

ericamador commented 10 years ago

Please add the following to your urls.py: url(r'^news/', include('cmsplugin_newsplus.urls')),

I just realized that this step is missing from the README, I'm going to add it right now. Thanks for raising this issue and let me know if you have any more problems.

viatoriche commented 10 years ago

Thx. It's works! Solved.