\": \"\", \"
\": \"\"}\n\n# Create a logging service.\nsmrylogger = logging.getLogger(\"smry\")\nsmrylogger.setLevel(logging.DEBUG)\n\ndef index(request):\n \"\"\"\n index(request)\n \n Site Front Page.\n\n Presents introductory text and a map of NCA regions. A form\n allows selection of a region. On submit, user is redirected\n to the rgn_smry view at the selected region.\n \"\"\"\n# smrylogger.debug(\"INDEX VIEW\")\n\n # Initialize a session.\n site_attr.init_session(request)\n\n attr_dct = site_attr.set_attrs(request, \"modis_lnd_cvr\") \n smrylogger.debug(\"index( )|attr_dct: %s\", attr_dct)\n\n # Region selection form.\n if request.method == \"POST\":\n rgn_form = RegionForm(request.POST) \n if rgn_form.is_valid():\n # Update attributes.\n for key in rgn_form.cleaned_data.keys():\n attr_dct[key] = rgn_form.cleaned_data[key]\n# smrylogger.debug(\"index( )|attr_dct: %s\", attr_dct)\n\n # Set session attributes to dictionary items.\n site_attr.set_session_attr(request, attr_dct)\n\n # Create response to redirect to region summary.\n response = HttpResponseRedirect(\"rgn_smry/\")\n else:\n # Create an instance of class RegionForm.\n rgn_form = RegionForm(initial = {\n \"region\": abbrv_to_rgn[attr_dct[\"region\"]],\n \"dscrpt_txt\": (attr_dct[\"dscrpt_txt\"] == \"True\")})\n\n # Get introductory text from the database and process to html.\n intro_text = text_items.get_txt_html(\"index\", \"intro_text\")\n intro_text_1 = text_items.get_txt_html(\"index\", \"intro_text_1\",\n replace = {\"\": \"\", \"
\": \"