<commit_before>DJango Template Project
=======================
.. image:: https://travis-ci.org/tarvitz/djtp.svg?branch=master
    :target: https://travis-ci.org/tarvitz/djtp


* DJTP means Django template project

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

.. contents:: :local:
    :depth: 2

License
~~~~~~~
minified BSD license you can find inside LICENSE file

Common features
~~~~~~~~~~~~~~~
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.


Backend dependecies (requirements/base.txt)
```````````````````````````````````````````
* Django 1.6+
* South 0.8.2+
* pytz 2013.8+
* simplejson 3.3.0

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

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

Frontend dependecies
````````````````````
* bootstrap 3.0+,
* jquery 1.8.3+,
* select2 3.4.3+
* noty 2.1.0+

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


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

Python 2.7
``````````
.. code-block:: bash

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

*optional*

.. code-block:: bash

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

Python 3.3
``````````
document build requirements stored in base-py3.txt

.. code-block:: bash
   user@localhost$ virtualenv --no-site-packages venv3
   user@localhost$ source venv3/bin/activate
   user@localhost$ pip install -r requirements/py3.txt



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

.. code-block:: bash

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

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

.. code-block:: bash

    (venv) user@localhost$ python ./manage.py syncdb

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

.. code-block:: bash
    (venv) user@localhost$ lessc --yui-compress --no-color media/less/bootstrap.less > media/css/bootstrap.css


Documentation
~~~~~~~~~~~~~
Whole bunch of the docs you can read by clicking this link
`djtp.readthedocs.org <http://djtp.readthedocs.org>`_
<commit_msg>update README for complete instructions<commit_after>DJango Template Project
=======================
.. image:: https://travis-ci.org/tarvitz/djtp.svg?branch=master
    :target: https://travis-ci.org/tarvitz/djtp


* DJTP means Django template project

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

.. contents:: :local:
    :depth: 2

License
~~~~~~~
minified BSD license you can find inside LICENSE file

Common features
~~~~~~~~~~~~~~~
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.


Backend dependecies (requirements/base.txt)
```````````````````````````````````````````
* Django 1.6+
* South 0.8.2+
* pytz 2013.8+
* simplejson 3.3.0

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

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

Frontend dependecies
````````````````````
* bootstrap 3.0+,
* jquery 1.8.3+,
* select2 3.4.3+
* noty 2.1.0+

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


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

Python 2.7
``````````
.. code-block:: bash

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

*optional*

.. code-block:: bash

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

Python 3.3
``````````
document build requirements stored in base-py3.txt

.. code-block:: bash
   user@localhost$ virtualenv --no-site-packages venv3
   user@localhost$ source venv3/bin/activate
   user@localhost$ pip install -r requirements/py3.txt



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

.. code-block:: bash

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

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

.. code-block:: bash
    (venv) user@localhost$ mkdir db
    (venv) user@localhost$ python ./manage.py syncdb --migrate

Also you should install `bower <https://www.npmjs.org/package/bower>`_ dependencies.
``Bower`` is a nodejs package that serves for frontend dependecies package manager.

.. code-block:: bash

    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:

.. code-block:: bash

    $ 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

.. code-block:: bash
    (venv) user@localhost$ lessc --yui-compress --no-color media/less/bootstrap.less > media/css/bootstrap.css


Documentation
~~~~~~~~~~~~~
Whole bunch of the docs you can read by clicking this link
`djtp.readthedocs.org <http://djtp.readthedocs.org>`_

{'fraction_non_alphanumeric': 0.14303898170246618, 'fraction_numerical': 0.018138424821002388, 'mean_word_length': 4.1524590163934425, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 5, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4378344', 'n_tokens_mistral': 2049, 'n_tokens_neox': 1863, 'n_words': 638}