Fixes some typos spotted in a few Horizon files.

It fixes a few typos spotted in comments and debug/exception messages of these Horizon files:
 horizon/tables/base.py
 horizon/tables/formset.py
 horizon/tables/views.py
 horizon/utils/functions.py
 horizon/workflows/base.py

Change-Id: I7f3069df3f60a6a788f71870f9b49ffe23fdb5a6
Closes-Bug: #1268712
This commit is contained in:
Vahid Hashemian 2014-01-13 13:06:31 -08:00
parent f7d00b5960
commit fc7bd9e30b
5 changed files with 10 additions and 10 deletions

View File

@ -837,8 +837,8 @@ class DataTableOptions(object):
.. attribute:: data_types
A list of data types that this table would accept. Default to be an
empty list, but if the attibute ``mixed_data_type`` is set to ``True``,
then this list must have at least one element.
empty list, but if the attribute ``mixed_data_type`` is set to
``True``, then this list must have at least one element.
.. attribute:: data_type_name
@ -917,7 +917,7 @@ class DataTableOptions(object):
self.mixed_data_type = True
# However, if the mixed_data_type is set to True manually and the
# the data_types is empty, raise an errror.
# the data_types is empty, raise an error.
if self.mixed_data_type and len(self.data_types) <= 1:
raise ValueError("If mixed_data_type is set to True in class %s, "
"data_types should has more than one types" %
@ -1189,7 +1189,7 @@ class DataTable(object):
@property
def needs_form_wrapper(self):
"""Boolean. Indicates whather this table should be rendered wrapped in
"""Boolean. Indicates whether this table should be rendered wrapped in
a ``<form>`` tag or not.
"""
# If needs_form_wrapper is explicitly set, defer to that.
@ -1281,7 +1281,7 @@ class DataTable(object):
# We either didn't get an action or we're being hacked. Goodbye.
return None
# Meanhile, back in Gotham...
# Meanwhile, back in Gotham...
if not action.requires_input or obj_id or obj_ids:
if obj_id:
obj_id = self.sanitize_id(obj_id)
@ -1476,7 +1476,7 @@ class DataTable(object):
"""Returns a display name that identifies this object.
By default, this returns a ``name`` attribute from the given object,
but this can be overriden to return other values.
but this can be overridden to return other values.
"""
if hasattr(datum, 'name'):
return datum.name

View File

@ -168,7 +168,7 @@ class FormsetDataTable(FormsetDataTableMixin, horizon_tables.DataTable):
.. attribute:: formset_class
A classs made with ``django.forms.formsets.formset_factory``
A class made with ``django.forms.formsets.formset_factory``
containing the definition of the formset to use with this data table.
The columns that are named the same as the formset fields will be

View File

@ -256,7 +256,7 @@ class MixedDataTableView(DataTableView):
self.table = super(MixedDataTableView, self).get_table()
if not self.table._meta.mixed_data_type:
raise AttributeError('You must have at least two elements in '
'the data_types attibute '
'the data_types attribute '
'in table %s to use MixedDataTableView.'
% self.table._meta.name)
return self.table

View File

@ -45,7 +45,7 @@ def logout_with_message(request, msg):
"""Send HttpResponseRedirect to LOGOUT_URL.
`msg` is a message displayed on the login page after the logout, to explain
the logout reson.
the logout reason.
"""
logout(request)
response = http.HttpResponseRedirect(

View File

@ -848,7 +848,7 @@ class Workflow(html.HTMLElement):
def add_error_to_step(self, message, slug):
"""Adds an error to the workflow's Step with the
specifed slug based on API issues. This is useful
specified slug based on API issues. This is useful
when you wish for API errors to appear as errors on
the form rather than using the messages framework.
"""