1.6 KiB
1.6 KiB
bernini
dependencies
poetry^python3.8including development libraries
up n runnin
cp bernini/settings.py-template bernini/settings.py
poetry install
./wrapper mi # migrate
./wrapper r # runserver at localhost:8000
# goto localhost:8000/api
server email configuration
- open bernini/settings.py and fill these fields
EMAIL_HOST = "some.smtp.server"
EMAIL_PORT = "someort"
EMAIL_HOST_USER = "someuser@some.server"
EMAIL_HOST_PASSWORD = "somepassword"
EMAIL_USE_TLS = True
- this will send an email when calling
/api/orders/{order}/sentwhich will renderbernini/templates/order_sold.htmlas body
fixtures
./wrapper.sh m loaddata users
./wrapper.sh m loaddata products
./wrapper.sh m loaddata product
./wrapper.sh m loaddata lines
api
- based on Django REST framework
- auth system using and extending django's
contrib.auth - admin available at /
- api available at /api
- documentation available at
models
Product: self-explanatory -- models a price and a name describing the productSaleOrderLine: middleman model between the main sale one and a product, needed in order to add quantities to the aforementioned main sale modelSaleOrder: main sale model