Skip to content

Django utils for admin, crypto, database, http, ip, mail and models

License

Notifications You must be signed in to change notification settings

Voltane-EU/djutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

djutils

Tools for use within the django framework

djutils 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.

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.

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.

About

Django utils for admin, crypto, database, http, ip, mail and models

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages