Skip to main content

Django urls.py TemplateView urlpatterns

Project description

Installation

$ pip install django-urls-templateview

settings.py

INSTALLED_APPS+=['django_urls_templateview']

migrate

$ python manage.py migrate

Features

  • urls.py TemplateView urlpatterns
  • admin

Models

model table columns/fields
Map django_urls_templateview id,url,template_name

Examples

urls.py

from django.db import connection
from django.views.generic.base import TemplateView

urlpatterns = []

cursor = connection.cursor()
cursor.execute("SELECT url,template_name FROM public.django_urls_templateview")
for url,template_name in cursor.fetchall():
    urlpatterns.insert(0,path(url, TemplateView.as_view(template_name=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_urls_templateview-1.0.2.tar.gz (2.0 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