@@ -158,7 +158,7 @@ class CarManagement(View):
158
158
message = None
159
159
160
160
def get (self , request ):
161
- self .model = models .Vehicle .objects .filter (owner = request .user )
161
+ self .model = models .Vehicle .objects .filter (owner = request .user )
162
162
return render (request , 'web/cars.html' , {"form" : self .form ,
163
163
"car_list" : self .model ,
164
164
"message" : self .message ,
@@ -197,13 +197,13 @@ def _add_car(self, in_request):
197
197
198
198
def _check_required (self ):
199
199
if self .name and self .color :
200
- new_car = models .Vehicle (owner = self .owner , name = self .name ,
201
- color = self .color , register = self .register_sign ,
202
- air_conditioning = self .air_conditioning ,
203
- animals_allowed = self .animals_allowed ,
204
- wifi_on_board = self .has_wifi ,
205
- smoking_allowed = self .smoking_allowed ,
206
- highway_mark = self .has_highway_sign )
200
+ new_car = models .Vehicle (owner = self .owner , name = self .name ,
201
+ color = self .color , register = self .register_sign ,
202
+ air_conditioning = self .air_conditioning ,
203
+ animals_allowed = self .animals_allowed ,
204
+ wifi_on_board = self .has_wifi ,
205
+ smoking_allowed = self .smoking_allowed ,
206
+ highway_mark = self .has_highway_sign )
207
207
new_car .save ()
208
208
return HttpResponseRedirect ("." )
209
209
else :
0 commit comments