27 Sep 2023

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

  1. Clone the repository:
git clone https://github.com/jsuarez-dev/StorageApp.git
  1. 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
  1. Install the requirements
pip install -r requirements.txt
  1. migrate the database
python manage.py migrate
  1. Create a superuser
python manage.py createsuperuser
  1. 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

References

© 2019 Jsuarez.Dev