Re: [Django] #15709: Duplicated group_by condition

2011-03-28 Thread Django
#15709: Duplicated group_by condition
-+-
   Reporter:  ziangsong  |Owner:  nobody
 Status:  new|Milestone:  1.3
  Component:  Database   |  Version:  1.3
  layer (models, ORM)| Keywords:  group_by, annotate
 Resolution: |Has patch:  0
   Triage Stage: |  Needs tests:  0
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by ziangsong):

 * cc: ziangsong (added)
 * needs_better_patch:   => 0
 * component:  Uncategorized => Database layer (models, ORM)
 * needs_tests:   => 0
 * milestone:   => 1.3
 * needs_docs:   => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15709: Duplicated group_by condition

2011-03-28 Thread Django
#15709: Duplicated group_by condition
+---
 Reporter:  ziangsong   | Owner:  nobody
   Status:  new | Milestone:
Component:  Uncategorized   |   Version:  1.3
 Keywords:  group_by, annotate  |  Triage Stage:  Unreviewed
Has patch:  0   |
+---
 So I want to implement this SQL:

 selelct id, count(*), max(insert_date) as m_d
 from Book
 group by id

 Here is the Django ORM query:

  q = Book.objects.values('id').annotate(c = Count('id'), m_d =
 Max('insert_date')).order_by()

 However, the translated sql is like this:

 selelct id, count(*), max(insert_date) as m_d
 from Book
 group by id, id  <-here is another id! It messed up things!

 Btw, the id in Book is a foreign key to another table and I am using MySql
 database.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15708: Regression in Forms: KeyError if trying to access nonvalid input from required field

2011-03-28 Thread Django
#15708: Regression in Forms: KeyError if trying to access nonvalid input from
required field
--+--
   Reporter:  jonescb |Owner:  nobody
 Status:  closed  |Milestone:
  Component:  Forms   |  Version:  1.3
 Resolution:  needsinfo   | Keywords:
   Triage Stage:  Unreviewed  |Has patch:  0
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  0   |
--+--
Changes (by kmtracey):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 I notice you say "something like this" which implies you have simplified
 your actual case. The code you have posted doesn't work in 1.2
 either...1.2 raises a !KeyError on exactly the line you note. Fields that
 have not successfully passed individual field validation have never been
 available in cleaned_data (what would be there...the data was determined
 to be invalid already?) when the form-level clean is called. You'll need
 to get an example closer to the actual case you have encountered that
 works on 1.2 and fails on 1.3 for someone to help identify what may have
 changed.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15708: Regression in Forms: KeyError if trying to access nonvalid input from required field

2011-03-28 Thread Django
#15708: Regression in Forms: KeyError if trying to access nonvalid input from
required field
--+--
   Reporter:  jonescb |Owner:  nobody
 Status:  new |Milestone:
  Component:  Forms   |  Version:  1.3
 Resolution:  | Keywords:
   Triage Stage:  Unreviewed  |Has patch:  0
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  0   |
--+--
Description changed by kmtracey:

Old description:

> I discovered that I'm getting a KeyError when I try to access a blank
> required field from the clean() method of the Form.
>
> Something like this will trigger the error:
>
> class TestForm(forms.Form)
> name = forms.CharField()
>
> def clean(self):
> super(forms.Form, self).clean()
> name = self.cleaned_data['name'] # this is the offending line
> return self.cleaned_data
>
> If you display that form in a template and the user enters nothing into
> the field, it causes a KeyError which leads to a 500 error.  This same
> code used to work in Django 1.2, but it doesn't work in 1.3 anymore.
>
> If you set the field to required=False, it does work.
> The obvious workaround is to wrap the offending line in a try/except.
>
> The previous functionality was that Django would display an error to the
> user telling them that the field is required if you configured your
> templates to display the errors.  It still displays that error if you
> don't try to access keys from self.cleaned_data.
>
> This also happens with EmailField if you enter an invalid email address.
> I didn't test any other fields though.

New description:

 I discovered that I'm getting a KeyError when I try to access a blank
 required field from the clean() method of the Form.

 Something like this will trigger the error:
 {{{
 class TestForm(forms.Form)
 name = forms.CharField()

 def clean(self):
 super(forms.Form, self).clean()
 name = self.cleaned_data['name'] # this is the offending line
 return self.cleaned_data
 }}}
 If you display that form in a template and the user enters nothing into
 the field, it causes a KeyError which leads to a 500 error.  This same
 code used to work in Django 1.2, but it doesn't work in 1.3 anymore.

 If you set the field to required=False, it does work.
 The obvious workaround is to wrap the offending line in a try/except.

 The previous functionality was that Django would display an error to the
 user telling them that the field is required if you configured your
 templates to display the errors.  It still displays that error if you
 don't try to access keys from self.cleaned_data.

 This also happens with EmailField if you enter an invalid email address.
 I didn't test any other fields though.

--

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15708: Regression in Forms: KeyError if trying to access nonvalid input from required field

2011-03-28 Thread Django
#15708: Regression in Forms: KeyError if trying to access nonvalid input from
required field
--+--
   Reporter:  jonescb |Owner:  nobody
 Status:  new |Milestone:
  Component:  Forms   |  Version:  1.3
 Resolution:  | Keywords:
   Triage Stage:  Unreviewed  |Has patch:  0
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  0   |
--+--
Changes (by jonescb):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Sorry, I messed up the formatting of the code in clean(), and I can't edit
 it.
 I'll just redo it.

 {{{
 class TestForm(forms.Form)
 name = forms.CharField?()
 def clean(self):
 super(forms.Form, self).clean()
 name = self.cleaned_data['name'] # this is the offending line
 return self.cleaned_data
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15708: Regression in Forms: KeyError if trying to access nonvalid input from required field

2011-03-28 Thread Django
#15708: Regression in Forms: KeyError if trying to access nonvalid input from
required field
-+---
 Reporter:  jonescb  | Owner:  nobody
   Status:  new  | Milestone:
Component:  Forms|   Version:  1.3
 Keywords:   |  Triage Stage:  Unreviewed
Has patch:  0|
-+---
 I discovered that I'm getting a KeyError when I try to access a blank
 required field from the clean() method of the Form.

 Something like this will trigger the error:

 class TestForm(forms.Form)
 name = forms.CharField()

 def clean(self):
 super(forms.Form, self).clean()
 name = self.cleaned_data['name'] # this is the offending line
 return self.cleaned_data

 If you display that form in a template and the user enters nothing into
 the field, it causes a KeyError which leads to a 500 error.  This same
 code used to work in Django 1.2, but it doesn't work in 1.3 anymore.

 If you set the field to required=False, it does work.
 The obvious workaround is to wrap the offending line in a try/except.

 The previous functionality was that Django would display an error to the
 user telling them that the field is required if you configured your
 templates to display the errors.  It still displays that error if you
 don't try to access keys from self.cleaned_data.

 This also happens with EmailField if you enter an invalid email address.
 I didn't test any other fields though.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5833: Custom FilterSpecs

2011-03-28 Thread Django
#5833: Custom FilterSpecs
-+-
   Reporter: |Owner:  jkocherhans
  Honza_Kral |Milestone:
 Status:  assigned   |  Version:  SVN
  Component: | Keywords:  nfa-someday
  django.contrib.admin   |  list_filter filterspec nfa-
 Resolution: |  changelist ep2008
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  1  |  Needs tests:  1
Patch needs improvement:  0  |
-+-

Comment (by julien):

 Sorry all for the confusion I've been stirring here. Thanks Luke, Russ and
 Karen -- point taken. I've started a thread on django-dev about this so we
 don't pollute this ticket with too many meta conversations:
 http://groups.google.com/group/django-
 developers/browse_thread/thread/bf7da09f1f5881dc

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15662: module_has_submodule incorrectly uses the Importer Protocol

2011-03-28 Thread Django
#15662: module_has_submodule incorrectly uses the Importer Protocol
-+-
   Reporter:  Bradley|Owner:  nobody
  Ayers |Milestone:  1.3
 Status:  new|  Version:  1.2
  Component:  Core   | Keywords:
  framework  |Has patch:  1
 Resolution: |  Needs tests:  0
   Triage Stage: |
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by Bradley Ayers ):

 * component:  Uncategorized => Core framework


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5833: Custom FilterSpecs

2011-03-28 Thread Django
#5833: Custom FilterSpecs
-+-
   Reporter: |Owner:  jkocherhans
  Honza_Kral |Milestone:
 Status:  assigned   |  Version:  SVN
  Component: | Keywords:  nfa-someday
  django.contrib.admin   |  list_filter filterspec nfa-
 Resolution: |  changelist ep2008
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  1  |  Needs tests:  1
Patch needs improvement:  0  |
-+-

Comment (by kmtracey):

 Replying to [comment:108 subsume]:
 > ...but being on the 1.3 was fine and dandy? Ok.

 No, looks to me like it was bumped out of 1.3 milestone minutes after
 being put in there, since it was put there after the feature deadline was
 passed. It's been put in just about every milestone since 1.1 beta, but no
 docs or tests have ever been included in any of the patches. Putting it in
 a milestone won't make these things appear, so perhaps the technique of
 not allowing it to be in the milestone until these these appear will help
 move it along. Doc/tests were asked for as long as 2 years ago...

 (This is actually something I'd like to have in one of my personal
 projects, but it's pretty low priority for me and not worth figuring out
 how to use in the absence of any docs, so I've not ever looked in detail
 at it. I would be motivated to look at it if it had some doc.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15707: Upgrade GIS feeds to use class-based (non-deprecated) APIs

2011-03-28 Thread Django
#15707: Upgrade GIS feeds to use class-based (non-deprecated) APIs
+--
   Reporter:  jbronn|Owner:  jbronn
 Status:  new   |Milestone:  1.4
  Component:  GIS   |  Version:  1.3
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  1
Needs documentation:  1 |  Needs tests:  0
Patch needs improvement:  0 |
+--
Changes (by jbronn):

 * owner:  nobody => jbronn
 * version:  1.2 => 1.3


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15706: Django GIS Feeds should use the new syndication.views.Feed

2011-03-28 Thread Django
#15706: Django GIS Feeds should use the new syndication.views.Feed
--+--
   Reporter:  coreyf@…|Owner:  nobody
 Status:  closed  |Milestone:
  Component:  GIS |  Version:  1.3
 Resolution:  duplicate   | Keywords:  Feed
   Triage Stage:  Unreviewed  |Has patch:  0
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  0   |
--+--
Changes (by russellm):

 * status:  new => closed
 * needs_docs:   => 0
 * resolution:   => duplicate
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 Marking as a duplicate of #15707, which has a patch.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5833: Custom FilterSpecs

2011-03-28 Thread Django
#5833: Custom FilterSpecs
-+-
   Reporter: |Owner:  jkocherhans
  Honza_Kral |Milestone:
 Status:  assigned   |  Version:  SVN
  Component: | Keywords:  nfa-someday
  django.contrib.admin   |  list_filter filterspec nfa-
 Resolution: |  changelist ep2008
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  1  |  Needs tests:  1
Patch needs improvement:  0  |
-+-

Comment (by russellm):

 @subsume: The point here is that putting a ticket on the milestone doesn't
 actually make anything happen. It just raises the false expectation that
 the feature will magically appear on it's own. We weren't very good about
 managing this expectation during the 1.3 cycle, so now that we have a
 clean slate, we have an opportunity to be more vigilant about this.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15707: Upgrade GIS feeds to use class-based (non-deprecated) APIs

2011-03-28 Thread Django
#15707: Upgrade GIS feeds to use class-based (non-deprecated) APIs
--+
   Reporter:  jbronn  |Owner:  nobody
 Status:  new |Milestone:  1.4
  Component:  GIS |  Version:  1.2
   Keywords:  | Triage Stage:  Accepted
  Has patch:  1   |  Needs documentation:  1
Needs tests:  0   |  Patch needs improvement:  0
--+
 The GIS feeds use deprecated APIs and need to be upgraded to use the
 class-based ones introduced in 1.2.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15706: Django GIS Feeds should use the new syndication.views.Feed

2011-03-28 Thread Django
#15706: Django GIS Feeds should use the new syndication.views.Feed
--+---
 Reporter:  coreyf@…  | Owner:  nobody
   Status:  new   | Milestone:
Component:  GIS   |   Version:  1.3
 Keywords:  Feed  |  Triage Stage:  Unreviewed
Has patch:  0 |
--+---
 Currently, '''contrib.gis.feeds.Feed''' relies on the deprecated
 '''contrib.syndication.feeds.Feed''' rather than the new
 '''contrib.syndication.views.Feed'''.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5833: Custom FilterSpecs

2011-03-28 Thread Django
#5833: Custom FilterSpecs
-+-
   Reporter: |Owner:  jkocherhans
  Honza_Kral |Milestone:
 Status:  assigned   |  Version:  SVN
  Component: | Keywords:  nfa-someday
  django.contrib.admin   |  list_filter filterspec nfa-
 Resolution: |  changelist ep2008
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  1  |  Needs tests:  1
Patch needs improvement:  0  |
-+-

Comment (by subsume):

 ...but being on the 1.3 was fine and dandy? Ok.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5833: Custom FilterSpecs

2011-03-28 Thread Django
#5833: Custom FilterSpecs
-+-
   Reporter: |Owner:  jkocherhans
  Honza_Kral |Milestone:
 Status:  assigned   |  Version:  SVN
  Component: | Keywords:  nfa-someday
  django.contrib.admin   |  list_filter filterspec nfa-
 Resolution: |  changelist ep2008
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  1  |  Needs tests:  1
Patch needs improvement:  0  |
-+-
Changes (by lukeplant):

 * milestone:  1.4 =>


Comment:

 Sorry, but:

  * no docs - it doesn't exist
  * no tests - it doesn't work

 This is a feature, not a bug, so until docs and tests appear, this cannot
 be on the radar screen, and it's not fair to put it in front of tickets
 which have these things. I'm going to remove the milestone again, just to
 make it clear we're absolutely serious about that, and to say that unless
 anyone is willing to come up with those things, there is no point
 suggesting it is a priority for any of the core developers.

 (No offence meant to you, Julien, and all the great triaging work you are
 doing, BTW - thanks so much for that).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r15941 - django/trunk/django/conf

2011-03-28 Thread noreply
Author: lukeplant
Date: 2011-03-28 15:19:14 -0700 (Mon, 28 Mar 2011)
New Revision: 15941

Modified:
   django/trunk/django/conf/global_settings.py
Log:
Removed totally unused setting.

Modified: django/trunk/django/conf/global_settings.py
===
--- django/trunk/django/conf/global_settings.py 2011-03-28 21:27:22 UTC (rev 
15940)
+++ django/trunk/django/conf/global_settings.py 2011-03-28 22:19:14 UTC (rev 
15941)
@@ -470,10 +470,6 @@
 # user. Set this to 0 if you want to disable it.
 COMMENTS_FIRST_FEW = 0
 
-# A tuple of IP addresses that have been banned from participating in various
-# Django-powered features.
-BANNED_IPS = ()
-
 ##
 # AUTHENTICATION #
 ##

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5833: Custom FilterSpecs

2011-03-28 Thread Django
#5833: Custom FilterSpecs
-+-
   Reporter: |Owner:  jkocherhans
  Honza_Kral |Milestone:  1.4
 Status:  assigned   |  Version:  SVN
  Component: | Keywords:  nfa-someday
  django.contrib.admin   |  list_filter filterspec nfa-
 Resolution: |  changelist ep2008
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  1  |  Needs tests:  1
Patch needs improvement:  0  |
-+-
Changes (by julien):

 * milestone:   => 1.4


Comment:

 Putting this on the radar for 1.4. Want! ;)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r15940 - django/trunk/django/utils

2011-03-28 Thread noreply
Author: Alex
Date: 2011-03-28 14:27:22 -0700 (Mon, 28 Mar 2011)
New Revision: 15940

Modified:
   django/trunk/django/utils/functional.py
Log:
Remove a license that no long applies to any code, and add a comment for the 
next person who wants to do some gardening.

Modified: django/trunk/django/utils/functional.py
===
--- django/trunk/django/utils/functional.py 2011-03-28 16:15:43 UTC (rev 
15939)
+++ django/trunk/django/utils/functional.py 2011-03-28 21:27:22 UTC (rev 
15940)
@@ -1,56 +1,9 @@
-# License for code in this file that was taken from Python 2.5.
-
-# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
-# 
-#
-# 1. This LICENSE AGREEMENT is between the Python Software Foundation
-# ("PSF"), and the Individual or Organization ("Licensee") accessing and
-# otherwise using this software ("Python") in source or binary form and
-# its associated documentation.
-#
-# 2. Subject to the terms and conditions of this License Agreement, PSF
-# hereby grants Licensee a nonexclusive, royalty-free, world-wide
-# license to reproduce, analyze, test, perform and/or display publicly,
-# prepare derivative works, distribute, and otherwise use Python
-# alone or in any derivative version, provided, however, that PSF's
-# License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
-# 2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software Foundation;
-# All Rights Reserved" are retained in Python alone or in any derivative
-# version prepared by Licensee.
-#
-# 3. In the event Licensee prepares a derivative work that is based on
-# or incorporates Python or any part thereof, and wants to make
-# the derivative work available to others as provided herein, then
-# Licensee hereby agrees to include in any such work a brief summary of
-# the changes made to Python.
-#
-# 4. PSF is making Python available to Licensee on an "AS IS"
-# basis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-# IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
-# DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
-# FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
-# INFRINGE ANY THIRD PARTY RIGHTS.
-#
-# 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
-# FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
-# A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
-# OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
-#
-# 6. This License Agreement will automatically terminate upon a material
-# breach of its terms and conditions.
-#
-# 7. Nothing in this License Agreement shall be deemed to create any
-# relationship of agency, partnership, or joint venture between PSF and
-# Licensee.  This License Agreement does not grant permission to use PSF
-# trademarks or trade name in a trademark sense to endorse or promote
-# products or services of Licensee, or any third party.
-#
-# 8. By copying, installing or otherwise using Python, Licensee
-# agrees to be bound by the terms and conditions of this License
-# Agreement.
-
 from functools import wraps
 
+
+# You can't trivially replace this `functools.partial` because this binds to
+# classes and returns bound instances, whereas functools.partial (on CPython)
+# is a type and it's instances don't bind.
 def curry(_curried_func, *args, **kwargs):
 def _curried(*moreargs, **morekwargs):
 return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14262: Helper for "get_something as varname" template tag pattern

2011-03-28 Thread Django
#14262: Helper for "get_something as varname" template tag pattern
---+--
   Reporter:  carljm   |Owner:  nobody
 Status:  new  |Milestone:
  Component:  Template system  |  Version:  SVN
 Resolution:   | Keywords:
   Triage Stage:  Accepted |Has patch:  0
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+--

Comment (by julien):

 Also check out #2016 which was in fact the first ticket to ask for this
 new functionality and has patches.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2016: [patch] Decorator for template tags that load objects

2011-03-28 Thread Django
#2016: [patch] Decorator for template tags that load objects
---+--
   Reporter:  jason@…  |Owner:  nobody
 Status:  closed   |Milestone:
  Component:  Template system  |  Version:
 Resolution:  fixed| Keywords:
   Triage Stage:  Accepted |Has patch:  1
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+--

Comment (by julien):

 Just for posterity, the resolution would actually be duplicate of #14262.
 Although it is more recent, it also has a more up-to-date discussion about
 the preferred API.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15667: Implement template-based widget rendering

2011-03-28 Thread Django
#15667: Implement template-based widget rendering
+
   Reporter:  brutasse  |Owner:  brutasse
 Status:  new   |Milestone:  1.4
  Component:  Forms |  Version:
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+
Changes (by trebor74hr):

 * cc: trebor74hr@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15705: Localflavor for Croatia

2011-03-28 Thread Django
#15705: Localflavor for Croatia
+---
 Reporter:  zmasek  | Owner:  zmasek
   Status:  new | Milestone:
Component:  django.contrib.localflavor  |   Version:  SVN
 Keywords:  localflavor croatia |  Triage Stage:  Unreviewed
Has patch:  1   |
+---
 This patch adds several form fields specific to Croatia.

 HRPostalNumber
 HRCountySelect
 HROIBField
 HRJMBGField
 HRPhoneNumberField
 HRPhoneNumberPrefixSelect
 HRLicencePlatePrefixSelect
 HRLicencePlateField
 HRJMBAGField

 (My first patch/contribution. Hope I got it right.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15704: Make cache tests more reusable

2011-03-28 Thread Django
#15704: Make cache tests more reusable
+--
   Reporter:  jonash|Owner:  nobody
 Status:  new   |Milestone:
  Component:  Cache system  |  Version:  SVN
 Resolution:| Keywords:
   Triage Stage:  Unreviewed|Has patch:  1
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+--
Changes (by jonash):

 * needs_docs:   => 0
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 Sorry. Second word should obviously be "patch". Again forgot to mention
 that this passes the Django test suite.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15704: Make cache tests more reusable

2011-03-28 Thread Django
#15704: Make cache tests more reusable
--+---
 Reporter:  jonash| Owner:  nobody
   Status:  new   | Milestone:
Component:  Cache system  |   Version:  SVN
 Keywords:|  Triage Stage:  Unreviewed
Has patch:  1 |
--+---
 I'm using the cache framework test suite that ships with Django for my own
 caching backend.

 This matches replaces the hard-coded backend paths (e.g.
 `django.core.cache.backends.db`) by class attributes, so using these tests
 for third-party backends is as easy as typing `backend_name =
 'your.cool.Backend'`.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15250: Cannot fill parent model instance in cache

2011-03-28 Thread Django
#15250: Cannot fill parent model instance in cache
-+-
   Reporter:  vzima  |Owner:  marekw2143
 Status:  assigned   |Milestone:
  Component:  Database   |  Version:  1.2
  layer (models, ORM)| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by marekw2143):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14540: Wrong localization (L10N) thousand separator & decimal point character for Puerto Rico

2011-03-28 Thread Django
#14540: Wrong localization (L10N) thousand separator & decimal point character 
for
Puerto Rico
-+-
   Reporter:  rosarior   |Owner:  nobody
 Status:  reopened   |Milestone:
  Component: |  Version:  1.2
  Internationalization   | Keywords:  L10N, Puerto Rico
 Resolution: |Has patch:  0
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by ramiro):

 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14540: Wrong localization (L10N) thousand separator & decimal point character for Puerto Rico

2011-03-28 Thread Django
#14540: Wrong localization (L10N) thousand separator & decimal point character 
for
Puerto Rico
-+-
   Reporter:  rosarior   |Owner:  nobody
 Status:  reopened   |Milestone:
  Component: |  Version:  1.2
  Internationalization   | Keywords:  L10N, Puerto Rico
 Resolution: |Has patch:  0
   Triage Stage: |  Needs tests:  0
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by rosarior):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Replying to [comment:2 ramiro]:
 > Django currently has no Puerto Rico translation/format support. Maybe
 you are using files provided by another Django-based project (in that case
 you can reporte this to its maintainers) or locally created file (in which
 case you can edit the file yourself)?.
 >
 > Of course, we would gladly add such a translation if anyone contributes
 one in good shape to Django.

 I'm using the official Django 1.2.4 files as downloaded by pip from
 djangoproject.com.  The formats.py file attached here was create by myself
 by copying django/conf/locale/es/formats.py and editing it to provide the
 missing format support for es-PR locale, as for translation/i18n support
 the general 'es' translation is adequate for Puerto Rico, no specific 'es-
 PR' translation is needed.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15667: Implement template-based widget rendering

2011-03-28 Thread Django
#15667: Implement template-based widget rendering
+
   Reporter:  brutasse  |Owner:  brutasse
 Status:  new   |Milestone:  1.4
  Component:  Forms |  Version:
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+

Comment (by carljm):

 Replying to [comment:7 brutasse]:
 > Right, so I have a patch but it's too large for Trac :). I'll be using a
 github branch instead:
 >
 > https://github.com/brutasse/django/compare/15667-template-widgets

 This looks great!

 > * !ClearableFileInput no longer has its 'template_with_initial' and
 'template_with_clear' arguments. This breaks a widget in the admin but I
 haven't started the admin widget migration yet. The question is whether
 this is supposed to be a public API or not.

 They aren't arguments, just class attributes. And they are not documented
 (I avoided documenting them specifically because I was hoping we could
 soon get rid of them by moving to template-based widgets). It's probably
 worth a note in the release notes in this patch for anyone who had a
 subclass overriding them, but since they aren't documented I don't think
 we need to provide the full deprecation path for them.

 > * The !RadioSelect "renderer" API should be deprecated. I left it
 unchanged (although I added !PendingDeprecationWarnings), it still works
 but it's not doing any template-based rendering. The templates give us
 enough flexibility so I'm in favor of starting its deprecation.

 Agreed.

 > * I added a template loader that is added to the list of loaders, this
 way the templates are always available and they can be overridden in
 project- or app-provided templates. Template caching works as expected,
 the cached loader also caches the forms templates.

 So I think this is the trickiest part here. I'm hesitant to introduce
 another implicit coupling between conceptually-separate components of
 Django, and it makes me cringe a bit that there's now no way to use the
 Django template language without having this forms template loader added
 automatically. That said, I don't have any other brilliant ideas for how
 to make this "just work" transparently when people upgrade. Needs more
 thought.

 On a more minor note, I'm not a big fan of how you're finding the
 forms_template_dir, relying on the relative filesystem location of
 django/template/loaders/forms.py and django/forms. I think it might be
 better to import the django.forms module and use its __file__ attribute?

 > * I chose to explicitly add the input's "name" and "type" to the
 template context instead of leaving it in the "attrs" dictionary. I like
 it this way but I can put it back in the attrs if we decide to.

 I prefer this as well; more explicit.

 > * Topic documentation and widget reference (I'll make a draft but I
 '''will''' need help here :)

 I'm happy to help with this at some point.

 > I'll keep reporting my progress here and will update my branch on
 github. As always, comments welcome :)

 Great work, thanks!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12483: Error message when Model.__unicode__() returns None

2011-03-28 Thread Django
#12483: Error message when Model.__unicode__() returns None
--+--
   Reporter:  lsaffre |Owner:  nobody
 Status:  new |Milestone:
  Component:  Core framework  |  Version:  1.1
 Resolution:  | Keywords:
   Triage Stage:  Accepted|Has patch:  1
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  0   |
--+--

Comment (by mk):

 New patch with tests and everything.

 I'm not completely sure whether raising a new exception on TypeError is
 worth it though -- maybe we lose precious trackback information...

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12483: Error message when Model.__unicode__() returns None

2011-03-28 Thread Django
#12483: Error message when Model.__unicode__() returns None
--+--
   Reporter:  lsaffre |Owner:  nobody
 Status:  new |Milestone:
  Component:  Core framework  |  Version:  1.1
 Resolution:  | Keywords:
   Triage Stage:  Accepted|Has patch:  1
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  0   |
--+--
Changes (by mk):

 * needs_tests:  1 => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r15939 - in django/branches/releases/1.3.X: django/http tests/regressiontests/requests

2011-03-28 Thread noreply
Author: lukeplant
Date: 2011-03-28 09:15:43 -0700 (Mon, 28 Mar 2011)
New Revision: 15939

Modified:
   django/branches/releases/1.3.X/django/http/__init__.py
   django/branches/releases/1.3.X/tests/regressiontests/requests/tests.py
Log:
[1.3.X] Fixed #15679 - regression in HttpRequest.POST and raw_post_data access.

Thanks to vkryachko for the report.

This also fixes a slight inconsistency with raw_post_data after parsing of a
multipart request, and adds a test for that.  (Previously accessing
raw_post_data would have returned the empty string rather than raising an
Exception).

Backport of [15938] from trunk.

Modified: django/branches/releases/1.3.X/django/http/__init__.py
===
--- django/branches/releases/1.3.X/django/http/__init__.py  2011-03-28 
16:11:40 UTC (rev 15938)
+++ django/branches/releases/1.3.X/django/http/__init__.py  2011-03-28 
16:15:43 UTC (rev 15939)
@@ -262,14 +262,18 @@
 if self.method != 'POST':
 self._post, self._files = QueryDict('', encoding=self._encoding), 
MultiValueDict()
 return
-if self._read_started:
+if self._read_started and not hasattr(self, '_raw_post_data'):
 self._mark_post_parse_error()
 return
 
 if self.META.get('CONTENT_TYPE', '').startswith('multipart'):
-self._raw_post_data = ''
+if hasattr(self, '_raw_post_data'):
+# Use already read data
+data = StringIO(self._raw_post_data)
+else:
+data = self
 try:
-self._post, self._files = self.parse_file_upload(self.META, 
self)
+self._post, self._files = self.parse_file_upload(self.META, 
data)
 except:
 # An error occured while parsing POST data.  Since when
 # formatting the error the request handler might access

Modified: django/branches/releases/1.3.X/tests/regressiontests/requests/tests.py
===
--- django/branches/releases/1.3.X/tests/regressiontests/requests/tests.py  
2011-03-28 16:11:40 UTC (rev 15938)
+++ django/branches/releases/1.3.X/tests/regressiontests/requests/tests.py  
2011-03-28 16:15:43 UTC (rev 15939)
@@ -179,6 +179,66 @@
 self.assertRaises(Exception, lambda: request.raw_post_data)
 self.assertEqual(request.POST, {})
 
+def test_raw_post_data_after_POST_multipart(self):
+"""
+Reading raw_post_data after parsing multipart is not allowed
+"""
+# Because multipart is used for large amounts fo data i.e. file 
uploads,
+# we don't want the data held in memory twice, and we don't want to
+# silence the error by setting raw_post_data = '' either.
+payload = "\r\n".join([
+'--boundary',
+'Content-Disposition: form-data; name="name"',
+'',
+'value',
+'--boundary--'
+''])
+request = WSGIRequest({'REQUEST_METHOD': 'POST',
+   'CONTENT_TYPE': 'multipart/form-data; 
boundary=boundary',
+   'CONTENT_LENGTH': len(payload),
+   'wsgi.input': StringIO(payload)})
+self.assertEqual(request.POST, {u'name': [u'value']})
+self.assertRaises(Exception, lambda: request.raw_post_data)
+
 def test_read_by_lines(self):
 request = WSGIRequest({'REQUEST_METHOD': 'POST', 'wsgi.input': 
StringIO('name=value')})
 self.assertEqual(list(request), ['name=value'])
+
+def test_POST_after_raw_post_data_read(self):
+"""
+POST should be populated even if raw_post_data is read first
+"""
+request = WSGIRequest({'REQUEST_METHOD': 'POST', 'wsgi.input': 
StringIO('name=value')})
+raw_data = request.raw_post_data
+self.assertEqual(request.POST, {u'name': [u'value']})
+
+def test_POST_after_raw_post_data_read_and_stream_read(self):
+"""
+POST should be populated even if raw_post_data is read first, and then
+the stream is read second.
+"""
+request = WSGIRequest({'REQUEST_METHOD': 'POST', 'wsgi.input': 
StringIO('name=value')})
+raw_data = request.raw_post_data
+self.assertEqual(request.read(1), u'n')
+self.assertEqual(request.POST, {u'name': [u'value']})
+
+def test_POST_after_raw_post_data_read_and_stream_read_multipart(self):
+"""
+POST should be populated even if raw_post_data is read first, and then
+the stream is read second. Using multipart/form-data instead of 
urlencoded.
+"""
+payload = "\r\n".join([
+'--boundary',
+'Content-Disposition: form-data; name="name"',
+'',
+'value',
+'--boundary--'
+''])

[Changeset] r15938 - in django/trunk: django/http tests/regressiontests/requests

2011-03-28 Thread noreply
Author: lukeplant
Date: 2011-03-28 09:11:40 -0700 (Mon, 28 Mar 2011)
New Revision: 15938

Modified:
   django/trunk/django/http/__init__.py
   django/trunk/tests/regressiontests/requests/tests.py
Log:
Fixed #15679 - regression in HttpRequest.POST and raw_post_data access.

Thanks to vkryachko for the report.

This also fixes a slight inconsistency with raw_post_data after parsing of a
multipart request, and adds a test for that.  (Previously accessing
raw_post_data would have returned the empty string rather than raising an
Exception).

Modified: django/trunk/django/http/__init__.py
===
--- django/trunk/django/http/__init__.py2011-03-28 14:22:48 UTC (rev 
15937)
+++ django/trunk/django/http/__init__.py2011-03-28 16:11:40 UTC (rev 
15938)
@@ -262,14 +262,18 @@
 if self.method != 'POST':
 self._post, self._files = QueryDict('', encoding=self._encoding), 
MultiValueDict()
 return
-if self._read_started:
+if self._read_started and not hasattr(self, '_raw_post_data'):
 self._mark_post_parse_error()
 return
 
 if self.META.get('CONTENT_TYPE', '').startswith('multipart'):
-self._raw_post_data = ''
+if hasattr(self, '_raw_post_data'):
+# Use already read data
+data = StringIO(self._raw_post_data)
+else:
+data = self
 try:
-self._post, self._files = self.parse_file_upload(self.META, 
self)
+self._post, self._files = self.parse_file_upload(self.META, 
data)
 except:
 # An error occured while parsing POST data.  Since when
 # formatting the error the request handler might access

Modified: django/trunk/tests/regressiontests/requests/tests.py
===
--- django/trunk/tests/regressiontests/requests/tests.py2011-03-28 
14:22:48 UTC (rev 15937)
+++ django/trunk/tests/regressiontests/requests/tests.py2011-03-28 
16:11:40 UTC (rev 15938)
@@ -179,6 +179,66 @@
 self.assertRaises(Exception, lambda: request.raw_post_data)
 self.assertEqual(request.POST, {})
 
+def test_raw_post_data_after_POST_multipart(self):
+"""
+Reading raw_post_data after parsing multipart is not allowed
+"""
+# Because multipart is used for large amounts fo data i.e. file 
uploads,
+# we don't want the data held in memory twice, and we don't want to
+# silence the error by setting raw_post_data = '' either.
+payload = "\r\n".join([
+'--boundary',
+'Content-Disposition: form-data; name="name"',
+'',
+'value',
+'--boundary--'
+''])
+request = WSGIRequest({'REQUEST_METHOD': 'POST',
+   'CONTENT_TYPE': 'multipart/form-data; 
boundary=boundary',
+   'CONTENT_LENGTH': len(payload),
+   'wsgi.input': StringIO(payload)})
+self.assertEqual(request.POST, {u'name': [u'value']})
+self.assertRaises(Exception, lambda: request.raw_post_data)
+
 def test_read_by_lines(self):
 request = WSGIRequest({'REQUEST_METHOD': 'POST', 'wsgi.input': 
StringIO('name=value')})
 self.assertEqual(list(request), ['name=value'])
+
+def test_POST_after_raw_post_data_read(self):
+"""
+POST should be populated even if raw_post_data is read first
+"""
+request = WSGIRequest({'REQUEST_METHOD': 'POST', 'wsgi.input': 
StringIO('name=value')})
+raw_data = request.raw_post_data
+self.assertEqual(request.POST, {u'name': [u'value']})
+
+def test_POST_after_raw_post_data_read_and_stream_read(self):
+"""
+POST should be populated even if raw_post_data is read first, and then
+the stream is read second.
+"""
+request = WSGIRequest({'REQUEST_METHOD': 'POST', 'wsgi.input': 
StringIO('name=value')})
+raw_data = request.raw_post_data
+self.assertEqual(request.read(1), u'n')
+self.assertEqual(request.POST, {u'name': [u'value']})
+
+def test_POST_after_raw_post_data_read_and_stream_read_multipart(self):
+"""
+POST should be populated even if raw_post_data is read first, and then
+the stream is read second. Using multipart/form-data instead of 
urlencoded.
+"""
+payload = "\r\n".join([
+'--boundary',
+'Content-Disposition: form-data; name="name"',
+'',
+'value',
+'--boundary--'
+''])
+request = WSGIRequest({'REQUEST_METHOD': 'POST',
+   'CONTENT_TYPE': 'multipart/form-data; 
boundary=boundary',
+

Re: [Django] #15683: the force_escpe filter should not call mark_safe

2011-03-28 Thread Django
#15683: the force_escpe filter should not call mark_safe
-+-
   Reporter:  tyrion |Owner:  marcosmoyano
 Status:  assigned   |Milestone:
  Component:  Template   |  Version:  1.3
  system | Keywords:  force_escape
 Resolution: |  mark_safe
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  0  |  Needs tests:  1
Patch needs improvement:  0  |
-+-
Changes (by marcosmoyano):

 * has_patch:  0 => 1
 * needs_tests:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15419: initial sql files need better warnings

2011-03-28 Thread Django
#15419: initial sql files need better warnings
-+-
   Reporter:  joel3000   |Owner:  marcosmoyano
 Status:  assigned   |Milestone:
  Component:  Database   |  Version:  1.2
  layer (models, ORM)| Keywords:  initial sql
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  1
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by marcosmoyano):

 * has_patch:  0 => 1
 * needs_tests:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10560: with SESSION_COOKIE_DOMAIN = '.localhost' cookie problem (development server)

2011-03-28 Thread Django
#10560: with SESSION_COOKIE_DOMAIN = '.localhost' cookie problem (development
server)
-+-
   Reporter: |Owner:  nobody
  sergey.kish@…  |Milestone:
 Status:  closed |  Version:  1.0
  Component:  HTTP   | Keywords:  cookie, localhost,
  handling   |  settings
 Resolution:  invalid|Has patch:  0
   Triage Stage: |  Needs tests:  0
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by anonymous):

 BTW, sorry if that was worded strongly. That was meant along the lines of
 "how things should functionaly be", not "what you should do for me." It's
 on my TODO list to supply a patch for this (both an addition to the doc
 and to raise an InvalidConfig exception when .localhost is given as a
 session- or csrf-cookie.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15070: url tag does not work within inclusion_tags when current_app is needed

2011-03-28 Thread Django
#15070: url tag does not work within inclusion_tags when current_app is needed
---+-
   Reporter:  raony|Owner:  bberes
 Status:  assigned |Milestone:
  Component:  Template system  |  Version:  SVN
 Resolution:   | Keywords:  easy-pickings
   Triage Stage:  Accepted |Has patch:  1
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+-

Comment (by mk):

 Refreshed patch for current SVN trunk.

 Only change: Made sure it applies correctly and added strip() calls so
 that the trailing newline in the newly added template does not cause test
 failures.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14091: PATCH: fix incorrect quoting in connection.queries for MySQL

2011-03-28 Thread Django
#14091: PATCH: fix incorrect quoting in connection.queries for MySQL
-+-
   Reporter:  danielr|Owner:  aaugustin
 Status:  new|Milestone:
  Component:  Database   |  Version:  1.2
  layer (models, ORM)| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  1
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by aaugustin):

 * owner:  nobody => aaugustin


Comment:

 #11209 reports the same problem; it was "fixed" in r10847 by a note in the
 docs.

 #8877 reports the same problem plus another case sensitivity problem; it
 was closed after the latter was considered invalid.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12581: connection.queries should use a ring buffer to avoid large memory consumption under runserver

2011-03-28 Thread Django
#12581: connection.queries should use a ring buffer to avoid large memory
consumption under runserver
-+-
   Reporter:  robhudson  |Owner:  nobody
 Status:  new|Milestone:
  Component:  Database   |  Version:
  layer (models, ORM)| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by aaugustin):

 This is a duplicate of #3711 (closed as wontfix) and #6734 (closed as
 duplicate).

 Since the ticket was accepted by a core dev, I won't close it, though.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14729: RawQuerySet.__repr__ fails when params passed as list

2011-03-28 Thread Django
#14729: RawQuerySet.__repr__ fails when params passed as list
-+-
   Reporter:  intgr  |Owner:  accuser
 Status:  assigned   |Milestone:  1.3
  Component:  Database   |  Version:  1.2
  layer (models, ORM)| Keywords:  raw query
 Resolution: |Has patch:  1
   Triage Stage:  Ready for  |  Needs tests:  0
  checkin|
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by mk):

 * version:  SVN => 1.2
 * stage:  Accepted => Ready for checkin


Comment:

 Still applies correctly and fixes the reported problem.

 Moving version back to 1.2 -- changing the version to SVN is not helpful
 because the field signifies since when a problem exists -- the fact that
 the ticket is still open already means that the problem still exists in
 SVN trunk.

 Thanks!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r15937 - django/trunk/django/db

2011-03-28 Thread noreply
Author: russellm
Date: 2011-03-28 07:22:48 -0700 (Mon, 28 Mar 2011)
New Revision: 15937

Modified:
   django/trunk/django/db/transaction.py
Log:
Fixed #15702 -- Corrected problem in test suite introduced by Python 2.4 
changes from r15927. Thanks to mk for the report and patch.

Modified: django/trunk/django/db/transaction.py
===
--- django/trunk/django/db/transaction.py   2011-03-28 14:20:15 UTC (rev 
15936)
+++ django/trunk/django/db/transaction.py   2011-03-28 14:22:48 UTC (rev 
15937)
@@ -208,7 +208,7 @@
 @wraps(func)
 def inner(*args, **kwargs):
 with self:
-func(*args, **kwargs)
+return func(*args, **kwargs)
 return inner
 
 def _transaction_func(entering, exiting, using):

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13647: Duplicated import of deepcopy in django.db.models.query

2011-03-28 Thread Django
#13647: Duplicated import of deepcopy in django.db.models.query
-+-
   Reporter:  DaNmarner  |Owner:  nobody
 Status:  closed |Milestone:
  Component:  Database   |  Version:  SVN
  layer (models, ORM)| Keywords:
 Resolution:  duplicate  |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by mk):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Duplicate of #14280

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r15936 - django/trunk/tests/regressiontests/utils

2011-03-28 Thread noreply
Author: russellm
Date: 2011-03-28 07:20:15 -0700 (Mon, 28 Mar 2011)
New Revision: 15936

Modified:
   django/trunk/tests/regressiontests/utils/datastructures.py
Log:
Fixed #15703 -- Corrected problem in test suite introduced by Python 2.4 
changes from r15927. Thanks to mk for the report and patch.

Modified: django/trunk/tests/regressiontests/utils/datastructures.py
===
--- django/trunk/tests/regressiontests/utils/datastructures.py  2011-03-28 
05:58:43 UTC (rev 15935)
+++ django/trunk/tests/regressiontests/utils/datastructures.py  2011-03-28 
14:20:15 UTC (rev 15936)
@@ -214,7 +214,7 @@
   ['Developer', 'Simon', 'Willison'])
 
 def test_copy(self):
-for copy_func in [copy, lambda d: d.copy()]:
+for copy_func in [copy.copy, lambda d: d.copy()]:
 d1 = MultiValueDict({
 "developers": ["Carl", "Fred"]
 })

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15703: Testsuite failure: django.utils.datastructures

2011-03-28 Thread Django
#15703: Testsuite failure: django.utils.datastructures
-+--
   Reporter:  mk |Owner:  nobody
 Status:  new|Milestone:
  Component:  Core framework |  Version:  SVN
 Resolution: | Keywords:
   Triage Stage:  Ready for checkin  |Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+--
Changes (by russellm):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11404: add has_changed() method to formsets

2011-03-28 Thread Django
#11404: add has_changed() method to formsets
-+---
   Reporter:  anonymous  |Owner:  nobody
 Status:  new|Milestone:
  Component:  Forms  |  Version:  1.0
 Resolution: | Keywords:  formset
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  1  |  Needs tests:  1
Patch needs improvement:  0  |
-+---
Changes (by mk):

 * needs_docs:  0 => 1
 * needs_tests:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #6953: ModelForm as_FOO output places form fields for ManyToMany fields at bottom of html output.

2011-03-28 Thread Django
#6953: ModelForm as_FOO output places form fields for ManyToMany fields at 
bottom
of html output.
---+
   Reporter:  brooks.travis@…  |Owner:  Alex
 Status:  new  |Milestone:
  Component:  Forms|  Version:  SVN
 Resolution:   | Keywords:
   Triage Stage:  Accepted |Has patch:  1
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+

Comment (by mk):

 Same patch updated for current trunk. Please test and move to ready for
 checkin if it works for you too.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #7425: change_form.html bodyclass block doesn't inherit

2011-03-28 Thread Django
#7425: change_form.html bodyclass block doesn't inherit
+--
   Reporter:  wiremine@…|Owner:  nobody
 Status:  new   |Milestone:
  Component:  django.contrib.admin  |  Version:  SVN
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  1
Needs documentation:  0 |  Needs tests:  1
Patch needs improvement:  1 |
+--
Changes (by mk):

 * needs_better_patch:  0 => 1
 * needs_tests:  0 => 1


Comment:

 This patch does does not contain any tests. Furthermore, other admin
 templates (change_list.html, user/change_password.html etc) do not insert
 block.super either.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15667: Implement template-based widget rendering

2011-03-28 Thread Django
#15667: Implement template-based widget rendering
+
   Reporter:  brutasse  |Owner:  brutasse
 Status:  new   |Milestone:  1.4
  Component:  Forms |  Version:
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+
Changes (by brutasse):

 * cc: brutasse (added)


Comment:

 Right, so I have a patch but it's too large for Trac :). I'll be using a
 github branch instead:

 https://github.com/brutasse/django/compare/15667-template-widgets

 All the regressiontest changes are whitespace-related, or changes in the
 widget attrs ordering (name="foo" value="bar" vs value="bar" name="foo").

 A few comments on the curent implementation:

 * !ClearableFileInput no longer has its 'template_with_initial' and
 'template_with_clear' arguments. This breaks a widget in the admin but I
 haven't started the admin widget migration yet. The question is whether
 this is supposed to be a public API or not.

 * The !RadioSelect "renderer" API should be deprecated. I left it
 unchanged (although I added !PendingDeprecationWarnings), it still works
 but it's not doing any template-based rendering. The templates give us
 enough flexibility so I'm in favor of starting its deprecation.

 * I added a template loader that is added to the list of loaders, this way
 the templates are always available and they can be overridden in project-
 or app-provided templates. Template caching works as expected, the cached
 loader also caches the forms templates.

 * I chose to explicitly add the input's "name" and "type" to the template
 context instead of leaving it in the "attrs" dictionary. I like it this
 way but I can put it back in the attrs if we decide to.

 TODO:

 * Topic documentation and widget reference (I'll make a draft but I
 '''will''' need help here :)

 * Convert the admin widgets

 * Add tests for the new widgets API (make sure altering template_name,
 get_context_data and get_context work as expected)

 I'll keep reporting my progress here and will update my branch on github.
 As always, comments welcome :)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11283: latest() doesn't clear previous ordering

2011-03-28 Thread Django
#11283: latest() doesn't clear previous ordering
-+-
   Reporter:  benmoran   |Owner:  nobody
 Status:  new|Milestone:
  Component:  Database   |  Version:
  layer (models, ORM)| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by mk):

 Same patch updated for current trunk. Please test and move to ready for
 checkin if it works for you too.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10993: get_or_create should throw an exception if no lookup parameters are given

2011-03-28 Thread Django
#10993: get_or_create should throw an exception if no lookup parameters are 
given
-+-
   Reporter:  gasull2|Owner:  szczav
 Status:  new|Milestone:
  Component:  Database   |  Version:  1.0
  layer (models, ORM)| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Design |  Needs tests:  0
  decision needed|
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by mk):

 * stage:  Accepted => Design decision needed


Comment:

 I'd argue that isn't a bug. Article.objects.get() does exactly the same
 thing. It's quite useful to call get() with no parameters from time to
 time, especially if the queryset has already been filtered before. The
 same could be said for get_or_create().

 Marking as design decision needed even though Alex moved it to Accepted
 earlier. I think this issue could be a bit more controversial in the light
 of consistence between get() and get_or_create()

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #9961: select_related(depth=0) should be a no-op

2011-03-28 Thread Django
#9961: select_related(depth=0) should be a no-op
-+-
   Reporter:  rdaysky|Owner:  nobody
 Status:  new|Milestone:
  Component:  Database   |  Version:  1.0
  layer (models, ORM)| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
-+-
Changes (by mk):

 * needs_better_patch:  0 => 1


Comment:

 Patch rot; does not apply anymore unfortunately. Marking as needs
 improvement again :-(

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2016: [patch] Decorator for template tags that load objects

2011-03-28 Thread Django
#2016: [patch] Decorator for template tags that load objects
---+--
   Reporter:  jason@…  |Owner:  nobody
 Status:  closed   |Milestone:
  Component:  Template system  |  Version:
 Resolution:  fixed| Keywords:
   Triage Stage:  Accepted |Has patch:  1
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+--
Changes (by mk):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 Let's be bold and close this ticket. @simple_tag has a takes_context
 parameter now making this ticket obsolete.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15673: Allow limit_choices_to to use a tuple for __in filters

2011-03-28 Thread Django
#15673: Allow limit_choices_to to use a tuple for __in filters
+--
   Reporter:  EnTeQuAk  |Owner:  nobody
 Status:  new   |Milestone:
  Component:  django.contrib.admin  |  Version:  SVN
 Resolution:| Keywords:
   Triage Stage:  Ready for checkin |Has patch:  1
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+--
Changes (by mk):

 * component:  Uncategorized => django.contrib.admin
 * stage:  Unreviewed => Ready for checkin


Comment:

 I think this makes lots of sense. The patch fixes the problem and provides
 a testcase for it. (Applied & ran the testsuite)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15658: reverse returns '//' for flatpage with URL '/'

2011-03-28 Thread Django
#15658: reverse returns '//' for flatpage with URL '/'
+-
   Reporter:  Fladi |Owner:  nobody
 Status:  new   |Milestone:
  Component:  Contrib apps  |  Version:  1.2
 Resolution:| Keywords:  flatpages
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+-
Changes (by mk):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * component:  Uncategorized => Contrib apps
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 I can confirm this is a real issue.

 Btw, this issue is the reason why most CMS applications use two URLconf
 entries for reversing; in the case of FeinCMS feincms_home (r'^$') and
 feincms_handler (r'^(.*)/$')

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15703: Testsuite failure: django.utils.datastructures

2011-03-28 Thread Django
#15703: Testsuite failure: django.utils.datastructures
+---
 Reporter:  mk  | Owner:  nobody
   Status:  new | Milestone:
Component:  Core framework  |   Version:  SVN
 Keywords:  |  Triage Stage:  Unreviewed
Has patch:  0   |
+---
 The test in tests/regressiontests/utils/datastructures fails since
 yesterday with the following error:

 {{{
 ==
 ERROR: test_copy
 (regressiontests.utils.datastructures.MultiValueDictTests)
 --
 Traceback (most recent call last):
   File
 "/Users/mk/Projects/django/tests/regressiontests/utils/datastructures.py",
 line 222, in test_copy
 d2 = copy_func(d1)
 TypeError: 'module' object is not callable
 }}}

 The testsuite is easily fixed by the following patch:

 {{{
 diff --git a/tests/regressiontests/utils/datastructures.py
 b/tests/regressiontests/utils/datastructures.py
 index 6ae652c..3ef1342 100644
 --- a/tests/regressiontests/utils/datastructures.py
 +++ b/tests/regressiontests/utils/datastructures.py
 @@ -214,7 +214,7 @@ class MultiValueDictTests(DatastructuresTestCase):
['Developer', 'Simon', 'Willison'])

  def test_copy(self):
 -for copy_func in [copy, lambda d: d.copy()]:
 +for copy_func in [copy.copy, lambda d: d.copy()]:
  d1 = MultiValueDict({
  "developers": ["Carl", "Fred"]
  })
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15694: Overriding Django admin views and nested transactions

2011-03-28 Thread Django
#15694: Overriding Django admin views and nested transactions
--+--
   Reporter:  etianen |Owner:  nobody
 Status:  new |Milestone:
  Component:  django.contrib.admin|  Version:  1.2
 Resolution:  | Keywords:
   Triage Stage:  Design decision needed  |Has patch:  0
Needs documentation:  1   |  Needs tests:  1
Patch needs improvement:  0   |
--+--
Changes (by mk):

 * needs_better_patch:   => 0
 * needs_docs:   => 1
 * needs_tests:   => 1
 * stage:  Unreviewed => Design decision needed


Comment:

 I think that's a good idea.

 However, if this was accepted it still needs tests, documentation and
 probably a note in the BackwardsIncompatibleChanges page.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15702: Drop 2.4 compatibility boilerplate code

2011-03-28 Thread Django
#15702: Drop 2.4 compatibility boilerplate code
-+--
   Reporter:  jonash |Owner:  nobody
 Status:  reopened   |Milestone:
  Component:  Core framework |  Version:  SVN
 Resolution: | Keywords:  2.4
   Triage Stage:  Ready for checkin  |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+--

Comment (by mk):

 Sorry for the comment spam -- patch is already attached; the patch by
 jonash contains the return statement, the committed version does not.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15702: Drop 2.4 compatibility boilerplate code

2011-03-28 Thread Django
#15702: Drop 2.4 compatibility boilerplate code
-+--
   Reporter:  jonash |Owner:  nobody
 Status:  reopened   |Milestone:
  Component:  Core framework |  Version:  SVN
 Resolution: | Keywords:  2.4
   Triage Stage:  Ready for checkin  |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+--
Changes (by mk):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


Comment:

 Not adding a test either -- the current test suite is sufficient for
 testing this particular piece of code. And it fails with current SVN
 trunk.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15702: Drop 2.4 compatibility boilerplate code

2011-03-28 Thread Django
#15702: Drop 2.4 compatibility boilerplate code
--+--
   Reporter:  jonash  |Owner:  nobody
 Status:  reopened|Milestone:
  Component:  Core framework  |  Version:  SVN
 Resolution:  | Keywords:  2.4
   Triage Stage:  Accepted|Has patch:  1
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  1   |
--+--
Changes (by mk):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 There is a grave bug since r15927 in Django: The decorator in
 django/db/transaction.py is missing a return statement, which causes
 testsuites and everything decorated with any transaction decorator to
 fail, f.e. with a 'NoneType' object has no attribute 'set_cookie' error.

 The fix is so simple that I won't attach a patch for it:

 {{{
 diff --git a/django/db/transaction.py b/django/db/transaction.py
 index cf7350c..6cbe39f 100644
 --- a/django/db/transaction.py
 +++ b/django/db/transaction.py
 @@ -207,7 +207,7 @@ class Transaction(object):
  @wraps(func)
  def inner(*args, **kwargs):
  with self:
 -func(*args, **kwargs)
 +return func(*args, **kwargs)
  return inner

  def _transaction_func(entering, exiting, using):
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.