Reputation: 2026
Upon accessing the test server/weblog/
url on localhost
, in an environment with "latest everything stable" (python 2.7, django 1.4.1, apache 2.2.22) I'm getting:
NoReverseMatch at /weblog/
Reverse for 'zinnia_entry_add' with arguments '()' and keyword arguments '{}' not found.
Request Method: GET
Request URL: http://127.0.0.1/weblog/
Django Version: 1.4.1
Exception Type: NoReverseMatch
Exception Value:
Reverse for 'zinnia_entry_add' with arguments '()' and keyword arguments '{}' not found.
Exception Location: /usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py in render, line 424
Python Executable: /usr/bin/python
Python Version: 2.7.3
Excerpt from settings.py
:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.admindocs',
'django.contrib.messages',
'django.contrib.comments',
'image_labeler',
'tagging',
'mptt',
'zinnia',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.i18n',
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.core.context_processors.static',
'zinnia.context_processors.version',
)
and from urls.py
:
urlpatterns = patterns('',
# Example:
# (r'^lastpixel/', include('lastpixel.foo.urls')),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^weblog/', include('zinnia.urls')),
(r'^comments/', include('django.contrib.comments.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^$', views.Index),
(r'^login/?$', views.Login),
(r'^logout/?$', views.Logout),
(r'^register/?$', views.Register),
(r'^i$', include('image_labeler.urls')),
(r'^i/', include('image_labeler.urls')),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/lastpixel/web/media', 'show_indexes': True}),
(r'^.*$', views.Index),
)
The application works otherwise (withouth the zinnia blog). Any idea what I might be doing wrong? Much appreciated!
Upvotes: 2
Views: 843
Reputation: 8103
It is likely that it is a namespace problem. In your error page, do you see the inline error highlight something that looks like {% block 'zinnia:zinnia_entry_add' %}
? This is part of the zinnia
name space, indicated by the zinnia:
part of that definition. If you see something like this, you likely just need to add the correct namespace to your URLs:
urlpatterns = patterns('',
#.....
(r'^weblog/', include('zinnia.urls', namespace="zinnia")),
#.....
)
Upvotes: 2
Reputation: 627
I had a similar problem after updating zinnia. This helped me out, although I didn't expect a solution in mysql:
First, edit /etc/my.conf
[client]
default-character-set=utf8
[mysqld]
default-character-set = utf8
skip-character-set-client-handshake
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = SET NAMES utf8
Second, restart mysql
Taken from: zinnia on github
Upvotes: 2