Commit 867779e2 authored by Christopher Toth's avatar Christopher Toth

Minor English cleanups across the codebase

parent de9f1c94
...@@ -29,10 +29,10 @@ class ActionsMixin(object): ...@@ -29,10 +29,10 @@ class ActionsMixin(object):
Actions mixin. Actions mixin.
In some cases, you might work with more than one "entity" (model, file, etc) in In some cases, you might work with more than one "entity" (model, file, etc) in
your admin view and will want to perform actions on group of entities at once. your admin view and will want to perform actions on a group of entities simultaneously.
In this case, you can add this functionality by doing this: In this case, you can add this functionality by doing this:
1. Add mixin to your administrative view class 1. Add this mixin to your administrative view class
2. Call `init_actions` in your class constructor 2. Call `init_actions` in your class constructor
3. Expose actions view 3. Expose actions view
4. Import `actions.html` library and add call library macros in your template 4. Import `actions.html` library and add call library macros in your template
...@@ -76,7 +76,7 @@ class ActionsMixin(object): ...@@ -76,7 +76,7 @@ class ActionsMixin(object):
def get_actions_list(self): def get_actions_list(self):
""" """
Return list and a dictionary of allowed actions. Return a list and a dictionary of allowed actions.
""" """
actions = [] actions = []
actions_confirmation = {} actions_confirmation = {}
......
...@@ -75,7 +75,7 @@ class ModelView(BaseModelView): ...@@ -75,7 +75,7 @@ class ModelView(BaseModelView):
""" """
Field to filter converter. Field to filter converter.
Override this attribute to use non-default converter. Override this attribute to use a non-default converter.
""" """
column_type_formatters = DEFAULT_FORMATTERS column_type_formatters = DEFAULT_FORMATTERS
...@@ -123,7 +123,7 @@ class ModelView(BaseModelView): ...@@ -123,7 +123,7 @@ class ModelView(BaseModelView):
def get_pk_value(self, model): def get_pk_value(self, model):
""" """
Return primary key value from the model instance Return the primary key value from the model instance
:param model: :param model:
Model instance Model instance
...@@ -154,7 +154,7 @@ class ModelView(BaseModelView): ...@@ -154,7 +154,7 @@ class ModelView(BaseModelView):
def scaffold_sortable_columns(self): def scaffold_sortable_columns(self):
""" """
Return sortable columns dictionary (name, field) Return a dictionary of sortable columns (name, field)
""" """
columns = {} columns = {}
...@@ -222,7 +222,7 @@ class ModelView(BaseModelView): ...@@ -222,7 +222,7 @@ class ModelView(BaseModelView):
def is_valid_filter(self, filter): def is_valid_filter(self, filter):
""" """
Validate if it is valid MongoEngine filter Validate if the provided filter is a valid MongoEngine filter
:param filter: :param filter:
Filter object Filter object
...@@ -254,7 +254,7 @@ class ModelView(BaseModelView): ...@@ -254,7 +254,7 @@ class ModelView(BaseModelView):
:param search: :param search:
Search criteria Search criteria
:param filters: :param filters:
List of applied fiters List of applied filters
:param execute: :param execute:
Run query immediately or not Run query immediately or not
""" """
...@@ -307,7 +307,7 @@ class ModelView(BaseModelView): ...@@ -307,7 +307,7 @@ class ModelView(BaseModelView):
def get_one(self, id): def get_one(self, id):
""" """
Return single model instance by ID Return a single model instance by its ID
:param id: :param id:
Model ID Model ID
......
...@@ -30,7 +30,7 @@ def import_attribute(name): ...@@ -30,7 +30,7 @@ def import_attribute(name):
:param name: :param name:
String reference. String reference.
Throws ImportError or AttributeError if module or attribute do not exist. Raises ImportError or AttributeError if module or attribute do not exist.
Example:: Example::
...@@ -80,7 +80,7 @@ def rec_getattr(obj, attr, default=None): ...@@ -80,7 +80,7 @@ def rec_getattr(obj, attr, default=None):
def get_dict_attr(obj, attr, default=None): def get_dict_attr(obj, attr, default=None):
""" """
Get attibute of the object without triggering its __getattr__. Get attribute of the object without triggering its __getattr__.
:param obj: :param obj:
Object Object
...@@ -98,7 +98,7 @@ def get_dict_attr(obj, attr, default=None): ...@@ -98,7 +98,7 @@ def get_dict_attr(obj, attr, default=None):
def get_property(obj, name, old_name, default=None): def get_property(obj, name, old_name, default=None):
""" """
Check if old property name exists and if it is - show warning message Check if old property name exists and if it does - show warning message
and return value. and return value.
Otherwise, return new property value Otherwise, return new property value
......
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