/django-loose-cms

Open source CMS based on the django framework

Primary LanguagePythonOtherNOASSERTION

Django Loose CMS

https://travis-ci.org/lefterisnik/django-loose-cms.png?branch=master Code Climate https://coveralls.io/repos/lefterisnik/django-loose-cms/badge.svg?branch=master&service=github

Django Loose CMS is a simple cms based on django framework.

Features

  • Hierarchical pages
  • Template pages
  • SEO friendly URLs
  • Build bootstrap grid
  • Edit stylesheet of the plugins (no fully functional)
  • File manager with custom model field

Requirements

Loose CMS requires:

  • Django version 1.8
  • Python 2.6 or 2.7
  • django-admin-bootstrapped
  • django-taggit
  • django-ckeditor

You should install manually:

  • unidecode: if your tags wan in non-latin format.

Quick Start

Installation via startproject template (quick way)

  1. Make the project folder:

    mkdir project_name
    cd project_name
    
  2. Create the virtualenv of python:

    virtualenv env
    source env/bin/activate
    
  3. Install django package (version 1.8):

    pip install django
    
  4. Create the django project with custom template:

    django-admin.py startproject <project_name> --template=https://github.com/lefterisnik/django-template/archive/master.zip
    cd <project_name>
    
  5. Install the requirements:

    pip install -r requirements.txt
    
  6. Sync database:

    python manage.py migrate
    
  1. Create one superuser account:

    python manage.py createsuperuser
    
  2. Visit http://127.0.0.1:8000/ to start playing with the cms

Normal installation (slow way)

Following this way you must edit settings.py file to provide some settings.

Using virtualenv

  1. Make the project folder:

    mkdir project_name
    cd project_name
    
  2. Create the virtualenv of python:

    virtualenv env
    source env/bin/activate
    
  3. Installation via pip:

    pip install https://github.com/lefterisnik/django-loose-cms/archive/master.zip
    

    The above command will download and setup all the requirements including the django.

  4. Create your django project:

    django-admin startproject myproject
    cd myproject
    
  5. Add "loosecms" to your INSTALLED_APPS setting at settings.py file like this:

    INSTALLED_APPS = (
        ...
        'loosecms',
    )
    
  6. Add "bootstrap_admin" to your INSTALLED_APPS setting like this before 'django.contrib.admin':

    INSTALLED_APPS = (
        'bootstrap_admin',
        'django.contrib.admin',
    )
    
  7. Include the loosecms URLconf in your project urls.py like this:

    url(r'^', include('loosecms.urls')),
    

    Loose CMS handles all urls.

  8. Run python manage.py migrate to create the loosecms models.

  9. Run python manage.py createsuperuser to create a superuser account.

  10. Run development server python manage.py runserver and visit http://127.0.0.1:8000/ to start playing with the cms.

Using system python

  1. Make the project folder:

    mkdir project_name
    cd project_name
    
  1. Installation via pip:

    sudo pip install https://github.com/lefterisnik/django-loose-cms/archive/master.zip
    

    The above command will download and setup all the requirements including the django.

  2. Create your django project:

    django-admin startproject myproject
    cd myproject
    
  3. Add "loosecms" to your INSTALLED_APPS setting at settings.py file like this:

    INSTALLED_APPS = (
        ...
        'loosecms',
    )
    
  4. Add "bootstrap_admin" to your INSTALLED_APPS setting like this before 'django.contrib.admin':

    INSTALLED_APPS = (
        'bootstrap_admin',
        'django.contrib.admin',
    )
    
  5. Include the loosecms URLconf in your project urls.py like this:

    url(r'^', include('loosecms.urls')),
    

    Loose CMS handles all urls.

  6. Run python manage.py migrate to create the loosecms models.

  7. Run python manage.py createsuperuser to create a superuser account.

  8. Run development server python manage.py runserver and visit http://127.0.0.1:8000/ to start playing with the cms.

Enable translation

You can enable multi language processing adding in your root urlconf (urls.py) the following code:

...
from loosecms.conf.urls.i18n import simple_i18n_patterns

urlpatterns = [
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^admin/', include(admin.site.urls)),
]

urlpatterns += simple_i18n_patterns(
    url(r'^', include('loosecms.urls')),
)

and adding the 'SimpleLocaleMiddleware' middleware:

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'loosecms.middleware.locale.SimpleLocaleMiddleware',
    'django.middleware.common.CommonMiddleware',
    ...
)

Restart development server python manage.py runserver and visit http://127.0.0.1:8000/ to start playing with the cms.

Plugins

Some plugins: