ORM Watching Storage, is an internal bank security control service written on Django framework.
Service allows you to monitor the following:
- all active pass-card
- List of vault visits on a unique pass-card and whether they were suspicious or not
- list of pass-cards who still in vault
Python3 should be already installed on your PC.
You need few additional libraries to run the service.
To install them use pip (or pip3, if there is a conflict with Python2) to install dependencies:
pip install -r requirements.txt
Once all dependencies installed, next step is create .env file which should contain all sensitive-secured information.
DATABASE_HOST=Address to database
DATABASE_PASSWORD=Your password
SECRET_KEY=Your secret key
Main file, run it to start a local server.
python3 manage.py runserver 0.0.0.0:8000
Example of success execute.
Click on hyperlink to open a webpage.
There only one django application datacenter in this service.
Contain 2 django models Passcard and Visits.
With following structure:
class Passcard(models.Model):
is_active = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now=True)
passcode = models.CharField(max_length=200, unique=True)
owner_name = models.CharField(max_length=255)
class Visit(models.Model):
created_at = models.DateTimeField(auto_now=True)
passcard = models.ForeignKey(Passcard, on_delete=models.CASCADE)
entered_at = models.DateTimeField()
leaved_at = models.DateTimeField(null=True)
Showing number of active pass-card from Passcards. Using active_passcards.html template.
Showing unique active pass-card from Passcards with all list of all visits from Visit.
If the visit was exceeded more than 60 minutes, flagged it as suspicious.
Using active_passcards.html template.

Showing unique active pass-card from Passcards who wasn't leave a vault at the moment.
Using storage_information.html template.

The code is written for educational purposes on online-course for web-developers dvmn.org.

