This project was created with the purpose of applying for a back-end web developer vacancy.
- Clone the repository in an environment with Python 3.8 installed.
- Once cloned, execute the command
pip install -r requirements.txt
to install the necessary dependencies to run the project. - PostgreSQL is used as the database. You must create a database named CDA and restore it with the file located in /RestauracionDB/DB-CDA. Alternatively, you can use any other database, but the configuration data will be required.
- Then, just run the command
python manage.py runserver
. - To create a super administrator user, execute the command
python manage.py createsuperuser
as the application requires authentication from the start of its execution.
- CRUD of Company, Users, Access Points, Access Schedules.
- The superuser can create companies and users for companies.
- The administrator user of each company can create the access points and schedules for their own company, not for other companies. Additionally, they only have access to these modules.
- The company's administrator user can only invite users, not create them.
- REST requests to validate an employee's access to the company.
To use the service, it is necessary to make a GET request to the URL http://127.0.0.1:8002/api/consultar-acceso with the project running, and send the following parameters. In addition to this, the database copy named Restore_CDA_REST must be restored, which contains the necessary data and parameterization ready for API consumption.
- company
- username
- headquarters
Where company is the name of the company, username is the name.surname, and headquarters is the name of the headquarters where the query is made. Access is calculated with the current system time, if correct, it returns the headquarters data, otherwise, it returns False.
- Email-dependent functionalities are not functional due to authentication issues with SMTP servers.
- Assignment of accesses to invited users