Skip to content

Instantly share code, notes, and snippets.

@paltman
Created October 19, 2017 02:17
Show Gist options
  • Save paltman/b4aa695556b63ea76a7abdcfd1111713 to your computer and use it in GitHub Desktop.
Save paltman/b4aa695556b63ea76a7abdcfd1111713 to your computer and use it in GitHub Desktop.
from django.conf.urls import url
from .configs import CONFIG_MAP
from .views import as_view, set_template_set
urlpatterns = [
url(r"^$", as_view("homepage.html"), name="home"),
url(r"^__set_tmpl/$", set_template_set, name="set_template_set")
]
for label in CONFIG_MAP:
urlpatterns.append(CONFIG_MAP[label].url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment