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
TemplateViewurlpatterns
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django_urls_templateview-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fe15fe3c54a64776a7aec7619d0aef6fdccc12963055505dfa1219af905b51f |
|
MD5 | f3b87e807425195931e67c51ca46e1df |
|
BLAKE2b-256 | 9ab6d44ef8fff4ffc9a142158495cd46260b6ee99269503c2b5e06800a4e16f5 |