Don't use CBV in common app's urls.py
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import patterns, url
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from .views import AboutView
|
||||
|
||||
urlpatterns = patterns(
|
||||
'common.views',
|
||||
url(r'^about/$', TemplateView.as_view(template_name='main/about.html'), name='about_view'),
|
||||
url(r'^about/$', AboutView.as_view(), name='about_view'),
|
||||
url(r'^license/$', 'license_view', (), name='license_view'),
|
||||
url(r'^password/change/done/$', 'password_change_done', (), name='password_change_done'),
|
||||
url(r'^object/multiple/action/$', 'multi_object_action_view', (), name='multi_object_action_view'),
|
||||
|
||||
@@ -13,7 +13,7 @@ from django.shortcuts import redirect, render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.utils.http import urlencode
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views.generic import FormView
|
||||
from django.views.generic import FormView, TemplateView
|
||||
from django.views.generic.edit import CreateView, DeleteView, UpdateView
|
||||
from django.views.generic.list import ListView
|
||||
|
||||
@@ -449,3 +449,7 @@ class MultiFormView(FormView):
|
||||
return self.forms_valid(forms)
|
||||
else:
|
||||
return self.forms_invalid(forms)
|
||||
|
||||
|
||||
class AboutView(TemplateView):
|
||||
template_name='main/about.html'
|
||||
|
||||
Reference in New Issue
Block a user