<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rachel's Blog &#187; Web Programming</title>
	<atom:link href="http://www.willmer.com/kb/category/websites/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.willmer.com/kb</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 14:27:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Selenium WebDriver won&#8217;t let you add/change request headers</title>
		<link>http://www.willmer.com/kb/2011/07/selenium-webdriver-wont-let-you-addchange-request-headers/</link>
		<comments>http://www.willmer.com/kb/2011/07/selenium-webdriver-wont-let-you-addchange-request-headers/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 13:20:43 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/?p=151</guid>
		<description><![CDATA[Selenium looks like being a good tool for writing some automated browser tests. Selenium WebDriver with the python bindings looks like it could be fantastic for doing this. But then they go and spoil it&#8230; I need to be able to modify the headers in my requests as part of my tests. WebDriver doesn&#8217;t let [...]]]></description>
			<content:encoded><![CDATA[<p>Selenium looks like being a good tool for writing some automated browser tests.</p>
<p>Selenium WebDriver with the python bindings looks like it could be fantastic for doing this.</p>
<p>But then they go and spoil it&#8230;</p>
<p>I need to be able to modify the headers in my requests as part of my tests. WebDriver doesn&#8217;t let you do that. Worse, its a conscious design choice they have made to not let you do this since they want WD to only do what a user can do.</p>
<p>But, um, doesn&#8217;t WD allow you to set/change cookies? Go figure&#8230;</p>
<p>So their suggestion is to use a proxy for this.</p>
<p>So AFAICS they&#8217;ve taken the main benefit of using WebDriver over the original Selenium (you don&#8217;t need to run a separate server process) and removed it. As a design choice&#8230;.</p>
<p>Looks like I&#8217;m not the only person who wants this feature..</p>
<p>http://code.google.com/p/selenium/issues/detail?id=141</p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2011/07/selenium-webdriver-wont-let-you-addchange-request-headers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to import extra INSTALLED_APPS from an external settings file</title>
		<link>http://www.willmer.com/kb/2011/03/how-to-import-extra-installed_apps-from-an-external-settings-file/</link>
		<comments>http://www.willmer.com/kb/2011/03/how-to-import-extra-installed_apps-from-an-external-settings-file/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 11:11:35 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Django]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/?p=147</guid>
		<description><![CDATA[from test_settings import * applist = list(INSTALLED_APPS) applist.extend(INSTALLED_TEST_APPS) INSTALLED_APPS = tuple(applist)]]></description>
			<content:encoded><![CDATA[<p>from test_settings import *<br />
applist = list(INSTALLED_APPS)<br />
applist.extend(INSTALLED_TEST_APPS)<br />
INSTALLED_APPS = tuple(applist)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2011/03/how-to-import-extra-installed_apps-from-an-external-settings-file/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>&#8220;LESSjs will obsolete css&#8221;</title>
		<link>http://www.willmer.com/kb/2010/08/lessjs-will-obsolete-css/</link>
		<comments>http://www.willmer.com/kb/2010/08/lessjs-will-obsolete-css/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 08:48:54 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/?p=139</guid>
		<description><![CDATA[http://fadeyev.net/2010/06/19/lessjs-will-obsolete-css]]></description>
			<content:encoded><![CDATA[<p><a href="http://fadeyev.net/2010/06/19/lessjs-will-obsolete-css">http://fadeyev.net/2010/06/19/lessjs-will-obsolete-css</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2010/08/lessjs-will-obsolete-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;AttributeError: &#8216;module&#8217; object has no attribute &#8216;blah&#8217;&#8221;</title>
		<link>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/</link>
		<comments>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 15:05:47 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/</guid>
		<description><![CDATA[The obvious cause of this is that the settings.py doesn&#8217;t have the directory containing blah listed in INSTALLED_APPS. A less obvious cause: you&#8217;ll also get this error if the directory doesn&#8217;t contain a file __init__.py.]]></description>
			<content:encoded><![CDATA[<ul>
<li>The obvious cause of this is that the settings.py doesn&#8217;t have the directory containing blah listed in INSTALLED_APPS.</li>
<li>A less obvious cause: you&#8217;ll also get this error if the directory doesn&#8217;t contain a file __init__.py.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2007/12/attributeerror-module-object-has-no-attribute-blah/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Dojo Custom Widget namespaces in V0.4</title>
		<link>http://www.willmer.com/kb/2007/01/dojo-custom-widget-namespaces-in-v04/</link>
		<comments>http://www.willmer.com/kb/2007/01/dojo-custom-widget-namespaces-in-v04/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 16:19:04 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Dojo]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/2007/01/dojo-custom-widget-namespaces-in-v04/</guid>
		<description><![CDATA[Been beating my head against a brick wall trying to figure this out from the dojo documentation &#8211; here&#8217;s the answer&#8230; http://blog.tijs.org/archives/2006/10/26/migrating-to-dojo-04/]]></description>
			<content:encoded><![CDATA[<p>Been beating my head against a brick wall trying to figure this out from the dojo documentation &#8211; here&#8217;s the answer&#8230;</p>
<p><a href="http://blog.tijs.org/archives/2006/10/26/migrating-to-dojo-04/">http://blog.tijs.org/archives/2006/10/26/migrating-to-dojo-04/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2007/01/dojo-custom-widget-namespaces-in-v04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmatic usage of FilteringTable</title>
		<link>http://www.willmer.com/kb/2006/12/programmatic-usage-of-filteringtable/</link>
		<comments>http://www.willmer.com/kb/2006/12/programmatic-usage-of-filteringtable/#comments</comments>
		<pubDate>Fri, 15 Dec 2006 12:08:34 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Dojo]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/2006/12/programmatic-usage-of-filteringtable/</guid>
		<description><![CDATA[I&#8217;m using FilteringTable in a dynamically generated website, here&#8217;s how I got it working&#8230; Thanks to Tom Trenka for the original nudge in the direction of the Dojo nightly test for the programmatic usage of FilteringTable /* * Dynamic Filtering Table */ // Creates the FilteringTable widget and ties it to an existing HTML Table. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using FilteringTable in a dynamically generated website, here&#8217;s how I got it working&#8230;</p>
<p>Thanks to Tom Trenka for the original nudge in the direction of the <a title="Dojo nightly test for programmatic usage of FilteringTable" target="_blank" href="http://archive.dojotoolkit.org/nightly/tests/widget/test_FilteringTable_programmatic.html">Dojo nightly test for the programmatic usage of FilteringTable<br />
</a></p>
<p><code /></p>
<p>/*<br />
* Dynamic Filtering Table<br />
*/</p>
<p>// Creates the FilteringTable widget and ties it to an existing HTML Table.<br />
// Call once on load.</p>
<p>function doCreateFilteringTable(view) {<br />
//   debugger;<br />
dojo.io.bind({<br />
url: "/get_columns?view="+view,<br />
load: handleCreateFilteringTable,<br />
error: handleError,<br />
timeout: handleTimeout,<br />
mimetype: "application/json"<br />
});<br />
}</p>
<p>// Populates the FilteringTable widget with live data.<br />
// Call whenever you want.</p>
<p>function doUpdateFilteringTable(view) {<br />
//   debugger;<br />
var url;<br />
url="/get_rows?view="+view;</p>
<p>dojo.io.bind({<br />
url: url,<br />
load: handleUpdateFilteringTable,<br />
error: handleError,<br />
timeout: handleTimeout,<br />
mimetype: "application/json"<br />
});<br />
}</p>
<p>function handleCreateFilteringTable(type,data,evt) {<br />
var e;</p>
<p>//   debugger;</p>
<p>try {</p>
<p>var table_id="tbl_"+data.view;<br />
var widget_id=table_id; // they don't need to be the same</p>
<p>var table;<br />
table=dojo.widget.createWidget(<br />
"dojo:FilteringTable",<br />
{<br />
// this provides unique id for table rows<br />
valueField:"id",</p>
<p>// must provide this so that we can find it again,<br />
// otherwise random id is generated<br />
widgetId: "tbl_"+data.view,</p>
<p>},<br />
dojo.byId(table_id)<br />
);</p>
<p>// add the columns<br />
for (x in data.columns)<br />
{<br />
var col=data.columns[x];<br />
table.columns.push(table.createMetaData(col));<br />
}</p>
<p>// set the initial data set to be empty<br />
table.store.setData([]);</p>
<p>// fetch the data<br />
doUpdateFilteringTable(data.view);<br />
} catch (e) {<br />
var errstr=e.name+": "+e.message;<br />
doLog(errstr,"error");<br />
}<br />
}</p>
<p>function handleUpdateFilteringTable(type,data,evt) {<br />
//   debugger;</p>
<p>var e;</p>
<p>/* get list of tickers and build table from them */<br />
try {<br />
var view=data.view;</p>
<p>// fill in table body<br />
var tabledata=[];<br />
var table;<br />
var id;<br />
var entry;<br />
var x;<br />
var col;</p>
<p>table=dojo.widget.byId("tbl_"+view);<br />
for (id in data.list)<br />
{<br />
// construct line<br />
var line={};<br />
entry=data.list[id];</p>
<p>for (x in entry)<br />
{<br />
// add one cell<br />
// This is the format expected by dojo:filteringTable<br />
var value;<br />
col=entry[x];<br />
line["id"]=id;<br />
line[col["heading"]]=col["value"]<br />
}</p>
<p>// now add the row<br />
tabledata.push(line);<br />
}</p>
<p>table.store.setData(tabledata);<br />
} catch (e) {<br />
var errstr=e.name+": "+e.message;<br />
doLog(errstr,"error");<br />
}<br />
}</p>
<p>In this example, the server is returning this for get_columns():</p>
<p>{<br />
"columns": [<br />
  {"dataType": "String", "field": "Column1"},<br />
  {"dataType": "String", "field": "Column2"},<br />
  {"dataType": "String", "field": "Column3"},<br />
  etc...<br />
],<br />
 other stuff...<br />
}</p>
<p>and get_rows() returns this from the server:</p>
<p>{<br />
"list": {<br />
 "id1": [<br />
   {"heading": "Column1", "value": 25},<br />
  {"heading": "Column2", "value": "ABC.L"},<br />
  {"heading": "Column3", "value": 395}<br />
],<br />
 "id2": [<br />
   {"heading": "Column1", "value": 57},<br />
  {"heading": "Column2", "value": "MFXYZ.L"},<br />
  {"heading": "Column3", "value": 42}<br />
]<br />
   }<br />
}</p>
<p>(I've removed non-relevant stuff from these responses for clarity.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2006/12/programmatic-usage-of-filteringtable/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t use eval() for reading JSON from untrusted sites</title>
		<link>http://www.willmer.com/kb/2006/11/dont-use-eval-for-reading-json-from-untrusted-sites/</link>
		<comments>http://www.willmer.com/kb/2006/11/dont-use-eval-for-reading-json-from-untrusted-sites/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 16:25:36 +0000</pubDate>
		<dc:creator>site admin</dc:creator>
				<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/2006/11/dont-use-eval-for-reading-json-from-untrusted-sites/</guid>
		<description><![CDATA[Use a JSON parser instead, like this one at http://www.json.org/json.js/ Why? it protects you against malicious servers feeding you bad bad code&#8230;]]></description>
			<content:encoded><![CDATA[<p>Use a JSON parser instead, like this one at <a title="JSON Parser" href="http://www.json.org/json.js">http://www.json.org/json.js/</a></p>
<p>Why? it protects you against malicious servers feeding you bad bad code&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2006/11/dont-use-eval-for-reading-json-from-untrusted-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django GeoIP templatetag</title>
		<link>http://www.willmer.com/kb/2006/10/django-geoip-templatetag/</link>
		<comments>http://www.willmer.com/kb/2006/10/django-geoip-templatetag/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 18:17:26 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[geoip]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/2006/10/django-geoip-templatetag/</guid>
		<description><![CDATA[I&#8217;ve published 2 template tags for use with GeoIP at geoip.py. Hope they may be of use&#8230; Usage: # Templatetag get_country_name returns the client&#8217;s country code # # Example: # {% ifequal get_country &#8220;GB&#8221; %} # do something # {% endifequal %} # Templatetag get_country sets the given variable name # to the client&#8217;s country [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve published 2 template tags for use with GeoIP at <a title="geoip.py" href="http://www.willmer.org/html/djangocode/geoip.py">geoip.py.</a></p>
<p>Hope they may be of use&#8230;</p>
<p>Usage:</p>
<p># Templatetag get_country_name returns the client&#8217;s country code<br />
#<br />
# Example:<br />
# {% ifequal get_country &#8220;GB&#8221; %}<br />
#       do something<br />
# {% endifequal %}</p>
<p># Templatetag get_country sets the given variable name<br />
# to the client&#8217;s country code<br />
#<br />
# Example:<br />
# {% get_country as my_country %}<br />
# {% ifequal my_country &#8220;GB&#8221; %}<br />
#       do something<br />
# {% endifequal %}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2006/10/django-geoip-templatetag/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Django/Ajax: a great simple tutorial</title>
		<link>http://www.willmer.com/kb/2006/10/djangoajax-a-great-simple-tutorial/</link>
		<comments>http://www.willmer.com/kb/2006/10/djangoajax-a-great-simple-tutorial/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 17:56:14 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Ajax]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/2006/10/djangoajax-a-great-simple-tutorial/</guid>
		<description><![CDATA[An excellent tutorial from James Bennett for your first step into combining AJAX with Django &#8220;A step-by-step walk through a simple AJAX form with Django backend&#8221;]]></description>
			<content:encoded><![CDATA[<p><a title="A simple AJAX example" href="http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1">An excellent tutorial </a>from James Bennett for your first step into combining AJAX with Django</p>
<p class="description"><cite>&#8220;A step-by-step walk through a simple AJAX form with Django backend&#8221;</cite></p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2006/10/djangoajax-a-great-simple-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make a Django ForeignKey optional</title>
		<link>http://www.willmer.com/kb/2006/10/how-to-make-a-foreign-key-optional/</link>
		<comments>http://www.willmer.com/kb/2006/10/how-to-make-a-foreign-key-optional/#comments</comments>
		<pubDate>Fri, 06 Oct 2006 11:12:23 +0000</pubDate>
		<dc:creator>Rachel</dc:creator>
				<category><![CDATA[Django]]></category>

		<guid isPermaLink="false">http://www.willmer.com/kb/2006/10/how-to-make-a-foreign-key-optional/</guid>
		<description><![CDATA[Looks like you need to have both blank=True and null=True to make a ForeignKey optional in a django model&#8230;]]></description>
			<content:encoded><![CDATA[<p>Looks like you need to have both <code>blank=True</code> and <code>null=True</code> to make a ForeignKey optional in a django model&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.willmer.com/kb/2006/10/how-to-make-a-foreign-key-optional/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

