Django CMS Themes
=================

Django CMS Themes at django-cms-themes.com, Copyright (c) 2017 Nuwa Information
Co., Ltd, All Rights Reserved.

This file is also a valid Markdown format.

Getting Started
---------------

To use this theme, you can simply use setup.py to do it all for you.

```
# Activate your virtualenv if needed.

# Please change my_cms_project_path to your django CMS project path.
python setup.py my_cms_project_path
```

Our setup.py will copy all required files to your project and load required 
database records (cms pages, plugins..etc.).

See 
```
python setup.py -h
```
for more details and options.

### Prerequisites

Django CMS 3.4+ is required. You can install this theme to existed project or 
a new Django CMS 3.4+ project.

If you want to create a new Django CMS project, you can follow the Django CMS 
tutorial: 
http://docs.django-cms.org/en/release-3.4.x/introduction/index.html#tutorials

Or you can create a environment then install all required libraries:
```
cmsplugin-filer>=1.1
dj-database-url==0.4.1
Django==1.8.18
django-appconf==1.0.2
django-classy-tags==0.7.2
django-cms==3.4.2
django-filer==1.2.4
django-formtools==1.0
django-mptt==0.8.5
django-polymorphic==0.8.1
django-reversion==1.8.7
django-sekizai>=0.9
django-select2<5.0six
django-treebeard>=4.0,<5.0
djangocms-admin-style>=1.2,<1.3
djangocms-attributes-field==0.1.1
djangocms-video>=2.0
djangocms-column>=1.6
djangocms-flash==0.3.0
djangocms-googlemap>=0.5
djangocms-inherit==0.2.1
djangocms-installer==0.8.11
djangocms-link>=1.8
djangocms-style>=1.7
djangocms-text-ckeditor>=3.2.1
djangocms-snippet>=1.9
easy_thumbnails
html5lib>=0.999999,<0.99999999
Pillow>=3.0
pytz==2016.6.1
six==1.10.0
tzlocal==1.2.2
Unidecode==0.4.19
```

Instructions:

* Save the requirements below to requirements.txt.
* Create virtualenv and activate it.

```
pip install -r requirements.txt
django-admin startproject mysite

cd theme_path 
python setup.py mysite_path
```
Please change [mysite], [theme_path] and [mysite_path].

### Programmer and User mode

There is a interesting option -m (mode), default is programmer mode.
In programmer mode, all placeholders have a pre-built plugin which makes user
can modify its content from pages. But if user removes the plugin, the default
content still shows because {% placeholder 'id' or %}. Sometimes this is not an 
expected behavior. 

You can use user mode to change this:
```
python setup.py -m user my_cms_project_path 
```
This will install templates which only use {% placeholder %}. All the default 
contents will be placed inside plugins, user can remove plugins to remove the 
block of content. This will be very convenient mode to ship pages to user.
The side effect is the HTML templates will be simplifed to only have required 
blocks.
