A flask-style decorator for Django views
Project description
Djecorator
Write Django routes in the same style as Flask.
Installation
pip install djecorator
Usage
views.py
from django.shortcuts import render
from djecorator import Route
route = Route()
@route("/")
def index(request):
return render(request, "index.html")
urls.py
import views
urlpatterns = [
...
]
urlpatterns += views.route.patterns
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
djecorator-1.1.0.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file djecorator-1.1.0.tar.gz
.
File metadata
- Download URL: djecorator-1.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31785a611b69d4f688f370caff9fd67336def64b02c005fa5df05fff3da23622 |
|
MD5 | 4ee28ee3641561c02a74dc0f4455c700 |
|
BLAKE2b-256 | a898b062cb3b055fb837c4d43e1fecd1ff2616ebd4d37f471aee19c067b14673 |
File details
Details for the file djecorator-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: djecorator-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b4336dfe4835522fe66a0705c3d819fd39523a209e97e27501dd9302c82d220 |
|
MD5 | f92227dcde375422cb72ad369acfa095 |
|
BLAKE2b-256 | eafe8d87c4f366fa6fc13e6b3a4f41ec1c9c6b007c101db8445c44267834ec39 |