Skip to content

YoannDeb/EpicEvents

Repository files navigation

forthebadge

Training django and DRF project.

Part of Open Classrooms "DA Python" formation, 12th Project.

EpicEvents CRM

EpicEvents CRM is composed of an admin interface for managers, sales team and support team members on one hand, and an API for front ends destined to sales team and support team members on the other hand.

It is designed to manage data concerning clients, contracts they make with sales team members and events managed by support team members.

You can consult the ER diagram here.

Local testing

Creating Virtual environment and downloading the program:

You need Python 3 (tested on 3.10), git and venv installed on your machine.

Open a terminal and navigate into the folder you want EpicEvent CRM to be downloaded, and run the following commands:

  • On Linux or macOS:
git clone https://github.com/YoannDeb/EpicEvents.git
cd EpicEvents
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
  • On Windows:
git clone https://github.com/YoannDeb/EpicEvents.git
cd EpicEvents
python -m venv env
env\Scripts\activate
pip install -r requirements.txt

Configure PostgreSQL database

You first must install postgresSQL and configure a database.

See official PostgreSQL doc and official Django doc for more info.

You need to create a database for the app, and then configure it in epicevents/settings.py.

Initiate PostgreSQL database

Open a terminal and navigate into the root of the project (i.e. the folder where is situated manage.py) , and run the following commands:

python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic

Create a superuser (administrator)

Open a terminal and navigate into the root of the project (i.e. the folder where is situated manage.py) , and run the following command:

python manage.py createsuperuser

You will be prompted an email, first and last name, and a password. That's it, the superuser is created !

Run EpicEvents CRM

Open a terminal and navigate into the root of the project (i.e. same folder than manager.py), and run the following command:

python manage.py runserver

The admin page will be accessible at http://127.0.0.1:8000/admin. You can then login with previously created superuser email and password. It is now possible to populate the database, with some sales or support team members (don't forget to assign roles).

API will be accessible (with Postman for example) at http://127.0.0.1:8000 .

Documentation of the API endpoints

Once server is running, API specifications are accessible on those urls with different formats:

Logging

Logs are registered in two files at the root of the project (i.e. same folder than manager.py):

  • debug.log, which shows all messages, but only activated if DEBUG is set to True in epicevents/settings.py
  • warning.log which shows messages from WARNING level and above. It is always active.

About

Epic Events CRM - Openclassrooms formation training project #12

Topics

Resources

Stars

Watchers

Forks

Languages