<?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-10T23:50:06Z</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-26297314</id>
	<title>flatpages not finding site_media</title>
	<published>2009-11-10T23:50:06Z</published>
	<updated>2009-11-10T23:50:06Z</updated>
	<author>
		<name>neridaj@gmail.com</name>
	</author>
	<content type="html">&lt;br&gt;I'm trying to use some flatpages for static content and I don''t
&lt;br&gt;understand why they keep failing to load media files. I have my
&lt;br&gt;template_dirs defined, media_root and media_url - when used in
&lt;br&gt;template does not resolve to media_root i.e., template contains:
&lt;br&gt;&lt;br&gt;&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;{{ media_url }}css/base.css&amp;quot; type=&amp;quot;text/
&lt;br&gt;css&amp;quot; media=&amp;quot;screen&amp;quot; title=&amp;quot;Base Styles&amp;quot; charset=&amp;quot;utf-8&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;results in:
&lt;br&gt;&lt;br&gt;Failed to load source for: &lt;a href=&quot;http://127.0.0.1:8000/about/css/base.css&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:8000/about/css/base.css&lt;/a&gt;&lt;br&gt;&lt;br&gt;MEDIA_ROOT = '/Users/neridaj/django-templates/neridaj/'
&lt;br&gt;MEDIA_URL = '/site_media/'
&lt;br&gt;TEMPLATE_DIRS = (
&lt;br&gt;&amp;nbsp; &amp;nbsp; '/Users/neridaj/django-templates/neridaj/'
&lt;br&gt;)
&lt;br&gt;&lt;br&gt;The default template renders but without any of the css.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;J
&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=26297314&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=26297314&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/flatpages-not-finding-site_media-tp26297314p26297314.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26297211</id>
	<title>Re: Uploading and using images in a database application</title>
	<published>2009-11-10T23:37:43Z</published>
	<updated>2009-11-10T23:37:43Z</updated>
	<author>
		<name>derekH-2</name>
	</author>
	<content type="html">&lt;br&gt;Adrian
&lt;br&gt;&lt;br&gt;Does the Photologue app store the image references in the database?
&lt;br&gt;&lt;br&gt;On Nov 5, 6:58 pm, adrian &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26297211&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;adrian...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The easiest way is to use the Photologue application.
&lt;br&gt;&amp;gt; It has done most of the work for you.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 5, 9:53 am, bruno desthuilliers &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26297211&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno.desthuilli...@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On 3 nov, 16:02, derek &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26297211&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gamesb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Given that I am a &amp;quot;wet behind the ears&amp;quot; newbie, maybe I should not be
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; attempting this, but...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Attempts at thing we don't yet fully grasp can be a good way to
&lt;br&gt;&amp;gt; &amp;gt; learn.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I need some simple and straightforward guidance on
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; uploading and using images in a simple database application, which (so far)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; only uses the admin interface.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I working on my development machine (i.e. no Apache integration as yet).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; The use case is not that complex.  If I have an &amp;quot;Event&amp;quot; object, with which I
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; want to associate a number of images (typically, photos taken by people at
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; that event), then I also need an &amp;quot;EventImage&amp;quot; object, with the event.id as
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; the foreign key.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; So, the models look like:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; class Event(models.Model):
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     id = models.AutoField(primary_key=True)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Hint : if you leave this previous line out, Django will automagically
&lt;br&gt;&amp;gt; &amp;gt; add this very same field to your model !-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     date_time = models.DateTimeField()
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     title = models.CharField(unique=True,max_length=250)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; class EventImage(models.Model):
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     id = models.AutoField(primary_key=True)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     caption = models.CharField(unique=True,max_length=10)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     title = models.CharField(max_length=250)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     event = models.ForeignKey(Event)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     image = models.ImageField(upload_to='photos')
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; What I have gathered so far, from browsing articles and snippets and Q&amp;A, is
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; that I also need:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 1.to add/change settings.py:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;  MEDIA_ROOT = '/home/blah/blah/mysite/media/'
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;  MEDIA_URL = '&lt;a href=&quot;http://127.0.0.1:8000/media/'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:8000/media/'&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;  ADMIN_MEDIA_PREFIX = '/media/'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Using the same path component for both the static medias and the admin
&lt;br&gt;&amp;gt; &amp;gt; media usually leads to unexpected results. Either change your static
&lt;br&gt;&amp;gt; &amp;gt; medias component path to something else or - way simplier -, change
&lt;br&gt;&amp;gt; &amp;gt; the ADMIN_MEDIA_PREFIX (here we canonically set it to 'admin-media').
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;  STATIC_DOC_ROOT = '/home/blah/blah/mysite/media/'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 2. add the following to the start of urls.py:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; from django.conf import settings
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 3. add the following to the end of urls.py:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; if settings.DEBUG:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     urlpatterns += patterns('',
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;         (r'^static/(?P&amp;lt;path&amp;gt;.*)$', 'django.views.static.serve',
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;         {'document_root': settings.STATIC_DOC_ROOT}),
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;     )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This url pattern is not consistant with the your MEDIA_URL settings. A
&lt;br&gt;&amp;gt; &amp;gt; good way to avoid this kind of problems is to follow the SPOT rule:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ### in settings.py
&lt;br&gt;&amp;gt; &amp;gt; import os
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
&lt;br&gt;&amp;gt; &amp;gt; SITE_URL = &amp;quot;&lt;a href=&quot;http://127.0.0.1:8000&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:8000&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; MEDIA_DIR = &amp;quot;media&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt; MEDIA_ROOT = os.path.join(PROJECT_PATH, MEDIA_DIR)
&lt;br&gt;&amp;gt; &amp;gt; MEDIA_URL = &amp;quot;%s/%s/&amp;quot; % (SITE_URL, MEDIA_DIR)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ADMIN_MEDIA_PREFIX = '/admin-media/'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; # decouple this from the DEBUG flag - you may want to
&lt;br&gt;&amp;gt; &amp;gt; # set DEBUG to true in preproduction
&lt;br&gt;&amp;gt; &amp;gt; # (ie, running behind apache or another web server)
&lt;br&gt;&amp;gt; &amp;gt; DEV_SERVER = True
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ### in urls.py
&lt;br&gt;&amp;gt; &amp;gt; from django.conf import settings
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; # urls here...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; if settings.DEV_SERVER:
&lt;br&gt;&amp;gt; &amp;gt;     urlpatterns += patterns('',
&lt;br&gt;&amp;gt; &amp;gt;         (r'^%s/(?P&amp;lt;path&amp;gt;.*)$' % setting.MEDIA_DIR,
&lt;br&gt;&amp;gt; &amp;gt; 'django.views.static.serve',
&lt;br&gt;&amp;gt; &amp;gt;         {'document_root': settings.MEDIA_ROOT}),
&lt;br&gt;&amp;gt; &amp;gt;     )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; (I have also tried variations on the above, such as:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;         (r'^media/(?P&amp;lt;path&amp;gt;.*)$', 'django.views.static.serve',
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; which may have worked, minus the conflict between MEDIA_URL and
&lt;br&gt;&amp;gt; &amp;gt; ADMIN_MEDIA_PREFIX
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; and
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;         (r'%s(?P&amp;lt;path&amp;gt;.*)' % settings.MEDIA_URL[1:],
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; MEDIA_URL is a string, so MEDIA_URL[1:] is the same string minus the
&lt;br&gt;&amp;gt; &amp;gt; first character, ie, in your case : &amp;quot;ttp://127.0.0.1:8000/media/&amp;quot;.
&lt;br&gt;&amp;gt; &amp;gt; Probably not what you expected !-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; 'django.views.static.serve',
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;          {'document_root': settings.MEDIA_ROOT}),
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; but in all cases, although the file does get uploaded and appears in the
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; '/home/blah/blah/mysite/media/photos/' directory, when I click on the link -
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; which is shown as
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&lt;a href=&quot;http://127.0.0.1:8000/media/photos/test.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:8000/media/photos/test.jpg&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I get a &amp;quot;Page not found:  /media/photos/test.jpg&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; This seems like a simple thing to fix - but not for me?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; cf above.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Any help to fix this is appreciated, as is any guidance on what will need to
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; change once this project needs to run under Apache...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; If you're careful to use the &amp;quot;medias&amp;quot; context processor and
&lt;br&gt;&amp;gt; &amp;gt; {{ MEDIA_URL }} in your templates, you shouldn't have to do much more
&lt;br&gt;&amp;gt; &amp;gt; than update your settings.py appropriately. But anyway - first fix
&lt;br&gt;&amp;gt; &amp;gt; your development setup.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&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=26297211&amp;i=3&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=26297211&amp;i=4&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/Uploading-and-using-images-in-a-database-application-tp26180984p26297211.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26297203</id>
	<title>Re: Uploading and using images in a database application</title>
	<published>2009-11-10T23:36:22Z</published>
	<updated>2009-11-10T23:36:22Z</updated>
	<author>
		<name>derekH-2</name>
	</author>
	<content type="html">&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;All the help is much appreciated - its working now, and I need to
&lt;br&gt;spend time to understand all the changes.
&lt;br&gt;&lt;br&gt;On Nov 5, 5:53 pm, bruno desthuilliers &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26297203&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno.desthuilli...@...&lt;/a&gt;&amp;gt;
&lt;br&gt;wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 3 nov, 16:02, derek &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26297203&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gamesb...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Given that I am a &amp;quot;wet behind the ears&amp;quot; newbie, maybe I should not be
&lt;br&gt;&amp;gt; &amp;gt; attempting this, but...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Attempts at thing we don't yet fully grasp can be a good way to
&lt;br&gt;&amp;gt; learn.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I need some simple and straightforward guidance on
&lt;br&gt;&amp;gt; &amp;gt; uploading and using images in a simple database application, which (so far)
&lt;br&gt;&amp;gt; &amp;gt; only uses the admin interface.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I working on my development machine (i.e. no Apache integration as yet).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The use case is not that complex.  If I have an &amp;quot;Event&amp;quot; object, with which I
&lt;br&gt;&amp;gt; &amp;gt; want to associate a number of images (typically, photos taken by people at
&lt;br&gt;&amp;gt; &amp;gt; that event), then I also need an &amp;quot;EventImage&amp;quot; object, with the event.id as
&lt;br&gt;&amp;gt; &amp;gt; the foreign key.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; So, the models look like:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; class Event(models.Model):
&lt;br&gt;&amp;gt; &amp;gt;     id = models.AutoField(primary_key=True)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hint : if you leave this previous line out, Django will automagically
&lt;br&gt;&amp;gt; add this very same field to your model !-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;     date_time = models.DateTimeField()
&lt;br&gt;&amp;gt; &amp;gt;     title = models.CharField(unique=True,max_length=250)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; class EventImage(models.Model):
&lt;br&gt;&amp;gt; &amp;gt;     id = models.AutoField(primary_key=True)
&lt;br&gt;&amp;gt; &amp;gt;     caption = models.CharField(unique=True,max_length=10)
&lt;br&gt;&amp;gt; &amp;gt;     title = models.CharField(max_length=250)
&lt;br&gt;&amp;gt; &amp;gt;     event = models.ForeignKey(Event)
&lt;br&gt;&amp;gt; &amp;gt;     image = models.ImageField(upload_to='photos')
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; What I have gathered so far, from browsing articles and snippets and Q&amp;A, is
&lt;br&gt;&amp;gt; &amp;gt; that I also need:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 1.to add/change settings.py:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;  MEDIA_ROOT = '/home/blah/blah/mysite/media/'
&lt;br&gt;&amp;gt; &amp;gt;  MEDIA_URL = '&lt;a href=&quot;http://127.0.0.1:8000/media/'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:8000/media/'&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;  ADMIN_MEDIA_PREFIX = '/media/'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using the same path component for both the static medias and the admin
&lt;br&gt;&amp;gt; media usually leads to unexpected results. Either change your static
&lt;br&gt;&amp;gt; medias component path to something else or - way simplier -, change
&lt;br&gt;&amp;gt; the ADMIN_MEDIA_PREFIX (here we canonically set it to 'admin-media').
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;  STATIC_DOC_ROOT = '/home/blah/blah/mysite/media/'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 2. add the following to the start of urls.py:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; from django.conf import settings
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 3. add the following to the end of urls.py:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; if settings.DEBUG:
&lt;br&gt;&amp;gt; &amp;gt;     urlpatterns += patterns('',
&lt;br&gt;&amp;gt; &amp;gt;         (r'^static/(?P&amp;lt;path&amp;gt;.*)$', 'django.views.static.serve',
&lt;br&gt;&amp;gt; &amp;gt;         {'document_root': settings.STATIC_DOC_ROOT}),
&lt;br&gt;&amp;gt; &amp;gt;     )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This url pattern is not consistant with the your MEDIA_URL settings. A
&lt;br&gt;&amp;gt; good way to avoid this kind of problems is to follow the SPOT rule:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ### in settings.py
&lt;br&gt;&amp;gt; import os
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
&lt;br&gt;&amp;gt; SITE_URL = &amp;quot;&lt;a href=&quot;http://127.0.0.1:8000&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:8000&lt;/a&gt;&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; MEDIA_DIR = &amp;quot;media&amp;quot;
&lt;br&gt;&amp;gt; MEDIA_ROOT = os.path.join(PROJECT_PATH, MEDIA_DIR)
&lt;br&gt;&amp;gt; MEDIA_URL = &amp;quot;%s/%s/&amp;quot; % (SITE_URL, MEDIA_DIR)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ADMIN_MEDIA_PREFIX = '/admin-media/'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; # decouple this from the DEBUG flag - you may want to
&lt;br&gt;&amp;gt; # set DEBUG to true in preproduction
&lt;br&gt;&amp;gt; # (ie, running behind apache or another web server)
&lt;br&gt;&amp;gt; DEV_SERVER = True
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ### in urls.py
&lt;br&gt;&amp;gt; from django.conf import settings
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; # urls here...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; if settings.DEV_SERVER:
&lt;br&gt;&amp;gt;     urlpatterns += patterns('',
&lt;br&gt;&amp;gt;         (r'^%s/(?P&amp;lt;path&amp;gt;.*)$' % setting.MEDIA_DIR,
&lt;br&gt;&amp;gt; 'django.views.static.serve',
&lt;br&gt;&amp;gt;         {'document_root': settings.MEDIA_ROOT}),
&lt;br&gt;&amp;gt;     )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; (I have also tried variations on the above, such as:
&lt;br&gt;&amp;gt; &amp;gt;         (r'^media/(?P&amp;lt;path&amp;gt;.*)$', 'django.views.static.serve',
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; which may have worked, minus the conflict between MEDIA_URL and
&lt;br&gt;&amp;gt; ADMIN_MEDIA_PREFIX
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; and
&lt;br&gt;&amp;gt; &amp;gt;         (r'%s(?P&amp;lt;path&amp;gt;.*)' % settings.MEDIA_URL[1:],
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; MEDIA_URL is a string, so MEDIA_URL[1:] is the same string minus the
&lt;br&gt;&amp;gt; first character, ie, in your case : &amp;quot;ttp://127.0.0.1:8000/media/&amp;quot;.
&lt;br&gt;&amp;gt; Probably not what you expected !-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 'django.views.static.serve',
&lt;br&gt;&amp;gt; &amp;gt;          {'document_root': settings.MEDIA_ROOT}),
&lt;br&gt;&amp;gt; &amp;gt; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; but in all cases, although the file does get uploaded and appears in the
&lt;br&gt;&amp;gt; &amp;gt; '/home/blah/blah/mysite/media/photos/' directory, when I click on the link -
&lt;br&gt;&amp;gt; &amp;gt; which is shown as
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&lt;a href=&quot;http://127.0.0.1:8000/media/photos/test.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:8000/media/photos/test.jpg&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I get a &amp;quot;Page not found:  /media/photos/test.jpg&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This seems like a simple thing to fix - but not for me?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; cf above.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Any help to fix this is appreciated, as is any guidance on what will need to
&lt;br&gt;&amp;gt; &amp;gt; change once this project needs to run under Apache...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you're careful to use the &amp;quot;medias&amp;quot; context processor and
&lt;br&gt;&amp;gt; {{ MEDIA_URL }} in your templates, you shouldn't have to do much more
&lt;br&gt;&amp;gt; than update your settings.py appropriately. But anyway - first fix
&lt;br&gt;&amp;gt; your development setup.
&lt;/div&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=26297203&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=26297203&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/Uploading-and-using-images-in-a-database-application-tp26180984p26297203.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26297004</id>
	<title>Re: annotation with filter issue (left join needed)</title>
	<published>2009-11-10T23:08:29Z</published>
	<updated>2009-11-10T23:08:29Z</updated>
	<author>
		<name>Михаил Лукин</name>
	</author>
	<content type="html">It seems that you&amp;#39;re right :( raw SQL takes away most of benefits of ORM&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/10 akaariai &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26297004&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;akaariai@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&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;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
On Nov 10, 8:29 am, Михаил Лукин &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26297004&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mihail.lu...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; Well, I didn&amp;#39;t find solution yet. Except that filter condition must be&lt;br&gt;
&amp;gt; placed in LEFT OUTER JOIN ... ON ( &amp;lt;here&amp;gt; ), but i&amp;#39;m not sure if it&amp;#39;s&lt;br&gt;
&amp;gt; possible with Django ORM. I notices that Aggregate base class takes &amp;#39;extra&amp;#39;&lt;br&gt;
&amp;gt; argument in its constructor, but I&amp;#39;m not sure how to use it for such&lt;br&gt;
&amp;gt; purpose.&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Django can not handle left joins where the filter conditions need to&lt;br&gt;
be in the ON clause of the join. The comment for function join in&lt;br&gt;
django.db.models.sql  clearly states this.&lt;br&gt;
&lt;br&gt;
So if you really need to place the filter condition on the left outer&lt;br&gt;
join, then there is nothing you can do except use raw SQL.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;regards,&lt;br&gt;Mihail&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=26297004&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=26297004&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 http://groups.google.com/group/django-users?hl=en&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/annotation-with-filter-issue-%28left-join-needed%29-tp26231217p26297004.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26296982</id>
	<title>Re: request.POST['value'] cannot get value, 500 error</title>
	<published>2009-11-10T23:06:19Z</published>
	<updated>2009-11-10T23:06:19Z</updated>
	<author>
		<name>Tamas Szabo</name>
	</author>
	<content type="html">Does &lt;br&gt;&lt;br&gt;request.POST[&amp;#39;value&amp;#39;][0][&amp;#39;LastName&amp;#39;]&lt;br&gt;&lt;br&gt;work?&lt;br&gt;&lt;br&gt;It looks like your post data has an array (keyed as &amp;#39;value&amp;#39;) of dicts.&lt;br&gt;&lt;br&gt;You might also consider using Firebug (or something similar) to inspect the http requests and responses when you are developing.&lt;br&gt;
&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;&lt;br&gt;Tamas&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 11, 2009 at 2:38 PM, robinne &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26296982&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;developer@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&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;br&gt;
I am posting data from a form to a django view. The form is created&lt;br&gt;
using inputEx (a YUI-like interface). The form gets created much like&lt;br&gt;
you create a YUI form and you include names for all your fields in&lt;br&gt;
javascript. It is javascript that creates the form on the page.&lt;br&gt;
&lt;br&gt;
I am able to load database data from the django view into my form&lt;br&gt;
fields (sending json string to UI), but when I post I cannot access&lt;br&gt;
individual posted values, even though I can see that the&lt;br&gt;
&amp;#39;request.POST&amp;#39; is getting posted to the django view. The request.POST&lt;br&gt;
looks something like &amp;lt;QueryDict:{u&amp;#39;value&amp;#39;:&lt;br&gt;
[u&amp;#39;{&amp;quot;FirstName&amp;quot;:&amp;quot;Mary&amp;quot;,&amp;quot;LastName&amp;quot;:&amp;quot;Smith&amp;quot;...etc]}&amp;gt;&lt;br&gt;
&lt;br&gt;
When trying to access a value by using...&lt;br&gt;
&lt;br&gt;
def MemberInfo(request, member_id):&lt;br&gt;
    if request.method == &amp;quot;POST&amp;quot;:&lt;br&gt;
        print request.POST&lt;br&gt;
        try:&lt;br&gt;
            print request.POST[&amp;#39;LastName&amp;#39;] #ERROR&lt;br&gt;
&lt;br&gt;
...&lt;br&gt;
error message is:&lt;br&gt;
 &amp;quot;POST /MemberInfo/1 HTTP/1.1&amp;quot; 500 54476&lt;br&gt;
&lt;br&gt;
any ideas?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&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=26296982&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=26296982&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;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/request.POST-%27value%27--cannot-get-value%2C-500-error-tp26296789p26296982.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26296971</id>
	<title>Template not displaying</title>
	<published>2009-11-10T23:04:33Z</published>
	<updated>2009-11-10T23:04:33Z</updated>
	<author>
		<name>Denis Bahati</name>
	</author>
	<content type="html">&lt;br&gt;Hi all, am using xampp as webserver with django 1.1,when i access the
&lt;br&gt;browser the template does not work. The media is in
&lt;br&gt;c:/xampp/htdocs/adc/media/ where i put the css,img and js folders. I
&lt;br&gt;set admin_media_prefix='http:/127.0.0.1/adc/media/' the same to
&lt;br&gt;media_url. The template is at c:/xampp/htdocs/adc/templates/. Please
&lt;br&gt;any idea on how to make the templates working?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sent from my mobile device
&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=26296971&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=26296971&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/Template-not-displaying-tp26296971p26296971.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26296888</id>
	<title>Re: [Django] #5446: New model fields for languages and countries at least</title>
	<published>2009-11-10T22:53:42Z</published>
	<updated>2009-11-10T22:53:42Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#5446: New model fields for languages and countries at least
&lt;br&gt;----------------------------------------------------------+-----------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;Raphaël Hertzog &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26296888&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;raphael@...&lt;/a&gt;&amp;gt; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp;marinho &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;reopened &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; Milestone: &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;Database layer (models, ORM) &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;
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp;Keywords: &amp;nbsp;feature_request
&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; &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;
&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; &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;
&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; &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;Comment (by idris):
&lt;br&gt;&lt;br&gt;&amp;nbsp;I suggest adding a slug to the COUNTRIES list, as it would be nice to be
&lt;br&gt;&amp;nbsp;able to use pretty url's based on a CountryField, like /afghanistan/ or
&lt;br&gt;&amp;nbsp;/brazil/
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/5446#comment:19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/5446#comment:19&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;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=26296888&amp;i=1&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=26296888&amp;i=2&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-Code---5446%3A-New-model-fields-for-languages-and-countries-at-least-tp12670554p26296888.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26296789</id>
	<title>request.POST['value'] cannot get value, 500 error</title>
	<published>2009-11-10T22:38:27Z</published>
	<updated>2009-11-10T22:38:27Z</updated>
	<author>
		<name>robinne</name>
	</author>
	<content type="html">&lt;br&gt;I am posting data from a form to a django view. The form is created
&lt;br&gt;using inputEx (a YUI-like interface). The form gets created much like
&lt;br&gt;you create a YUI form and you include names for all your fields in
&lt;br&gt;javascript. It is javascript that creates the form on the page.
&lt;br&gt;&lt;br&gt;I am able to load database data from the django view into my form
&lt;br&gt;fields (sending json string to UI), but when I post I cannot access
&lt;br&gt;individual posted values, even though I can see that the
&lt;br&gt;'request.POST' is getting posted to the django view. The request.POST
&lt;br&gt;looks something like &amp;lt;QueryDict:{u'value':
&lt;br&gt;[u'{&amp;quot;FirstName&amp;quot;:&amp;quot;Mary&amp;quot;,&amp;quot;LastName&amp;quot;:&amp;quot;Smith&amp;quot;...etc]}&amp;gt;
&lt;br&gt;&lt;br&gt;When trying to access a value by using...
&lt;br&gt;&lt;br&gt;def MemberInfo(request, member_id):
&lt;br&gt;&amp;nbsp; &amp;nbsp; if request.method == &amp;quot;POST&amp;quot;:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print request.POST
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print request.POST['LastName'] #ERROR
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;error message is:
&lt;br&gt;&amp;nbsp;&amp;quot;POST /MemberInfo/1 HTTP/1.1&amp;quot; 500 54476
&lt;br&gt;&lt;br&gt;any ideas?
&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=26296789&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=26296789&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/request.POST-%27value%27--cannot-get-value%2C-500-error-tp26296789p26296789.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26296483</id>
	<title>Re: [Django] #12146: Canada localflavor: postal code validation too lax</title>
	<published>2009-11-10T21:52:57Z</published>
	<updated>2009-11-10T21:52:57Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#12146: Canada localflavor: postal code validation too lax
&lt;br&gt;-------------------------------------------------+--------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;paulschreiber &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp;nobody &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; | &amp;nbsp; &amp;nbsp; Milestone: &amp;nbsp;1.2 &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;django.contrib.localflavor &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.1 &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;| &amp;nbsp; &amp;nbsp; &amp;nbsp;Keywords: &amp;nbsp;canada postal code
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; Has_patch: &amp;nbsp;0 &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; &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; 
&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;
&lt;br&gt;-------------------------------------------------+--------------------------
&lt;br&gt;Changes (by agabel):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * needs_better_patch: &amp;nbsp;=&amp;gt; 0
&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;I'm having some trouble with the wording of the wikipedia article. &amp;nbsp;&amp;quot;The
&lt;br&gt;&amp;nbsp;letters W and Z are used, but are not currently used as the first letter.&amp;quot;
&lt;br&gt;&amp;nbsp;Does this mean the first letter of the Postal Code, (Zxx xxx) or does it
&lt;br&gt;&amp;nbsp;apply to the first letter in both the FSA and the LDU (Zxx Zxx)?
&lt;br&gt;&lt;br&gt;&amp;nbsp;I was unable to find any relevant information after a quick search. &amp;nbsp;I
&lt;br&gt;&amp;nbsp;would like to see another source validating this besides wikipedia.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/12146#comment:1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/12146#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;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=26296483&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=26296483&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---12146%3A-Canada-localflavor%3A-postal-code-validation-too-lax-tp26190868p26296483.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26296152</id>
	<title>Re: [Django] #12104: Object-&gt;object lookup fails in blocktrans</title>
	<published>2009-11-10T21:04:33Z</published>
	<updated>2009-11-10T21:04:33Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#12104: Object-&amp;gt;object lookup fails in blocktrans
&lt;br&gt;-------------------------------------------+--------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;philipn &amp;nbsp; &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;reopened &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;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Internationalization &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.1 &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; &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; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; Has_patch: &amp;nbsp;1 &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; 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; &amp;nbsp; &amp;nbsp; | &amp;nbsp;
&lt;br&gt;-------------------------------------------+--------------------------------
&lt;br&gt;Changes (by philipn):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * status: &amp;nbsp;closed =&amp;gt; reopened
&lt;br&gt;&amp;nbsp; * resolution: &amp;nbsp;invalid =&amp;gt;
&lt;br&gt;&lt;br&gt;Comment:
&lt;br&gt;&lt;br&gt;&amp;nbsp;If this is to keep translations simple then that makes sense, especially
&lt;br&gt;&amp;nbsp;considering blocktrans doesn't allow for other blocks inside it.
&lt;br&gt;&lt;br&gt;&amp;nbsp;Adding support for other block tags inside of blocktrans seems easy enough
&lt;br&gt;&amp;nbsp;to add, though (using the same idea as my patch -- executing a template
&lt;br&gt;&amp;nbsp;rendering).
&lt;br&gt;&lt;br&gt;&amp;nbsp;But, unlike other blocks in blocktrans, this kind of variable access
&lt;br&gt;&amp;nbsp;doesn't trigger an error message.
&lt;br&gt;&lt;br&gt;&amp;nbsp;I've attached a patch that causes an error to be displayed when you try
&lt;br&gt;&amp;nbsp;and use complex variable lookups inside a blocktrans block.
&lt;br&gt;&lt;br&gt;&amp;nbsp;If we did decide to allow for variable.attr syntax then it would probably
&lt;br&gt;&amp;nbsp;be better to use django.template's Variable class to look up the
&lt;br&gt;&amp;nbsp;variable's values rather than the context-dictionary-key approach used in
&lt;br&gt;&amp;nbsp;the code currently.
&lt;br&gt;&lt;br&gt;&amp;nbsp;I guess it's also worth noting that the current blocktrans variable lookup
&lt;br&gt;&amp;nbsp;behaviour will throw a keyerror for{{{ {{ variable_that_isnt_in_context }}
&lt;br&gt;&amp;nbsp;}}}when templates normally do not. &amp;nbsp;With this in mind it really seems like
&lt;br&gt;&amp;nbsp;the right thing to do is to replace the lookup behaviour with
&lt;br&gt;&amp;nbsp;{{{Variable(..).resolve()}}}. &amp;nbsp;I've attached a patch that does this, as
&lt;br&gt;&amp;nbsp;well.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/12104#comment:2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/12104#comment:2&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;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=26296152&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=26296152&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---12104%3A-Object-%3Eobject-lookup-fails-in-blocktrans-tp26087034p26296152.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26296068</id>
	<title>Re: tiny_mce TypeError</title>
	<published>2009-11-10T20:50:43Z</published>
	<updated>2009-11-10T20:50:43Z</updated>
	<author>
		<name>neridaj@gmail.com</name>
	</author>
	<content type="html">&lt;br&gt;I'm using 1.2 pre-alpha, I tried pasting that code in, again, but no
&lt;br&gt;dice.
&lt;br&gt;&lt;br&gt;On Nov 10, 8:06 pm, James Bennett &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26296068&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ubernost...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tue, Nov 10, 2009 at 9:47 PM, neridaj &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26296068&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neri...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; I'm just following &amp;quot;Practical Django Projects&amp;quot; and was curious if
&lt;br&gt;&amp;gt; &amp;gt; anyone else was able to fix a TypeError when trying to add tiny_mce to
&lt;br&gt;&amp;gt; &amp;gt; the admin for flatpages, or is this something buried in the
&lt;br&gt;&amp;gt; &amp;gt; tiny_mce.js file?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Compare to this, which is the canonical version (and which worked
&lt;br&gt;&amp;gt; locally for me on 1.1 when I committed it):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://bitbucket.org/ubernostrum/practical-django-projects/src/tip/cm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bitbucket.org/ubernostrum/practical-django-projects/src/tip/cm&lt;/a&gt;...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &amp;quot;Bureaucrat Conrad, you are technically correct -- the best kind of correct.&amp;quot;
&lt;/div&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=26296068&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=26296068&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/tiny_mce-TypeError-tp26295649p26296068.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26295959</id>
	<title>Re: How to handle this race condition?</title>
	<published>2009-11-10T20:35:03Z</published>
	<updated>2009-11-10T20:35:03Z</updated>
	<author>
		<name>Continuation</name>
	</author>
	<content type="html">&lt;br&gt;Thank you.
&lt;br&gt;&lt;br&gt;On Nov 10, 10:03 pm, Tamas Szabo &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26295959&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;szab...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; You can inspect the rowcount attribute of the cursor object after you
&lt;br&gt;&amp;gt; executed your update.
&lt;br&gt;&amp;gt; rowcount returns the number of rows affected by your update, so it will be 1
&lt;br&gt;&amp;gt; if your where condition was true.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Wed, Nov 11, 2009 at 10:04 AM, Continuation &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26295959&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;selforgani...@...&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; &amp;gt; Would something like
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; UPDATE bid = new_bid WHERE id = id and bid &amp;lt; new_bid
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; work for you?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is a great idea.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; One question is, how do I know whether bid has been updated to new_bid
&lt;br&gt;&amp;gt; &amp;gt; or not (ie. how to tell whether the conditional test bid &amp;lt; new_bid is
&lt;br&gt;&amp;gt; &amp;gt; true or not)?
&lt;/div&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=26295959&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=26295959&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/How-to-handle-this-race-condition--tp26278186p26295959.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26295757</id>
	<title>Re: tiny_mce TypeError</title>
	<published>2009-11-10T20:06:44Z</published>
	<updated>2009-11-10T20:06:44Z</updated>
	<author>
		<name>James Bennett</name>
	</author>
	<content type="html">&lt;br&gt;On Tue, Nov 10, 2009 at 9:47 PM, neridaj &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26295757&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;neridaj@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; I'm just following &amp;quot;Practical Django Projects&amp;quot; and was curious if
&lt;br&gt;&amp;gt; anyone else was able to fix a TypeError when trying to add tiny_mce to
&lt;br&gt;&amp;gt; the admin for flatpages, or is this something buried in the
&lt;br&gt;&amp;gt; tiny_mce.js file?
&lt;br&gt;&lt;br&gt;Compare to this, which is the canonical version (and which worked
&lt;br&gt;locally for me on 1.1 when I committed it):
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://bitbucket.org/ubernostrum/practical-django-projects/src/tip/cms/templates/admin/flatpages/flatpage/change_form.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bitbucket.org/ubernostrum/practical-django-projects/src/tip/cms/templates/admin/flatpages/flatpage/change_form.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;quot;Bureaucrat Conrad, you are technically correct -- the best kind of correct.&amp;quot;
&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=26295757&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=26295757&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/tiny_mce-TypeError-tp26295649p26295757.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26295701</id>
	<title>Re: [Django] #3665: select_related() should generate LEFT JOINs for foreign keys with null=True</title>
	<published>2009-11-10T19:58:28Z</published>
	<updated>2009-11-10T19:58:28Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#3665: select_related() should generate LEFT JOINs for foreign keys with null=True
&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=26295701&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;semenov@...&lt;/a&gt; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp;mtredinnick &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;closed &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;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Core framework &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.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;&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; &amp;nbsp;Keywords: &amp;nbsp;orm select_related left join
&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; Has_patch: &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; 
&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; 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; 
&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; | &amp;nbsp;
&lt;br&gt;-----------------------------------------+----------------------------------
&lt;br&gt;Changes (by Alex):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * status: &amp;nbsp;reopened =&amp;gt; closed
&lt;br&gt;&amp;nbsp; * resolution: &amp;nbsp;=&amp;gt; duplicate
&lt;br&gt;&lt;br&gt;Comment:
&lt;br&gt;&lt;br&gt;&amp;nbsp;This ticket was closed over 2 years ago, please do not reopen it. &amp;nbsp;If you
&lt;br&gt;&amp;nbsp;think there is a new bug please file a new bug.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/3665#comment:7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/3665#comment:7&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;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=26295701&amp;i=1&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=26295701&amp;i=2&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-Code---3665%3A-select_related%28%29-to-generate-LEFT-JOINs-for-foreign-keys-with-null%3DTrue-tp9331077p26295701.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26295686</id>
	<title>Re: [Django] #3665: select_related() should generate LEFT JOINs for foreign keys with null=True</title>
	<published>2009-11-10T19:56:53Z</published>
	<updated>2009-11-10T19:56:53Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#3665: select_related() should generate LEFT JOINs for foreign keys with null=True
&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=26295686&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;semenov@...&lt;/a&gt; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp;mtredinnick &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;reopened &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;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Core framework &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.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;&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;Keywords: &amp;nbsp;orm select_related left join
&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; Has_patch: &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; 
&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; 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; 
&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; | &amp;nbsp;
&lt;br&gt;-----------------------------------------+----------------------------------
&lt;br&gt;Changes (by retrogradeorbit):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * status: &amp;nbsp;closed =&amp;gt; reopened
&lt;br&gt;&amp;nbsp; * version: &amp;nbsp;SVN =&amp;gt; 1.1
&lt;br&gt;&amp;nbsp; * resolution: &amp;nbsp;duplicate =&amp;gt;
&lt;br&gt;&lt;br&gt;Comment:
&lt;br&gt;&lt;br&gt;&amp;nbsp;This ticket is still not fixed as it was never really a duplicate of
&lt;br&gt;&amp;nbsp;#3592. The behavior explained in this ticket still persists in the most
&lt;br&gt;&amp;nbsp;recent versions of Django and this ticket describes the problem exactly.
&lt;br&gt;&amp;nbsp;In fact the best description of the problem from the ticket is:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;quot;select_related() should always use LEFT JOINs for all nullable foreign
&lt;br&gt;&amp;nbsp;keys. The recursion should not proceed to these fields.&amp;quot;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/3665#comment:6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/3665#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;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=26295686&amp;i=1&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=26295686&amp;i=2&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-Code---3665%3A-select_related%28%29-to-generate-LEFT-JOINs-for-foreign-keys-with-null%3DTrue-tp9331077p26295686.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26295649</id>
	<title>tiny_mce TypeError</title>
	<published>2009-11-10T19:47:13Z</published>
	<updated>2009-11-10T19:47:13Z</updated>
	<author>
		<name>neridaj@gmail.com</name>
	</author>
	<content type="html">&lt;br&gt;Hello,
&lt;br&gt;&lt;br&gt;I'm just following &amp;quot;Practical Django Projects&amp;quot; and was curious if
&lt;br&gt;anyone else was able to fix a TypeError when trying to add tiny_mce to
&lt;br&gt;the admin for flatpages, or is this something buried in the
&lt;br&gt;tiny_mce.js file?
&lt;br&gt;&lt;br&gt;(r'^tiny_mce/(?P&amp;lt;path&amp;gt;.*)$', 'django.views.static.serve',
&lt;br&gt;{ 'dcument_root': '/Users/username/src/tinymce/jscripts/tiny_mce' }),
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/tiny_mce/tiny_mce.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&lt;br&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
&lt;br&gt;tinyMCE.init({
&lt;br&gt;mode: &amp;quot;textareas&amp;quot;,
&lt;br&gt;theme: &amp;quot;simple&amp;quot;
&lt;br&gt;});
&lt;br&gt;&amp;lt;/script&amp;gt;
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;J
&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=26295649&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=26295649&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/tiny_mce-TypeError-tp26295649p26295649.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26295378</id>
	<title>Re: [Django] #9447: ifequal should be chainable(and,or)</title>
	<published>2009-11-10T19:11:17Z</published>
	<updated>2009-11-10T19:11:17Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#9447: ifequal should be chainable(and,or)
&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=26295378&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hybrid.basis@...&lt;/a&gt; &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Owner: &amp;nbsp;nobody &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;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Template system &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.0 &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; &amp;nbsp;Keywords: &amp;nbsp;ifequal,and,or
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Stage: &amp;nbsp;Design decision needed &amp;nbsp;| &amp;nbsp; &amp;nbsp; Has_patch: &amp;nbsp;0 &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; 
&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; &amp;nbsp; &amp;nbsp; | &amp;nbsp;
&lt;br&gt;---------------------------------------------+------------------------------
&lt;br&gt;Comment (by anonymous):
&lt;br&gt;&lt;br&gt;&amp;nbsp;critical issue !
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/9447#comment:4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/9447#comment:4&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;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=26295378&amp;i=1&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=26295378&amp;i=2&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---9447%3A-ifequal-should-be-chainable%28and%2Cor%29-tp20161735p26295378.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26295333</id>
	<title>Re: How to handle this race condition?</title>
	<published>2009-11-10T19:03:41Z</published>
	<updated>2009-11-10T19:03:41Z</updated>
	<author>
		<name>Tamas Szabo</name>
	</author>
	<content type="html">You can inspect the rowcount attribute of the cursor object after you executed your update. &lt;br&gt;rowcount returns the number of rows affected by your update, so it will be 1 if your where condition was true.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 11, 2009 at 10:04 AM, Continuation &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26295333&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;selforganized@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&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;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;br&gt;
&amp;gt; Would something like&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; UPDATE bid = new_bid WHERE id = id and bid &amp;lt; new_bid&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; work for you?&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;This is a great idea.&lt;br&gt;
&lt;br&gt;
One question is, how do I know whether bid has been updated to new_bid&lt;br&gt;
or not (ie. how to tell whether the conditional test bid &amp;lt; new_bid is&lt;br&gt;
true or not)?&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&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=26295333&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=26295333&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;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-to-handle-this-race-condition--tp26278186p26295333.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26294900</id>
	<title>Re: How to handle this race condition?</title>
	<published>2009-11-10T18:04:59Z</published>
	<updated>2009-11-10T18:04:59Z</updated>
	<author>
		<name>Continuation</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&amp;gt; Would something like
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; UPDATE bid = new_bid WHERE id = id and bid &amp;lt; new_bid
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; work for you?
&lt;br&gt;&lt;br&gt;This is a great idea.
&lt;br&gt;&lt;br&gt;One question is, how do I know whether bid has been updated to new_bid
&lt;br&gt;or not (ie. how to tell whether the conditional test bid &amp;lt; new_bid is
&lt;br&gt;true or not)?
&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=26294900&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=26294900&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/How-to-handle-this-race-condition--tp26278186p26294900.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26294527</id>
	<title>Re: How to handle this race condition?</title>
	<published>2009-11-10T17:25:33Z</published>
	<updated>2009-11-10T17:25:33Z</updated>
	<author>
		<name>Tamas Szabo</name>
	</author>
	<content type="html">&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;
Anyways, as concurrency is hard and taking row level locks is cheap&lt;br&gt;
and easy way to get the concurrency right I would suggest you use the&lt;br&gt;
select for update method. Also, this way you will avoid the need to&lt;br&gt;
retry failed transactions because of concurrent updates.&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;IMHO, both approaches are valid and have their own advantages and disadvantages. &lt;br&gt;I don&amp;#39;t think that we have enough information to make a suggestion. &lt;br&gt;What works best for the situation is for the OP to decide.&lt;br&gt;
&lt;br&gt;Regards,&lt;br&gt;&lt;br&gt;Tamas&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=26294527&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=26294527&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;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-to-handle-this-race-condition--tp26278186p26294527.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26294288</id>
	<title>Re: datetime problems with Django application</title>
	<published>2009-11-10T16:57:46Z</published>
	<updated>2009-11-10T16:57:46Z</updated>
	<author>
		<name>Brian Chapman-2</name>
	</author>
	<content type="html">There may be another application setting the time zone, but my question still remains as to why the admin  page is getting the correct time but the view is not.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Brian&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;
On Tue, Nov 10, 2009 at 7:45 PM, Graham Dumpleton &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26294288&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;graham.dumpleton@...&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;
&lt;div class=&quot;im&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
On Nov 11, 10:41 am, BEC &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26294288&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chapma...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; I have a Django application running with mod_python on Apache. In&lt;br&gt;
&amp;gt; settings.py I have set TIME_ZONE=&amp;quot;America/New_York&amp;quot;. Within my&lt;br&gt;
&amp;gt; application I verify that os.environ[&amp;#39;TZ&amp;#39;] is indeed set to this&lt;br&gt;
&amp;gt; value. Within my view.py I use datetime.datetime.now() to create a&lt;br&gt;
&amp;gt; time stamp that is stored in a model as a DateTimeField and viewed on&lt;br&gt;
&amp;gt; a rendered html page.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; However, the times that I generate in my view are all off from what&lt;br&gt;
&amp;gt; they should be by five hours. I&amp;#39;ve changed the time zone around&lt;br&gt;
&amp;gt; &amp;quot;America/Chicago&amp;quot;, &amp;quot;America/Anchorage&amp;quot; etc. no matter what I set&lt;br&gt;
&amp;gt; TIME_ZONE to, I get the same wrong time (5 hours off).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If I go to the admin page and use the change entry page to modify the&lt;br&gt;
&amp;gt; values stored in the database, the Time now link gives the correct&lt;br&gt;
&amp;gt; time?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Any idea on what is going on here? I&amp;#39;m particularly perplexed as to&lt;br&gt;
&amp;gt; why the admin page and my view are giving different times.&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Do you run other Python or PHP applications in the same Apache? If you&lt;br&gt;
do they likely have conflicting time zone requires.&lt;br&gt;
&lt;br&gt;
The problem here is that TZ is a process wide setting and can only be&lt;br&gt;
set to one value at a time. Thus, whatever application got to set it&lt;br&gt;
last will take precedence.&lt;br&gt;
&lt;br&gt;
See:&lt;br&gt;
&lt;br&gt;
  &lt;a href=&quot;http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_Locale_Settings&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_Locale_Settings&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Use mod_wsgi daemon mode or fastcgi solutions, both of which can run&lt;br&gt;
applications in their own processes if you are being afflicted with&lt;br&gt;
this problem.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
Graham&lt;br&gt;
&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&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=26294288&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=26294288&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 http://groups.google.com/group/django-users?hl=en&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/datetime-problems-with-Django-application-tp26293623p26294288.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26294171</id>
	<title>Re: datetime problems with Django application</title>
	<published>2009-11-10T16:45:13Z</published>
	<updated>2009-11-10T16:45:13Z</updated>
	<author>
		<name>Graham Dumpleton-2</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;br&gt;On Nov 11, 10:41 am, BEC &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26294171&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chapma...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I have a Django application running with mod_python on Apache. In
&lt;br&gt;&amp;gt; settings.py I have set TIME_ZONE=&amp;quot;America/New_York&amp;quot;. Within my
&lt;br&gt;&amp;gt; application I verify that os.environ['TZ'] is indeed set to this
&lt;br&gt;&amp;gt; value. Within my view.py I use datetime.datetime.now() to create a
&lt;br&gt;&amp;gt; time stamp that is stored in a model as a DateTimeField and viewed on
&lt;br&gt;&amp;gt; a rendered html page.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, the times that I generate in my view are all off from what
&lt;br&gt;&amp;gt; they should be by five hours. I've changed the time zone around
&lt;br&gt;&amp;gt; &amp;quot;America/Chicago&amp;quot;, &amp;quot;America/Anchorage&amp;quot; etc. no matter what I set
&lt;br&gt;&amp;gt; TIME_ZONE to, I get the same wrong time (5 hours off).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I go to the admin page and use the change entry page to modify the
&lt;br&gt;&amp;gt; values stored in the database, the Time now link gives the correct
&lt;br&gt;&amp;gt; time?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any idea on what is going on here? I'm particularly perplexed as to
&lt;br&gt;&amp;gt; why the admin page and my view are giving different times.
&lt;/div&gt;&lt;br&gt;Do you run other Python or PHP applications in the same Apache? If you
&lt;br&gt;do they likely have conflicting time zone requires.
&lt;br&gt;&lt;br&gt;The problem here is that TZ is a process wide setting and can only be
&lt;br&gt;set to one value at a time. Thus, whatever application got to set it
&lt;br&gt;last will take precedence.
&lt;br&gt;&lt;br&gt;See:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_Locale_Settings&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_Locale_Settings&lt;/a&gt;&lt;br&gt;&lt;br&gt;Use mod_wsgi daemon mode or fastcgi solutions, both of which can run
&lt;br&gt;applications in their own processes if you are being afflicted with
&lt;br&gt;this problem.
&lt;br&gt;&lt;br&gt;Graham
&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=26294171&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=26294171&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/datetime-problems-with-Django-application-tp26293623p26294171.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26294101</id>
	<title>Re: A simple database project</title>
	<published>2009-11-10T16:35:28Z</published>
	<updated>2009-11-10T16:35:28Z</updated>
	<author>
		<name>Kenneth Gonsalves-2</name>
	</author>
	<content type="html">&lt;br&gt;On Wednesday 11 Nov 2009 5:51:00 am Zeynel wrote:
&lt;br&gt;&amp;gt; So I want to enter in the search box &amp;quot;Lawyer1&amp;quot; and in the result page
&lt;br&gt;&amp;gt; I want to see &amp;quot;Lawyer1 knows Lawyer2&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;if your school is a foreign key (I think it is) you need a related name to 
&lt;br&gt;search for that. Check out ModelAdmin.search_fields in the docs. Not sure that 
&lt;br&gt;this is what you are looking for though.
&lt;br&gt;-- 
&lt;br&gt;regards
&lt;br&gt;Kenneth Gonsalves
&lt;br&gt;Senior Project Officer
&lt;br&gt;NRC-FOSS
&lt;br&gt;&lt;a href=&quot;http://nrcfosshelpline.in/web/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://nrcfosshelpline.in/web/&lt;/a&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=26294101&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=26294101&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/A-simple-database-project-tp26245536p26294101.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293912</id>
	<title>Re: A simple database project</title>
	<published>2009-11-10T16:21:00Z</published>
	<updated>2009-11-10T16:21:00Z</updated>
	<author>
		<name>Zeynel-2</name>
	</author>
	<content type="html">&lt;br&gt;Hi Tomasz,
&lt;br&gt;&lt;br&gt;I was able to build the admin page and put a search box there:
&lt;br&gt;&lt;br&gt;class LawyerAdmin(admin.ModelAdmin):
&lt;br&gt;&amp;nbsp; &amp;nbsp; fieldsets = [
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ('Name', &amp;nbsp; {'fields': ['last', 'first', 'initial']}),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ('School', {'fields': ['school', 'year_graduated']}),
&lt;br&gt;&amp;nbsp; &amp;nbsp; ]
&lt;br&gt;&amp;nbsp; &amp;nbsp; list_display = ('first', 'initial', 'last', 'school',
&lt;br&gt;'year_graduated')
&lt;br&gt;&amp;nbsp; &amp;nbsp; list_filter = ['year_graduated']
&lt;br&gt;&amp;nbsp; &amp;nbsp; search_fields = ['last', 'first']
&lt;br&gt;&lt;br&gt;This search box searches only first and last names. But what i want is
&lt;br&gt;a search box that finds all lawyers who went to same school. My
&lt;br&gt;database now contains:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tom	T.	Lawyer3	Columbia School of Law	2003
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Bob	 	Lawyer2	NYU	2000
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; John	I	Lawyer1	NYU	2000
&lt;br&gt;&lt;br&gt;So Lawyer1 and Lawyer2 graduated from NYU in 2000.
&lt;br&gt;&lt;br&gt;So I want to enter in the search box &amp;quot;Lawyer1&amp;quot; and in the result page
&lt;br&gt;I want to see &amp;quot;Lawyer1 knows Lawyer2&amp;quot;
&lt;br&gt;&lt;br&gt;How do I do this?
&lt;br&gt;&lt;br&gt;Thank you so much.
&lt;br&gt;&lt;br&gt;On Nov 7, 12:23 pm, Tomasz Zieliński
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293912&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tomasz.zielin...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 7 Lis, 15:58, Zeynel &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293912&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;azeyn...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I am planning to build a demo prototype for a who-knows-who database
&lt;br&gt;&amp;gt; &amp;gt; for the legal profession. Database will consist of lawyer name, school
&lt;br&gt;&amp;gt; &amp;gt; and year graduated. Searching by lawyer name will return other lawyers
&lt;br&gt;&amp;gt; &amp;gt; graduated from same law school the same year. Can I build this in
&lt;br&gt;&amp;gt; &amp;gt; Django? How long would it take me to learn enough Django to build this
&lt;br&gt;&amp;gt; &amp;gt; myself?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Of course you can build this in Django, I think that going through
&lt;br&gt;&amp;gt; tutorial:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://docs.djangoproject.com/en/dev/intro/tutorial01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.djangoproject.com/en/dev/intro/tutorial01/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; is enough to build it in no longer that a few days (learning
&lt;br&gt;&amp;gt; included),
&lt;br&gt;&amp;gt; even for pre-intermediate programmer.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Tomasz Zielińskihttp://pyconsultant.eu
&lt;/div&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=26293912&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=26293912&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/A-simple-database-project-tp26245536p26293912.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293693</id>
	<title>Re: How to handle this race condition?</title>
	<published>2009-11-10T16:00:33Z</published>
	<updated>2009-11-10T16:00:33Z</updated>
	<author>
		<name>Craig Kimerer</name>
	</author>
	<content type="html">Ah, you&amp;#39;re absolutely right.  I am not sure how I didn&amp;#39;t even catch the other thing that should have grabbed my attention this morning, which was that the table I was using was MyISAM.  This is why I shouldn&amp;#39;t send emails before noon :)&lt;div&gt;
&lt;br&gt;&lt;/div&gt;&lt;div&gt;Sorry about that, that was my mistake.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Craig&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Nov 10, 2009 at 3:28 PM, akaariai &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293693&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;akaariai@...&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;&lt;br&gt;
You missed the &amp;#39;where bid &amp;lt; new_bid&amp;#39; part of the update. In that case&lt;br&gt;
there is no race I am aware of. Either the transaction sees the update&lt;br&gt;
of the other transaction in which case the highest bid will stay in&lt;br&gt;
effect or it will not see the effect of the other transaction in which&lt;br&gt;
case there is concurrent update and the transaction is aborted.&lt;br&gt;
&lt;br&gt;
Anyways, as concurrency is hard and taking row level locks is cheap&lt;br&gt;
and easy way to get the concurrency right I would suggest you use the&lt;br&gt;
select for update method. Also, this way you will avoid the need to&lt;br&gt;
retry failed transactions because of concurrent updates.&lt;br&gt;
&lt;br&gt;
On Nov 10, 9:55 pm, Craig Kimerer &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293693&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;craig.kime...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&amp;gt; On Mon, Nov 9, 2009 at 10:56 PM, Tamas Szabo &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293693&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;szab...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; Would something like&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; UPDATE bid = new_bid WHERE id = id and bid &amp;lt; new_bid&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; work for you?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; It is a more optimistic approach (it assumes that the case you describe is&lt;br&gt;
&amp;gt; &amp;gt; an exception rather than what usually happens) and I think it is simpler by&lt;br&gt;
&amp;gt; &amp;gt; not having to do any locking etc.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Regards,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Tamas&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; That only works if you have transactions disabled for your database.  If&lt;br&gt;
&amp;gt; your connections are using transactions, you still have the race condition.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; For example (in MySQL):&lt;br&gt;
&amp;gt; Start two DB Shells&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; In the first shell:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; insert into bids (id, high_bid) values (1, 20);&lt;br&gt;
&amp;gt; Query OK, 1 row affected (0.00 sec)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; START TRANSACTION;&lt;br&gt;
&amp;gt; Query OK, 0 rows affected (0.01 sec)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; In the second shell:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; START TRANSACTION;&lt;br&gt;
&amp;gt; Query OK, 0 rows affected (0.00 sec)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; update bids set high_bid = 25 where id = 1;&lt;br&gt;
&amp;gt; Query OK, 1 row affected (0.00 sec)&lt;br&gt;
&amp;gt; Rows matched: 1  Changed: 1  Warnings: 0&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; commit;&lt;br&gt;
&amp;gt; Query OK, 0 rows affected (0.00 sec)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Back in the first shell:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; UPDATE bids SET high_bid = 23 where id = 1;&lt;br&gt;
&amp;gt; Query OK, 1 row affected (0.00 sec)&lt;br&gt;
&amp;gt; Rows matched: 1  Changed: 1  Warnings: 0&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; commit;&lt;br&gt;
&amp;gt; Query OK, 0 rows affected (0.00 sec)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; mysql&amp;gt; select * from bids;&lt;br&gt;
&amp;gt; +------+----------+&lt;br&gt;
&amp;gt; | id   | high_bid |&lt;br&gt;
&amp;gt; +------+----------+&lt;br&gt;
&amp;gt; |    1 |       23 |&lt;br&gt;
&amp;gt; +------+----------+&lt;br&gt;
&amp;gt; 1 row in set (0.00 sec)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Craig&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&amp;gt; &amp;gt; On Tue, Nov 10, 2009 at 2:17 PM, Continuation &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293693&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;selforgani...@...&lt;/a&gt;&amp;gt;wrote:&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Thanks Christophe and Kenneth!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Let me make sure I understand this:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; If I write this vew function:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; @transaction.commit_on_success&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; def update_high_bid(request):&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; ....&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; cursor = connection.cursor()&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;        cursor.execute(&amp;quot;SELECT high_bid FROM auctionapp_auction WHERE&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; id=%s&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; FOR UPDATE&amp;quot;, [&lt;a href=&quot;http://auction.id&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;auction.id&lt;/a&gt;])&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;         returned_rows = cursor.fetchall()&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;        high_bid = returned_rows[0][0]&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;        if new_bid &amp;gt; high_bid:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;            auction.high_bid = new_bid&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;            auction.save()&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; The entire function will be wrapped within a transaction.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; SELECT FOR UPDATE will acquire a row-level lock&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; and that lock will not be released until the function update_high_bid&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; () returns successfully, or until the function raises an exception and&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; the whole transaction is rolled back.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Is that right?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Thanks.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; On Nov 10, 12:45 am, Christophe Pettus &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293693&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;x...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; On Nov 9, 2009, at 9:34 PM, Continuation wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Also does django middleware acquire database lock on my behalf, or do&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I need to explicitly perform the locking?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; In the example code, it&amp;#39;s the SELECT ... FOR UPDATE that acquires the&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; lock.  Django doesn&amp;#39;t currently have any explicit knowledge of&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; locking, so you need to drop down to the custom SQL level to issue the&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; right statement to acquire the lock on the row.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; The example I wrote assumed you were using PostgreSQL as the backend;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; you can get all sorts of details about locking in PostgreSQL here:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;a href=&quot;http://www.postgresql.org/docs/8.4/interactive/explicit-locking.html#.&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/docs/8.4/interactive/explicit-locking.html#.&lt;/a&gt;..&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt; -- Christophe Pettus&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; &amp;gt;     &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293693&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;x...@...&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&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=26293693&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=26293693&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 http://groups.google.com/group/django-users?hl=en&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-to-handle-this-race-condition--tp26278186p26293693.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293606</id>
	<title>Re: template or is it template_name</title>
	<published>2009-11-10T15:53:57Z</published>
	<updated>2009-11-10T15:53:57Z</updated>
	<author>
		<name>Russell Keith-Magee-2</name>
	</author>
	<content type="html">&lt;br&gt;On Wed, Nov 11, 2009 at 5:06 AM, Sean Brant &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293606&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;brant.sean@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Stop me if you have heard this one before. Anyone else find it
&lt;br&gt;&amp;gt; annoying that direct_to_template takes the kwarg &amp;quot;template&amp;quot; and most
&lt;br&gt;&amp;gt; other generic views take &amp;quot;template_name&amp;quot;. Smells a little like php to
&lt;br&gt;&amp;gt; me.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is this something that should be / can be fixed?
&lt;br&gt;&lt;br&gt;Agreed that it is an annoying wart.
&lt;br&gt;&lt;br&gt;I can see two ways we can address this.
&lt;br&gt;&lt;br&gt;Firstly we can introduce a 'template_name' argument to
&lt;br&gt;direct_to_template that shadows the existing 'template' argument. An
&lt;br&gt;error would be raised if you specify both; using 'template' would
&lt;br&gt;raise a Deprecation warning.
&lt;br&gt;&lt;br&gt;Secondly, we can ignore it in the current implementation, and use the
&lt;br&gt;migration to class-based generic views (#6735) as an excuse to clean
&lt;br&gt;up that bit of API.
&lt;br&gt;&lt;br&gt;Patches welcome :-)
&lt;br&gt;&lt;br&gt;Yours,
&lt;br&gt;Russ Magee %-)
&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=26293606&amp;i=1&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=26293606&amp;i=2&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/template-or-is-it-template_name-tp26291143p26293606.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293593</id>
	<title>Re: [Django] #9286: Starting other processes in a view gives me some weird results.</title>
	<published>2009-11-10T15:52:58Z</published>
	<updated>2009-11-10T15:52:58Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#9286: Starting other processes in a view gives me some weird results.
&lt;br&gt;------------------------------------+---------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;namename12 &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.1 &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Uncategorized &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.0 &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resolution: &amp;nbsp;worksforme &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;Accepted &amp;nbsp; &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;Changes (by Alex):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * status: &amp;nbsp;reopened =&amp;gt; closed
&lt;br&gt;&amp;nbsp; * resolution: &amp;nbsp;=&amp;gt; worksforme
&lt;br&gt;&lt;br&gt;Comment:
&lt;br&gt;&lt;br&gt;&amp;nbsp;This bug was closed by a core developer, if you disagree please bring this
&lt;br&gt;&amp;nbsp;up for discussion ont he django-development mailiing list.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/9286#comment:6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/9286#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;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=26293593&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=26293593&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---9286%3A-Starting-other-processes-in-a-view-gives-me-some-weird-results.-tp19800276p26293593.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293545</id>
	<title>Happy 5th Brithday Firefox</title>
	<published>2009-11-10T15:47:01Z</published>
	<updated>2009-11-10T15:47:01Z</updated>
	<author>
		<name>aga toytoy</name>
	</author>
	<content type="html">hmmm it seems we forgot to greet and thank Firefox for it&amp;#39;s 5th year of existence!&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.spreadfirefox.com/5years/en-US/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.spreadfirefox.com/5years/en-US/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://zi.pe/eft&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://zi.pe/eft&lt;/a&gt;&lt;input id=&quot;gwProxy&quot; type=&quot;hidden&quot;&gt;&lt;input id=&quot;jsProxy&quot; type=&quot;hidden&quot;&gt;&lt;div id=&quot;refHTML&quot;&gt;
&lt;/div&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=26293545&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=26293545&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;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/Happy-5th-Brithday-Firefox-tp26293545p26293545.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293538</id>
	<title>Re: Imports, works from directory but not from file</title>
	<published>2009-11-10T15:46:32Z</published>
	<updated>2009-11-10T15:46:32Z</updated>
	<author>
		<name>Bill Freeman-3</name>
	</author>
	<content type="html">&lt;br&gt;Did you really mean &amp;quot;init.py&amp;quot;, rather than the required &amp;quot;__init__.py&amp;quot;.
&lt;br&gt;&amp;nbsp;If so, that's wrong.
&lt;br&gt;&lt;br&gt;I presume that the names of the files and directories are all lower
&lt;br&gt;case and contain no spaces or accented characters.
&lt;br&gt;&lt;br&gt;I presume that you've checked and rechecked the spelling of the file
&lt;br&gt;name against the spelling in the import statement.
&lt;br&gt;&lt;br&gt;It is just possible that it's a permission problem. &amp;nbsp;Can you open the
&lt;br&gt;files for reading? &amp;nbsp;In the manage.py shell try (and assuming FILE_ROOT
&lt;br&gt;is the current directory):
&lt;br&gt;&lt;br&gt;open('lib/openid/association.py').readline()
&lt;br&gt;&lt;br&gt;If that doesn't give an exception, but just prints the first line of
&lt;br&gt;the file, good.
&lt;br&gt;&lt;br&gt;If there's an association.pyc remove it and try again (write
&lt;br&gt;permission problem to replace file
&lt;br&gt;with compiled python for the version of the interpreter in use, though
&lt;br&gt;I think it would work fine
&lt;br&gt;anyway).
&lt;br&gt;&lt;br&gt;I'd expect a different exception, but maybe a problem in
&lt;br&gt;association.py is preventing it from importing. &amp;nbsp;Try adding:
&lt;br&gt;&lt;br&gt;import pdb;pdb.set_trace()
&lt;br&gt;&lt;br&gt;to the top of association.py and see if it gets there and stops, then
&lt;br&gt;step along (&amp;quot;n&amp;quot; command) to see that it all completes.
&lt;br&gt;&lt;br&gt;Check that the file doesn't have Apple line endings ('\r' only). &amp;nbsp;I
&lt;br&gt;know that both DOS and *nix line endings work on Windows ('\r\n' and
&lt;br&gt;'\n' respectively).
&lt;br&gt;&lt;br&gt;There could be problems if the file is in a unicode variant as opposed
&lt;br&gt;to simple 7 bit ASCII, though I hope not. &amp;nbsp;That would probably be
&lt;br&gt;clear from the open test above.
&lt;br&gt;&lt;br&gt;Check that the __init__.py files are either empty, or have valid
&lt;br&gt;python contents.
&lt;br&gt;&lt;br&gt;Beyond that, I'm out of ideas. &amp;nbsp;Good luck.
&lt;br&gt;&lt;br&gt;Bill
&lt;br&gt;&lt;br&gt;On Tue, Nov 10, 2009 at 5:24 PM, When ideas fail
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293538&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andrewkenyon123@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I used this in my settings.py to add the open id folder on my path
&lt;br&gt;&amp;gt; sys.path.append(os.path.join(FILE_ROOT, 'lib', 'openid'))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; and on my path it say:
&lt;br&gt;&amp;gt; 'C:\\TheAbeonaFile\\Python26\\Lib\\idlelib\\lib\\openid'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And both the yadis file and openid file have an init.py
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10 Nov, 22:18, Bill Freeman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293538&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ke1g...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Which all of these directories are on your python path, and which of
&lt;br&gt;&amp;gt;&amp;gt; them have __init__.py files?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Bill
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [Hint to answer first question:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; from pprint import pprint as pp
&lt;br&gt;&amp;gt;&amp;gt; import sys
&lt;br&gt;&amp;gt;&amp;gt; pp(sys.path)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ]
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Tue, Nov 10, 2009 at 5:12 PM, When ideas fail
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293538&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andrewkenyon...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I have a folder called lib on my path and in there I have a folder
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; called openid.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; If i want to import things from openid i have a problem.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; For example if I have these 2 import statements:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; from openid.yadis import xri
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; from openid.association import Association as OIDAssociation
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; yadis is a directory (in openid) and then there is xri.py inside. This
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; works fine.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; association is a .py file not in a subdirectory, just in lib/openid
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; this produces the following error:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Traceback (most recent call last):
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  File &amp;quot;C:\TheAbeonaFile\Apache2.2\MyProject\test.py&amp;quot;, line 18, in
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;lt;module&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;    from openid.association import Association as OIDAssociation
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; ImportError: No module named association
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I don't see why one would be a problem and not the other, does anyone
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; have any ideas?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; thanks
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&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=26293538&amp;i=3&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=26293538&amp;i=4&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/Imports%2C-works-from-directory-but-not-from-file-tp26292260p26293538.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293526</id>
	<title>Happy 5th Brithday Firefox</title>
	<published>2009-11-10T15:44:52Z</published>
	<updated>2009-11-10T15:44:52Z</updated>
	<author>
		<name>aga toytoy</name>
	</author>
	<content type="html">hmmm it seems we forgot to greet and thank Firefox for it&amp;#39;s 5th year of existence!&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.spreadfirefox.com/5years/en-US/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.spreadfirefox.com/5years/en-US/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://zi.pe/eft&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://zi.pe/eft&lt;/a&gt;&lt;input id=&quot;gwProxy&quot; type=&quot;hidden&quot;&gt;&lt;input id=&quot;jsProxy&quot; type=&quot;hidden&quot;&gt;&lt;div id=&quot;refHTML&quot;&gt;
&lt;/div&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=26293526&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=26293526&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;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/Happy-5th-Brithday-Firefox-tp26293526p26293526.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293522</id>
	<title>Re: Model field validation for admin</title>
	<published>2009-11-10T15:44:33Z</published>
	<updated>2009-11-10T15:44:33Z</updated>
	<author>
		<name>pjrharley@gmail.com</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Hello, I want to make a field optional (blank=True), only if another
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; text field's options match a certain value in the admin. Is there any
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; way to do this? Thanks!
&lt;br&gt;&lt;br&gt;You want to do this in a modelform, and then specify that model form
&lt;br&gt;in your admin.py. Put the checks in the overall form clean method (as
&lt;br&gt;it refers to more than one field). In your model allow blank/null.
&lt;br&gt;&lt;br&gt;Peter
&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=26293522&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=26293522&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/Model-field-validation-for-admin-tp26286037p26293522.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293623</id>
	<title>datetime problems with Django application</title>
	<published>2009-11-10T15:41:01Z</published>
	<updated>2009-11-10T15:41:01Z</updated>
	<author>
		<name>Brian Chapman-2</name>
	</author>
	<content type="html">&lt;br&gt;I have a Django application running with mod_python on Apache. In
&lt;br&gt;settings.py I have set TIME_ZONE=&amp;quot;America/New_York&amp;quot;. Within my
&lt;br&gt;application I verify that os.environ['TZ'] is indeed set to this
&lt;br&gt;value. Within my view.py I use datetime.datetime.now() to create a
&lt;br&gt;time stamp that is stored in a model as a DateTimeField and viewed on
&lt;br&gt;a rendered html page.
&lt;br&gt;&lt;br&gt;However, the times that I generate in my view are all off from what
&lt;br&gt;they should be by five hours. I've changed the time zone around
&lt;br&gt;&amp;quot;America/Chicago&amp;quot;, &amp;quot;America/Anchorage&amp;quot; etc. no matter what I set
&lt;br&gt;TIME_ZONE to, I get the same wrong time (5 hours off).
&lt;br&gt;&lt;br&gt;If I go to the admin page and use the change entry page to modify the
&lt;br&gt;values stored in the database, the Time now link gives the correct
&lt;br&gt;time?
&lt;br&gt;&lt;br&gt;Any idea on what is going on here? I'm particularly perplexed as to
&lt;br&gt;why the admin page and my view are giving different times.
&lt;br&gt;&lt;br&gt;Brian
&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=26293623&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=26293623&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/datetime-problems-with-Django-application-tp26293623p26293623.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293390</id>
	<title>Re: [Django] #9286: Starting other processes in a view gives me some weird results.</title>
	<published>2009-11-10T15:32:40Z</published>
	<updated>2009-11-10T15:32:40Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#9286: Starting other processes in a view gives me some weird results.
&lt;br&gt;------------------------------------+---------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;namename12 &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;reopened &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; Milestone: &amp;nbsp;1.1 &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Uncategorized &amp;nbsp;| &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.0 &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;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;Accepted &amp;nbsp; &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;Changes (by &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293390&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;stevecrozz@...&lt;/a&gt;):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * status: &amp;nbsp;closed =&amp;gt; reopened
&lt;br&gt;&amp;nbsp; * resolution: &amp;nbsp;worksforme =&amp;gt;
&lt;br&gt;&lt;br&gt;Comment:
&lt;br&gt;&lt;br&gt;&amp;nbsp;I'd call this a bug, and its affecting me.
&lt;br&gt;&lt;br&gt;&amp;nbsp;The django development server is able to start a background process, but
&lt;br&gt;&amp;nbsp;for some reason it must block until the sub process dies. Place something
&lt;br&gt;&amp;nbsp;like this in a view and you'll get your response 5 seconds later,
&lt;br&gt;&amp;nbsp;Popen.communicate() is not needed to reproduce it:
&lt;br&gt;&lt;br&gt;&amp;nbsp;{{{
&lt;br&gt;&amp;nbsp;subprocess.Popen(['/bin/sleep', '5'])
&lt;br&gt;&amp;nbsp;return HttpResponse(u'That sure took a while!')
&lt;br&gt;&amp;nbsp;}}}
&lt;br&gt;&lt;br&gt;&amp;nbsp;Also see #4953 and #3712
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/9286#comment:5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/9286#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;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=26293390&amp;i=1&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=26293390&amp;i=2&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---9286%3A-Starting-other-processes-in-a-view-gives-me-some-weird-results.-tp19800276p26293390.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293357</id>
	<title>Re: How to handle this race condition?</title>
	<published>2009-11-10T15:28:26Z</published>
	<updated>2009-11-10T15:28:26Z</updated>
	<author>
		<name>akaariai</name>
	</author>
	<content type="html">&lt;br&gt;You missed the 'where bid &amp;lt; new_bid' part of the update. In that case
&lt;br&gt;there is no race I am aware of. Either the transaction sees the update
&lt;br&gt;of the other transaction in which case the highest bid will stay in
&lt;br&gt;effect or it will not see the effect of the other transaction in which
&lt;br&gt;case there is concurrent update and the transaction is aborted.
&lt;br&gt;&lt;br&gt;Anyways, as concurrency is hard and taking row level locks is cheap
&lt;br&gt;and easy way to get the concurrency right I would suggest you use the
&lt;br&gt;select for update method. Also, this way you will avoid the need to
&lt;br&gt;retry failed transactions because of concurrent updates.
&lt;br&gt;&lt;br&gt;On Nov 10, 9:55 pm, Craig Kimerer &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293357&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;craig.kime...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Mon, Nov 9, 2009 at 10:56 PM, Tamas Szabo &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293357&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;szab...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Would something like
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; UPDATE bid = new_bid WHERE id = id and bid &amp;lt; new_bid
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; work for you?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; It is a more optimistic approach (it assumes that the case you describe is
&lt;br&gt;&amp;gt; &amp;gt; an exception rather than what usually happens) and I think it is simpler by
&lt;br&gt;&amp;gt; &amp;gt; not having to do any locking etc.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Tamas
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That only works if you have transactions disabled for your database.  If
&lt;br&gt;&amp;gt; your connections are using transactions, you still have the race condition.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For example (in MySQL):
&lt;br&gt;&amp;gt; Start two DB Shells
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In the first shell:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; insert into bids (id, high_bid) values (1, 20);
&lt;br&gt;&amp;gt; Query OK, 1 row affected (0.00 sec)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; START TRANSACTION;
&lt;br&gt;&amp;gt; Query OK, 0 rows affected (0.01 sec)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In the second shell:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; START TRANSACTION;
&lt;br&gt;&amp;gt; Query OK, 0 rows affected (0.00 sec)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; update bids set high_bid = 25 where id = 1;
&lt;br&gt;&amp;gt; Query OK, 1 row affected (0.00 sec)
&lt;br&gt;&amp;gt; Rows matched: 1  Changed: 1  Warnings: 0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; commit;
&lt;br&gt;&amp;gt; Query OK, 0 rows affected (0.00 sec)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Back in the first shell:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; UPDATE bids SET high_bid = 23 where id = 1;
&lt;br&gt;&amp;gt; Query OK, 1 row affected (0.00 sec)
&lt;br&gt;&amp;gt; Rows matched: 1  Changed: 1  Warnings: 0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; commit;
&lt;br&gt;&amp;gt; Query OK, 0 rows affected (0.00 sec)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mysql&amp;gt; select * from bids;
&lt;br&gt;&amp;gt; +------+----------+
&lt;br&gt;&amp;gt; | id   | high_bid |
&lt;br&gt;&amp;gt; +------+----------+
&lt;br&gt;&amp;gt; |    1 |       23 |
&lt;br&gt;&amp;gt; +------+----------+
&lt;br&gt;&amp;gt; 1 row in set (0.00 sec)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Craig
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Tue, Nov 10, 2009 at 2:17 PM, Continuation &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293357&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;selforgani...@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Thanks Christophe and Kenneth!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Let me make sure I understand this:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; If I write this vew function:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; @transaction.commit_on_success
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; def update_high_bid(request):
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ....
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; cursor = connection.cursor()
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;        cursor.execute(&amp;quot;SELECT high_bid FROM auctionapp_auction WHERE
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; id=%s
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; FOR UPDATE&amp;quot;, [auction.id])
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;         returned_rows = cursor.fetchall()
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;        high_bid = returned_rows[0][0]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;        if new_bid &amp;gt; high_bid:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;            auction.high_bid = new_bid
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;            auction.save()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; The entire function will be wrapped within a transaction.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; SELECT FOR UPDATE will acquire a row-level lock
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; and that lock will not be released until the function update_high_bid
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; () returns successfully, or until the function raises an exception and
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; the whole transaction is rolled back.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Is that right?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Nov 10, 12:45 am, Christophe Pettus &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293357&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;x...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; On Nov 9, 2009, at 9:34 PM, Continuation wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; Also does django middleware acquire database lock on my behalf, or do
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; &amp;gt; I need to explicitly perform the locking?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; In the example code, it's the SELECT ... FOR UPDATE that acquires the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; lock.  Django doesn't currently have any explicit knowledge of
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; locking, so you need to drop down to the custom SQL level to issue the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; right statement to acquire the lock on the row.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; The example I wrote assumed you were using PostgreSQL as the backend;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; you can get all sorts of details about locking in PostgreSQL here:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&lt;a href=&quot;http://www.postgresql.org/docs/8.4/interactive/explicit-locking.html#&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.postgresql.org/docs/8.4/interactive/explicit-locking.html#&lt;/a&gt;...
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; -- Christophe Pettus
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293357&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;x...@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&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=26293357&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=26293357&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/How-to-handle-this-race-condition--tp26278186p26293357.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26293217</id>
	<title>Re: [Django] #12196: EmailField reject this email address tosha...99@gmail.com</title>
	<published>2009-11-10T15:17:50Z</published>
	<updated>2009-11-10T15:17:50Z</updated>
	<author>
		<name>Django-3</name>
	</author>
	<content type="html">#12196: EmailField reject this email address &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26293217&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tosha...99@...&lt;/a&gt;
&lt;br&gt;---------------------------------+------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: &amp;nbsp;mtsyganov &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;new &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; Milestone: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Component: &amp;nbsp;Forms &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &amp;nbsp; Version: &amp;nbsp;1.1 &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;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; 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; 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;
&lt;br&gt;---------------------------------+------------------------------------------
&lt;br&gt;Changes (by Alex):
&lt;br&gt;&lt;br&gt;&amp;nbsp; * needs_better_patch: &amp;nbsp;=&amp;gt; 0
&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;Old description:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; To fix that problem, just change
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; email_re = re.compile(
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; r&amp;quot;(^[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]+)*&amp;quot; &amp;nbsp;#
&lt;br&gt;&amp;gt; dot-atom
&lt;br&gt;&amp;gt; r'|^&amp;quot;([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*&amp;quot;'
&lt;br&gt;&amp;gt; # quoted-string
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$',
&lt;br&gt;&amp;gt; re.IGNORECASE) &amp;nbsp;# domain
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; TO
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; email_re = re.compile(
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; r&amp;quot;(^[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]*)*&amp;quot; &amp;nbsp;#
&lt;br&gt;&amp;gt; dot-atom
&lt;br&gt;&amp;gt; r'|^&amp;quot;([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*&amp;quot;'
&lt;br&gt;&amp;gt; # quoted-string
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$',
&lt;br&gt;&amp;gt; re.IGNORECASE) &amp;nbsp;# domain
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; in the file django.forms.fields.py
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I just replaced in the first line the + to *
&lt;/div&gt;&lt;br&gt;New description:
&lt;br&gt;&lt;br&gt;&amp;nbsp;To fix that problem, just change
&lt;br&gt;&amp;nbsp;{{{
&lt;br&gt;&amp;nbsp;email_re = re.compile(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;r&amp;quot;(^[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]+)*&amp;quot; &amp;nbsp;#
&lt;br&gt;&amp;nbsp;dot-atom
&lt;br&gt;&amp;nbsp;r'|^&amp;quot;([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*&amp;quot;'
&lt;br&gt;&amp;nbsp;# quoted-string
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$',
&lt;br&gt;&amp;nbsp;re.IGNORECASE) &amp;nbsp;# domain
&lt;br&gt;&amp;nbsp;}}}
&lt;br&gt;&amp;nbsp;TO
&lt;br&gt;&amp;nbsp;{{{
&lt;br&gt;&amp;nbsp;email_re = re.compile(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;r&amp;quot;(^[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&amp;'*+/=?^_`{}|~0-9A-Z]*)*&amp;quot; &amp;nbsp;#
&lt;br&gt;&amp;nbsp;dot-atom
&lt;br&gt;&amp;nbsp;r'|^&amp;quot;([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*&amp;quot;'
&lt;br&gt;&amp;nbsp;# quoted-string
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$',
&lt;br&gt;&amp;nbsp;re.IGNORECASE) &amp;nbsp;# domain
&lt;br&gt;&amp;nbsp;}}}
&lt;br&gt;&amp;nbsp;in the file django.forms.fields.py
&lt;br&gt;&lt;br&gt;&amp;nbsp;I just replaced in the first line the + to *
&lt;br&gt;&lt;br&gt;Comment:
&lt;br&gt;&lt;br&gt;&amp;nbsp;Please use preview.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ticket URL: &amp;lt;&lt;a href=&quot;http://code.djangoproject.com/ticket/12196#comment:1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.djangoproject.com/ticket/12196#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;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=26293217&amp;i=1&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=26293217&amp;i=2&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---12196%3A-EmailField-reject-this-email-address-tosha...99%40gmail.com-tp26293195p26293217.html" />
</entry>

</feed>
