# HG changeset patch # User Pawel Solyga # Date 1229300486 0 # Node ID cd9bf163473c5dd98600c97e26b7b4affb754b6c # Parent e6ab5b0c2fda76de8e5229affd0d616d701111b6 Add missing dots, fix imports sorting and too long lines in different modules. Add TODO in soc.views.models.host module. Patch by: Pawel Solyga diff -r e6ab5b0c2fda -r cd9bf163473c app/soc/logic/dicts.py --- a/app/soc/logic/dicts.py Sun Dec 14 00:51:03 2008 +0000 +++ b/app/soc/logic/dicts.py Mon Dec 15 00:21:26 2008 +0000 @@ -91,7 +91,7 @@ def unzip(target, order): - """Constructs a list from target in the order specified by order + """Constructs a list from target in the order specified by order. Args: target: the dictionary to pull the values from @@ -123,7 +123,7 @@ def split(target): - """Takes a dictionary and splits it into single-valued dicts + """Takes a dictionary and splits it into single-valued dicts. If there are any values in target that are a list it is split up into a new dictionary instead. diff -r e6ab5b0c2fda -r cd9bf163473c app/soc/logic/models/user.py --- a/app/soc/logic/models/user.py Sun Dec 14 00:51:03 2008 +0000 +++ b/app/soc/logic/models/user.py Mon Dec 15 00:21:26 2008 +0000 @@ -57,7 +57,7 @@ return False def getForCurrentAccount(self): - """Retrieves the user entity for the currently logged in account + """Retrieves the user entity for the currently logged in account. If there is no user logged in, or they have no associated User entity, None is returend. diff -r e6ab5b0c2fda -r cd9bf163473c app/soc/views/helper/templatetags/forms_helpers.py --- a/app/soc/views/helper/templatetags/forms_helpers.py Sun Dec 14 00:51:03 2008 +0000 +++ b/app/soc/views/helper/templatetags/forms_helpers.py Mon Dec 15 00:21:26 2008 +0000 @@ -72,8 +72,8 @@ _readonly_field_as_table_row.html template (which is actually doing all of the work). - See soc/templates/soc/templatetags/_readonly_field_as_table_row.html for the CSS - styles used by this template tag. + See soc/templates/soc/templatetags/_readonly_field_as_table_row.html for + the CSS styles used by this template tag. Usage: {% load forms_helpers %} @@ -96,9 +96,10 @@ 'field_value': field_value} -@register.inclusion_tag('soc/templatetags/_readonly_multiline_field_as_table_row.html') +@register.inclusion_tag( + 'soc/templatetags/_readonly_multiline_field_as_table_row.html') def readonly_multiline_field_as_table_row(field_label, field_value): - """See readonly_field_as_table_row, but with a different template tag + """See readonly_field_as_table_row, but with a different template tag. """ return {'field_label': field_label, 'field_value': field_value} diff -r e6ab5b0c2fda -r cd9bf163473c app/soc/views/models/host.py --- a/app/soc/views/models/host.py Sun Dec 14 00:51:03 2008 +0000 +++ b/app/soc/views/models/host.py Mon Dec 15 00:21:26 2008 +0000 @@ -37,6 +37,8 @@ import soc.views.helper import soc.views.models.sponsor +# TODO(pawel.solyga): Rename all list methods and functions to something else +# and remove this tolist assignment tolist = list @@ -117,9 +119,9 @@ super(View, self).__init__(params=params) - def list(self, request, access_type, - page_name=None, params=None, filter=None): - """See base.View.list + def list(self, request, access_type, page_name=None, + params=None, filter=None): + """See base.View.list. Passes a filter to base.View.list so that only hosts from a sponsor that this user is host for are listed.