A Django app to manage chart of accounts layers.
Project description
Description
DRF Chart of Account holds the layer models and it’s operations for a greater Accounting Software. Layers are usually used in an accounting software to make resources under a relationship. Generally 7 layers are used in a typical accounting software but in drf_chart_of_account there are 5 layers. As for example an organization has transport business. So we can say all the vehicles are in Vehicle Layer. Under that water vehicles may be under Vehicle -> Water Vehicle Layer. A speedboat can be under Vehicle -> Water Vehicle -> Speedboat layer. That’s how all the layer’s has relationship.
Requirements
This package needs Django, Django Rest Framework and Requests to run.
Version
Current stable version is 1.0
Compatibility
This package is Tox tested with Python version 3.6, 3.7 and 3.8 with Django version 2.0, 2.1, 2.2, 3.0, 3.1 with Django Rest Framework version 3.12.1. However, this package is compatible with Python version > 3.0 and Django version > 2.0 but not compatible with Python 2.7 and Django version < 2.0
Installation
This package can be installed in two ways. One is via the pypi package manager and other is directly from the Github.
For pypi installation please use the following command
pip install drf_chart_of_account
And for directly downloading from the Github repository use the following commands
git clone https://github.com/skoobytechforimpact/drf_chart_of_account
After successful installation open Django’s settings.py file and add ‘drf_chart_of_account’ and ‘rest_framework’, on your INSTALLED_APPS list.
INSTALLED_APPS = [
...
'rest_framework',
'django_user_interaction_log',
]
Include the event loggers URLconf in your project urls.py like this
path('accounts/', include('drf_chart_of_account.urls')),
Here you can put whatever you like on the path. Now run the app migration for creating the database migrations
python manage.py makemigrations
python manage.py migrate
Usage
This package is shipped with 5 Layer Models. LayerOneModel is the top parent model of all and LayerTwoModel is the immediate child of LayerOneModel and LayerThreeModel is the immediate child of LayerTwoModel and so on is LayerFourModel to LayerThreeModel and LayerFiveModel to LayerFourModel.
Each model needs a name, parent_layer (for child models) and created_by data to create an instance.
If any of the model instance has child data or has transaction (Transaction is a feature of Journal application) then the instance can’t be updated or deleted. However, this update validity check only happens if the update operation is called from the appropriate Update API. Updating model instance directly without the usage of the serializer class will not check the validity. The deletion operation always check the validity. It doesn’t depend on the invoking method.
API Details:
This package only accept json data as request and returns json in response. Below are the list of api endpoints for this package.
Here <layer_no> belongs to the layer model no. So for different layers the numbers are here:
Layer Model | URL Text |
|
---|---|
LayerOneModel | one |
|
LayerTwoModel | two |
|
LayerThreeModel | three |
|
LayerFourModel | four |
|
LayerFiveModel | five |
The model primary key is an integer value.
Create API View
endpoint: https://your-domain-name/accounts/charts/layer/<layer_number>/
method: POST
payload:
{
"name": "Demo layer data",
"is_active": true,
"created_by": <pk>
}
List API View
endpoint: https://your-domain-name/accounts/charts/layer/<layer_number>/
method: GET
Detail API View
endpoint: https://your-domain-name/accounts/charts/layer/<pk>/
method: GET
Update API View
endpoint: https://your-domain-name/accounts/charts/layer/<pk>/
method: PUT
payload:
{
"name": "Demo layer data",
"is_active": true,
"created_by": <pk>
}
Delete API View
endpoint: https://your-domain-name/accounts/charts/layer/<pk>/
method: DELETE
Package Creator
This package is created by Skooby Technology for Impact. The package is a sub module of a larger Accounting Module
Project details
Release history Release notifications | RSS feed
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
Hashes for skooby-drf-chart-of-account-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2d27ec1594ff9b62f08ee5b572ea7985bc045e78bf5c16d037e4b0b27421e9d |
|
MD5 | 3f916119db51649a7c036975d74b0e52 |
|
BLAKE2b-256 | 075d707abe5663a5162fae4fc68d59f190f98806cf6d64bfe175eb68aedf3167 |
Hashes for skooby_drf_chart_of_account-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dba2a28afa86c82f5f3e617775f87326c0772e9709ceac93ba0751a8686cc7c9 |
|
MD5 | 05ca43d315b64f3ca49d3dba4833f62e |
|
BLAKE2b-256 | a7df5a3d836f827c83e637f7f507f7f4759fff1c162cec04023c0bf4702d6502 |