Skip to main content

Django url2template map

Project description

Installation

$ pip install django-url2template

settings.py

INSTALLED_APPS+=['django_url2template']

migrate

$ python manage.py migrate

views.py

from django.shortcuts import render
from django_url2template.utils import get_template_name

template_name = get_template_name(request.path[1:])
if template_name:
    return render(request, template_name, {})
### Models
model|table|columns/fields
-|-|-
`Map`|`django_url2template_map`|id,url,template_name

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_url2template-1.0.0.tar.gz (2.2 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