Skip to content

Commit

Permalink
Ch17: Replace template_name in most GCBV.
Browse files Browse the repository at this point in the history
Excluding UpdateView subclasses.
  • Loading branch information
jambonrose committed Jul 30, 2015
1 parent 3b4975a commit 889de90
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions organizer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class NewsLinkCreate(CreateView):
form_class = NewsLinkForm
template_name = 'organizer/newslink_form.html'
model = NewsLink


class NewsLinkDelete(View):
Expand Down Expand Up @@ -74,15 +74,13 @@ def post(self, request, pk):

class StartupCreate(CreateView):
form_class = StartupForm
template_name = 'organizer/startup_form.html'
model = Startup


class StartupDelete(DeleteView):
model = Startup
success_url = reverse_lazy(
'organizer_startup_list')
template_name = (
'organizer/startup_confirm_delete.html')


class StartupDetail(DetailView):
Expand Down Expand Up @@ -140,15 +138,13 @@ class StartupUpdate(UpdateView):

class TagCreate(CreateView):
form_class = TagForm
template_name = 'organizer/tag_form.html'
model = Tag


class TagDelete(DeleteView):
model = Tag
success_url = reverse_lazy(
'organizer_tag_list')
template_name = (
'organizer/tag_confirm_delete.html')


class TagDetail(DetailView):
Expand Down

0 comments on commit 889de90

Please sign in to comment.