Update cabinets and document_index api views docstrings. Update multi level docstrings as per Python best practices.

Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-03-14 21:39:14 -04:00
committed by Roberto Rosario
parent f44fbe5687
commit de65d96fe2
35 changed files with 40 additions and 227 deletions

View File

@@ -195,7 +195,6 @@ class UserForm(forms.ModelForm):
"""
Form used to edit an user's mininal fields by the user himself
"""
class Meta:
fields = ('username', 'first_name', 'last_name', 'email')
model = get_user_model()
@@ -205,7 +204,6 @@ class UserForm_view(DetailForm):
"""
Form used to display an user's public details
"""
class Meta:
fields = (
'username', 'first_name', 'last_name', 'email', 'last_login',

View File

@@ -48,7 +48,6 @@ class ExtraContextMixin(object):
"""
Mixin that allows views to pass extra context to the template
"""
extra_context = {}
def get_extra_context(self):
@@ -64,7 +63,6 @@ class FormExtraKwargsMixin(object):
"""
Mixin that allows a view to pass extra keyword arguments to forms
"""
form_extra_kwargs = {}
def get_form_extra_kwargs(self):
@@ -123,7 +121,6 @@ class MultipleObjectMixin(object):
"""
Mixin that allows a view to work on a single or multiple objects
"""
model = None
object_permission = None
pk_list_key = 'id_list'
@@ -184,7 +181,6 @@ class ObjectActionMixin(object):
"""
Mixin that performs an user action to a queryset
"""
success_message = 'Operation performed on %(count)d object'
success_message_plural = 'Operation performed on %(count)d objects'

View File

@@ -83,7 +83,6 @@ def render_subtemplate(context, template_name, template_context):
Renders the specified template with the mixed parent and
subtemplate contexts
"""
new_context = Context(context.flatten())
new_context.update(Context(template_context))
return get_template(template_name).render(new_context.flatten())

View File

@@ -312,7 +312,6 @@ def multi_object_action_view(request):
Proxy view called first when using a multi object action, which
then redirects to the appropiate specialized view
"""
next = request.POST.get(
'next', request.GET.get(
'next', request.META.get(