Storage App
Description
This app allow to manage a stock of "products" (could be anything) in a SQLite database. It is written in Python and uses the Django framework. This application is intended to be used in a local network, so it is not secure enough to be used in a production environment. And could be used as a template to create a more complex application.
Features
- Create, edit and delete products
- Register of all the changes made to the products
- User authentication and management using the library django-allauth.
- Export the products to a CSV file (To Be implemented)
Installation
- Clone the repository:
git clone https://github.com/jsuarez-dev/StorageApp.git
- Create a virtual environment and activate it:
Mac and Linux:
python -m venv venv
source venv/bin/activate
Windows:
python -m venv venv
venv\Scripts\Activate.ps1
- Install the requirements
pip install -r requirements.txt
- migrate the database
python manage.py migrate
- Create a superuser
python manage.py createsuperuser
- Run the server
python manage.py runserver
Models
Product
| Field | Type | Description |
|---|---|---|
| name | CharField | Name of the product |
| description | TextField | Description of the product |
| stock | OneToOneField | Quantity model |
| created_at | DateTimeField | Date and time of the creation of the product |
| updated_at | DateTimeField | Date and time of the last update of the product |
Stock
| Field | Type | Description |
|---|---|---|
| quantity | IntegerField | Quantity of the product in the stock |
| created_at | DateTimeField | Date and time of the creation of the product |
| updated_at | DateTimeField | Date and time of the last update of the product |
Transactions
| Field | Type | Description |
|---|---|---|
| User | ForeignKey | User that made the change |
| description | TextField | Description of the change |
| created_at | DateTimeField | Date and time of the creation of the transaction |
| updated_at | DateTimeField | Date and time of the last update of the transaction |