'zinnia

I am working on Django 1.8. I want to work with Django-blog-zinnia. I have installed zinnia, changed my setting.py file and have added links in urls.py of project. when I tried to access zinnia using weblog as per mentioned on Installation site

weblog

I got an error

'zinnia_loop_template' received too many positional arguments

I am new to it. Kindly tell me how to resolve this

This is my setting.py file """

Django settings for newproject project.

Generated by 'django-admin startproject' using Django 1.8.

For more information on this file, see

For the full list of settings and their values, see

Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath( file )))

SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'f7p-j96!04oy!5wbuf&=g8vkm9deupxw9ywjq)+ef8wfjy=5s('

SECURITY WARNING: don't run with debug turned on in production! DEBUG = True

ALLOWED_HOSTS = []

Application definition

INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_comments', 'mptt', 'tagging', 'zinnia', )

MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', )

ROOT_URLCONF = 'newproject.urls'

TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.i18n', 'django.template.context_processors.request', 'django.contrib.messages.context_processors.messages', 'zinnia.context_processors.version', # Optional ] } } ]

SITE_ID = 1

WSGI_APPLICATION = 'newproject.wsgi.application'

DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

STATIC_URL = '/static/'

This is my urls.py file

from django.conf.urls import include, url from django.contrib import admin

urlpatterns = [     
    url(r'^admin/', include(admin.site.urls)),
    url(r'^weblog/', include('zinnia.urls')),
  url(r'^comments/', include('django_comments.urls')),
]

i also have this failure in django-blog-zinnia 0.17 with django 1.8 . i assume, it's a bug, because it works with django-blog-zinnia 0.16;

pip install django-blog-zinnia==0.16

maybe it's because of the compatibility of django 1.9 since zinnia 0.17 - because i like to stay on django 1.8 for other website-parts, i just downgrade zinnia to 0.16 and it's ok for me, hope it helps you too.

链接地址: http://www.djcxy.com/p/62016.html

上一篇: RavenDB糟糕的选择表现

下一篇: “百日草