A Django web application that allows managing telecom service consumptions.
The user can import csv files of products and product categories. Sample csv files are included in the repository.
Consumptions are available as a list filtered by the product categories and new ones can be created, edited or deleted.
The Consumptions resource is also accessible through a REST API endpoint.
The Application is made with:
- Python, Django & Django-REST-Framework
- Postgres, Tests
Set up instructions:
-
Assuming you have postgres installed, create project database:
sudo su - postgres psql CREATE DATABASE djangoapp; CREATE USER coder WITH PASSWORD 'coderpwd'; \q exit
-
In the folder django-app make a virtualenv called myenv.
python3 -m venv myenv
-
Activate virtual environment (include full path if required).
source djangoapp/myenv/bin/activate
-
Install requirements of the project.
pip install -r requirements.txt
-
Apply migrations.
python manage.py migrate
-
Create admin account.
python manage.py createsuperuser
-
To start run:
python manage.py runserver
The database can be filled either from:
* http://127.0.0.1:8000/admin manually or
* using the upload sections of the interface and uploading the sample csv files
that are included in the project.
To access the Client visit: http://127.0.0.1:8000/home
To access the API Client visit: http://127.0.0.1:8000