File: urls.py

package info (click to toggle)
python-django-debreach 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: python: 327; makefile: 140
file content (30 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.urls import re_path
from django.views.generic.base import TemplateView
from django.views.generic.edit import FormView

from test_project.forms import TestForm

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = [
    # Examples:
    # url(r'^$', 'test_project.views.home', name='home'),
    # url(r'^test_project/', include('test_project.foo.urls')),
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
    re_path(r"^$", TemplateView.as_view(template_name="home.html"), name="home"),
    re_path(
        r"^form/$",
        FormView.as_view(
            form_class=TestForm, template_name="test.html", success_url="/"
        ),
        name="test_form",
    ),
]