How to start a django cms project

I decided to take a look at django-cms. Looking at the docs, I cloned the repository using

git clone https://github.com/divio/django-cms.git

Then I installed it using

sudo python setup.py install

I already have django 1.2.3 installed. I moved to the directory example, launched syncdb, which created the following tables:

Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_admin_log
Creating table django_site
Creating table sampleapp_category
Creating table sampleapp_picture
Creating table south_migrationhistory



You just installed Django auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes...

We can clearly see that cms tables are not created. I obviously ran into this problem when starting the server and viewinghttp://localhost:8000/

DatabaseError: no such table: cms_page

I looked through the documents and saw that I met the version requirements, but it was clear that I was doing something wrong. Any help would be greatly appreciated.

+3
source share
3 answers

django-cms South . , , syncdb. manage.py migrate.

django-cms , :

  • 'south' INSTALLED_APPS
  • manage.py syncdb ( django-cms)
  • INSTALLED_APPS
  • run manage.py migrate --fake

django-cms manage.py migrate .

+7

'cms' INSTALLED_APPS settings.py? , Django-CMS menus, publisher mptt, . !

+1

In general, if tables are not created, there may be some errors in the application itself: try starting the Django shell and import the model from the application:

python manage.py shell

>>> from csm import models

and check if you have a trace.

Hope this helps.

0
source

Source: https://habr.com/ru/post/1780186/


All Articles