binel01 / bedjango-starter

An easy to use project template for Django 1.11

Home Page:http://www.bedjango.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BeDjango starter skeleton

An easy to use project template for Django 1.11, for more information visit our blog

Build Status Coverage Status Codacy Badge

Features

  • High code coverage
  • Custom theme and responsive based on bootstrap
  • Usefull packages
  • Default views
  • User control system
  • Modularity of the applications
  • Application ready for intenationalization
  • Python2/3 compatibility
  • Different utils (Decorators, breadcrumbs..)
  • PO files web editor provided by django-rosetta
  • Cookies adapted to EU Commision standards.

Prerequisites

What things you need to use this starter and how to install them:

  • Git (if you are going to clone this project):
 sudo apt install git
  • Pip:
 sudo apt install python-pip
  • Virtualenv:
 sudo pip install virtualenv
  • Python3-dev:
 sudo apt install python3-dev

How to use it

The following steps have been created based on a ubuntu 16 using python3.5. To create a new application using this starter, you must do the following steps

# Create virtualenv
virtualenv -p python3 venv

# Activate virtualenv and install Django
source venv/bin/activate
pip install django==1.11

Use django-admin to create the app using the starter
django-admin.py startproject --template=https://github.com/BeDjango/bedjango-starter/archive/master.zip --extension=py,rst,yml {{nameofproject}}

# Install requirements/dev-requirements
cd nameofproject/nameofproject
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Migrate database 
python3 manage.py migrate

# Compile translations
python3 manage.py compilemessages

# To run our project:
python3 manage.py runserver

Now your app is running at localhost

Other commands

# Create superuser (Password must be at least 8 characters and contain letters, numbers and special characters !-·$%/()=?)
python3 manage.py createsuperuser

# You can create a project from a local template
git clone https://github.com/bedjango/bedjango-starter.git
django-admin.py startproject --template=bedjango-starter/project_name --extension=py,rst,yml {{nameofproject}}

# If we need to create a new app inside our project, we must clone this repo and run following command:
django-admin.py startapp --template=bedjango-starter/project_name/project_name --extension=py,rst,yml {{nameofapp}}


Testing

To run tests we must run the following command:

coverage run --source='.' manage.py test --settings base.test_settings

# To get a coverage report
coverage report -m

Packages included

License

This project is licensed under the MIT License

About

An easy to use project template for Django 1.11

http://www.bedjango.com

License:MIT License


Languages

Language:CSS 42.1%Language:HTML 26.5%Language:Python 19.2%Language:JavaScript 12.1%