Skip to main content

Flask-Style URL Patterns for Django

Project description

Flask-Style URL Patterns for Django

Usage

In urls.py: change your regex patterns to flask-styled paths

(see format here: http://flask.pocoo.org/docs/latest/api/#url-route-registrations)

from django.conf.urls import include
from django_fsu import url

from . import views

urlpatterns = [
    url('login', views.login),
    url('user/<username>', views.profile),
    url('article/<int:pk>', views.article),
    url('projects/', include('projects.urls'),
]

Installation

pip install django-fsu

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

django-fsu-0.1.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page