Errors I got in django cms configurating process

本文介绍了一位开发者安装并配置 django-cms-themes 插件的过程,包括使用 pip 安装、设置 INSTALLED_APPS 以及解决迁移错误的具体步骤。



Just want to find some templates to use in django cms, then I  downloaded "django-cms-themes pluggable app", followed the steps (http://www.djangocmsthemes.com/getting-started/):

  • install the django-cms-themes pluggable django app. The best way to do this is to use the command "pip install django-cms-themes" (if you are using pip).
  • Add 'cms_themes' to INSTALLED_APPS in your settings file. 
  • Make sure you have a setting in your settings.py file called PROJECT_DIR, which should point to the root of your project in the filesystem, i.e. PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
  • Run "python manage.py syncdb" (or "python manage.py migrate" if you have south installed).

After this, there is no problem for python manage.py syncdb --all, but with python manage.py migrate --fake. Similar erros as followed:


 ! Migration (cms, 0023_plugin_table_naming_

function_changed) should not have been applied before (googlemap, 0001_initial) but was.

...


Did not find some help from Internet (seems I need to study and understand what South actually does...). Then I decide to change the package import order in the INSTALLED_APPS. based on the error messages.


INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
    'mptt',
    'menus',
    'south',
    'sekizai',
    'cms.plugins.file',
    'cms.plugins.flash',
    'cms.plugins.googlemap',
    'cms.plugins.link',
    'cms.plugins.picture',
    'cms.plugins.snippet',
    'cms.plugins.teaser',
    'cms.plugins.text',
    'cms.plugins.video',
    'cms.plugins.twitter',
    'cms_themes',
    'cms',
)


Note that 'cms' is moved from the top of 'mptt' to the bottom. Then all the migration errors disappeared!



评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值