Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class maintenanceEdit(LoginRequiredMixin,UpdateView,):
- model = Maintenance
- form_class = EditMaintenance
- template_name = 'maintenance_edit.html'
- login_url = 'login'
- def form_valid(self, form,):
- instance = form.save(commit=False)
- complete = form.instance.completed
- super(maintenanceEdit, self).form_valid(form)
- def get_absolute_url(self):
- return reverse('equipmentdashboard',)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement