Code Monkey home page Code Monkey logo

django-cms-bootstrap's Introduction

What's that?

This project contains fully working and integrated version of Django CMS to enable fast start web projects.

What's included?

  1. Twitter Bootstrap - collection of styles and JS enabling fast start with web sites
  2. Backbone.js - JS MVC library
  3. Underscore.js - JS functional programming library
  4. Handlebars.js - JS templating library
  5. Hogan.js - JS templating library, a faster version of Moustache, developed by Twitter
  6. Django Bount - a Python library enabling to easily develop Fabric deployment scripts

How to install?

  1. Create virtualenv

     mkdir site
     virtualenv site/ENV
    
  2. Create dirs for static and media

     mkdir site/static
     mkdir site/media
    
  3. Activate virtualenv

     source site/ENV/bin/activate
    
  4. Install requirements

     sudo pip install REQUIREMENTS
    
  5. Remote git origin since you will be changing the original project to make you custom application

     git remote rm origin
    
  6. Init git submodules

     git submodule init
     git submodule update
    

How to configure?

  1. Update "site" directory. Site directory is used to store Sqlite data file, static files, user uploaded media files. By default it's ROOT/site but it could be changed by editing the following line in src/settings_common.py

     SITE_PATH = PROJECT_PATH.joinpath('site')
    
  2. Create local settings file.

    In this project we have different settings for local and production. In this approach all settings files you use import all information from settings_common.py.

    For example:

     from settings_common import *
    

    For production specific settings you can use settings_production.py. Since your project could be shared between multiple developers it makes sense for each developer to have a specific settings file for his local machine. To do so I recommend to have settings_local_default.py that contains recommended local settings and create settings.py for each developer (excluding it from git to avoid overwriting). Here are the steps to do it:

  • Edit settings_local_default.py and commit it to git.

  • Create a copy of settings_local_default.py

      cp src/settings_local_default.py src/settings.py
    
  • Edit src/settings.py to enable your database configuration

  • Add /src/settings.py to .gitignore

    In this configuration approach you also need to make sure you are using right configuation file in production. You can do it by either renaming settings_production.py to settings.py during the deployment or specify DJANGO_SETTINGS_MODULE when using django-admin.py to launch your applicatiion or performing management commands.

  1. If you don't want to use separate local and production settings just rename settings_common.py to settings.py and delete other settings. In this case you also will need to add database configuration to settings.py

  2. Create database schema:

     cd src
     ./manage.py syncdb --all
     ./manage.py migrate --fake
    

Some things to consider

  • Django root is located in the src subfolder
  • You must choose what approach to use for configuration files: single settings.py or multiple files to have separate configurations for each developer and production server.
  • You need to compile LESS files: /less/django-cms-bootstrap.less should be compiled to /compiled/css-compiled/django-cms-bootstrap.css. You can also add your own LESS files and compile them as well. As an alternative you can add your own styles to /less/django-cms-bootstrap.less

What's next?

No user application are created. So you probably could start from creating you application in src folder. Another option is to start creating CMS pages.

Reporting errors

If you find any errors or difficulties please mail me at mturilin (at) gmail.com. I will be happy to help.

django-cms-bootstrap's People

Contributors

mturilin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.