djecorator

A flask-style decorator for Django views


License
MIT
Install
pip install djecorator==1.1.0

Documentation

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