Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voltane-eu/djutils
Django utils for admin, crypto, database, http, ip, mail and models
https://github.com/voltane-eu/djutils
django django-app utilities
Last synced: 3 months ago
JSON representation
Django utils for admin, crypto, database, http, ip, mail and models
- Host: GitHub
- URL: https://github.com/voltane-eu/djutils
- Owner: Voltane-EU
- License: lgpl-2.1
- Created: 2019-11-26T22:15:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T17:18:36.000Z (about 1 year ago)
- Last Synced: 2024-11-01T17:09:56.095Z (3 months ago)
- Topics: django, django-app, utilities
- Language: Python
- Homepage: https://pypi.org/project/djutils/
- Size: 66.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# djutils
## Tools for use within the django frameworkdjutils provides tools for common actions within the django framework.
It includes tools for:
- Administration interface
- Cryptographics
- Database interaction
- Exceptions
- HTTP Handling
- IP-Address handling
- Mixins for Classes## Installation
Use the python package manager pip to install djutils.```bash
pip install djutils
```## Usage
Just an example how you could use the exceptions_to_http decorator.
Each method defined in djutils has a small documentation with it.
```python
from djutils import http, exceptions@http.exceptions_to_http(exceptions.Error)
def my_route(request):
if request.POST:
raise exceptions.Error("POST is not allowed", code="no_post", status_code=403)return "Hello World"
```## License
GNU LGPLv2.1, see LICENSE## Maintainer
This package is maintained by Manuel Stingl.