mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes in /InvenTree
This commit is contained in:
parent
ac3a4e3de4
commit
29ab19d51d
@ -11,4 +11,4 @@ class HelperForm(forms.ModelForm):
|
||||
super(forms.ModelForm, self).__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
|
||||
self.helper.form_tag = False
|
||||
self.helper.form_tag = False
|
||||
|
@ -23,4 +23,4 @@ class AuthRequiredMiddleware(object):
|
||||
# Code to be executed for each request/response after
|
||||
# the view is called.
|
||||
|
||||
return response
|
||||
return response
|
||||
|
@ -3,10 +3,10 @@ from __future__ import unicode_literals
|
||||
|
||||
from rest_framework import serializers
|
||||
from rest_framework import generics
|
||||
from rest_framework import mixins
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
|
||||
class UserSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
@ -33,4 +33,4 @@ class DraftRUDView(generics.RetrieveAPIView, generics.UpdateAPIView, generics.De
|
||||
if ctx_data.get('_is_final', False) in [True, u'true', u'True', 1]:
|
||||
super(generics.UpdateAPIView, self).perform_update(serializer)
|
||||
else:
|
||||
pass
|
||||
pass
|
||||
|
@ -9,7 +9,6 @@ from django.views.generic import UpdateView, CreateView, DeleteView
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
from rest_framework import views
|
||||
from django.http import JsonResponse
|
||||
|
||||
|
||||
class TreeSerializer(views.APIView):
|
||||
@ -159,9 +158,6 @@ class AjaxUpdateView(AjaxMixin, UpdateView):
|
||||
return response
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
||||
response = super(UpdateView, self).get(request, *args, **kwargs)
|
||||
|
||||
if request.is_ajax():
|
||||
form = self.form_class(instance=self.get_object())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user