A Django package to handle SadaBiz payment links.
Project description
Sada
Sada is a Django package designed to handle SadaBiz payment links.
Installation
To install the package, you can use pip:
pip install sada
Usage
After installing the package, you need to add it to your Django project.
In your settings.py file, add sada to your INSTALLED_APPS:
INSTALLED_APPS = [
...
'sada',
...
]
Then, include the sada URLconf in your project urls.py:
from django.urls import include
urlpatterns = [
...
path('sada/', include('sada.urls')),
...
]
Now you can run Django's command to check for any database migrations:
python manage.py makemigrations
python manage.py migrate
Models
Sada provides two main models: Product and Price.
Productrepresents a product with fields like name, description, active, and metadata.Pricerepresents the pricing information related to a product.
Views
Sada provides several views for managing products and prices:
-
ProductListView: Displays a list of all products. -
ProductDetailView: Displays detailed information about a specific product. -
ProductCreateView: Allows you to create a new product. -
ProductUpdateView: Allows you to update an existing product. -
ProductDeleteView: Allows you to delete a product. -
PriceListView: Displays a list of all prices. -
PriceDetailView: Displays detailed information about a specific price. -
PriceCreateView: Allows you to create a new price. -
PriceUpdateView: Allows you to update an existing price. -
PriceDeleteView: Allows you to delete a price.
These views are accessible via the URLs defined in sada/urls.py.
Templates
Sada provides several templates for displaying products and prices:
-
sada/product/product_list.html: Displays a list of all products. -
sada/product/product_detail.html: Displays detailed information about a specific product. -
sada/product/product_form.html: Displays a form for creating or updating a product. -
sada/product/product_confirm_delete.html: Displays a confirmation prompt before deleting a product. -
sada/price/price_list.html: Displays a list of all prices. -
sada/price/price_detail.html: Displays detailed information about a specific price. -
sada/price/price_form.html: Displays a form for creating or updating a price. -
sada/price/price_confirm_delete.html: Displays a confirmation prompt before deleting a price.
You can customize these templates to suit your needs.
License
Sada is licensed under the MIT License. For more information, see the LICENSE file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sada-0.4.0.tar.gz.
File metadata
- Download URL: sada-0.4.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c17ec1118286f6854d618c7d1e82561dcde71a6f9386d61d58292e695623163f
|
|
| MD5 |
9b1dbf73c363bc9258ad05fdb5b5143d
|
|
| BLAKE2b-256 |
6c951fc0a9e5a54f85f24dddf5d4424bfb77d6a979c1aeb9ab9b6c0a9b8a6d4b
|
File details
Details for the file sada-0.4.0-py3-none-any.whl.
File metadata
- Download URL: sada-0.4.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b25964d2c386da38a73f3501ce0bd089b35f51eafa4c5fccdfcad6301a8d305
|
|
| MD5 |
70decc55b6cb12e8f936c3183ba32f47
|
|
| BLAKE2b-256 |
4372fc631105dcd47d7817a8a8b9d611bf015c614baad0dcb4dc8e700cf64459
|