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):
Actions mixin.
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:
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
3. Expose actions view
4. Import `actions.html` library and add call library macros in your template
......@@ -76,7 +76,7 @@ class ActionsMixin(object):
def get_actions_list(self):
"""
Return list and a dictionary of allowed actions.
Return a list and a dictionary of allowed actions.
"""
actions = []
actions_confirmation = {}
......
......@@ -75,7 +75,7 @@ class ModelView(BaseModelView):
"""
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
......@@ -123,7 +123,7 @@ class ModelView(BaseModelView):
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:
Model instance
......@@ -154,7 +154,7 @@ class ModelView(BaseModelView):
def scaffold_sortable_columns(self):
"""
Return sortable columns dictionary (name, field)
Return a dictionary of sortable columns (name, field)
"""
columns = {}
......@@ -222,7 +222,7 @@ class ModelView(BaseModelView):
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:
Filter object
......@@ -254,7 +254,7 @@ class ModelView(BaseModelView):
:param search:
Search criteria
:param filters:
List of applied fiters
List of applied filters
:param execute:
Run query immediately or not
"""
......@@ -307,7 +307,7 @@ class ModelView(BaseModelView):
def get_one(self, id):
"""
Return single model instance by ID
Return a single model instance by its ID
:param id:
Model ID
......
......@@ -30,7 +30,7 @@ def import_attribute(name):
:param name:
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::
......@@ -80,7 +80,7 @@ def rec_getattr(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:
Object
......@@ -98,7 +98,7 @@ def get_dict_attr(obj, attr, 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.
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