I had fun the past couple days working with django-cms. During my time with the current release (svn r41) I noticed that django-cms 2.0 is planned. So I figured I’d try it out and document my experience. Maybe a couple tickets or bug requests will come of my little endeavor. I’m using Fedora 10, python 2.5.2 and Django 1.0. I’m following the instructions loosely at http://trac.django-cms.org/trac/wiki/GettingStarted and http://trac.django-cms.org/trac/wiki/ServingMediaFiles. Here’s the steps I got through tonight and the results I came up with.
I started with pulling down the code from the repo.
$ svn co http://svn.django-cms.org/branches/django-cms2
Got revision 177 today. Start a fresh django project. Change dir into the project folder and soft link in the cms and mptt directories from the svn checkout. Also make a media directory in the project directory and inside the media directory link the cms media so the admin can see it later.
$ django-admin.py startproject djangocms2
$ ln -s ../svn/django-cms2/cms/
$ ln -s ../svn/django-cms2/mptt/
$ ln -s ../cms/media/cms/
Here’s a diff of the changes I made to the default settings.py and url.py files. django-cms2.diffs
I also had to make one modification to the django-cms code to get the admin media working right for the page object. Diff for that is in that file too. Didn’t really spend the time to figure if the fix I made fits into the conventions django-cms is using, just got it working for now. So now go ahead and sync the db and run the dev server:
$ ./manage.py syncdb
$ ./manage.py runserver
As expected http://localhost:8000/ gave me an error. This is ok. I got this error in the current release too. Resolution in the current release was to go create a page. I first updated my site object in the django admin, this is important. Django-cms 2.0 seems to be dependent on the sites infrastructure. At http://127.0.0.1:8000/admin/sites/site/1/ I updated domain name to ‘localhost:8000′ and display name to ‘Localhost Test Server’
Next I tried to create a page. At http://127.0.0.1:8000/admin/cms/page/add/ I set the title to ‘Home’ and the slug populated automagically with ‘home’. Hit save and got a template error. Django-cms 2.0 doesn’t have a base template the same way the current version does. Create a templates directory in your project directory and copy the index.html template in the example site to this templates directory.
This seems like a good stopping point. Cms is configured and you can see a page by this point. I’ll be working with the cms to find what features are setup beyond this point and hope to make another post when I have more to share.