Style fix, as requested by Todd to dict usage
authorSverre Rabbelier <srabbelier@gmail.com>
Sun, 05 Oct 2008 13:27:49 +0000
changeset 285 52e206a6a417
parent 284 44abd20296ce
child 286 d4cf44962f50
Style fix, as requested by Todd to dict usage Use "dict['key'] = value" instead of "dict.update({'key' : 'value'})" when updating only one key.
app/soc/views/site/docs/edit.py
app/soc/views/site/home.py
--- a/app/soc/views/site/docs/edit.py	Sat Oct 04 07:22:43 2008 +0000
+++ b/app/soc/views/site/docs/edit.py	Sun Oct 05 13:27:49 2008 +0000
@@ -278,6 +278,6 @@
     # no link name specified, so start with an empty form
     form = CreateForm()
 
-  context.update({'form': form})
+  context['form'] = form
 
   return helper.responses.respond(request, template, context)
--- a/app/soc/views/site/home.py	Sat Oct 04 07:22:43 2008 +0000
+++ b/app/soc/views/site/home.py	Sun Oct 05 13:27:49 2008 +0000
@@ -109,12 +109,12 @@
   site_settings = soc.logic.site.settings.getSiteSettings(DEF_SITE_SETTINGS_PATH)
 
   if site_settings:
-    context.update({'site_settings': site_settings})
+    context['site_settings'] = site_settings
     site_doc = site_settings.home
   
     if site_doc:
       site_doc.content = helper.templates.unescape(site_doc.content)
-      context.update({'site_document': site_doc})
+      context['site_document'] = site_doc
 
   return helper.responses.respond(request, template, context)
 
@@ -179,7 +179,7 @@
       site_settings = soc.logic.site.settings.updateOrCreateSiteSettings(
           DEF_SITE_SETTINGS_PATH, home=site_doc, feed_url=feed_url)
       
-      context.update({'submit_message': 'Site Settings saved.'})
+      context['submit_message'] = 'Site Settings saved.'
   else: # request.method == 'GET'
     # try to fetch SiteSettings entity by unique key_name
     site_settings = soc.logic.site.settings.getSiteSettings(