私はDjango 1.9.13とDjangoCMSを使って、比較的シンプルなアプリケーションを構築しています。新しいユーザーをシステムに追加しようとすると、以下のような厄介なエラーが表示されます(DjangoCMSのAldryn People Pluginを使用)。他のエンティティをサイトに追加しようとすると、このエラーが発生します。Django CMSプロジェクトこのようなテーブルはありません:reversion_revision
しかし、このエラーは私が使用している特定のアプリケーションに関連するよりもDjango関連のようです。したがって、私はあなたがどのようにこれを修正できるかについての提案があれば疑問に思います。
何か助けていただければ幸いです。
エラー:
no such table: reversion_revision Request Method: POST Request
URL: http://localhost:8000/admin/aldryn_people/person/add/?language=en-us
Django Version: 1.9.13 Exception Type: OperationalError Exception
Value: no such table: reversion_revision
settings.py
"""
Django settings for XXXXX project.
Generated by 'django-admin startproject' using Django 1.9.13.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ''
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'djangocms_admin_style',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'cms',
'menus',
'treebeard',
'sekizai',
'filer',
'easy_thumbnails',
'mptt',
'djangocms_text_ckeditor',
'djangocms_link',
'djangocms_file',
'djangocms_picture',
'djangocms_video',
'djangocms_googlemap',
'djangocms_snippet',
'djangocms_style',
'djangocms_column',
'aldryn_bootstrap3',
'aldryn_apphooks_config',
'aldryn_categories',
'aldryn_common',
'aldryn_newsblog',
'aldryn_people',
'aldryn_reversion',
'aldryn_translation_tools',
'parler',
'sortedm2m',
'taggit',
]
MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
'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.locale.LocaleMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware',
'cms.middleware.utils.ApphookReloadMiddleware'
]
ROOT_URLCONF = 'XXXXX.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['templates'],
#'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.i18n',
'sekizai.context_processors.sekizai',
'cms.context_processors.cms_settings',
'aldryn_boilerplates.context_processors.boilerplate',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
# important! place right before django.template.loaders.app_directories.Loader
'aldryn_boilerplates.template_loaders.AppDirectoriesLoader',
'django.template.loaders.app_directories.Loader',
]
},
},
]
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
# important - place immediately before AppDirectoriesFinder
'aldryn_boilerplates.staticfile_finders.AppDirectoriesFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
CMS_TEMPLATES = [
('home.html', 'Home page template'),
]
THUMBNAIL_HIGH_RESOLUTION = True
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters'
)
WSGI_APPLICATION = 'XXXXX.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
SITE_ID = 1
LANGUAGES = [
('en-us', 'English'),
]
ALDRYN_BOILERPLATE_NAME = 'bootstrap3'
Requirements.txt
aldryn-apphooks-config==0.3.3
aldryn-boilerplates==0.7.5
aldryn-bootstrap3==1.2.2
aldryn-categories==1.0.4
aldryn-common==1.0.4
aldryn-newsblog==1.3.3
aldryn-people==1.2.2
aldryn-reversion==1.1.0
aldryn-translation-tools==0.2.1
Babel==2.4.0
backport-collections==0.1
dj-database-url==0.4.2
Django==1.9.13
django-appconf==1.0.2
django-appdata==0.1.6
django-classy-tags==0.8.0
django-cms==3.4.3
django-filer==1.2.7
django-formtools==2.0
django-mptt==0.8.7
django-parler==1.7
django-phonenumber-field==1.3.0
django-polymorphic==1.0.2
django-reversion==1.10.2
django-sekizai==0.10.0
django-sortedm2m==1.3.3
django-taggit==0.22.1
django-treebeard==4.1.0
djangocms-admin-style==1.2.7
djangocms-attributes-field==0.2.0
djangocms-column==1.7.0
djangocms-file==2.0.2
djangocms-googlemap==1.1.0
djangocms-installer==0.9.6
djangocms-link==2.1.2
djangocms-picture==2.0.5
djangocms-snippet==1.9.2
djangocms-style==2.0.2
djangocms-text-ckeditor==3.5.0
djangocms-video==2.0.3
easy-thumbnails==2.3
html5lib==0.9999999
lxml==3.7.3
olefile==0.44
phonenumbers==8.4.3
phonenumberslite==8.4.3
Pillow==4.1.1
python-dateutil==2.6.0
python-slugify==1.2.0
pytz==2017.2
six==1.10.0
tzlocal==1.4
Unidecode==0.4.20
YURL==0.13
移行を実行しましたか? – panatale1
はい。私は実際にそれを修正できるだけでした。インストールされているアプリのリストにアプリがありませんでした。私が従ったチュートリアルではそれを一度も言及しなかった。 – MadPhysicist
このようなテーブルがあるかどうかチェックしましたか? – iamkhush