<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16208</id>
	<title>Nabble - Django</title>
	<updated>2009-11-27T09:18:16Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Django-f16208.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Django-f16208.html" />
	<subtitle type="html">&lt;a href=&quot;http://www.djangoproject.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Django&lt;/a&gt;&amp;nbsp;is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26545338</id>
	<title>Re: CSRF gone haywire</title>
	<published>2009-11-27T09:18:16Z</published>
	<updated>2009-11-27T09:18:16Z</updated>
	<author>
		<name>rebus_rdk</name>
	</author>
	<content type="html">2009/11/27 Tim Valenta &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26545338&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tonightslastsong@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Has anybody else experienced a senseless failure of the dev trunk's
&lt;br&gt;&amp;gt; CSRF verification?  Very suddenly this morning, Django won't let me
&lt;br&gt;&amp;gt; change anything in my admin sites.  I didn't update my copy of the SVN
&lt;br&gt;&amp;gt; trunk, but as soon as I took myself off of the admin-ui branch, it
&lt;br&gt;&amp;gt; flipped out.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Step by step, all I did was move my copy of the main trunk to
&lt;br&gt;&amp;gt; &amp;quot;_django&amp;quot; instead of &amp;quot;django&amp;quot;.  I then uncompressed the admin-ui
&lt;br&gt;&amp;gt; branch to &amp;quot;django&amp;quot; as a replacement.  All was well.  There are some
&lt;br&gt;&amp;gt; broken &amp;quot;Add new item&amp;quot; links in that branch, and I got sick of it not
&lt;br&gt;&amp;gt; working.  So I moved my admin-ui trunk to &amp;quot;admin-ui&amp;quot; for safekeeping,
&lt;br&gt;&amp;gt; and then put back my original copy of the main trunk.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Everything seemed right and good in the world, but for some reason the
&lt;br&gt;&amp;gt; changelist view wouldn't show any items in its list.  Every model
&lt;br&gt;&amp;gt; suffered from the lack of display.  It was weird.  It showed a correct
&lt;br&gt;&amp;gt; total number of items that *should* have been in the list, but no
&lt;br&gt;&amp;gt; items were present.  The HTML was literally not there.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And when I jump directly to a changeform page via the id I knew I was
&lt;br&gt;&amp;gt; working with, the page would should up, but saving the model keeps
&lt;br&gt;&amp;gt; triggering the CSRF error response.  I don't think the CSRF token is
&lt;br&gt;&amp;gt; being rendered in the changeform.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Has anybody else experienced this?  I seriously haven't touched my
&lt;br&gt;&amp;gt; copy of the main trunk between my little adventure with the admin-ui
&lt;br&gt;&amp;gt; branch.  For good measure, I updated the repository just now, and it
&lt;br&gt;&amp;gt; didn't fix it.  I removed all of the .pyc files in the Django
&lt;br&gt;&amp;gt; directory and my project home.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm just totally at a loss for what happened.  I've dropped the
&lt;br&gt;&amp;gt; database and rebuilt it... no luck.  I'm ready to swear that I didn't
&lt;br&gt;&amp;gt; change anything at all, and I don't use the CSRF system explicitly, so
&lt;br&gt;&amp;gt; it's not like I've got bad imports.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;AFAIK admin uses CSRF by default in SVN version.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/contrib/csrf/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/contrib/csrf/&lt;/a&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26545338&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26545338&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/CSRF-gone-haywire-tp26545285p26545338.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26545285</id>
	<title>CSRF gone haywire</title>
	<published>2009-11-27T09:14:54Z</published>
	<updated>2009-11-27T09:14:54Z</updated>
	<author>
		<name>Tim Valenta</name>
	</author>
	<content type="html">Has anybody else experienced a senseless failure of the dev trunk's
&lt;br&gt;CSRF verification? &amp;nbsp;Very suddenly this morning, Django won't let me
&lt;br&gt;change anything in my admin sites. &amp;nbsp;I didn't update my copy of the SVN
&lt;br&gt;trunk, but as soon as I took myself off of the admin-ui branch, it
&lt;br&gt;flipped out.
&lt;br&gt;&lt;br&gt;Step by step, all I did was move my copy of the main trunk to
&lt;br&gt;&amp;quot;_django&amp;quot; instead of &amp;quot;django&amp;quot;. &amp;nbsp;I then uncompressed the admin-ui
&lt;br&gt;branch to &amp;quot;django&amp;quot; as a replacement. &amp;nbsp;All was well. &amp;nbsp;There are some
&lt;br&gt;broken &amp;quot;Add new item&amp;quot; links in that branch, and I got sick of it not
&lt;br&gt;working. &amp;nbsp;So I moved my admin-ui trunk to &amp;quot;admin-ui&amp;quot; for safekeeping,
&lt;br&gt;and then put back my original copy of the main trunk.
&lt;br&gt;&lt;br&gt;Everything seemed right and good in the world, but for some reason the
&lt;br&gt;changelist view wouldn't show any items in its list. &amp;nbsp;Every model
&lt;br&gt;suffered from the lack of display. &amp;nbsp;It was weird. &amp;nbsp;It showed a correct
&lt;br&gt;total number of items that *should* have been in the list, but no
&lt;br&gt;items were present. &amp;nbsp;The HTML was literally not there.
&lt;br&gt;&lt;br&gt;And when I jump directly to a changeform page via the id I knew I was
&lt;br&gt;working with, the page would should up, but saving the model keeps
&lt;br&gt;triggering the CSRF error response. &amp;nbsp;I don't think the CSRF token is
&lt;br&gt;being rendered in the changeform.
&lt;br&gt;&lt;br&gt;Has anybody else experienced this? &amp;nbsp;I seriously haven't touched my
&lt;br&gt;copy of the main trunk between my little adventure with the admin-ui
&lt;br&gt;branch. &amp;nbsp;For good measure, I updated the repository just now, and it
&lt;br&gt;didn't fix it. &amp;nbsp;I removed all of the .pyc files in the Django
&lt;br&gt;directory and my project home.
&lt;br&gt;&lt;br&gt;I'm just totally at a loss for what happened. &amp;nbsp;I've dropped the
&lt;br&gt;database and rebuilt it... no luck. &amp;nbsp;I'm ready to swear that I didn't
&lt;br&gt;change anything at all, and I don't use the CSRF system explicitly, so
&lt;br&gt;it's not like I've got bad imports.
&lt;br&gt;&lt;br&gt;Any help?
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26545285&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26545285&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/CSRF-gone-haywire-tp26545285p26545285.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544873</id>
	<title>Re: Django + Cherokee Web Server</title>
	<published>2009-11-27T08:42:58Z</published>
	<updated>2009-11-27T08:42:58Z</updated>
	<author>
		<name>hcarvalhoalves</name>
	</author>
	<content type="html">On Nov 27, 5:56 am, Jarek Zgoda &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544873&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jarek.zg...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Wiadomo¶æ napisana w dniu 2009-11-27, o godz. 00:31, przez  
&lt;br&gt;&amp;gt; hcarvalhoalves:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I'm able to configure Cherokee to run my Django project correctly,
&lt;br&gt;&amp;gt; &amp;gt; using the included wizard. The problem is, if an exception is thrown,
&lt;br&gt;&amp;gt; &amp;gt; Cherokee just shows a &amp;quot;Unhandled Exception&amp;quot; page. I figured out that
&lt;br&gt;&amp;gt; &amp;gt; if I run fcgi with debug=true, then I get a stacktrace from Flup, but
&lt;br&gt;&amp;gt; &amp;gt; I wanted the default Django behaviour (showing debug pages when
&lt;br&gt;&amp;gt; &amp;gt; DEBUG=TRUE on settings.py), similar to Apache or the development
&lt;br&gt;&amp;gt; &amp;gt; server.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is not the response from web server, nor Django - this page is  
&lt;br&gt;&amp;gt; served by Flup. This indicates the error at the stage of loading  
&lt;br&gt;&amp;gt; Django machinery (eg. some problem with settings.py) and can not be  
&lt;br&gt;&amp;gt; passed to Django's error handling because Django is simply not yet  
&lt;br&gt;&amp;gt; loaded or not initialized properly. The only possible way to get any  
&lt;br&gt;&amp;gt; debugging information is to turn on FastCGI debug.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Artificial intelligence stands no chance against natural stupidity
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Jarek Zgoda, R&amp;D, Redefine
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544873&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jarek.zg...@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;I understand it's a debug page from Flup, but it shouldn't be: the
&lt;br&gt;exception is not caused by settings or anything, in fact, it's an
&lt;br&gt;IOError exception thrown because my view tries to access some file
&lt;br&gt;that doesn't exist. But with the development server, I get the
&lt;br&gt;stacktrace with Django's debug page for this same case. So I was
&lt;br&gt;wondering why now the exception is going up one layer and getting
&lt;br&gt;caught by Flup instead.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544873&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544873&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Django-%2B-Cherokee-Web-Server-tp26536215p26544873.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544855</id>
	<title>Re: Newbie: is it possible to re-render a tag/filter after adding it 	to the web page as string</title>
	<published>2009-11-27T08:41:13Z</published>
	<updated>2009-11-27T08:41:13Z</updated>
	<author>
		<name>Andy McKay-4</name>
	</author>
	<content type="html">On 09-11-27 4:41 AM, Allen wrote:
&lt;br&gt;&amp;gt; Dear Bruno
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Great to hear that there are other ZOPE users among us.
&lt;br&gt;&lt;br&gt;More than you might think ;)
&lt;br&gt;&lt;br&gt;&amp;gt; When I work with ZOPE I code with dtml. I only found out about ZPT
&lt;br&gt;&amp;gt; when I quiz ZOPE and never got familiar with it afterwords. The first
&lt;br&gt;&amp;gt; thing they teach you when working with ZOPE is to combine segment of
&lt;br&gt;&amp;gt; web pages with&amp;lt;dtml-var &amp;quot;aSegment.html&amp;quot;&amp;gt;. With this I could type use
&lt;br&gt;&amp;gt; some page with other tags or javascript/css and it will all render
&lt;br&gt;&amp;gt; normally.
&lt;br&gt;&lt;br&gt;The include tag will include a chunk of another template and is a simple 
&lt;br&gt;way include a HTML snippet for re-use:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/templates/builtins/#include&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/templates/builtins/#include&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;gt; I want to create a application that uses minimal html files. At the
&lt;br&gt;&amp;gt; present stage of development, coded everything into one html and save
&lt;br&gt;&amp;gt; all the static data into the database.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I want to know about re-rendering a django tag/javascript/css is
&lt;br&gt;&amp;gt; because I want to allow my users to use a web interface to type in
&lt;br&gt;&amp;gt; their contents and custom tag that I created and save it back to the
&lt;br&gt;&amp;gt; database.
&lt;br&gt;&lt;br&gt;So users should be typing in some HTML, that becomes part of a model and 
&lt;br&gt;you then render the model back out.
&lt;br&gt;&lt;br&gt;As for the custom tag you can compile that back out like this:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/templates/api/#compiling-a-string&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/templates/api/#compiling-a-string&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;gt; If everything work accordingly, the custom tag will activate and put
&lt;br&gt;&amp;gt; javascript/googleMap api onto the page and display a google map. But
&lt;br&gt;&amp;gt; sadly it didn't gone according to plan and instead the page only
&lt;br&gt;&amp;gt; displayed the tag as if it was just text.
&lt;br&gt;&lt;br&gt;To be honest this is one of the things I did in my first or second Zope 
&lt;br&gt;project which seems about 4 bazillion years ago. Users could enter these 
&lt;br&gt;custom tags into the HTML area and magic would happen. Sadly it didn't 
&lt;br&gt;work out very well.
&lt;br&gt;&lt;br&gt;I would recommend a simple &amp;quot;add map to this page&amp;quot; button myself that 
&lt;br&gt;twiddles a model attribute.
&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp; &amp;nbsp;Andy McKay, @clearwind
&lt;br&gt;&amp;nbsp; &amp;nbsp;Training: &lt;a href=&quot;http://clearwind.ca/training/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clearwind.ca/training/&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Whistler conference: &lt;a href=&quot;http://clearwind.ca/djangoski/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clearwind.ca/djangoski/&lt;/a&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544855&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544855&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Newbie%3A-is-it-possible-to-re-render-a-tag-filter-after-adding-it-to--the-web-page-as-string-tp26537460p26544855.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544686</id>
	<title>Re: mixed Case Field names in the database columns</title>
	<published>2009-11-27T08:28:32Z</published>
	<updated>2009-11-27T08:28:32Z</updated>
	<author>
		<name>Karen Tracey-2</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 9:26 AM, Tim Langeman &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544686&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tim@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
I know that there is a setting to configure the db_table in django,&lt;br&gt;
but I haven&amp;#39;t found any similar setting for the field names.  &lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;There is one:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/models/fields/#db-column&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/models/fields/#db-column&lt;/a&gt;&lt;br&gt;
&lt;br&gt;Karen &lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;Django users&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544686&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544686&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.&lt;br /&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/mixed-Case-Field-names-in-the-database-columns-tp26543626p26544686.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544678</id>
	<title>Re: Best UI for letting users select an item from a large selection of  records?</title>
	<published>2009-11-27T08:27:17Z</published>
	<updated>2009-11-27T08:27:17Z</updated>
	<author>
		<name>David De La Harpe Golden-3</name>
	</author>
	<content type="html">Stodge wrote:
&lt;br&gt;&amp;gt; Thanks. I have the DataTables plugin working so I can filter my
&lt;br&gt;&amp;gt; records. Now I just need to work out how to select specific ones from
&lt;br&gt;&amp;gt; the table and work with them.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Well, that depends a bit on what you want. if you, say, used javascript
&lt;br&gt;&amp;nbsp;to directly populate a field in a html form when the user clicks on a
&lt;br&gt;row in the datatable, you're pretty firmly tied to functioning
&lt;br&gt;javascript, but it should be straightforward enough.
&lt;br&gt;&lt;a href=&quot;http://www.datatables.net/examples/example_select_single_row.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.datatables.net/examples/example_select_single_row.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;One thing to consider could be actual click-through html links on each
&lt;br&gt;row in the table that go to a small helper view taking the ticket and
&lt;br&gt;relevant requirement as parameters that performs the desired
&lt;br&gt;association, possibly after prompting for confirmation, then redirect
&lt;br&gt;back to the main page. &amp;nbsp;At first glance, that might seem unpleasant,
&lt;br&gt;because the user apparently navigates away - However once you have got
&lt;br&gt;that basic interaction working, you can go back and use jquery to
&lt;br&gt;intercept clicking the link and make the request in an ajax manner so
&lt;br&gt;that the user doesn't navigate away from the main page. &amp;nbsp;Django has
&lt;br&gt;request.is_ajax() you can use in the helper view to detect and respond
&lt;br&gt;appropriately to ajax requests from jquery. &amp;nbsp; This approach has the
&lt;br&gt;advantage of progressive enhancement (or graceful degradation) like
&lt;br&gt;datatables itself - the ui doesn't become unusable just because
&lt;br&gt;javascript is disabled, it just gets clunkier. &amp;nbsp;It also means you can
&lt;br&gt;focus on getting something working , then worry about javascript
&lt;br&gt;wierdness. &amp;nbsp;The ticket object also kinda has to already exist for this
&lt;br&gt;approach to be simple, but you can have separate &amp;quot;ticket add&amp;quot; and
&lt;br&gt;&amp;quot;ticket edit&amp;quot; views with the former only asking for a subset of
&lt;br&gt;essential fields, say.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544678&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544678&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Best-UI-for-letting-users-select-an-item-from-a-large-selection-of--records--tp26529668p26544678.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544598</id>
	<title>Re: better error handling in templatetags?</title>
	<published>2009-11-27T08:22:24Z</published>
	<updated>2009-11-27T08:22:24Z</updated>
	<author>
		<name>Karen Tracey-2</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 5:58 AM, KONTRA, Gergely &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544598&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihentagy@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Seems like you built your own project, and not using my zip.&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;Yes, because just cut and pasting the template tag into my existing working test project seemed easier than downloading a zip file.  But even after retrieving the zip file and working from that (I had to remove the references to admin in the urls.py file since admin isn&amp;#39;t in the INSTALLED_APPS setting) I still see the original traceback reflected in the message, so the difference between what you and I see is not due to differences in the projects.&lt;br&gt;
 &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;  &lt;/blockquote&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
However, the result IS different.&lt;br&gt;
&lt;br&gt;
In my traceback I do not have any snippet referencing customtag.py.&lt;br&gt;
&lt;br&gt;
See my trace: &lt;a href=&quot;http://dpaste.com/hold/125819/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://dpaste.com/hold/125819/&lt;/a&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;Hmm.  Your traceback shows you are using Python 2.6.  If I switch to that, then I see the behavior you are describing.  For some reason under Python 2.6 the exception value is being truncated at the end of the first line, so the original traceback is getting lost.  &lt;br&gt;
&lt;br&gt;There is a ticket open on the whole exception wrapping behavior of handing exceptions that occur during template rendering:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://code.djangoproject.com/ticket/11461&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/11461&lt;/a&gt;&lt;br&gt;
&lt;br&gt;I have not looked in detail at how things behave with the proposed patches, partly because since I&amp;#39;ve been seeing the original exception the wrapping behavior did not strike me as quite that bad.  Perhaps you can try out the patches, see if they improve things for your environment, and give some feedback.&lt;br&gt;
&lt;br&gt;Karen&lt;br&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;Django users&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544598&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544598&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.&lt;br /&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/better-error-handling-in-templatetags--tp26298957p26544598.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544470</id>
	<title>Re: Issue when saving a model form</title>
	<published>2009-11-27T08:12:53Z</published>
	<updated>2009-11-27T08:12:53Z</updated>
	<author>
		<name>Tim Valenta</name>
	</author>
	<content type="html">Try overriding your AddRestaurantForm's &amp;quot;save&amp;quot; method:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; def save(self, commit=True):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.instance.city = get_object_or_404(City,
&lt;br&gt;name=self.instance.city)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Finish by passing control back to the normal Django flow:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super(AddRestaurantForm, self).save(commit)
&lt;br&gt;&lt;br&gt;I think that'd work. &amp;nbsp;Sometimes 'super' causes recursion errors in
&lt;br&gt;Django, so if that gives you problems, try calling the method all by
&lt;br&gt;itself:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Finish by passing control back tot he normal Django flow:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; forms.ModelForm.save(self, commit)
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;On Nov 27, 8:57 am, jul &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544470&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;juj...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Previous post wasn't finished. Wrong key :(
&lt;br&gt;&amp;gt; Here's the complete one:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've got the ModelForm and Model shown below.
&lt;br&gt;&amp;gt; I'm overriding the 'city' field to get a CharField instead of a City
&lt;br&gt;&amp;gt; foreign key.
&lt;br&gt;&amp;gt; When saving the Restaurant instance, it returns &amp;quot;&amp;quot;Restaurant.city&amp;quot;
&lt;br&gt;&amp;gt; must be a &amp;quot;City&amp;quot; instance&amp;quot;.
&lt;br&gt;&amp;gt; How can I save the Restaurant instance with the City instance got or
&lt;br&gt;&amp;gt; created before?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; def addRestaurant(request):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     if request.user.is_authenticated():
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;         if request.method == 'POST':
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;             form = AddRestaurantForm(request.POST)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;             if form.is_valid():
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;                 geonameID = request.POST.get('city_geonameId','')
&lt;br&gt;&amp;gt;                 country = Country.objects.get(code=request.POST.get
&lt;br&gt;&amp;gt; ('city_countryCode',''))
&lt;br&gt;&amp;gt;                 city, created = City.objects.get_or_create
&lt;br&gt;&amp;gt; (geonameID=geonameID, country = country, name = form.cleaned_data
&lt;br&gt;&amp;gt; ['city'])
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;                 if created: #stuff
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;                 city.save()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;                 new_restaurant = form.save
&lt;br&gt;&amp;gt; (commit=False)
&lt;br&gt;&amp;gt;                 new_restaurant.city = city
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; class AddRestaurantForm(ModelForm):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     rating = forms.IntegerField(widget=forms.Select(choices =
&lt;br&gt;&amp;gt; RATING_CHOICE), required=False)
&lt;br&gt;&amp;gt;     city = forms.CharField(max_length=100)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     class Meta:
&lt;br&gt;&amp;gt;         model = Restaurant
&lt;br&gt;&amp;gt;         exclude = ('slug')
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; class Restaurant(models.Model):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     name = models.CharField(max_length=100)
&lt;br&gt;&amp;gt;     country=models.ForeignKey(Country)
&lt;br&gt;&amp;gt;     city=models.ForeignKey(City)
&lt;br&gt;&amp;gt;     street=models.CharField(max_length=100)
&lt;br&gt;&amp;gt;     street_number=models.PositiveSmallIntegerField()
&lt;br&gt;&amp;gt;     phone_number=models.CharField(max_length=16, blank=True,
&lt;br&gt;&amp;gt; null=True)
&lt;br&gt;&amp;gt;     price_range=models.PositiveSmallIntegerField(blank=True,
&lt;br&gt;&amp;gt; null=True)
&lt;br&gt;&amp;gt;     category=models.ManyToManyField(Category, blank=True, null=True)
&lt;br&gt;&amp;gt;     tag=models.ManyToManyField(Tag, blank=True, null=True)
&lt;br&gt;&amp;gt;     slug = models.SlugField(unique=True)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def get_absolute_url(self):
&lt;br&gt;&amp;gt;         return &amp;quot;/restaurant/%s/&amp;quot; % self.slug
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def __unicode__(self):
&lt;br&gt;&amp;gt;         return self.name
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def save(self):
&lt;br&gt;&amp;gt;         self.slug = slugify(self.name)
&lt;br&gt;&amp;gt;         super(Restaurant, self).save()
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544470&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544470&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Issue-when-saving-a-model-form-tp26544281p26544470.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544347</id>
	<title>Re: add permission by name instead of number</title>
	<published>2009-11-27T08:02:16Z</published>
	<updated>2009-11-27T08:02:16Z</updated>
	<author>
		<name>Tim Valenta</name>
	</author>
	<content type="html">You can expand your .add() statement slightly, by passing it an object
&lt;br&gt;instead of an id:
&lt;br&gt;&lt;br&gt;request.user.user_permissions.add(Permission.objects.get(name='some
&lt;br&gt;permission name'))
&lt;br&gt;&lt;br&gt;You could alternatively do a lookup with the &amp;quot;codename='some_name'&amp;quot;
&lt;br&gt;instead of the human-readable name. &amp;nbsp;The codename is arguably less
&lt;br&gt;prone to change than the straight &amp;quot;name&amp;quot; parameter.
&lt;br&gt;&lt;br&gt;Just be sure to import the Permission model. &amp;nbsp;It in
&lt;br&gt;django.contrib.auth.models
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;On Nov 26, 2:59 am, Adonis &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544347&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;achrysoch...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have been going through the permission documentation and i know i
&lt;br&gt;&amp;gt; can assign users with permissions like this,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *
&lt;br&gt;&amp;gt; request.user.user_permissions.add(1)
&lt;br&gt;&amp;gt; *
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But having 100 or more permissions i find this method a bit weird. Is
&lt;br&gt;&amp;gt; not there a way to say,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *
&lt;br&gt;&amp;gt; request.user.user_permissions.add('auth.delete_permission') or what i
&lt;br&gt;&amp;gt; found in an other post,
&lt;br&gt;&amp;gt; *
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *
&lt;br&gt;&amp;gt; def get_permission_object(perm_label):
&lt;br&gt;&amp;gt;     from django.contrib.contenttypes.models import ContentType
&lt;br&gt;&amp;gt;     from django.contrib.auth.models import Permission
&lt;br&gt;&amp;gt;     app_label,perm_code_name = perm_label.split('.')
&lt;br&gt;&amp;gt;     content_type = ContentType.objects.get(app_label=app_label)
&lt;br&gt;&amp;gt;     perm = Permission.objects.get
&lt;br&gt;&amp;gt; (content_type=content_type,codename=perm_code_name)
&lt;br&gt;&amp;gt;     return perm
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; def add_perm_to_user(user,perm_label):
&lt;br&gt;&amp;gt;     user.user_permissions.add(get_permission_object(perm_label))
&lt;br&gt;&amp;gt;     user.save()
&lt;br&gt;&amp;gt;     return user
&lt;br&gt;&amp;gt; *
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any suggestions?
&lt;br&gt;&amp;gt; Thanks in advance!
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544347&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544347&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/add-permission-by-name-instead-of-number-tp26526988p26544347.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544283</id>
	<title>Re: distinct related objects</title>
	<published>2009-11-27T07:57:37Z</published>
	<updated>2009-11-27T07:57:37Z</updated>
	<author>
		<name>Tim Valenta</name>
	</author>
	<content type="html">It looks like the problem is that you're trying to group by
&lt;br&gt;Technology, but your queryset is in Projects. &amp;nbsp;You could experiment
&lt;br&gt;with the &amp;quot;regroup&amp;quot; template tag
&lt;br&gt;( &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup&lt;/a&gt;&lt;br&gt;)
&lt;br&gt;&lt;br&gt;It's a little hard to understand at first, but I think it's pretty
&lt;br&gt;much what you're trying to do. &amp;nbsp;You would be able to remove the
&lt;br&gt;&amp;quot;.distinct&amp;quot; part of your query because dictionary keys are already
&lt;br&gt;can't be doubled.
&lt;br&gt;&lt;br&gt;Hope that helps.
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;On Nov 26, 7:04 am, andreas schmid &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544283&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;a.schmi...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i have a question about retrieving related objects avoiding double entries.
&lt;br&gt;&amp;gt; actually i have 3 models:
&lt;br&gt;&amp;gt;     topics
&lt;br&gt;&amp;gt;     projects
&lt;br&gt;&amp;gt;     technologies
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; the projects model has foreignkeys to topics and technologies. i have a
&lt;br&gt;&amp;gt; view for the topic detail like this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def topic_detail(request, slug):
&lt;br&gt;&amp;gt;         topic = get_object_or_404(Topic, slug=slug)
&lt;br&gt;&amp;gt;         return object_list(request,
&lt;br&gt;&amp;gt;                            queryset=topic.project_set.all(),
&lt;br&gt;&amp;gt;                            paginate_by=20,
&lt;br&gt;&amp;gt;                            template_name='FSlabs/topic_detail.html',
&lt;br&gt;&amp;gt;                            extra_context={ 'topic': topic })
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; in the template i can loop trough the projects and  get those  assigned
&lt;br&gt;&amp;gt; to this topic.
&lt;br&gt;&amp;gt; but im having problems to retrieve the technologies used by those
&lt;br&gt;&amp;gt; projects without having double entries.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i tried this in the template with a list for every project
&lt;br&gt;&amp;gt; assigned...which of course is not what i want:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     {% for project in object_list  %}
&lt;br&gt;&amp;gt;             {% for technology in project.technologies.distinct %}
&lt;br&gt;&amp;gt;                 &amp;lt;a href=&amp;quot;{{ technology.get_absolute_url }}&amp;quot;&amp;gt;{{
&lt;br&gt;&amp;gt;     technology.title }}&amp;lt;/a&amp;gt;
&lt;br&gt;&amp;gt;                 {% if forloop.last %}{% else %}
&lt;br&gt;&amp;gt;                 {% ifequal forloop.revcounter0 1 %}and {% else %}, {%
&lt;br&gt;&amp;gt;     endifequal %}
&lt;br&gt;&amp;gt;                 {% endif %}
&lt;br&gt;&amp;gt;             {% endfor %}
&lt;br&gt;&amp;gt;         {% endfor %}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; can somebody point me to the right way to get what i need?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; thx
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544283&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544283&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/distinct-related-objects-tp26529899p26544283.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544281</id>
	<title>Issue when saving a model form</title>
	<published>2009-11-27T07:57:31Z</published>
	<updated>2009-11-27T07:57:31Z</updated>
	<author>
		<name>jujul</name>
	</author>
	<content type="html">Previous post wasn't finished. Wrong key :(
&lt;br&gt;Here's the complete one:
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;I've got the ModelForm and Model shown below.
&lt;br&gt;I'm overriding the 'city' field to get a CharField instead of a City
&lt;br&gt;foreign key.
&lt;br&gt;When saving the Restaurant instance, it returns &amp;quot;&amp;quot;Restaurant.city&amp;quot;
&lt;br&gt;must be a &amp;quot;City&amp;quot; instance&amp;quot;.
&lt;br&gt;How can I save the Restaurant instance with the City instance got or
&lt;br&gt;created before?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;def addRestaurant(request):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; if request.user.is_authenticated():
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if request.method == 'POST':
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; form = AddRestaurantForm(request.POST)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if form.is_valid():
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; geonameID = request.POST.get('city_geonameId','')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; country = Country.objects.get(code=request.POST.get
&lt;br&gt;('city_countryCode',''))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city, created = City.objects.get_or_create
&lt;br&gt;(geonameID=geonameID, country = country, name = form.cleaned_data
&lt;br&gt;['city'])
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if created: #stuff
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city.save()
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_restaurant = form.save
&lt;br&gt;(commit=False)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new_restaurant.city = city
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;class AddRestaurantForm(ModelForm):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; rating = forms.IntegerField(widget=forms.Select(choices =
&lt;br&gt;RATING_CHOICE), required=False)
&lt;br&gt;&amp;nbsp; &amp;nbsp; city = forms.CharField(max_length=100)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; class Meta:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model = Restaurant
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exclude = ('slug')
&lt;br&gt;&lt;br&gt;class Restaurant(models.Model):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; name = models.CharField(max_length=100)
&lt;br&gt;&amp;nbsp; &amp;nbsp; country=models.ForeignKey(Country)
&lt;br&gt;&amp;nbsp; &amp;nbsp; city=models.ForeignKey(City)
&lt;br&gt;&amp;nbsp; &amp;nbsp; street=models.CharField(max_length=100)
&lt;br&gt;&amp;nbsp; &amp;nbsp; street_number=models.PositiveSmallIntegerField()
&lt;br&gt;&amp;nbsp; &amp;nbsp; phone_number=models.CharField(max_length=16, blank=True,
&lt;br&gt;null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; price_range=models.PositiveSmallIntegerField(blank=True,
&lt;br&gt;null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; category=models.ManyToManyField(Category, blank=True, null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; tag=models.ManyToManyField(Tag, blank=True, null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; slug = models.SlugField(unique=True)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; def get_absolute_url(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &amp;quot;/restaurant/%s/&amp;quot; % self.slug
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; def __unicode__(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return self.name
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; def save(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.slug = slugify(self.name)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super(Restaurant, self).save()
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544281&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544281&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Issue-when-saving-a-model-form-tp26544281p26544281.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544193</id>
	<title>Re: How can I change the values of select options created by a  ModelForm?</title>
	<published>2009-11-27T07:50:51Z</published>
	<updated>2009-11-27T07:50:51Z</updated>
	<author>
		<name>Tim Valenta</name>
	</author>
	<content type="html">You could tell Django to designate the 'code' field as the primary
&lt;br&gt;key, which will automatically make it unique. &amp;nbsp;Any forms will then be
&lt;br&gt;forced to identify by the code, rather than some numeric id:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; class Country(models.Model):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; code = models.CharField(max_length=5, primary_key=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name = models.CharField(max_length=100, unique=True)
&lt;br&gt;&lt;br&gt;Hope that helps! &amp;nbsp;There is another way to do it as well, but I opted
&lt;br&gt;to keep it simple.
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;On Nov 26, 10:28 am, jul &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544193&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;juj...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm generating, using ModelForm, a form from a Restaurant model, which
&lt;br&gt;&amp;gt; has a Country field.
&lt;br&gt;&amp;gt; Country has a 'code' and a 'name' fields.
&lt;br&gt;&amp;gt; When the form is created in my template, the values of the select
&lt;br&gt;&amp;gt; options are the Country ids. How can I replace them by the Country
&lt;br&gt;&amp;gt; 'code' values. Is it possible to choose which field is used as the
&lt;br&gt;&amp;gt; value by overriding the Country field in the ModelForm?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; thanks
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have that:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;label for=&amp;quot;id_country&amp;quot;&amp;gt;Country:&amp;lt;/label&amp;gt; &amp;lt;select name=&amp;quot;country&amp;quot;
&lt;br&gt;&amp;gt; id=&amp;quot;id_country&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;&amp;quot; selected=&amp;quot;selected&amp;quot;&amp;gt;---------&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;1&amp;quot;&amp;gt;Andorra&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;2&amp;quot;&amp;gt;United Arab Emirates&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;3&amp;quot;&amp;gt;Afghanistan&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; and I want that:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;label for=&amp;quot;id_country&amp;quot;&amp;gt;Country:&amp;lt;/label&amp;gt; &amp;lt;select name=&amp;quot;country&amp;quot;
&lt;br&gt;&amp;gt; id=&amp;quot;id_country&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;&amp;quot; selected=&amp;quot;selected&amp;quot;&amp;gt;---------&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;AD&amp;quot;&amp;gt;Andorra&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;AE&amp;quot;&amp;gt;United Arab Emirates&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;option value=&amp;quot;AF&amp;quot;&amp;gt;Afghanistan&amp;lt;/option&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Models and ModelForm:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; class Country(models.Model):
&lt;br&gt;&amp;gt;     code = models.CharField(max_length=5, unique=True)
&lt;br&gt;&amp;gt;     name = models.CharField(max_length=100, unique=True)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     class Meta:
&lt;br&gt;&amp;gt;         verbose_name_plural = 'Countries'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def __unicode__(self):
&lt;br&gt;&amp;gt;         return self.name
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; class Restaurant(models.Model):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     name = models.CharField(max_length=100)
&lt;br&gt;&amp;gt;     country=models.ForeignKey(Country)
&lt;br&gt;&amp;gt;     city=models.ForeignKey(City)
&lt;br&gt;&amp;gt;     street=models.CharField(max_length=100)
&lt;br&gt;&amp;gt;     street_number=models.PositiveSmallIntegerField()
&lt;br&gt;&amp;gt;     phone_number=models.CharField(max_length=16, blank=True,
&lt;br&gt;&amp;gt; null=True)
&lt;br&gt;&amp;gt;     price_range=models.PositiveSmallIntegerField(blank=True,
&lt;br&gt;&amp;gt; null=True)
&lt;br&gt;&amp;gt;     category=models.ManyToManyField(Category, blank=True,
&lt;br&gt;&amp;gt; null=True)
&lt;br&gt;&amp;gt;     tag=models.ManyToManyField(Tag, blank=True, null=True)
&lt;br&gt;&amp;gt;     slug = models.SlugField(unique=True)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def get_absolute_url(self):
&lt;br&gt;&amp;gt;         return &amp;quot;/restaurant/%s/&amp;quot; % self.slug
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def __unicode__(self):
&lt;br&gt;&amp;gt;         return self.name
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     def save(self):
&lt;br&gt;&amp;gt;         self.slug = slugify(self.name)
&lt;br&gt;&amp;gt;         super(Restaurant, self).save()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; class AddRestaurantForm(ModelForm):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;     class Meta:
&lt;br&gt;&amp;gt;         model = Restaurant
&lt;br&gt;&amp;gt;         exclude = ('slug')
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544193&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544193&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-can-I-change-the-values-of-select-options-created-by-a-ModelForm--tp26532659p26544193.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544168</id>
	<title>Issue when saving a model form</title>
	<published>2009-11-27T07:48:56Z</published>
	<updated>2009-11-27T07:48:56Z</updated>
	<author>
		<name>jujul</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I've got the ModelForm and Model shown below.
&lt;br&gt;I'm overriding the 'city' field to get a CharField instead of a City
&lt;br&gt;foreign key.
&lt;br&gt;&lt;br&gt;def addRestaurant(request):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; if request.user.is_authenticated():
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if request.method == 'POST':
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; form = AddRestaurantForm(request.POST)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if form.is_valid():
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; geonameID = request.POST.get('city_geonameId','')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; country = Country.objects.get(code=request.POST.get
&lt;br&gt;('city_countryCode',''))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city, created = City.objects.get_or_create
&lt;br&gt;(geonameID=geonameID, country = country, name = form.cleaned_data
&lt;br&gt;['city'])
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if created:
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &amp;quot;hello1&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; city.save()
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;class AddRestaurantForm(ModelForm):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; rating = forms.IntegerField(widget=forms.Select(choices =
&lt;br&gt;RATING_CHOICE), required=False)
&lt;br&gt;&amp;nbsp; &amp;nbsp; city = forms.CharField(max_length=100)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; class Meta:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model = Restaurant
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exclude = ('slug')
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;class Restaurant(models.Model):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; name = models.CharField(max_length=100)
&lt;br&gt;&amp;nbsp; &amp;nbsp; country=models.ForeignKey(Country)
&lt;br&gt;&amp;nbsp; &amp;nbsp; city=models.ForeignKey(City)
&lt;br&gt;&amp;nbsp; &amp;nbsp; street=models.CharField(max_length=100)
&lt;br&gt;&amp;nbsp; &amp;nbsp; street_number=models.PositiveSmallIntegerField()
&lt;br&gt;&amp;nbsp; &amp;nbsp; phone_number=models.CharField(max_length=16, blank=True,
&lt;br&gt;null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; price_range=models.PositiveSmallIntegerField(blank=True,
&lt;br&gt;null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; category=models.ManyToManyField(Category, blank=True, null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; tag=models.ManyToManyField(Tag, blank=True, null=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; slug = models.SlugField(unique=True)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; def get_absolute_url(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &amp;quot;/restaurant/%s/&amp;quot; % self.slug
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; def __unicode__(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return self.name
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; def save(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.slug = slugify(self.name)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super(Restaurant, self).save()
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544168&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544168&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Issue-when-saving-a-model-form-tp26544168p26544168.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543936</id>
	<title>Re: better error handling in templatetags?</title>
	<published>2009-11-27T07:28:52Z</published>
	<updated>2009-11-27T07:28:52Z</updated>
	<author>
		<name>Tim Valenta</name>
	</author>
	<content type="html">spite* us all.
&lt;br&gt;&lt;br&gt;Sorry :)
&lt;br&gt;&lt;br&gt;On Nov 27, 8:27 am, Tim Valenta &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tonightslasts...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Django is forced to catch your errors, and then bubble them back up to
&lt;br&gt;&amp;gt; you.  If you notice, none of the traceback lines are even in your
&lt;br&gt;&amp;gt; code-- it's all in Python libs or an Django code.  The issue is that
&lt;br&gt;&amp;gt; you're not seeing raw exceptions, but instead you're seeing reproduced
&lt;br&gt;&amp;gt; exceptions.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I agree that template tags are had to debug, especially when it's a
&lt;br&gt;&amp;gt; big complex tag that goes wrong all of the sudden.  However, don't
&lt;br&gt;&amp;gt; forget that it's just a Python object or method, just why not fire up
&lt;br&gt;&amp;gt; the shell and import it, testing it out?  Step through it with input
&lt;br&gt;&amp;gt; that you *know* you're getting, and use the Django modules to create
&lt;br&gt;&amp;gt; dummy contexts if needed (although you could probably get away with
&lt;br&gt;&amp;gt; just Python dict objects, since the template rendering engine won't
&lt;br&gt;&amp;gt; actually be involved).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Fixing the reporting would be amazingly welcome by many of us, but
&lt;br&gt;&amp;gt; it's not like it's a simple matter of printing a single debug variable
&lt;br&gt;&amp;gt; that accidentally got omitted.  I don't know enough about how Django
&lt;br&gt;&amp;gt; bubbles exceptions, so I can't say much more on the subject, but it's
&lt;br&gt;&amp;gt; clear to me that it's not something that they're doing on purpose to
&lt;br&gt;&amp;gt; spit us all.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tim
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 27, 3:58 am, &amp;quot;KONTRA, Gergely&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihent...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Seems like you built your own project, and not using my zip.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; However, the result IS different.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; In my traceback I do not have any snippet referencing customtag.py.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; See my trace:&lt;a href=&quot;http://dpaste.com/hold/125819/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dpaste.com/hold/125819/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; thanks
&lt;br&gt;&amp;gt; &amp;gt; Gergo
&lt;br&gt;&amp;gt; &amp;gt; +-[ Gergely Kontra &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihent...@...&lt;/a&gt;&amp;gt; ]------------------+
&lt;br&gt;&amp;gt; &amp;gt; |                                                           |
&lt;br&gt;&amp;gt; &amp;gt; | Mobile:(+36 20)356 9656                                   |
&lt;br&gt;&amp;gt; &amp;gt; |                                                           |
&lt;br&gt;&amp;gt; &amp;gt; +- &amp;quot;Olyan lángész vagyok, hogy poroltóval kellene járnom!&amp;quot; -+
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Fri, Nov 27, 2009 at 04:38, Karen Tracey &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kmtra...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; On Thu, Nov 26, 2009 at 6:02 PM, KONTRA, Gergely &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihent...@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; My problem is the error handling of django in templatetags, not the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; specific dummy error, which I programmed:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; @register.simple_tag
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; def current_time():
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;        1/0
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt;        return unicode(datetime.datetime.now())
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; What annoys me, that you cannot find the line number of the error,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; just a message, that somewhere there is an error rendering the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&amp;gt; current_time tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; With DEBUG=True, TEMPLATE_DEBUG=DEBUG, I get a TemplateSyntaxError debug
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; page with exception value:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Caught an exception while rendering: integer division or modulo by zero
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Original Traceback (most recent call last):
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;   File &amp;quot;d:\u\kmt\django\trunk\django\template\debug.py&amp;quot;, line 71, in
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; render_node
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     result = node.render(context)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;   File &amp;quot;d:\u\kmt\django\trunk\django\template\__init__.py&amp;quot;, line 909, in
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; render
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     return func(*resolved_vars)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;   File &amp;quot;D:\u\kmt\software\web\playground\ttt\templatetags\tstuff.py&amp;quot;, line
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 6, in current_time
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     1/0
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; ZeroDivisionError: integer division or modulo by zero
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; So I am seeing the line number of the error reported.  It's (somewhat
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; annoyingly) not actually in the traceback portion of the page, but it is on
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; the page.  Are you seeing something different?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Karen
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;quot;Django users&amp;quot; group.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; To unsubscribe from this group, send email to
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; For more options, visit this group at
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543936&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/better-error-handling-in-templatetags--tp26298957p26543936.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543916</id>
	<title>Re: better error handling in templatetags?</title>
	<published>2009-11-27T07:27:39Z</published>
	<updated>2009-11-27T07:27:39Z</updated>
	<author>
		<name>Tim Valenta</name>
	</author>
	<content type="html">Django is forced to catch your errors, and then bubble them back up to
&lt;br&gt;you. &amp;nbsp;If you notice, none of the traceback lines are even in your
&lt;br&gt;code-- it's all in Python libs or an Django code. &amp;nbsp;The issue is that
&lt;br&gt;you're not seeing raw exceptions, but instead you're seeing reproduced
&lt;br&gt;exceptions.
&lt;br&gt;&lt;br&gt;I agree that template tags are had to debug, especially when it's a
&lt;br&gt;big complex tag that goes wrong all of the sudden. &amp;nbsp;However, don't
&lt;br&gt;forget that it's just a Python object or method, just why not fire up
&lt;br&gt;the shell and import it, testing it out? &amp;nbsp;Step through it with input
&lt;br&gt;that you *know* you're getting, and use the Django modules to create
&lt;br&gt;dummy contexts if needed (although you could probably get away with
&lt;br&gt;just Python dict objects, since the template rendering engine won't
&lt;br&gt;actually be involved).
&lt;br&gt;&lt;br&gt;Fixing the reporting would be amazingly welcome by many of us, but
&lt;br&gt;it's not like it's a simple matter of printing a single debug variable
&lt;br&gt;that accidentally got omitted. &amp;nbsp;I don't know enough about how Django
&lt;br&gt;bubbles exceptions, so I can't say much more on the subject, but it's
&lt;br&gt;clear to me that it's not something that they're doing on purpose to
&lt;br&gt;spit us all.
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;On Nov 27, 3:58 am, &amp;quot;KONTRA, Gergely&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihent...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Seems like you built your own project, and not using my zip.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, the result IS different.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In my traceback I do not have any snippet referencing customtag.py.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; See my trace:&lt;a href=&quot;http://dpaste.com/hold/125819/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dpaste.com/hold/125819/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; thanks
&lt;br&gt;&amp;gt; Gergo
&lt;br&gt;&amp;gt; +-[ Gergely Kontra &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihent...@...&lt;/a&gt;&amp;gt; ]------------------+
&lt;br&gt;&amp;gt; |                                                           |
&lt;br&gt;&amp;gt; | Mobile:(+36 20)356 9656                                   |
&lt;br&gt;&amp;gt; |                                                           |
&lt;br&gt;&amp;gt; +- &amp;quot;Olyan lángész vagyok, hogy poroltóval kellene járnom!&amp;quot; -+
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Fri, Nov 27, 2009 at 04:38, Karen Tracey &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kmtra...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; On Thu, Nov 26, 2009 at 6:02 PM, KONTRA, Gergely &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihent...@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; My problem is the error handling of django in templatetags, not the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; specific dummy error, which I programmed:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; @register.simple_tag
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; def current_time():
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;        1/0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;        return unicode(datetime.datetime.now())
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; What annoys me, that you cannot find the line number of the error,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; just a message, that somewhere there is an error rendering the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; current_time tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; With DEBUG=True, TEMPLATE_DEBUG=DEBUG, I get a TemplateSyntaxError debug
&lt;br&gt;&amp;gt; &amp;gt; page with exception value:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Caught an exception while rendering: integer division or modulo by zero
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Original Traceback (most recent call last):
&lt;br&gt;&amp;gt; &amp;gt;   File &amp;quot;d:\u\kmt\django\trunk\django\template\debug.py&amp;quot;, line 71, in
&lt;br&gt;&amp;gt; &amp;gt; render_node
&lt;br&gt;&amp;gt; &amp;gt;     result = node.render(context)
&lt;br&gt;&amp;gt; &amp;gt;   File &amp;quot;d:\u\kmt\django\trunk\django\template\__init__.py&amp;quot;, line 909, in
&lt;br&gt;&amp;gt; &amp;gt; render
&lt;br&gt;&amp;gt; &amp;gt;     return func(*resolved_vars)
&lt;br&gt;&amp;gt; &amp;gt;   File &amp;quot;D:\u\kmt\software\web\playground\ttt\templatetags\tstuff.py&amp;quot;, line
&lt;br&gt;&amp;gt; &amp;gt; 6, in current_time
&lt;br&gt;&amp;gt; &amp;gt;     1/0
&lt;br&gt;&amp;gt; &amp;gt; ZeroDivisionError: integer division or modulo by zero
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; So I am seeing the line number of the error reported.  It's (somewhat
&lt;br&gt;&amp;gt; &amp;gt; annoyingly) not actually in the traceback portion of the page, but it is on
&lt;br&gt;&amp;gt; &amp;gt; the page.  Are you seeing something different?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Karen
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;Django users&amp;quot; group.
&lt;br&gt;&amp;gt; &amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe from this group, send email to
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; For more options, visit this group at
&lt;br&gt;&amp;gt; &amp;gt;&lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543916&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/better-error-handling-in-templatetags--tp26298957p26543916.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543782</id>
	<title>Re: Feature Request: Reinteract</title>
	<published>2009-11-27T07:18:01Z</published>
	<updated>2009-11-27T07:18:01Z</updated>
	<author>
		<name>Ales Zoulek</name>
	</author>
	<content type="html">Since this would obviously create a lot of external dependecies of Django package (X, GTK, reinteract). I&amp;#39;d prefer if you&amp;#39;d just create a reausable app, that would add ./manage.py reinteract command.&lt;div&gt;&lt;br&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Ales&lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;all&quot;&gt;------------------------------------------------------&lt;br&gt;Ales Zoulek&lt;br&gt;+420 604 332 515&lt;br&gt;Jabber: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543782&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ales.zoulek@...&lt;/a&gt;&lt;br&gt;
------------------------------------------------------&lt;br&gt;
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Nov 27, 2009 at 1:07 PM, noel &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543782&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tellnoel@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
I really love this application Reinteract. Its an enhancement to&lt;br&gt;
Python Interactive Shell. And it would be lovely if I can use&lt;br&gt;
Reinteract with manage.py shell.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
&lt;br&gt;
You received this message because you are subscribed to the Google Groups &amp;quot;Django developers&amp;quot; group.&lt;br&gt;
To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543782&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-developers@...&lt;/a&gt;.&lt;br&gt;
To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543782&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-developers%2Bunsubscribe@...&lt;/a&gt;.&lt;br&gt;
For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-developers?hl=en&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-developers?hl=en&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;Django developers&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543782&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-developers@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543782&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-developers+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.&lt;br /&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-developers-f16210.html&quot; embed=&quot;fixTarget[16210]&quot; target=&quot;_top&quot; &gt;django-developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feature-Request%3A-Reinteract-tp26543619p26543782.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543471</id>
	<title>RuntimeError: class.__dict__ not accessible in restricted mode</title>
	<published>2009-11-27T06:54:16Z</published>
	<updated>2009-11-27T06:54:16Z</updated>
	<author>
		<name>grossetti</name>
	</author>
	<content type="html">Hello everyone,
&lt;br&gt;&lt;br&gt;I keep on getting this error with mod_python:
&lt;br&gt;&lt;br&gt;*RuntimeError: class.__dict__ not accessible in restricted mode
&lt;br&gt;&lt;br&gt;*I read that I have to set :
&lt;br&gt;&lt;br&gt;PythonInterpreter main_interpreter
&lt;br&gt;&lt;br&gt;in my httpd.conf, but this doesn't seam to work. Here is my httpd.conf :
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;lt;VirtualHost *&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ServerName srv1.myapp1.com
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;location &amp;quot;/myapp1&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SetHandler mod_python
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PythonInterpreter main_interpreter
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PythonHandler django.core.handlers.modpython
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PythonDebug Off
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PythonAutoReload Off
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SetEnv DJANGO_SETTINGS_MODULE myapp1.settings
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PythonPath &amp;quot;['/var/www/mysite1', 
&lt;br&gt;'/var/lib/python-support/python2.5/django'] + sys.path&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/location&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;lt;/VirtualHost&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;lt;VirtualHost *&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ServerName srv2.myapp2.com
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;location &amp;quot;/myapp2&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SetHandler mod_python
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PythonInterpreter main_interpreter2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PythonHandler django.core.handlers.modpython
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PythonDebug Off
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PythonAutoReload Off
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SetEnv DJANGO_SETTINGS_MODULE myapp2.settings
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PythonPath &amp;quot;['/var/www/mysite2', 
&lt;br&gt;'/var/lib/python-support/python2.5/django'] + sys.path&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/location&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;lt;/VirtualHost&amp;gt;
&lt;br&gt;&lt;br&gt;does someone get this? Thank you, Gabriel
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543471&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543471&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/RuntimeError%3A-class.__dict__-not-accessible-in-restricted-mode-tp26543471p26543471.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543347</id>
	<title>Re: applying a patch</title>
	<published>2009-11-27T06:44:12Z</published>
	<updated>2009-11-27T06:44:12Z</updated>
	<author>
		<name>paulh-5</name>
	</author>
	<content type="html">Thanks to everybody who replied, in the end I downloaded git, cloned
&lt;br&gt;the django repository with with git clone and applied the patch with
&lt;br&gt;git apply and it all worked well.
&lt;br&gt;&lt;br&gt;Paul Hide
&lt;br&gt;&lt;br&gt;On 26 Nov, 12:26, Tim Chase &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543347&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django.us...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; rebus_ wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; diff --git a/django/contrib/admin/media/js/admin/
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; RelatedObjectLookups.js b/django/contrib/admin/media/js/admin/
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; RelatedObjectLookups.js
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; index 1bc78f8..3941752 100644
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; --- a/django/contrib/admin/media/js/admin/RelatedObjectLookups.js
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; +++ b/django/contrib/admin/media/js/admin/RelatedObjectLookups.js
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; so I guess that explains it, but I thought django used used svn!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Django uses SVN as the official repository, but AFAIK git is often
&lt;br&gt;&amp;gt; &amp;gt; used for development of new features etc cos it is not centralized and
&lt;br&gt;&amp;gt; &amp;gt; it is very simple to create branches in it and so on.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; For patching on windows you could use either gnuwin32 [1] or unxutils
&lt;br&gt;&amp;gt; &amp;gt; [2] for comand line, both of which should be able to usepatchfiles
&lt;br&gt;&amp;gt; &amp;gt; produced by any diff (svn, git or just diff) like Tim said:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;patch-p0 &amp;lt; /path/to/patch.diff
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; TortoiseSVN has an option for &amp;quot;ApplyPatch&amp;quot; that should behave
&lt;br&gt;&amp;gt; similarly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -tim
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543347&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543347&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/applying-a-patch-tp26518593p26543347.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543145</id>
	<title>Re: Best UI for letting users select an item from a large selection  of records?</title>
	<published>2009-11-27T06:28:54Z</published>
	<updated>2009-11-27T06:28:54Z</updated>
	<author>
		<name>Margie Roginski</name>
	</author>
	<content type="html">After much struggling on this same topic, I found that autocomplete
&lt;br&gt;was by far better than a dropdown or a set of chained dropdowns. &amp;nbsp;I
&lt;br&gt;looked at a variety of jquery autocomplete packages, and eventually
&lt;br&gt;settled on this one, which has worked very well for me:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It is unfortunately maintained in a somewhat haphazard way (as you'll
&lt;br&gt;see from the blog that that link takes you to). &amp;nbsp;But on firefox at
&lt;br&gt;least, I find that the 1.1 verson works fine. &amp;nbsp;It has the nice feature
&lt;br&gt;that the user can put in multiple entries. &amp;nbsp;For example, in my case, I
&lt;br&gt;have an autocomplete field where teh user needs to be able to enter
&lt;br&gt;one or more names of users, and this package allowed that whereas the
&lt;br&gt;standard one on the jquery site only allowed you to enter one.
&lt;br&gt;&lt;br&gt;Margie
&lt;br&gt;&lt;br&gt;On Nov 26, 5:47 am, Stodge &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543145&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sto...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have a Ticket model that has a Requirement foreign key. The problem
&lt;br&gt;&amp;gt; is, there could be hundreds of requirements. Offering the user a drop
&lt;br&gt;&amp;gt; down combo box of requirements to choose from isn't the best option.
&lt;br&gt;&amp;gt; So how would you let the user select one record from a large
&lt;br&gt;&amp;gt; selection? What UI widget(s) would you use?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I suppose I could create an auto-complete text box widget that offers
&lt;br&gt;&amp;gt; a list of requirements that matches what they typed. But that's a lot
&lt;br&gt;&amp;gt; of work for someone who doesn't know Javascript (though I do have
&lt;br&gt;&amp;gt; JQuery plugged into my app) and I don't want to spend hours coding it
&lt;br&gt;&amp;gt; to find out it's not the best solution. Any suggestions appreciated.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543145&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543145&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Best-UI-for-letting-users-select-an-item-from-a-large-selection-of--records--tp26529668p26543145.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543626</id>
	<title>mixed Case Field names in the database columns</title>
	<published>2009-11-27T06:26:35Z</published>
	<updated>2009-11-27T06:26:35Z</updated>
	<author>
		<name>Tim Langeman</name>
	</author>
	<content type="html">I'm trying to query my Postgres database through an ODBC data source
&lt;br&gt;in Windows (Excel &amp; Access).
&lt;br&gt;&lt;br&gt;I've found that Excel does not like mixed case field names and the
&lt;br&gt;recommendation for linked SQL servers is to use all lower case names.
&lt;br&gt;I assume this also applies to other types of connections with the
&lt;br&gt;windows ODBC driver.
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.postgresonline.com/journal/index.php?/archives/46-Setting-up-PostgreSQL-as-a-Linked-Server-in-Microsoft-SQL-Server-64-bit.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresonline.com/journal/index.php?/archives/46-Setting-up-PostgreSQL-as-a-Linked-Server-in-Microsoft-SQL-Server-64-bit.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;I know that there is a setting to configure the db_table in django,
&lt;br&gt;but I haven't found any similar setting for the field names. &amp;nbsp;What
&lt;br&gt;approach would you recommend to address this problem. &amp;nbsp;It seems that
&lt;br&gt;my options are:
&lt;br&gt;&lt;br&gt;1) rename all the fields to lower case in django and in the db
&lt;br&gt;2) find a way to continue to use mixed case in my application but
&lt;br&gt;change the tables
&lt;br&gt;3) find a way to get the ODBC driver to handle mixed cases so that
&lt;br&gt;everything can stay mixed case
&lt;br&gt;&lt;br&gt;-Tim Langeman
&lt;br&gt;Akron, PA
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543626&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543626&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/mixed-Case-Field-names-in-the-database-columns-tp26543626p26543626.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542704</id>
	<title>Re: Best UI for letting users select an item from a large selection  of  records?</title>
	<published>2009-11-27T05:56:03Z</published>
	<updated>2009-11-27T05:56:03Z</updated>
	<author>
		<name>Stodge</name>
	</author>
	<content type="html">Thanks. I have the DataTables plugin working so I can filter my
&lt;br&gt;records. Now I just need to work out how to select specific ones from
&lt;br&gt;the table and work with them.
&lt;br&gt;&lt;br&gt;On Nov 26, 9:31 am, David De La Harpe Golden
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542704&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;david.delaharpe.gol...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Stodge wrote:
&lt;br&gt;&amp;gt; &amp;gt; Offering the user a drop
&lt;br&gt;&amp;gt; &amp;gt; down combo box of requirements to choose from isn't the best option.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Rant: combo box /means/ a text entry widget plus dropdown menu &amp;quot;combo&amp;quot;.
&lt;br&gt;&amp;gt;  For some reason web developers in particular seem prone to using it to
&lt;br&gt;&amp;gt; mean a dropdown alone (html forms sadly lack built-in combo boxes, of
&lt;br&gt;&amp;gt; course)&lt;a href=&quot;http://en.wikipedia.org/wiki/Combo_box&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Combo_box&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I suppose I could create an auto-complete text box widget that offers
&lt;br&gt;&amp;gt; &amp;gt; a list of requirements that matches what they typed. But that's a lot
&lt;br&gt;&amp;gt; &amp;gt; of work for someone who doesn't know Javascript (though I do have
&lt;br&gt;&amp;gt; &amp;gt; JQuery plugged into my app)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you're using jquery there are quite a few ready-made jquery plugins
&lt;br&gt;&amp;gt; that mean you can make a combo box (for various ideas of what
&lt;br&gt;&amp;gt; a combo box is or should be) quickly. Kinda one of the points of jquery
&lt;br&gt;&amp;gt; is the large array of plugins, though with the usual problems of plugins
&lt;br&gt;&amp;gt; - variable quality and design.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here's a couple of examples:&lt;a href=&quot;http://phone.witamean.net/sexy-combo/examples/index.htmlhttp://www.fairwaytech.com/Technology/FlexBoxDemo.aspx#demo8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://phone.witamean.net/sexy-combo/examples/index.htmlhttp://www.fairwaytech.com/Technology/FlexBoxDemo.aspx#demo8&lt;/a&gt;&lt;br&gt;&amp;gt; see the jquery plugins list:&lt;a href=&quot;http://plugins.jquery.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://plugins.jquery.com/&lt;/a&gt;&lt;br&gt;&amp;gt; search for &amp;quot;combo&amp;quot; or &amp;quot;autocomplete&amp;quot; or &amp;quot;autosuggest&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; OTOH, a combo box might still be a cramped interface. One could
&lt;br&gt;&amp;gt; e.g. present a filterable table with the likes of dataTables.&lt;a href=&quot;http://www.datatables.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.datatables.net/&lt;/a&gt;&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542704&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542704&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Best-UI-for-letting-users-select-an-item-from-a-large-selection-of--records--tp26529668p26542704.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542671</id>
	<title>extend queryset field lookups for time</title>
	<published>2009-11-27T05:53:43Z</published>
	<updated>2009-11-27T05:53:43Z</updated>
	<author>
		<name>hinnack</name>
	</author>
	<content type="html">Hi,&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;how would I extend the field lookup to get somethnng like this:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;SELECT ... WHERE EXTRACT(&amp;#39;hour&amp;#39; FROM pub_date) &amp;gt; 20&lt;/div&gt;&lt;div&gt;what is for MYSQL:&lt;/div&gt;&lt;div&gt;&lt;div&gt;SELECT ... WHERE HOUR(pub_date) &amp;gt; 20&lt;/div&gt;
&lt;div&gt;to get all entries where the timepart of pub_date is grater then 8pm&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;and how would I change the existing of YEAR, MONTH, DAY for &amp;gt; and &amp;lt;...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;
regards&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-- Hinnack&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;Django users&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542671&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542671&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.&lt;br /&gt;

&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/extend-queryset-field-lookups-for-time-tp26542671p26542671.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542537</id>
	<title>Re: [Django] #8662: Overriding save() raises error when using Model.objects.create()</title>
	<published>2009-11-27T05:40:20Z</published>
	<updated>2009-11-27T05:40:20Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#8662: Overriding save() raises error when using Model.objects.create()
&lt;br&gt;------------------------------------+---------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;pjs &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp;nobody
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status: &amp;nbsp;closed &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; Milestone: &amp;nbsp;1.0 &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Documentation &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;SVN &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resolution: &amp;nbsp;fixed &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp;Keywords: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Stage: &amp;nbsp;Unreviewed &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; Has_patch: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Needs_docs: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; Needs_tests: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 
&lt;br&gt;Needs_better_patch: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;
&lt;br&gt;------------------------------------+---------------------------------------
&lt;br&gt;Comment (by x_O):
&lt;br&gt;&lt;br&gt;&amp;nbsp;Docs here
&lt;br&gt;&amp;nbsp;&lt;a href=&quot;http://www.djangoproject.com/documentation/models/save_delete_hooks/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.djangoproject.com/documentation/models/save_delete_hooks/&lt;/a&gt;&lt;br&gt;&amp;nbsp;are still in old version, this produces a lot of confusions.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/8662#comment:5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/8662#comment:5&lt;/a&gt;&amp;gt;
&lt;br&gt;Django &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/&lt;/a&gt;&amp;gt;
&lt;br&gt;The Web framework for perfectionists with deadlines.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django updates&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542537&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542537&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-updates?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-updates?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-updates-f16211.html&quot; embed=&quot;fixTarget[16211]&quot; target=&quot;_top&quot; &gt;django-updates&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A--Django---8662%3A-Overriding-save%28%29-raises-error-when-using-Model.objects.create%28%29-tp26542537p26542537.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542161</id>
	<title>(no subject)</title>
	<published>2009-11-27T05:02:43Z</published>
	<updated>2009-11-27T05:02:43Z</updated>
	<author>
		<name>Nadae Ivar BADIO</name>
	</author>
	<content type="html">Morning 
&lt;br&gt;I'm novice in django and i want to install my apllication on my server production whos on ubuntu i mean install my aplli on apache and i have this error:
&lt;br&gt;MOD_PYTHON ERROR
&lt;br&gt;&lt;br&gt;ProcessId: &amp;nbsp; &amp;nbsp; &amp;nbsp;3230
&lt;br&gt;Interpreter: &amp;nbsp; &amp;nbsp;'127.0.1.1'
&lt;br&gt;&lt;br&gt;ServerName: &amp;nbsp; &amp;nbsp; '127.0.1.1'
&lt;br&gt;DocumentRoot: &amp;nbsp; '/var/www'
&lt;br&gt;&lt;br&gt;URI: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'/mysite'
&lt;br&gt;Location: &amp;nbsp; &amp;nbsp; &amp;nbsp; '/mysite'
&lt;br&gt;Directory: &amp;nbsp; &amp;nbsp; &amp;nbsp;None
&lt;br&gt;Filename: &amp;nbsp; &amp;nbsp; &amp;nbsp; '/var/www/mysite'
&lt;br&gt;PathInfo: &amp;nbsp; &amp;nbsp; &amp;nbsp; ''
&lt;br&gt;&lt;br&gt;Phase: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'PythonHandler'
&lt;br&gt;Handler: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'django.core.handlers.modpython'
&lt;br&gt;&lt;br&gt;Traceback (most recent call last):
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/usr/lib/python2.6/dist-packages/mod_python/importer.py&amp;quot;, line 1537, in HandlerDispatch
&lt;br&gt;&amp;nbsp; &amp;nbsp; default=default_handler, arg=req, silent=hlist.silent)
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/usr/lib/python2.6/dist-packages/mod_python/importer.py&amp;quot;, line 1229, in _process_target
&lt;br&gt;&amp;nbsp; &amp;nbsp; result = _execute_target(config, req, object, arg)
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/usr/lib/python2.6/dist-packages/mod_python/importer.py&amp;quot;, line 1128, in _execute_target
&lt;br&gt;&amp;nbsp; &amp;nbsp; result = object(arg)
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/var/lib/python-support/python2.6/django/core/handlers/modpython.py&amp;quot;, line 228, in handler
&lt;br&gt;&amp;nbsp; &amp;nbsp; return ModPythonHandler()(req)
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/var/lib/python-support/python2.6/django/core/handlers/modpython.py&amp;quot;, line 191, in __call__
&lt;br&gt;&amp;nbsp; &amp;nbsp; self.load_middleware()
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/var/lib/python-support/python2.6/django/core/handlers/base.py&amp;quot;, line 31, in load_middleware
&lt;br&gt;&amp;nbsp; &amp;nbsp; for middleware_path in settings.MIDDLEWARE_CLASSES:
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/var/lib/python-support/python2.6/django/conf/__init__.py&amp;quot;, line 28, in __getattr__
&lt;br&gt;&amp;nbsp; &amp;nbsp; self._import_settings()
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/var/lib/python-support/python2.6/django/conf/__init__.py&amp;quot;, line 59, in _import_settings
&lt;br&gt;&amp;nbsp; &amp;nbsp; self._target = Settings(settings_module)
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/var/lib/python-support/python2.6/django/conf/__init__.py&amp;quot;, line 94, in __init__
&lt;br&gt;&amp;nbsp; &amp;nbsp; raise ImportError, &amp;quot;Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s&amp;quot; % (self.SETTINGS_MODULE, e)
&lt;br&gt;&lt;br&gt;ImportError: Could not import settings 'mysite.settings' (Is it on sys.path? Does it have syntax errors?): No module named mysite.settings
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542161&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542161&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/%28no-subject%29-tp26542161p26542161.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542010</id>
	<title>Re: Newbie: is it possible to re-render a tag/filter after adding it  to the web page as string</title>
	<published>2009-11-27T04:49:33Z</published>
	<updated>2009-11-27T04:49:33Z</updated>
	<author>
		<name>Allen-57</name>
	</author>
	<content type="html">Dear Bruno
&lt;br&gt;&lt;br&gt;Great to hear that there are other ZOPE users among us.
&lt;br&gt;&lt;br&gt;When I work with ZOPE I code with dtml. I only found out about ZPT
&lt;br&gt;when I quiz ZOPE and never got familiar with it afterwords. The first
&lt;br&gt;thing they teach you when working with ZOPE is to combine segment of
&lt;br&gt;web pages with &amp;lt;dtml-var &amp;quot;aSegment.html&amp;quot;&amp;gt;. With this I could prepare
&lt;br&gt;some page with other tags or javascript/css and it will all render
&lt;br&gt;normally.
&lt;br&gt;&lt;br&gt;I was kind of disappointed that I didn't find any thing similar here
&lt;br&gt;and page inheritance is still new to me so I didn't consider it first.
&lt;br&gt;&lt;br&gt;I want to create a application that uses minimal html files. At the
&lt;br&gt;present stage of development, I coded everything into one html and
&lt;br&gt;save all the static data into the database.
&lt;br&gt;&lt;br&gt;I want to know about re-rendering a django tag/javascript/css is
&lt;br&gt;because I want to allow my users to use a web interface to input their
&lt;br&gt;own contents and custom tag that I created and save it back to the
&lt;br&gt;database.
&lt;br&gt;&lt;br&gt;If everything work accordingly, the custom tag will activate and put
&lt;br&gt;javascript/googleMap api onto the page and display a google map. But
&lt;br&gt;sadly it didn't gone according to plan and instead the page only
&lt;br&gt;displayed the tag as if it was just text.
&lt;br&gt;&lt;br&gt;So.. does anyone have any idea how I could solve this problem?
&lt;br&gt;&lt;br&gt;Allen
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Nov 27, 6:06 pm, bruno desthuilliers
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542010&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno.desthuilli...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 27 nov, 09:35, Allen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542010&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swa...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Dear Andy McKay
&lt;br&gt;&amp;gt; &amp;gt; Thanks for the input and you're right, I shouldn't do it this way.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I use to use ZOPE for a couple of years and it has to abilities to
&lt;br&gt;&amp;gt; &amp;gt; integrate multiple static webpages just by write a tag with the static
&lt;br&gt;&amp;gt; &amp;gt; webpage filename similar to the filter tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ZPT or dtml ? I've done my share of Zope / ZPT (and still do when
&lt;br&gt;&amp;gt; someone points a gun at me), and from memory I don't see what you're
&lt;br&gt;&amp;gt; talking about...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; But I just started django
&lt;br&gt;&amp;gt; &amp;gt; a month ago and I didn't see function of this sort except for page
&lt;br&gt;&amp;gt; &amp;gt; inheritance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, there's an include tag, but if that's not what you're after, you
&lt;br&gt;&amp;gt; can write your own cutom tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have consider using page inheritance but I just not use to it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You should, definitly. Page inheritance work mostly like the &amp;quot;page
&lt;br&gt;&amp;gt; macro&amp;quot; pattern in ZPT - except it's way cleaner.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; That's why I place it in the database. This is just my temporary fix
&lt;br&gt;&amp;gt; &amp;gt; for the time being and I know eventually I find a problem with this
&lt;br&gt;&amp;gt; &amp;gt; way soon of later.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, putting template code in the DB is not necessarily totally dumb
&lt;br&gt;&amp;gt; - but you need to explicitely render it, which is not supported OOTB,
&lt;br&gt;&amp;gt; so you either have to do it in the view or write some custom tag /
&lt;br&gt;&amp;gt; filters to take care of the rendering.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You'll find relevant doc here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates...http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howt&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates...http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howt&lt;/a&gt;...
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542010&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26542010&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Newbie%3A-is-it-possible-to-re-render-a-tag-filter-after-adding-it-to--the-web-page-as-string-tp26537460p26542010.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541978</id>
	<title>Re: Newbie: is it possible to re-render a tag/filter after adding it  to the web page as string</title>
	<published>2009-11-27T04:46:36Z</published>
	<updated>2009-11-27T04:46:36Z</updated>
	<author>
		<name>Allen-57</name>
	</author>
	<content type="html">Dear Bruno
&lt;br&gt;&lt;br&gt;Great to hear that there are other ZOPE users among us.
&lt;br&gt;&lt;br&gt;When I work with ZOPE I code with dtml. I only found out about ZPT
&lt;br&gt;when I quiz ZOPE and never got familiar with it afterwords. The first
&lt;br&gt;thing they teach you when working with ZOPE is to combine segment of
&lt;br&gt;web pages with &amp;lt;dtml-var &amp;quot;aSegment.html&amp;quot;&amp;gt;. With this I could prepare
&lt;br&gt;some page with other tags or javascript/css and it will all render
&lt;br&gt;normally.
&lt;br&gt;&lt;br&gt;I was kind of disappointed that I didn't find any thing similar here
&lt;br&gt;and page inheritance is still new to me so I didn't consider
&lt;br&gt;it first.
&lt;br&gt;&lt;br&gt;I want to create a application that uses minimal html files. At the
&lt;br&gt;present stage of development, coded everything into one html and save
&lt;br&gt;all the static data into the database.
&lt;br&gt;&lt;br&gt;I want to know about re-rendering a django tag/javascript/css is
&lt;br&gt;because I want to allow my users to use a web interface to create
&lt;br&gt;their own contents and with custom tag that I created and save it back
&lt;br&gt;to the
&lt;br&gt;database.
&lt;br&gt;&lt;br&gt;If everything work accordingly, the custom tag will activate and put
&lt;br&gt;javascript/googleMap api onto the page and display a google map. But
&lt;br&gt;sadly it didn't gone according to plan and the page only
&lt;br&gt;displayed the tag as if it was just text.
&lt;br&gt;&lt;br&gt;So.. does anyone have any idea how I could solve this problem?
&lt;br&gt;&lt;br&gt;Allen
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Nov 27, 6:06 pm, bruno desthuilliers
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541978&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno.desthuilli...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 27 nov, 09:35, Allen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541978&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swa...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Dear Andy McKay
&lt;br&gt;&amp;gt; &amp;gt; Thanks for the input and you're right, I shouldn't do it this way.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I use to use ZOPE for a couple of years and it has to abilities to
&lt;br&gt;&amp;gt; &amp;gt; integrate multiple static webpages just by write a tag with the static
&lt;br&gt;&amp;gt; &amp;gt; webpage filename similar to the filter tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ZPT or dtml ? I've done my share of Zope / ZPT (and still do when
&lt;br&gt;&amp;gt; someone points a gun at me), and from memory I don't see what you're
&lt;br&gt;&amp;gt; talking about...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; But I just started django
&lt;br&gt;&amp;gt; &amp;gt; a month ago and I didn't see function of this sort except for page
&lt;br&gt;&amp;gt; &amp;gt; inheritance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, there's an include tag, but if that's not what you're after, you
&lt;br&gt;&amp;gt; can write your own cutom tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have consider using page inheritance but I just not use to it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You should, definitly. Page inheritance work mostly like the &amp;quot;page
&lt;br&gt;&amp;gt; macro&amp;quot; pattern in ZPT - except it's way cleaner.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; That's why I place it in the database. This is just my temporary fix
&lt;br&gt;&amp;gt; &amp;gt; for the time being and I know eventually I find a problem with this
&lt;br&gt;&amp;gt; &amp;gt; way soon of later.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, putting template code in the DB is not necessarily totally dumb
&lt;br&gt;&amp;gt; - but you need to explicitely render it, which is not supported OOTB,
&lt;br&gt;&amp;gt; so you either have to do it in the view or write some custom tag /
&lt;br&gt;&amp;gt; filters to take care of the rendering.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You'll find relevant doc here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates...http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howt&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates...http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howt&lt;/a&gt;...
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541978&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541978&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Newbie%3A-is-it-possible-to-re-render-a-tag-filter-after-adding-it-to--the-web-page-as-string-tp26537460p26541978.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541926</id>
	<title>Re: Newbie: is it possible to re-render a tag/filter after adding it  to the web page as string</title>
	<published>2009-11-27T04:41:08Z</published>
	<updated>2009-11-27T04:41:08Z</updated>
	<author>
		<name>Allen-57</name>
	</author>
	<content type="html">Dear Bruno
&lt;br&gt;&lt;br&gt;Great to hear that there are other ZOPE users among us.
&lt;br&gt;&lt;br&gt;When I work with ZOPE I code with dtml. I only found out about ZPT
&lt;br&gt;when I quiz ZOPE and never got familiar with it afterwords. The first
&lt;br&gt;thing they teach you when working with ZOPE is to combine segment of
&lt;br&gt;web pages with &amp;lt;dtml-var &amp;quot;aSegment.html&amp;quot;&amp;gt;. With this I could type use
&lt;br&gt;some page with other tags or javascript/css and it will all render
&lt;br&gt;normally.
&lt;br&gt;&lt;br&gt;I was kind of disappointed that I didn't find any thing similar here
&lt;br&gt;and page inheritance is still new to me to adopt so I didn't consider
&lt;br&gt;it first.
&lt;br&gt;&lt;br&gt;I want to create a application that uses minimal html files. At the
&lt;br&gt;present stage of development, coded everything into one html and save
&lt;br&gt;all the static data into the database.
&lt;br&gt;&lt;br&gt;I want to know about re-rendering a django tag/javascript/css is
&lt;br&gt;because I want to allow my users to use a web interface to type in
&lt;br&gt;their contents and custom tag that I created and save it back to the
&lt;br&gt;database.
&lt;br&gt;&lt;br&gt;If everything work accordingly, the custom tag will activate and put
&lt;br&gt;javascript/googleMap api onto the page and display a google map. But
&lt;br&gt;sadly it didn't gone according to plan and instead the page only
&lt;br&gt;displayed the tag as if it was just text.
&lt;br&gt;&lt;br&gt;So.. does anyone have any idea how I could solve this problem?
&lt;br&gt;&lt;br&gt;Allen
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; I use to use ZOPE for a couple of years and it has to abilities to
&lt;br&gt;&amp;gt; &amp;gt; integrate multiple static webpages just by write a tag with the static
&lt;br&gt;&amp;gt; &amp;gt; webpage filename similar to the filter tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ZPT or dtml ? I've done my share of Zope / ZPT (and still do when
&lt;br&gt;&amp;gt; someone points a gun at me), and from memory I don't see what you're
&lt;br&gt;&amp;gt; talking about...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; But I just started django
&lt;br&gt;&amp;gt; &amp;gt; a month ago and I didn't see function of this sort except for page
&lt;br&gt;&amp;gt; &amp;gt; inheritance.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, there's an include tag, but if that's not what you're after, you
&lt;br&gt;&amp;gt; can write your own cutom tag.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have consider using page inheritance but I just not use to it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You should, definitly. Page inheritance work mostly like the &amp;quot;page
&lt;br&gt;&amp;gt; macro&amp;quot; pattern in ZPT - except it's way cleaner.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; That's why I place it in the database. This is just my temporary fix
&lt;br&gt;&amp;gt; &amp;gt; for the time being and I know eventually I find a problem with this
&lt;br&gt;&amp;gt; &amp;gt; way soon of later.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, putting template code in the DB is not necessarily totally dumb
&lt;br&gt;&amp;gt; - but you need to explicitely render it, which is not supported OOTB,
&lt;br&gt;&amp;gt; so you either have to do it in the view or write some custom tag /
&lt;br&gt;&amp;gt; filters to take care of the rendering.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You'll find relevant doc here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates...http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howt&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates...http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howt&lt;/a&gt;...
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541926&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541926&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Newbie%3A-is-it-possible-to-re-render-a-tag-filter-after-adding-it-to--the-web-page-as-string-tp26537460p26541926.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543619</id>
	<title>Feature Request: Reinteract</title>
	<published>2009-11-27T04:07:42Z</published>
	<updated>2009-11-27T04:07:42Z</updated>
	<author>
		<name>noel-29</name>
	</author>
	<content type="html">I really love this application Reinteract. Its an enhancement to
&lt;br&gt;Python Interactive Shell. And it would be lovely if I can use
&lt;br&gt;Reinteract with manage.py shell.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django developers&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543619&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-developers@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543619&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-developers+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-developers?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-developers?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-developers-f16210.html&quot; embed=&quot;fixTarget[16210]&quot; target=&quot;_top&quot; &gt;django-developers&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Feature-Request%3A-Reinteract-tp26543619p26543619.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541567</id>
	<title>Re: [Django] #11293: Filters on aggregates lose connector</title>
	<published>2009-11-27T04:05:00Z</published>
	<updated>2009-11-27T04:05:00Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#11293: Filters on aggregates lose connector
&lt;br&gt;--------------------------------------------+-------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541567&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django@...&lt;/a&gt; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status: &amp;nbsp;new &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; Milestone: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;ORM aggregation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;SVN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resolution: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp;Keywords: &amp;nbsp;having, where, aggregate, connector
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Stage: &amp;nbsp;Accepted &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; Has_patch: &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Needs_docs: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; Needs_tests: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;Needs_better_patch: &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;
&lt;br&gt;--------------------------------------------+-------------------------------
&lt;br&gt;Changes (by RaceCondition):
&lt;br&gt;&lt;br&gt;&amp;nbsp;* cc: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541567&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;eallik@...&lt;/a&gt; (added)
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/11293#comment:6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/11293#comment:6&lt;/a&gt;&amp;gt;
&lt;br&gt;Django &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/&lt;/a&gt;&amp;gt;
&lt;br&gt;The Web framework for perfectionists with deadlines.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django updates&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541567&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541567&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-updates?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-updates?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-updates-f16211.html&quot; embed=&quot;fixTarget[16211]&quot; target=&quot;_top&quot; &gt;django-updates&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-Django---11293%3A-Filters-on-aggregates-lose-connector-tp23954139p26541567.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541492</id>
	<title>Re: [Django] #12270: Wrong SQL generated with annotated fields and ORed Q objects</title>
	<published>2009-11-27T03:58:50Z</published>
	<updated>2009-11-27T03:58:50Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#12270: Wrong SQL generated with annotated fields and ORed Q objects
&lt;br&gt;--------------------------------------+-------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;RaceCondition &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status: &amp;nbsp;closed &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; Milestone: &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;ORM aggregation &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resolution: &amp;nbsp;duplicate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp;Keywords: &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Stage: &amp;nbsp;Unreviewed &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; Has_patch: &amp;nbsp;0 &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Needs_docs: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; Needs_tests: &amp;nbsp;0 &amp;nbsp;
&lt;br&gt;Needs_better_patch: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;
&lt;br&gt;--------------------------------------+-------------------------------------
&lt;br&gt;Changes (by ubernostrum):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * status: &amp;nbsp;new =&amp;gt; closed
&lt;br&gt;&amp;nbsp; * needs_better_patch: &amp;nbsp;=&amp;gt; 0
&lt;br&gt;&amp;nbsp; * resolution: &amp;nbsp;=&amp;gt; duplicate
&lt;br&gt;&amp;nbsp; * needs_tests: &amp;nbsp;=&amp;gt; 0
&lt;br&gt;&amp;nbsp; * needs_docs: &amp;nbsp;=&amp;gt; 0
&lt;br&gt;&lt;br&gt;Comment:
&lt;br&gt;&lt;br&gt;&amp;nbsp;Duplicate of #11293.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/12270#comment:1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/12270#comment:1&lt;/a&gt;&amp;gt;
&lt;br&gt;Django &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/&lt;/a&gt;&amp;gt;
&lt;br&gt;The Web framework for perfectionists with deadlines.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django updates&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541492&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541492&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-updates?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-updates?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-updates-f16211.html&quot; embed=&quot;fixTarget[16211]&quot; target=&quot;_top&quot; &gt;django-updates&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-Django---12270%3A-Wrong-SQL-generated-with-annotated-fields-and-ORed-Q-objects-tp26541442p26541492.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541442</id>
	<title>[Django] #12270: Wrong SQL generated with annotated fields and ORed Q objects</title>
	<published>2009-11-27T03:54:24Z</published>
	<updated>2009-11-27T03:54:24Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#12270: Wrong SQL generated with annotated fields and ORed Q objects
&lt;br&gt;-----------------------------+----------------------------------------------
&lt;br&gt;&amp;nbsp;Reporter: &amp;nbsp;RaceCondition &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;Status: &amp;nbsp;new &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; Milestone: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;Component: &amp;nbsp;ORM aggregation &amp;nbsp;| &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;Keywords: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; Stage: &amp;nbsp;Unreviewed
&lt;br&gt;Has_patch: &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;
&lt;br&gt;-----------------------------+----------------------------------------------
&lt;br&gt;&amp;nbsp;These are the models I have:
&lt;br&gt;&lt;br&gt;&amp;nbsp;A {{{Language}}} model, and
&lt;br&gt;&amp;nbsp;{{{Text}}} with fkeys to {{{Language}}}: {{{language}}}
&lt;br&gt;&amp;nbsp;(related_name={{{'texts1'}}} and {{{target_language}}}
&lt;br&gt;&amp;nbsp;(related_name={{{'texts2'}}}).
&lt;br&gt;&lt;br&gt;&amp;nbsp;I want to do a query on languages that have either at least one item in
&lt;br&gt;&amp;nbsp;texts1 or in texts2.
&lt;br&gt;&lt;br&gt;&amp;nbsp;{{{
&lt;br&gt;&amp;nbsp;from django.db.models import Count, Q
&lt;br&gt;&amp;nbsp;languages = Language.objects.all().annotate(num_texts1=Count('texts1'),
&lt;br&gt;&amp;nbsp;num_texts2=Count('texts2'))
&lt;br&gt;&amp;nbsp;languages = languages.filter(Q(num_texts1__gt=0) | Q(num_texts2__gt=0))
&lt;br&gt;&amp;nbsp;}}}
&lt;br&gt;&lt;br&gt;&amp;nbsp;Now I'd assume the generated query contains a {{{HAVING}}} clause with two
&lt;br&gt;&amp;nbsp;conditions {{{OR}}}ed in it, but no. This is what {{{_as_sql()}}} returns:
&lt;br&gt;&amp;nbsp;{{{
&lt;br&gt;&amp;nbsp;('SELECT U0.&amp;quot;id&amp;quot; FROM &amp;quot;localsite_language&amp;quot; U0
&lt;br&gt;&amp;nbsp;LEFT OUTER JOIN &amp;quot;localsite_text&amp;quot; U1 ON (U0.&amp;quot;id&amp;quot; = U1.&amp;quot;target_language_id&amp;quot;)
&lt;br&gt;&amp;nbsp;LEFT OUTER JOIN &amp;quot;localsite_text&amp;quot; U2 ON (U0.&amp;quot;id&amp;quot; = U2.&amp;quot;language_id&amp;quot;)
&lt;br&gt;&amp;nbsp;GROUP BY U0.&amp;quot;id&amp;quot;, U0.&amp;quot;name&amp;quot;, U0.&amp;quot;slug&amp;quot;, U0.&amp;quot;original_name&amp;quot;
&lt;br&gt;&amp;nbsp;HAVING (COUNT(U1.&amp;quot;id&amp;quot;) &amp;gt; %s &amp;nbsp;AND COUNT(U2.&amp;quot;id&amp;quot;) &amp;gt; %s )',
&lt;br&gt;&amp;nbsp; (0, 0))
&lt;br&gt;&amp;nbsp;}}}
&lt;br&gt;&lt;br&gt;&amp;nbsp;In the {{{HAVING}}} clause there's an {{{AND}}} instead of an {{{OR}}}
&lt;br&gt;&amp;nbsp;which causes wrong query results. Am I missing something here myself or is
&lt;br&gt;&amp;nbsp;this a bug?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/12270&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/12270&lt;/a&gt;&amp;gt;
&lt;br&gt;Django &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/&lt;/a&gt;&amp;gt;
&lt;br&gt;The Web framework for perfectionists with deadlines.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django updates&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541442&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541442&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-updates+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-updates?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-updates?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-updates-f16211.html&quot; embed=&quot;fixTarget[16211]&quot; target=&quot;_top&quot; &gt;django-updates&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-Django---12270%3A-Wrong-SQL-generated-with-annotated-fields-and-ORed-Q-objects-tp26541442p26541442.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541253</id>
	<title>Handling IntegrityError on transaction middleware commit</title>
	<published>2009-11-27T03:35:39Z</published>
	<updated>2009-11-27T03:35:39Z</updated>
	<author>
		<name>Ryan Fugger</name>
	</author>
	<content type="html">I had an IntegrityError come up on transaction commit (using postgres)
&lt;br&gt;today on a production site -- trying to insert an invalid foreign key
&lt;br&gt;value (an admin deleted something she shouldn't have). &amp;nbsp;The problem
&lt;br&gt;was that instead of emailing me the exception like usual, django
&lt;br&gt;logged the exception to my apache (using mod_wsgi) error log and then
&lt;br&gt;that apache process was semi-broken for about half and hour, refusing
&lt;br&gt;to recognize session cookies or log anyone in, but also not throwing
&lt;br&gt;up any exceptions either.
&lt;br&gt;&lt;br&gt;I realize that I should be validating my data before saving it, but
&lt;br&gt;I'll admit I don't guard against every eventuality. &amp;nbsp;My question is,
&lt;br&gt;should I be doing something in my code to prevent this kind of poor
&lt;br&gt;exception handling, or should I file a bug against django? &amp;nbsp;I would
&lt;br&gt;certainly prefer the whole server not to break when the transaction
&lt;br&gt;commit fails for whatever reason -- it should rollback the transaction
&lt;br&gt;and give a 500 error page.
&lt;br&gt;&lt;br&gt;Here's the middleware tuple from my settings.py:
&lt;br&gt;&lt;br&gt;MIDDLEWARE_CLASSES = (
&lt;br&gt;&amp;nbsp; &amp;nbsp; 'django.middleware.common.CommonMiddleware',
&lt;br&gt;&amp;nbsp; &amp;nbsp; 'django.contrib.sessions.middleware.SessionMiddleware',
&lt;br&gt;&amp;nbsp; &amp;nbsp; 'django.contrib.auth.middleware.AuthenticationMiddleware',
&lt;br&gt;&amp;nbsp; &amp;nbsp; 'django.middleware.transaction.TransactionMiddleware',
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;Any thoughts? &amp;nbsp;Thanks.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541253&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541253&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Handling-IntegrityError-on-transaction-middleware-commit-tp26541253p26541253.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540993</id>
	<title>Re: Ordering over ManyToMany relationship omits records</title>
	<published>2009-11-27T03:10:18Z</published>
	<updated>2009-11-27T03:10:18Z</updated>
	<author>
		<name>Ramiro Morales-2</name>
	</author>
	<content type="html">On Thu, Nov 26, 2009 at 6:31 PM, David &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540993&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidkazuhiro@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Listing.objects.order_by(&amp;quot;book__courses&amp;quot;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; gives me Listings with id's (5, 1, 3, 5, 2, 4), and
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Listing.objects.order_by(&amp;quot;-book__courses&amp;quot;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; gives me Listings with id's (6, 4, 5, 2, 5,1)
&lt;br&gt;&lt;br&gt;On Thu, Nov 26, 2009 at 6:38 PM, David &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540993&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidkazuhiro@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; P.S. id == 6 disappears in ascending and id == 3 disappears in
&lt;br&gt;&amp;gt; descending.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It's not a surprise that id == 5 is duplicated because it is the only
&lt;br&gt;&amp;gt; Listing__book which has a relationship with two courses, the rest have
&lt;br&gt;&amp;gt; a relationship with only one. That part does look suspicious to me
&lt;br&gt;&amp;gt; though, as if the duplicate id &amp;quot;swallowing up&amp;quot; the missing records. I
&lt;br&gt;&amp;gt; have no clue why though... hope these details help clarify my problem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;I'd suggest to perform the same queries using SQL to see if the
&lt;br&gt;results you get are different from what you get when using the ORM. I say
&lt;br&gt;this because the last paragraph in the order_by() method description:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/models/querysets/#order-by-fields&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/models/querysets/#order-by-fields&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ramiro Morales &amp;nbsp;| &amp;nbsp;&lt;a href=&quot;http://rmorales.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://rmorales.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540993&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540993&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Ordering-over-ManyToMany-relationship-omits-records-tp26535171p26540993.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540833</id>
	<title>Re: better error handling in templatetags?</title>
	<published>2009-11-27T02:58:19Z</published>
	<updated>2009-11-27T02:58:19Z</updated>
	<author>
		<name>KONTRA, Gergely</name>
	</author>
	<content type="html">Seems like you built your own project, and not using my zip.
&lt;br&gt;&lt;br&gt;However, the result IS different.
&lt;br&gt;&lt;br&gt;In my traceback I do not have any snippet referencing customtag.py.
&lt;br&gt;&lt;br&gt;See my trace: &lt;a href=&quot;http://dpaste.com/hold/125819/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://dpaste.com/hold/125819/&lt;/a&gt;&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;Gergo
&lt;br&gt;+-[ Gergely Kontra &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540833&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihentagy@...&lt;/a&gt;&amp;gt; ]------------------+
&lt;br&gt;|                                                           |
&lt;br&gt;| Mobile:(+36 20)356 9656                                   |
&lt;br&gt;|                                                           |
&lt;br&gt;+- &amp;quot;Olyan lángész vagyok, hogy poroltóval kellene járnom!&amp;quot; -+
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Fri, Nov 27, 2009 at 04:38, Karen Tracey &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540833&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kmtracey@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Nov 26, 2009 at 6:02 PM, KONTRA, Gergely &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540833&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pihentagy@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; My problem is the error handling of django in templatetags, not the
&lt;br&gt;&amp;gt;&amp;gt; specific dummy error, which I programmed:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; @register.simple_tag
&lt;br&gt;&amp;gt;&amp;gt; def current_time():
&lt;br&gt;&amp;gt;&amp;gt;        1/0
&lt;br&gt;&amp;gt;&amp;gt;        return unicode(datetime.datetime.now())
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What annoys me, that you cannot find the line number of the error,
&lt;br&gt;&amp;gt;&amp;gt; just a message, that somewhere there is an error rendering the
&lt;br&gt;&amp;gt;&amp;gt; current_time tag.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; With DEBUG=True, TEMPLATE_DEBUG=DEBUG, I get a TemplateSyntaxError debug
&lt;br&gt;&amp;gt; page with exception value:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Caught an exception while rendering: integer division or modulo by zero
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Original Traceback (most recent call last):
&lt;br&gt;&amp;gt;   File &amp;quot;d:\u\kmt\django\trunk\django\template\debug.py&amp;quot;, line 71, in
&lt;br&gt;&amp;gt; render_node
&lt;br&gt;&amp;gt;     result = node.render(context)
&lt;br&gt;&amp;gt;   File &amp;quot;d:\u\kmt\django\trunk\django\template\__init__.py&amp;quot;, line 909, in
&lt;br&gt;&amp;gt; render
&lt;br&gt;&amp;gt;     return func(*resolved_vars)
&lt;br&gt;&amp;gt;   File &amp;quot;D:\u\kmt\software\web\playground\ttt\templatetags\tstuff.py&amp;quot;, line
&lt;br&gt;&amp;gt; 6, in current_time
&lt;br&gt;&amp;gt;     1/0
&lt;br&gt;&amp;gt; ZeroDivisionError: integer division or modulo by zero
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So I am seeing the line number of the error reported.  It's (somewhat
&lt;br&gt;&amp;gt; annoyingly) not actually in the traceback portion of the page, but it is on
&lt;br&gt;&amp;gt; the page.  Are you seeing something different?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Karen
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google Groups
&lt;br&gt;&amp;gt; &amp;quot;Django users&amp;quot; group.
&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540833&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540833&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; For more options, visit this group at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540833&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540833&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/better-error-handling-in-templatetags--tp26298957p26540833.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540244</id>
	<title>Re: Newbie: is it possible to re-render a tag/filter after adding it  to the web page as string</title>
	<published>2009-11-27T02:06:56Z</published>
	<updated>2009-11-27T02:06:56Z</updated>
	<author>
		<name>bruno desthuilliers-7</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;On 27 nov, 09:35, Allen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540244&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;swa...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Dear Andy McKay
&lt;br&gt;&amp;gt; Thanks for the input and you're right, I shouldn't do it this way.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I use to use ZOPE for a couple of years and it has to abilities to
&lt;br&gt;&amp;gt; integrate multiple static webpages just by write a tag with the static
&lt;br&gt;&amp;gt; webpage filename similar to the filter tag.
&lt;br&gt;&lt;br&gt;ZPT or dtml ? I've done my share of Zope / ZPT (and still do when
&lt;br&gt;someone points a gun at me), and from memory I don't see what you're
&lt;br&gt;talking about...
&lt;br&gt;&lt;br&gt;&amp;gt; But I just started django
&lt;br&gt;&amp;gt; a month ago and I didn't see function of this sort except for page
&lt;br&gt;&amp;gt; inheritance.
&lt;br&gt;&lt;br&gt;Well, there's an include tag, but if that's not what you're after, you
&lt;br&gt;can write your own cutom tag.
&lt;br&gt;&lt;br&gt;&amp;gt; I have consider using page inheritance but I just not use to it.
&lt;br&gt;&lt;br&gt;You should, definitly. Page inheritance work mostly like the &amp;quot;page
&lt;br&gt;macro&amp;quot; pattern in ZPT - except it's way cleaner.
&lt;br&gt;&lt;br&gt;&amp;gt; That's why I place it in the database. This is just my temporary fix
&lt;br&gt;&amp;gt; for the time being and I know eventually I find a problem with this
&lt;br&gt;&amp;gt; way soon of later.
&lt;br&gt;&lt;br&gt;Well, putting template code in the DB is not necessarily totally dumb
&lt;br&gt;- but you need to explicitely render it, which is not supported OOTB,
&lt;br&gt;so you either have to do it in the view or write some custom tag /
&lt;br&gt;filters to take care of the rendering.
&lt;br&gt;&lt;br&gt;You'll find relevant doc here:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates-api&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/ref/templates/api/#ref-templates-api&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howto-custom-template-tags&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howto-custom-template-tags&lt;/a&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Django users&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540244&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540244&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/django-users?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/django-users?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/django-users-f16209.html&quot; embed=&quot;fixTarget[16209]&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;django-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Newbie%3A-is-it-possible-to-re-render-a-tag-filter-after-adding-it-to--the-web-page-as-string-tp26537460p26540244.html" />
</entry>

</feed>
