Remove spaces between dict key name and colon. Fix some typos based on comments http://code.google.com/p/soc/source/detail?r=739.
Patch by: Pawel Solyga
Review by: to-be-reviewed
--- a/app/soc/logic/models/base.py Mon Oct 13 21:54:51 2008 +0000
+++ b/app/soc/logic/models/base.py Mon Oct 13 22:04:42 2008 +0000
@@ -80,7 +80,7 @@
Returns:
* None if a field is false.
- * Eentity for supplied fields
+ * Entity for supplied fields
Raises:
out_of_band.ErrorResponse if link name is not false, but no Sponsor entity
@@ -171,7 +171,7 @@
"""Update existing entity, or create new one with supplied properties.
Args:
- properties: dictionairy with entity properties and their values
+ properties: dict with entity properties and their values
key_name: the key_name of the entity that uniquely identifies it
Returns:
--- a/app/soc/views/site/home.py Mon Oct 13 21:54:51 2008 +0000
+++ b/app/soc/views/site/home.py Mon Oct 13 22:04:42 2008 +0000
@@ -163,14 +163,14 @@
user = models.user.logic.getFromFields(email=logged_in_id)
properties = {
- 'title' : document_form.cleaned_data.get('title'),
- 'short_name' : document_form.cleaned_data.get('short_name'),
- 'abstract' : document_form.cleaned_data.get('abstract'),
- 'content' : document_form.cleaned_data.get('content'),
- 'link_name' : link_name,
- 'partial_path' : partial_path,
- 'id' : logged_in_id,
- 'user' : user,
+ 'title': document_form.cleaned_data.get('title'),
+ 'short_name': document_form.cleaned_data.get('short_name'),
+ 'abstract': document_form.cleaned_data.get('abstract'),
+ 'content': document_form.cleaned_data.get('content'),
+ 'link_name': link_name,
+ 'partial_path': partial_path,
+ 'id': logged_in_id,
+ 'user': user,
}
site_doc = document.logic.updateOrCreateFromFields(
@@ -179,7 +179,7 @@
feed_url = settings_form.cleaned_data.get('feed_url')
site_settings = models.settings.logic.updateOrCreateFromFields(
- {'feed_url' : feed_url, 'home' : site_doc}, path=DEF_SITE_SETTINGS_PATH)
+ {'feed_url': feed_url, 'home': site_doc}, path=DEF_SITE_SETTINGS_PATH)
context['notice'] = 'Site Settings saved.'
else: # request.method == 'GET'
--- a/app/soc/views/site/user/profile.py Mon Oct 13 21:54:51 2008 +0000
+++ b/app/soc/views/site/user/profile.py Mon Oct 13 22:04:42 2008 +0000
@@ -414,10 +414,10 @@
link_name = form.cleaned_data.get('link_name')
properties = {
- 'id' : form_id,
- 'link_name' : link_name,
- 'nick_name' : form.cleaned_data.get('nick_name'),
- 'is_developer' : form.cleaned_data.get('is_developer'),
+ 'id': form_id,
+ 'link_name': link_name,
+ 'nick_name': form.cleaned_data.get('nick_name'),
+ 'is_developer': form.cleaned_data.get('is_developer'),
}
user = models.user.logic.updateOrCreateFromFields(properties, email=form_id)
--- a/app/soc/views/user/profile.py Mon Oct 13 21:54:51 2008 +0000
+++ b/app/soc/views/user/profile.py Mon Oct 13 22:04:42 2008 +0000
@@ -134,9 +134,9 @@
if form.is_valid():
new_link_name = form.cleaned_data.get('link_name')
properties = {
- 'link_name' : new_link_name,
- 'nick_name' : form.cleaned_data.get("nick_name"),
- 'id' : id,
+ 'link_name': new_link_name,
+ 'nick_name': form.cleaned_data.get("nick_name"),
+ 'id': id,
}
user = models.user.logic.updateOrCreateFromFields(properties, email=id.email())