Errors I got in django cms configurating process



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!



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章