Commit fb010aba authored by okhin's avatar okhin 🚴

Fixing the AddView #22

parent 28e9cc7d
......@@ -146,8 +146,9 @@ class JSONMixin(object):
def get(self, request, *args, **kwargs):
return HttpResponse(serializers.serialize('json', self.get_queryset()))
class AddForm(FormView, MultipleObjectMixin):
template = 'index.html'
class AddForm(FormView):
model = Violation
template_name = 'index.html'
form_class = AddViolation
success_url = '/'
context_object_name = 'violations'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment