Installing django CMS¶
We’ll get started by setting up our environment.
django CMS requires Django 1.8, and Python 2.7, 3.3 or 3.4.
Your working environment¶
We’re going to assume that you have a reasonably recent version of virtualenv installed and that you have some basic familiarity with it.
Create and activate a virtual env¶
virtualenv env source env/bin/activate
Note that if you’re using Windows, to activate the virtualenv you’ll need:
Use the django CMS installer¶
The django CMS installer is a helpful script that takes care of setting up a new project.
pip install djangocms-installer
This provides you with a new command,
Create a new directory to work in, and
cd into it:
mkdir tutorial-project cd tutorial-project
Run it to create a new Django project called
djangocms -f -p . mysite
- run the django CMS installer
- install Django Filer too (
-f) - required for this tutorial
- use the current directory as the parent of the new project directory (
- call the new project directory
About Django Filer
Django Filer, a useful application for managing files and processing images. Although it’s not required for django CMS itself, a vast number of django CMS addons use it, and nearly all django CMS projects have it installed. If you know you won’t need it, omit the flag. See the django CMS installer documentation for more information.
djangocms-installer expects directory
. to be empty at this stage, and will check for this,
and will warn if it’s not. You can get it to skip the check and go ahead anyway using the
flag; note that this may overwrite existing files.
Windows users may need to do a little extra to make sure Python files are associated correctly if that doesn’t work right away:
assoc .py=Python.file ftype Python.File="C:\Users\Username\workspace\demo\env\Scripts\python.exe" "%1" %*
For the purposes of this tutorial, it’s recommended that you answer the installer’s questions as follows (where we suggest something different from the default, it’s indicated with an asterisk *).
- Database configuration (in URL format):
- django CMS version:
- Django version:
- Activate Django I18N / L10N setting:
- Install and configure reversion support:
- Languages to enable. Option can be provided multiple times, or as a comma separated list:
- Optional default time zone:
- Activate Django time zone support:
- Activate CMS permission management:
- Use Twitter Bootstrap Theme:
- Use custom template set:
- Load a starting page with examples after installation:
Create a Django admin user when invited.
Start up the runserver¶
python manage.py runserver
Open http://localhost:8000/ in your browser, where you should be presented with your brand new django CMS homepage.
Congratulations, you now have installed a fully functional CMS.
To log in, append
?edit to the URL and hit enter. This will enable the
toolbar, from where you can log in and manage your website.
If you are not already familiar with django CMS, take a few minutes to run through the basics of the django CMS tutorial for users.