<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>Developing with Django</title>
  <link>https://django-dev.dreamwidth.org/</link>
  <description>Developing with Django - Dreamwidth Studios</description>
  <lastBuildDate>Sat, 19 Apr 2014 20:27:48 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>django_dev</lj:journal>
  <lj:journaltype>community</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/318969/437163</url>
    <title>Developing with Django</title>
    <link>https://django-dev.dreamwidth.org/</link>
    <width>100</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/4559.html</guid>
  <pubDate>Sat, 19 Apr 2014 20:27:48 GMT</pubDate>
  <title>Ever wanted a simplified Django tutorial?</title>
  <link>https://django-dev.dreamwidth.org/4559.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://programming.oreilly.com/2014/04/simplifying-django.html&quot;&gt;Simplifying Django&lt;/a&gt; -- has a very clever set up as an example&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=4559&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/4559.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/4308.html</guid>
  <pubDate>Tue, 26 Feb 2013 20:45:05 GMT</pubDate>
  <title>Django 1.5 released!</title>
  <link>https://django-dev.dreamwidth.org/4308.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Woo!&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.djangoproject.com/weblog/2013/feb/26/15/&quot;&gt;https://www.djangoproject.com/weblog/2013/feb/26/15/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This release includes experimental Python 3 support, configurable user models.  Note: the new URL template tag is in full swing now.  Any stragglers in your templates that aren&apos;t using it will need to convert before upgrading!&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=4308&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/4308.html</comments>
  <category>version release</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/3886.html</guid>
  <pubDate>Fri, 23 Mar 2012 18:50:03 GMT</pubDate>
  <title>Django 1.4 released!</title>
  <link>https://django-dev.dreamwidth.org/3886.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I am &lt;em&gt;really&lt;/em&gt; excited about this release.  Currently my two favorite features are &lt;a href=&quot;https://docs.djangoproject.com/en/dev/releases/1.4/#args-and-kwargs-support-for-template-tag-helper-functions&quot;&gt;*args and **kwargs support for template tag helper functions (and an &quot;assignment tag&quot;)&lt;/a&gt; and &lt;a href=&quot;https://docs.djangoproject.com/en/dev/releases/1.4/#list-filters-in-admin-interface&quot;&gt;list filters in admin interface&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=3886&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/3886.html</comments>
  <category>version release</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/3741.html</guid>
  <pubDate>Tue, 28 Feb 2012 18:05:49 GMT</pubDate>
  <title>Tip of my day: db.reset_queries()</title>
  <link>https://django-dev.dreamwidth.org/3741.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Are you writing a script to update tons of stuff in your Django database?&lt;br /&gt;&lt;br /&gt;Then you are going to need to &lt;tt&gt;from django import db&lt;/tt&gt; and use &lt;tt&gt;db.reset_queries()&lt;/tt&gt; on appropriate occasions to prevent your script from taking up ALL the memories.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=3741&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/3741.html</comments>
  <category>tip</category>
  <category>standalone scripts</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/3513.html</guid>
  <pubDate>Fri, 30 Sep 2011 17:41:32 GMT</pubDate>
  <title>Scripts for Django and WSGI</title>
  <link>https://django-dev.dreamwidth.org/3513.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html&quot;&gt;An improved WSGI script for use with Django.&lt;/a&gt;  Pretty long and interesting, might lead me to use some better practices.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=3513&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/3513.html</comments>
  <category>wsgi</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/3270.html</guid>
  <pubDate>Sat, 11 Jun 2011 22:54:40 GMT</pubDate>
  <title>Question about search plugins</title>
  <link>https://django-dev.dreamwidth.org/3270.html</link>
  <description>Posted by: &lt;span lj:user=&apos;aithine&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://aithine.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://aithine.dreamwidth.org/&apos;&gt;&lt;b&gt;aithine&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Has anyone here used &lt;a href=&quot;http://haystacksearch.org&quot;&gt;Haystack&lt;/a&gt;? What did you like or dislike about it? What search engine backend did you choose? Why?&lt;br /&gt;&lt;br /&gt;(Why yes, I do have a potential major RL project that needs to have a serious search function, why do you ask? *vbg*)&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=3270&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/3270.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>aithine</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/2879.html</guid>
  <pubDate>Wed, 23 Mar 2011 21:43:36 GMT</pubDate>
  <title>Django 1.3 out</title>
  <link>https://django-dev.dreamwidth.org/2879.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/releases/1.3/&quot;&gt;Django 1.3 release notes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=2879&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/2879.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>5</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/2711.html</guid>
  <pubDate>Tue, 12 Oct 2010 20:50:38 GMT</pubDate>
  <title>A simple distinct inner join in Django</title>
  <link>https://django-dev.dreamwidth.org/2711.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let&apos;s say I have ColorProperty and DWThemeColor (which is the through of a ManyToMany between DWTheme and ColorProperty).  And I want to get all distinct ColorProperties that belong to DWThemes.  This is how:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ColorProperty.objects.filter(dwthemecolor__isnull = False).distinct()&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You don&apos;t even want to know how long it took me to figure this out, people.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=2711&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/2711.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/2545.html</guid>
  <pubDate>Mon, 04 Oct 2010 18:59:34 GMT</pubDate>
  <title>Make a sortable ordering item list with jQuery and jQuery UI</title>
  <link>https://django-dev.dreamwidth.org/2545.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here&apos;s an example of making an admin page that lets people reorder the items through drag and drop.  It&apos;s *fairly* genericized already--you can use the same template for multiple data types--and has the potential to be MORE generic by creating a generic view sort of thing, but I haven&apos;t done that yet.&lt;br /&gt;&lt;br /&gt;All you need is a model that has a (Integer or PositiveInteger) field named &apos;order&apos;.&lt;br /&gt;&lt;br /&gt;The form will let you reorder the items by drag and drop and save them, and also lets you link to the usual form to add an item.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://django-dev.dreamwidth.org/2545.html#cutid1&quot;&gt;This way to the code!&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=2545&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/2545.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/2123.html</guid>
  <pubDate>Mon, 16 Aug 2010 16:56:04 GMT</pubDate>
  <title>Some useful vim syntax highlighting files</title>
  <link>https://django-dev.dreamwidth.org/2123.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://svn.python.org/projects/python/trunk/Misc/Vim/vimrc&quot;&gt;This one&apos;s for the Python recommended practices&lt;/a&gt;.

&lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1487&quot;&gt;This one&apos;s purportedly for Django templates&lt;/a&gt;, though I haven&apos;t managed to get it working yet.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=2123&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/2123.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/1993.html</guid>
  <pubDate>Tue, 06 Jul 2010 23:08:39 GMT</pubDate>
  <title>Treemenus</title>
  <link>https://django-dev.dreamwidth.org/1993.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/django-treemenus/&quot;&gt;Treemenus&lt;/a&gt; is &quot;a simple and generic tree-structured menuing system for Django with an easy-to-use admin interface.&quot;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=1993&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/1993.html</comments>
  <category>apps</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/1619.html</guid>
  <pubDate>Fri, 11 Jun 2010 23:17:24 GMT</pubDate>
  <title>Beware CSRF when upgrading to 1.2!</title>
  <link>https://django-dev.dreamwidth.org/1619.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This one caught me due to inattentiveness--if you&apos;re upgrading to 1.2, be sure to read the notes on &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#upgrading-notes&quot;&gt;CSRF&lt;/a&gt;. There&apos;s some changes that are really important if you&apos;re using forms.  I think it&apos;s great that they&apos;re making it easier to keep your site secure, but beware, you might end up with 403 errors if you&apos;re not careful.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=1619&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/1619.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/1379.html</guid>
  <pubDate>Wed, 26 May 2010 17:31:43 GMT</pubDate>
  <title>Book recommendation: Pro Django</title>
  <link>https://django-dev.dreamwidth.org/1379.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I can&apos;t say I was actually the target audience for &lt;a href=&quot;http://prodjango.com/&quot;&gt;Pro Django&lt;/a&gt;: I didn&apos;t have enough of a basis in either Django &lt;i&gt;or&lt;/i&gt; Python.  However, I love this book.  It taught me more about Python metaprogramming than anything else, due to its use it Django internals, and has given me a bunch of tools to use in Django development.  I haven&apos;t used many of the Django tips yet, I admit, but knowing them gave me a better understanding of the system as a whole, and I&apos;ve definitely used Python techniques I&apos;ve learned here in other projects.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=1379&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/1379.html</comments>
  <category>books</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/1157.html</guid>
  <pubDate>Thu, 20 May 2010 01:14:24 GMT</pubDate>
  <title>Example of a filter that adds HTML to a string</title>
  <link>https://django-dev.dreamwidth.org/1157.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This is a filter that turned out to be not quite as useful as I thought because some of the phrases our graphic designer wanted more than one word bolded, but I could totally change around the argument of this filter to take in a number of words to enclose, instead of making the class the optional argument.  But, I thought it made a good basic example, so I figured I&apos;d post it.  It&apos;s useful if you want to visually emphasize the first word of a string, since there&apos;s no CSS pseudoselector for that.&lt;/p&gt;

&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://django-dev.dreamwidth.org/1157.html#cutid1&quot;&gt;On to the example code!&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=1157&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/1157.html</comments>
  <category>templates: filters</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/769.html</guid>
  <pubDate>Wed, 19 May 2010 21:15:12 GMT</pubDate>
  <title>Full page URL on page template</title>
  <link>https://django-dev.dreamwidth.org/769.html</link>
  <description>Posted by: &lt;span lj:user=&apos;aithine&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://aithine.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://aithine.dreamwidth.org/&apos;&gt;&lt;b&gt;aithine&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Say you need the full URL of the current page you&apos;re displaying that you need to use on the template of that page. (For example, to add links to Facebook, Delicious, etc., and you don&apos;t want to have additional JavaScript that you didn&apos;t write on your pages. Shush, yes, I&apos;m a control freak. :P) Also say that you don&apos;t want to use the sites framework to hack it together. The permalink decorator won&apos;t work, either, because that gives you the relative link.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.build_absolute_uri&quot;&gt;Thankfully, there&apos;s a new request object&lt;/a&gt; that&apos;s been added to 1.0 that will do it.&lt;br /&gt;&lt;br /&gt;To use it, include the bolded bit in your &lt;code&gt;views.py&lt;/code&gt; file, as part of each view where you want to have the variable available: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;return render_to_response(&apos;dir/template.html&apos;, {&apos;object&apos;: obj, &lt;strong&gt;&apos;link&apos;: request.build_absolute_uri()&lt;/strong&gt;}, RequestContext(request))&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then you can use the &lt;code&gt;link&lt;/code&gt; variable on the template where you need the URL:&lt;br /&gt;&lt;br /&gt;&amp;lt;a href=&quot;&lt;a href=&quot;http://www.facebook.com/sharer.php?u=&quot;&gt;http://www.facebook.com/sharer.php?u=&lt;/a&gt;{{ link|urlencode }}&amp;t={{ title|urlencode }}&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=769&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/769.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>aithine</lj:poster>
  <lj:reply-count>2</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/653.html</guid>
  <pubDate>Wed, 28 Apr 2010 22:49:25 GMT</pubDate>
  <title>Making a &quot;non-built-in&quot; link in the admin list view</title>
  <link>https://django-dev.dreamwidth.org/653.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This was something I found out how to do recently and got inspired to share!  It&apos;s about how to add a link that&apos;s not a built in one (like the link to edit the model) to the list view in the admin.  This can be useful in some cases.&lt;br /&gt;&lt;br /&gt;First, in your model definition, add a function that returns the link that you want.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;def external_link(self):
        &quot;&quot;&quot;Returns a link for display in the admin table.&quot;&quot;&quot;
        if self.article_link:
            return u&apos;&lt;a href=&quot;%s&quot;&gt;Link&lt;/a&gt;&apos; % self.article_link
        else:
            return None
    external_link.allow_tags = True 
    external_link.short_description = &quot;Link&quot;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Adding the &lt;tt&gt;allow_tags&lt;/tt&gt; attribute to this function lets the admin know it can display the raw HTML.  The &lt;tt&gt;short_description&lt;/tt&gt; attribute is optional and lets you specify what you want the column&apos;s title to be; if you don&apos;t have it, it&apos;ll be the function&apos;s name with underscores replaced by spaces. &lt;br /&gt;&lt;br /&gt;Then, you can add it to the list display:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;class NewsItemAdmin(admin.ModelAdmin):
    list_display =  (&apos;title&apos;, &apos;date_published&apos;, &apos;external_link&apos;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Tada!  You now have a link in your admin&apos;s list display.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=653&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/653.html</comments>
  <category>admin</category>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://django-dev.dreamwidth.org/332.html</guid>
  <pubDate>Tue, 11 Aug 2009 21:42:42 GMT</pubDate>
  <title>Django just in case</title>
  <link>https://django-dev.dreamwidth.org/332.html</link>
  <description>Posted by: &lt;span lj:user=&apos;foxfirefey&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://foxfirefey.dreamwidth.org/&apos;&gt;&lt;b&gt;foxfirefey&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don&apos;t know how many other people on Dreamwidth do development with &lt;a href=&quot;http://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt;, or want to, but I made this community for that just in case, because I do.&lt;br /&gt;&lt;br /&gt;So welcome!&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=django_dev&amp;ditemid=332&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://django-dev.dreamwidth.org/332.html</comments>
  <lj:security>public</lj:security>
  <lj:poster>foxfirefey</lj:poster>
  <lj:reply-count>3</lj:reply-count>
</item>
</channel>
</rss>
