Skip to content

Cybernisk/djtp

 
 

Repository files navigation

DJango Template Project

https://travis-ci.org/tarvitz/djtp.svg?branch=master https://readthedocs.org/projects/djtp/badge/?version=latest
  • DJTP means Django template project

DJTP serves for quick/fast your django application make start.

minified BSD license you can find inside LICENSE file

It's standard django application with small and simple dependencies and some bunch of helper code which (app) allows you to make your own project a little bit faster.

  • Django 1.8+
  • pytz 2015.4+
  • simplejson 3.7.3

All backend dependencies you can installed via pip using: .. code-block:

user@localhost$ pip install -r requirements/base.txt
  • bootstrap 3.3+,
  • jquery 2.1+,
  • select2 4.0+
  • noty 2.3.5+

All frontend dependencies you can installed via bower (it depens on nodejs 0.10+) using: .. code-block:

# you should run this command in project root directory
user@localhost$ bower install

For general installation you would probably need virtual environment with pip installed:

user@localhost$ virtualenv --no-site-packages venv
user@localhost$ source venv/bin/activate
user@localhost$ pip install -r requirements/base.txt

optional

user@localhost$ pip install -r requirements/docs.txt

document build requirements stored in base-py3.txt

You could run tests via python manage.py test --settings=app.settings.test ` or via `./scripts/run_tests.sh script

user@localhost$ ./scripts/run_tests.sh apps.accounts

Use allure and pytest for better reports generating:

user@localhost$ ./scripts/run_pytest.sh

with py.test you could use pytest-cov (code coverage) to generate stats around your code being tests with unit tests.

user@localhost$ coverage run --source=apps -m py.test --alluredir=db/reports/allure apps/
user@localhost$ coverage report --fail-under=90
user@localhist$ coverage html

After dependecies were installed you should build your own database/database file (if you decided use sqlite3)

Also you should install bower dependencies. Bower is a nodejs package that serves for frontend dependecies package manager.

user@localhost$ sudo npm install -g bower
# or
root@localhost$ npm install -g bower
# then from ``project root`` directory run
user@localhost$ bower install

After all frontend dependencies installation some git submodules should be reinitialized for current project version:

$ git submodule
48cd4b44bc94046cab20e0d345c978483684ab2e media/less/select2-bootstrap-css (v1.0-198-g48cd4b4)
$ git submodule init media/less/select2-bootstrap-css
$ git submodule update media/less/select2-bootstrap-css

After successfull submodule update the last step is to compile bootstrap less into css file.

Then compile project bootstrap markup using less compiler (tested with nodejs lessc) or run ./scripts/update_styles.sh script

Whole bunch of the docs you can read by clicking this link djtp.readthedocs.org

Note

There's no certain plan for project development, but every major update of django would be integreated into djtp as soon as possible.

Releases

No releases published

Packages

No packages published

Languages

  • Python 46.7%
  • CSS 40.7%
  • JavaScript 6.3%
  • HTML 6.0%
  • Shell 0.3%