Skip to content

BeDjango/post-resource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Note: This repository is being used as sample code for bedjango posts. To use the real bedjango starter view the BeDjango repo

BeDjango starter skeleton

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

Features

  • 98% 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..)

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.10

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 --extension=py,rst,yml {{nameofproject}}

# If we need create a new app inside our project, if we are cloned this project:
django-admin.py startapp --template=bedjango-starter/project/project_name --extension=py,rst,yml {{nameofapp}}

# If you haven't cloned this project, you must use following django command:
python3 manage.py startapp {{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

Repository with the resources used for the post published in www.bedjango.com/blog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published