Commit cc3fcb1b8bcbc2a11066c1ac51bb78ecbfc229e2

Authored by Gustavo Bernardo
1 parent fe73d6be

Changing context name to apply fields [Issue: #120]

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
links/views.py
... ... @@ -13,7 +13,7 @@ class CreateLink(generic.CreateView):
13 13 template_name = 'links/create_link.html'
14 14 form_class = CreateLinkForm
15 15 success_url = reverse_lazy('course:manage')
16   - context_object_name = 'links'
  16 + context_object_name = 'form'
17 17  
18 18 def form_valid(self, form):
19 19 form.save()
... ... @@ -26,7 +26,6 @@ class CreateLink(generic.CreateView):
26 26 context['form'] = CreateLinkForm
27 27 return context
28 28  
29   -
30 29 def deleteLink(request,linkname):
31 30 link = get_object_or_404(Link,name = linkname)
32 31 link.delete()
... ...