@@ -23,7 +23,7 @@ def get_queryset(self):
2323 return ToDoItem .objects .filter (todo_list_id = self .kwargs ["list_id" ])
2424
2525 def get_context_data (self ):
26- context = super (ItemListView , self ).get_context_data ()
26+ context = super ().get_context_data ()
2727 context ["todo_list" ] = ToDoList .objects .get (id = self .kwargs ["list_id" ])
2828 return context
2929
@@ -33,7 +33,7 @@ class ListCreate(CreateView):
3333 fields = ["title" ]
3434
3535 def get_context_data (self ):
36- context = super (ListCreate , self ).get_context_data ()
36+ context = super ().get_context_data ()
3737 context ["title" ] = "Add a new list"
3838 return context
3939
@@ -48,13 +48,13 @@ class ItemCreate(CreateView):
4848 ]
4949
5050 def get_initial (self ):
51- initial_data = super (ItemCreate , self ).get_initial ()
51+ initial_data = super ().get_initial ()
5252 todo_list = ToDoList .objects .get (id = self .kwargs ["list_id" ])
5353 initial_data ["todo_list" ] = todo_list
5454 return initial_data
5555
5656 def get_context_data (self ):
57- context = super (ItemCreate , self ).get_context_data ()
57+ context = super ().get_context_data ()
5858 todo_list = ToDoList .objects .get (id = self .kwargs ["list_id" ])
5959 context ["todo_list" ] = todo_list
6060 context ["title" ] = "Create a new item"
@@ -74,7 +74,7 @@ class ItemUpdate(UpdateView):
7474 ]
7575
7676 def get_context_data (self ):
77- context = super (ItemUpdate , self ).get_context_data ()
77+ context = super ().get_context_data ()
7878 context ["todo_list" ] = self .object .todo_list
7979 context ["title" ] = "Edit item"
8080 return context
@@ -97,6 +97,6 @@ def get_success_url(self):
9797 return reverse_lazy ("list" , args = [self .kwargs ["list_id" ]])
9898
9999 def get_context_data (self , ** kwargs ):
100- context = super (ItemDelete , self ).get_context_data (** kwargs )
100+ context = super ().get_context_data (** kwargs )
101101 context ["todo_list" ] = self .object .todo_list
102102 return context
0 commit comments