The second version of the sales manager of the association Air-Eisti. It's a Django (1.11.2) application using the css framework bulma .
You should already know what is virtualenv. So, simply create it for this project :
$ mkvirtualenv Market_Manager_V2
Then you need to download the application :
$ cd /path/to/your/workspace
$ git clone https://github.com/AIR-EISTI/Market_Manager_V2.git
$ cd Market_Manager_V2
Before installing python dependancies you need to install some packages
- libpng-dev
- python3-dev
- numpy
The requirements.txt file contains all the libraries needed, to install them, simply launch :
$ pip install -r requirements.txt
$ python manage.py makemigrations Snack
$ python manage.py migrate
$ python manage.py createsuperuser
or
$ python manage.py shell
>>> from django.contrib.auth.models import User
>>> user=User.objects.create_user('username', password='password')
>>> user.is_superuser=True
>>> user.is_staff=True
>>> user.save()
The tests can be launch as follow (coverage
required) :
coverage run manage.py test Snack
or
python manage.py test Snack
the verbosity level 2 or 3, -v 2
or -v 3
, can be added to have more detail.
Then launch $ coverage report
to have a summary in percentage of the
coverage.
$ coverage html
can be launch to have the html version of the coverage
report, moreover this shows what part of the code is not covered by the tests.
If you want to ignored some file or folder, virtualenv folder for exemple,
create a .coveragerc
, and add :
[run]
omit = path/to/venv, manage.py, Snack/migrations/*
The plugin django_coverage_plugin
allows the integration of the differents
templates during the coverage. Add this, in the .coveragerc
file :
plugins =
django_coverage_plugin
In order to use the plugin add 'debug': True
in the settings.py
files
as follow :
TEMPLATES = [
{
...
'OPTIONS': {
'context_processors': [
...
],
'debug': True,
}
...
}
]
$ python manage.py runserver
Don't forget to pass all of the debug
variable at False
.
- Laurine Sorel - Initial work - DracarysBZH
- Tom - Contributor - Tjiho
This project follows the BSD 2-Clause License. See the LICENSE for details.
- Inspired by the first version of Market_Manager create by FunkySayu and blQn
- Readme inspired by PurpleBooth/README-Template.md
- Sortable table : sorttable
- Graph : visjs.org