Re: [Django] #13258: Writing your first Django app, part 4, urls.py

2010-03-31 Thread Django
#13258: Writing your first Django app, part 4, urls.py
+---
  Reporter:  julyzerg...@gmail.com  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution:  wontfix|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * milestone:  1.2 =>
  * needs_docs:  => 0
  * resolution:  => wontfix

Comment:

 The existing example is correct, it is significantly simpler, and it
 highlights some important consistency issues introduced by the use of
 generic views.

 Given that this ticket doesn't contain any description of *why* these
 changes are required, I'm closing wontfix.

-- 
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-upda...@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] #13258: Writing your first Django app, part 4, urls.py

2010-03-31 Thread Django
#13258: Writing your first Django app, part 4, urls.py
---+
 Reporter:  julyzerg...@gmail.com  |   Owner:  nobody
   Status:  new|   Milestone:  1.2   
Component:  Documentation  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 maybe the urls.py should be like this at last.
 {{{
 from django.conf.urls.defaults import *
 from mysite.polls.models import Poll

 info_dict = {
 'queryset': Poll.objects.all(),
 }

 urlpatterns = patterns('',
 url(r'^$', 'django.views.generic.list_detail.object_list',
 dict(info_dict, template_object_name='latest_poll',
 template_name='polls/index.html')),

 url(r'^(?P\d+)/$',
 'django.views.generic.list_detail.object_detail', dict(info_dict,
 template_object_name='poll', template_name='polls/detail.html')),

 url(r'^(?P\d+)/results/$',
 'django.views.generic.list_detail.object_detail', dict(info_dict,
 template_object_name='poll', template_name='polls/results.html'),
 'poll_results'),

 (r'^(?P\d+)/vote/$', 'mysite.polls.views.vote'),
 )
 }}}

-- 
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-upda...@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] #12446: multipart/mixed in multipart/form-data

2010-03-31 Thread Django
#12446: multipart/mixed in multipart/form-data
---+
  Reporter:    | Owner:  nobody 
Status:  new   | Milestone: 
 Component:  File uploads/storage  |   Version:  1.1
Resolution:|  Keywords:  multipart/mixed
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 #13255 notes Chrome also supports multiple-file upload.

-- 
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-upda...@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] #13255: HTML5 Multiple File upload support

2010-03-31 Thread Django
#13255: HTML5 Multiple File upload support
-+--
  Reporter:  Ciantic | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Forms   |   Version:
Resolution:  duplicate   |  Keywords:  html5 
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by kmtracey):

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

Comment:

 Duplicate of #12446.

-- 
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-upda...@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] #13082: Oracle-specific test_long_string backends regression test has a bug

2010-03-31 Thread Django
#13082: Oracle-specific test_long_string backends regression test has a bug
---+
  Reporter:  stvsmth   | Owner:  nobody 
  
Status:  new   | Milestone:  1.2
  
 Component:  Database layer (models, ORM)  |   Version:  1.1
  
Resolution:|  Keywords:  regression 
backends oracle clob nclob
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * summary:  Backends test_long_string regression test has a bug =>
  Oracle-specific test_long_string backends
  regression test has a bug

-- 
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-upda...@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] #13257: label_tag syntax check should also check for blank fields and show no syntax

2010-03-31 Thread Django
#13257: label_tag syntax check should also check for blank fields and show no
syntax
---+
  Reporter:  jkatzer   | Owner:  nobody   
Status:  new   | Milestone:  1.2  
 Component:  django.contrib.admin  |   Version:  SVN  
Resolution:|  Keywords:  label_tag
 Stage:  Unreviewed| Has_patch:  1
Needs_docs:  0 |   Needs_tests:  1
Needs_better_patch:  0 |  
---+
Changes (by jkatzer):

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

Comment:

 ok this new patch is really hacky, but it gets the job done for me

-- 
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-upda...@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] #13257: label_tag syntax check should also check for blank fields and show no syntax

2010-03-31 Thread Django
#13257: label_tag syntax check should also check for blank fields and show no
syntax
---+
  Reporter:  jkatzer   | Owner:  nobody   
Status:  new   | Milestone:  1.2  
 Component:  django.contrib.admin  |   Version:  SVN  
Resolution:|  Keywords:  label_tag
 Stage:  Unreviewed| Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by jkatzer):

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

Comment:

 disregard the patch... that code does not run unless label_syntax is used
 (which i assumed admin used)

-- 
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-upda...@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] #13091: admin list_editable with unique_together raises Integrity Error

2010-03-31 Thread Django
#13091: admin list_editable with unique_together raises Integrity Error
-+--
  Reporter:  slafs   | Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  django.contrib.admin|   Version:  SVN  
   
Resolution:  |  Keywords:  list_editable 
unique_together IntegrityError
 Stage:  Design decision needed  | Has_patch:  0
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Changes (by orokusaki):

 * cc: orokusaki (added)

Comment:

 Replying to [comment:1 kmtracey]:
 > Possibly the unique validation code could be changed to use existing
 instance values, if present, for excluded fields instead of simply
 dropping them from consideration. Not sure why it doesn't do that already.

 I've mentioned this in my ticket with another example of where it'd be
 helpful: 13249 I might open a new ticket requesting this specific feature
 of excluding only if not present.

-- 
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-upda...@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] #13257: label_tag syntax check should also check for blank fields and show no syntax

2010-03-31 Thread Django
#13257: label_tag syntax check should also check for blank fields and show no
syntax
---+
  Reporter:  jkatzer   | Owner:  nobody   
Status:  new   | Milestone:  1.2  
 Component:  django.contrib.admin  |   Version:  SVN  
Resolution:|  Keywords:  label_tag
 Stage:  Unreviewed| Has_patch:  1
Needs_docs:  0 |   Needs_tests:  1
Needs_better_patch:  0 |  
---+
Changes (by jkatzer):

  * needs_better_patch:  => 0
  * needs_tests:  => 1
  * 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-upda...@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] #13257: label_tag syntax check should also check for blank fields and show no syntax

2010-03-31 Thread Django
#13257: label_tag syntax check should also check for blank fields and show no
syntax
--+-
 Reporter:  jkatzer   |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:  label_tag |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 if for some reason you would like a field in the admin to have a blank
 label, such as for an extra address field, the admin should not punctuate
 your empty field with syntax.

 yes, i know you might just call that field address2 or anything else, but
 its your admin and you should be able to do whatever you feel with it.
 also, this makes sense for the front end form generation, which is where
 the change needs to be made.

 i was trying to do the simple thing by just hacking the template (since
 this is just presentation after all), but then i found the line that would
 need to be changed and thought it was worth proposing here...

 diff attached...

-- 
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-upda...@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] #13233: readonly_fields doesn't work with fields not part of the model

2010-03-31 Thread Django
#13233: readonly_fields doesn't work with fields not part of the model
---+
  Reporter:  benc  | Owner:  nobody 
   
Status:  closed| Milestone: 
   
 Component:  django.contrib.admin  |   Version:  1.2-beta   
   
Resolution:  worksforme|  Keywords:  admin, 
readonly_fields
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 Using r12896, I can't reproduce. The admin definition you provide works
 fine for me, displaying a single readonly row when editing instance of
 MyModel.

-- 
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-upda...@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] #13256: OGRGeometry equals throws exception when compared to None

2010-03-31 Thread Django
#13256: OGRGeometry equals throws exception when compared to None
+---
 Reporter:  ninowalker  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  GIS | Version:  1.1   
 Keywords:  GDAL|   Stage:  Unreviewed
Has_patch:  0   |  
+---
 The following generates an exception:

 {{{
 >>> from django.contrib.gis.gdal import OGRGeometry
 >>> geom = OGRGeometry("POINT(0 0)")
 >>> if geom == None:
 ...print 1
 ...
 Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/local/lib/python2.6/site-
 packages/Django-1.1.1-py2.6.egg/django/contrib/gis/gdal/geometries.py",
 line 166, in __eq__
 return self.equals(other)
   File "/usr/local/lib/python2.6/site-
 packages/Django-1.1.1-py2.6.egg/django/contrib/gis/gdal/geometries.py",
 line 397, in equals
 return self._topology(capi.ogr_equals, other)
   File "/usr/local/lib/python2.6/site-
 packages/Django-1.1.1-py2.6.egg/django/contrib/gis/gdal/geometries.py",
 line 385, in _topology
 raise TypeError('Must use another OGRGeometry object for topology
 operations!')
 TypeError: Must use another OGRGeometry object for topology operations!
 }}}

 Equals (and other predicate methods), should probably test for None before
 dispatching to the C bindings.  No?

-- 
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-upda...@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] #13249: Feature request: ModelForm validation error handling after commit=False

2010-03-31 Thread Django
#13249: Feature request: ModelForm validation error handling after commit=False
-+--
  Reporter:  orokusaki   | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Forms   |   Version:  SVN   
Resolution:  wontfix |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by orokusaki):

 @Russellm

 There's still one problem with doing what you did above.

 Thanks for the code snippet BTW first of all. I ended up using {{{
 form.instance.account = request.account }}} before my call to {{{
 form.is_valid() }}}, but in the case of adding data to an instance or a
 form during all of this is usually due to the fact that the field is not
 included in the form because of {{{editable=False}}} on the model or
 {{{exclude=('field',)}}} in the form. When this is the case the fields
 that are excluded still don't go through validation with {{{
 form.is_valid() }}}. Is it reasonable to request the addition of either
 '''(A)''' If a field's value is set via {{{ form.instance.account =
 request.account }}}, then it is included in validation again, or '''(B)'''
 A way to add the field back into validation again manually such as {{{
 form.include_in_validation = 'account' }}}.

 If you'd like, I can create a new ticket, or is it relevant enough to this
 ticket, or do you think it's even worth the time for what I mentioned?

-- 
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-upda...@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] #13248: manage.py sqlsequencereset misses m2m tables

2010-03-31 Thread Django
#13248: manage.py sqlsequencereset misses m2m tables
---+
  Reporter:  EroSennin | Owner:  
gabrielhurley
Status:  assigned  | Milestone:  1.2
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords: 
  
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  0 |  
---+
Changes (by gabrielhurley):

  * owner:  nobody => gabrielhurley
  * status:  new => assigned
  * has_patch:  0 => 1
  * needs_tests:  0 => 1

Comment:

 I've attached a patch which causes the auto-created models to be reset as
 they should, but for the life of me I can't figure out how to write a
 regression test for this...

 If anyone has a bright idea on how to test without comparing SQL line-for-
 line (which will vary by backend) let me know.

-- 
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-upda...@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] #10427: Bound field needs an easy way to get form value

2010-03-31 Thread Django
#10427: Bound field needs an easy way to get form value
---+
  Reporter:  toxik | Owner:  nobody  
Status:  reopened  | Milestone:  
 Component:  Forms |   Version:  SVN 
Resolution:|  Keywords:  form field value
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

 * cc: kmik...@gmail.com (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-upda...@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] #13167: Non-existent arg passed to template filter raises VariableDoesNotExist

2010-03-31 Thread Django
#13167: Non-existent arg passed to template filter raises VariableDoesNotExist
-+--
  Reporter:  copelco | Owner:  nobody
Status:  new | Milestone:  1.2   
 Component:  Template system |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by gabrielhurley):

  * has_patch:  0 => 1

Comment:

 The "has patch" box never got checked. Just doing a little cleanup...

-- 
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-upda...@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] r12899 - django/branches/releases/1.1.X/django/contrib/gis/geos

2010-03-31 Thread noreply
Author: jbronn
Date: 2010-03-31 13:58:19 -0500 (Wed, 31 Mar 2010)
New Revision: 12899

Modified:
   django/branches/releases/1.1.X/django/contrib/gis/geos/geometry.py
Log:
[1.1.X] No longer use the deprecated GEOS C API function `GEOSGeomFromWKB_buf` 
when unpickling `GEOSGeometry` objects.

Backport of r12898 from trunk.


Modified: django/branches/releases/1.1.X/django/contrib/gis/geos/geometry.py
===
--- django/branches/releases/1.1.X/django/contrib/gis/geos/geometry.py  
2010-03-31 18:55:52 UTC (rev 12898)
+++ django/branches/releases/1.1.X/django/contrib/gis/geos/geometry.py  
2010-03-31 18:58:19 UTC (rev 12899)
@@ -142,7 +142,7 @@
 def __setstate__(self, state):
 # Instantiating from the tuple state that was pickled.
 wkb, srid = state
-ptr = capi.from_wkb(wkb, len(wkb))
+ptr = wkb_r.read(buffer(wkb))
 if not ptr: raise GEOSException('Invalid Geometry loaded from pickled 
state.')
 self.ptr = ptr
 self._post_init(srid)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] r12898 - django/trunk/django/contrib/gis/geos

2010-03-31 Thread noreply
Author: jbronn
Date: 2010-03-31 13:55:52 -0500 (Wed, 31 Mar 2010)
New Revision: 12898

Modified:
   django/trunk/django/contrib/gis/geos/geometry.py
Log:
No longer use the deprecated GEOS C API function `GEOSGeomFromWKB_buf` when 
unpickling `GEOSGeometry` objects.


Modified: django/trunk/django/contrib/gis/geos/geometry.py
===
--- django/trunk/django/contrib/gis/geos/geometry.py2010-03-31 13:51:20 UTC 
(rev 12897)
+++ django/trunk/django/contrib/gis/geos/geometry.py2010-03-31 18:55:52 UTC 
(rev 12898)
@@ -143,7 +143,7 @@
 def __setstate__(self, state):
 # Instantiating from the tuple state that was pickled.
 wkb, srid = state
-ptr = capi.from_wkb(wkb, len(wkb))
+ptr = wkb_r().read(buffer(wkb))
 if not ptr: raise GEOSException('Invalid Geometry loaded from pickled 
state.')
 self.ptr = ptr
 self._post_init(srid)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] #11707: limit_choices_to on a ForeignKey can render duplicate options in formfield

2010-03-31 Thread Django
#11707: limit_choices_to on a ForeignKey can render duplicate options in 
formfield
-+--
  Reporter:  chris.wessel...@cwi.nl  | Owner:  nobody   
  
Status:  new | Milestone:   
  
 Component:  Forms   |   Version:  SVN  
  
Resolution:  |  Keywords:  ForeingKey 
limit_choices_to
 Stage:  Ready for checkin   | Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  0   |  
-+--
Comment (by SmileyChris):

 The [http://code.djangoproject.com/wiki/Version1.2Roadmap 1.2 roadmap]
 shows that we're in a feature freeze. I'd suggest bringing this up on the
 django-dev google group a week or so after 1.2 final is released.

-- 
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-upda...@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] #9460: Template blocks for submit buttons in admin's change view

2010-03-31 Thread Django
#9460: Template blocks for submit buttons in admin's change view
---+
  Reporter:  kosmik| Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  django.contrib.admin  |   Version:  SVN
 
Resolution:|  Keywords:  admin, submit, 
buttons, template
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by Ciantic):

 * cc: cian...@mbnet.fi (removed)
 * cc: Ciantic (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-upda...@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] #13255: HTML5 Multiple File upload support

2010-03-31 Thread Django
#13255: HTML5 Multiple File upload support
-+--
 Reporter:  Ciantic  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Forms| Version:
 Keywords:  html5|   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Django backend does not support multiple file field in HTML5, currently
 implemented by Chrome.

 Here is excerpt of HTML5 how it is done:
 {{{
 
   
   
 
 }}}

 I have not tested what happens in Django when using above, but
 nevertheless there should be new ''form fields'' and ''model fields'' for
 this.

 More details see [http://rakaz.nl/2009/08/uploading-multiple-files-using-
 html5.html blog post uploading multiple files using html5] and
 [http://www.w3.org/TR/html5/forms.html#file-upload-state W3 File Upload
 State].

-- 
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-upda...@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] #13233: readonly_fields doesn't work with fields not part of the model

2010-03-31 Thread Django
#13233: readonly_fields doesn't work with fields not part of the model
---+
  Reporter:  benc  | Owner:  nobody 
   
Status:  reopened  | Milestone: 
   
 Component:  django.contrib.admin  |   Version:  1.2-beta   
   
Resolution:|  Keywords:  admin, 
readonly_fields
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by benc):

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

Comment:

 Using an attribute or callable on MyModelAdmin or MyModel doesn't work.

 I'm getting:

 {{{
 'MyModelAdmin.fieldsets[0][1]['fields']' refers to field 'somefield' that
 is missing from the form.
 }}}

 I think that list_display implements special functionality to use an
 attribute or callable that is missing from readonly_fields.


 {{{
 class MyModelAdminForm(forms.ModelForm):
 class Meta:
 model = MyModel

 class MyModelAdmin(admin.ModelAdmin):
 form = MyModelAdminForm
 readonly_fields = ('somefield',)

 def somefield(self, obj):
 return 'somefield test'

 fieldsets = (
 (None, {
 'fields': ('somefield',)
 })
 )

-- 
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-upda...@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] #5908: Cycle tag should reset after it steps out of scope(?)

2010-03-31 Thread Django
#5908: Cycle tag should reset after it steps out of scope(?)
--+-
  Reporter:  Simon Litchfield   | Owner:  
nobody  
Status:  new  | Milestone:  

 Component:  Template system  |   Version:  SVN 

Resolution:   |  Keywords:  
cycle templatetag tag counter for loop reset
 Stage:  Accepted | Has_patch:  1   

Needs_docs:  0|   Needs_tests:  0   

Needs_better_patch:  0|  
--+-
Changes (by vbmendes):

 * cc: vbmen...@gmail.com (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-upda...@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] r12897 - in django/branches/releases/1.1.X: django/db/models/sql tests/regressiontests/aggregation_regress

2010-03-31 Thread noreply
Author: russellm
Date: 2010-03-31 08:51:20 -0500 (Wed, 31 Mar 2010)
New Revision: 12897

Modified:
   django/branches/releases/1.1.X/django/db/models/sql/query.py
   
django/branches/releases/1.1.X/tests/regressiontests/aggregation_regress/tests.py
Log:
[1.1.X] Fixed #11916 -- Corrected handling of aggregation when there is a 
subquery provided in an extra(select=) clause. Thanks to jaklaas...@gmail.com 
for the report, and to tobias, paluh, Karen Tracey and Ian Kelly for their work 
on the fix.

Backport of r12896 from trunk.

Modified: django/branches/releases/1.1.X/django/db/models/sql/query.py
===
--- django/branches/releases/1.1.X/django/db/models/sql/query.py
2010-03-31 13:43:22 UTC (rev 12896)
+++ django/branches/releases/1.1.X/django/db/models/sql/query.py
2010-03-31 13:51:20 UTC (rev 12897)
@@ -875,7 +875,7 @@
 elif hasattr(col, 'as_sql'):
 result.append(col.as_sql(qn))
 else:
-result.append(str(col))
+result.append('(%s)' % str(col))
 return result, params
 
 def get_ordering(self):

Modified: 
django/branches/releases/1.1.X/tests/regressiontests/aggregation_regress/tests.py
===
--- 
django/branches/releases/1.1.X/tests/regressiontests/aggregation_regress/tests.py
   2010-03-31 13:43:22 UTC (rev 12896)
+++ 
django/branches/releases/1.1.X/tests/regressiontests/aggregation_regress/tests.py
   2010-03-31 13:51:20 UTC (rev 12897)
@@ -1,5 +1,6 @@
+from django.conf import settings
 from django.test import TestCase
-from django.db.models import Max
+from django.db.models import Count, Max
 
 from regressiontests.aggregation_regress.models import *
 
@@ -13,7 +14,7 @@
 
 Tests that the subselect works and returns results equivalent to a
 query with the IDs listed.
-
+
 Before the corresponding fix for this bug, this test passed in 1.1 and
 failed in 1.2-beta (trunk).
 """
@@ -33,7 +34,7 @@
 
 Same as the above test, but evaluates the queryset for the subquery
 before it's used as a subquery.
-
+
 Before the corresponding fix for this bug, this test failed in both
 1.1 and 1.2-beta (trunk).
 """
@@ -46,3 +47,25 @@
 qs1 = books.filter(id__in=qs)
 qs2 = books.filter(id__in=list(qs))
 self.assertEqual(list(qs1), list(qs2))
+
+if settings.DATABASE_ENGINE != 'oracle':
+def test_annotate_with_extra(self):
+"""
+Regression test for #11916: Extra params + aggregation creates
+incorrect SQL.
+"""
+#oracle doesn't support subqueries in group by clause
+shortest_book_sql = """
+SELECT name
+FROM aggregation_regress_book b
+WHERE b.publisher_id = aggregation_regress_publisher.id
+ORDER BY b.pages
+LIMIT 1
+"""
+# tests that this query does not raise a DatabaseError due to the 
full
+# subselect being (erroneously) added to the GROUP BY parameters
+qs = Publisher.objects.extra(select={
+'name_of_shortest_book': shortest_book_sql,
+}).annotate(total_books=Count('book'))
+# force execution of the query
+list(qs)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] r12896 - in django/trunk: django/db/models/sql tests/regressiontests/aggregation_regress

2010-03-31 Thread noreply
Author: russellm
Date: 2010-03-31 08:43:22 -0500 (Wed, 31 Mar 2010)
New Revision: 12896

Modified:
   django/trunk/django/db/models/sql/compiler.py
   django/trunk/tests/regressiontests/aggregation_regress/tests.py
Log:
Fixed #11916 -- Corrected handling of aggregation when there is a subquery 
provided in an extra(select=) clause. Thanks to jaklaas...@gmail.com for the 
report, and to tobias, paluh, Karen Tracey and Ian Kelly for their work on the 
fix.

Modified: django/trunk/django/db/models/sql/compiler.py
===
--- django/trunk/django/db/models/sql/compiler.py   2010-03-31 12:33:10 UTC 
(rev 12895)
+++ django/trunk/django/db/models/sql/compiler.py   2010-03-31 13:43:22 UTC 
(rev 12896)
@@ -484,7 +484,7 @@
 elif hasattr(col, 'as_sql'):
 result.append(col.as_sql(qn))
 else:
-result.append(str(col))
+result.append('(%s)' % str(col))
 return result, params
 
 def fill_related_selections(self, opts=None, root_alias=None, cur_depth=1,

Modified: django/trunk/tests/regressiontests/aggregation_regress/tests.py
===
--- django/trunk/tests/regressiontests/aggregation_regress/tests.py 
2010-03-31 12:33:10 UTC (rev 12895)
+++ django/trunk/tests/regressiontests/aggregation_regress/tests.py 
2010-03-31 13:43:22 UTC (rev 12896)
@@ -1,5 +1,7 @@
+from django.conf import settings
 from django.test import TestCase
-from django.db.models import Max
+from django.db import DEFAULT_DB_ALIAS
+from django.db.models import Count, Max
 
 from regressiontests.aggregation_regress.models import *
 
@@ -13,7 +15,7 @@
 
 Tests that the subselect works and returns results equivalent to a
 query with the IDs listed.
-
+
 Before the corresponding fix for this bug, this test passed in 1.1 and
 failed in 1.2-beta (trunk).
 """
@@ -33,7 +35,7 @@
 
 Same as the above test, but evaluates the queryset for the subquery
 before it's used as a subquery.
-
+
 Before the corresponding fix for this bug, this test failed in both
 1.1 and 1.2-beta (trunk).
 """
@@ -46,3 +48,25 @@
 qs1 = books.filter(id__in=qs)
 qs2 = books.filter(id__in=list(qs))
 self.assertEqual(list(qs1), list(qs2))
+
+if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] != 
'django.db.backends.oracle':
+def test_annotate_with_extra(self):
+"""
+Regression test for #11916: Extra params + aggregation creates
+incorrect SQL.
+"""
+#oracle doesn't support subqueries in group by clause
+shortest_book_sql = """
+SELECT name
+FROM aggregation_regress_book b
+WHERE b.publisher_id = aggregation_regress_publisher.id
+ORDER BY b.pages
+LIMIT 1
+"""
+# tests that this query does not raise a DatabaseError due to the 
full
+# subselect being (erroneously) added to the GROUP BY parameters
+qs = Publisher.objects.extra(select={
+'name_of_shortest_book': shortest_book_sql,
+}).annotate(total_books=Count('book'))
+# force execution of the query
+list(qs)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] #13254: TemplateSyntaxError at /password_reset/

2010-03-31 Thread Django
#13254: TemplateSyntaxError at /password_reset/
---+
  Reporter:  anonymous | Owner:  nobody  
Status:  closed| Milestone:  1.2 
 Component:  django.contrib.admin  |   Version:  1.2-beta
Resolution:  duplicate |  Keywords:  
 Stage:  Unreviewed| Has_patch:  0   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 This report is seriously confusing (most notably, what is Django Version
 1.2 beta 1 SVN-7?), but as far as I can work out, this is a duplicate of
 #12945, which was fixed in r12889.

 If you're getting this on a current SVN checkout, please provide the
 *exact* revision, and what you are doing to invoke this error.

-- 
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-upda...@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] #13254: TemplateSyntaxError at /password_reset/

2010-03-31 Thread Django
#13254: TemplateSyntaxError at /password_reset/
--+-
 Reporter:  anonymous |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  django.contrib.admin  | Version:  1.2-beta  
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 {{{
 Django Version: 1.2 beta 1 SVN-7
 Exception Type: TemplateSyntaxError
 Exception Value:Malformed arguments to url tag

 In template
 
\home\dev\src\django\contrib\admin\templates\registration\password_reset_email.html,
 error at line 7

 {{ protocol }}://{{ domain }}{% url
 django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token
 %}
 }}}

-- 
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-upda...@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] #13207: Unlock http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser

2010-03-31 Thread Django
#13207: Unlock http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
--+-
  Reporter:  Beuc | Owner:  nobody
Status:  reopened | Milestone:
 Component:  Django Web site  |   Version:
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by Beuc):

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

Comment:

 Would you like to elaborate some more about that on the wiki page, and
 explain in what context it's ok to use the thread-locals approach (such as
 in Django i18n)?
 Education is good.

-- 
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-upda...@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] r12895 - in django/trunk: django/contrib/contenttypes django/db/models/fields tests/regressiontests/multiple_database

2010-03-31 Thread noreply
Author: russellm
Date: 2010-03-31 07:33:10 -0500 (Wed, 31 Mar 2010)
New Revision: 12895

Modified:
   django/trunk/django/contrib/contenttypes/generic.py
   django/trunk/django/db/models/fields/related.py
   django/trunk/tests/regressiontests/multiple_database/tests.py
Log:
Fixed #13250 -- Corrected a problem with the use of routing rules on the 
create() call on a Foreign Key. Thanks to ch...@xlevus.net for the report.

Modified: django/trunk/django/contrib/contenttypes/generic.py
===
--- django/trunk/django/contrib/contenttypes/generic.py 2010-03-31 11:34:32 UTC 
(rev 12894)
+++ django/trunk/django/contrib/contenttypes/generic.py 2010-03-31 12:33:10 UTC 
(rev 12895)
@@ -5,7 +5,7 @@
 from django.core.exceptions import ObjectDoesNotExist
 from django.db import connection
 from django.db.models import signals
-from django.db import models
+from django.db import models, router
 from django.db.models.fields.related import RelatedField, Field, ManyToManyRel
 from django.db.models.loading import get_model
 from django.forms import ModelForm
@@ -271,7 +271,8 @@
 def create(self, **kwargs):
 kwargs[self.content_type_field_name] = self.content_type
 kwargs[self.object_id_field_name] = self.pk_val
-return super(GenericRelatedObjectManager, self).create(**kwargs)
+db = router.db_for_write(self.model, instance=self.instance)
+return super(GenericRelatedObjectManager, 
self).using(db).create(**kwargs)
 create.alters_data = True
 
 return GenericRelatedObjectManager

Modified: django/trunk/django/db/models/fields/related.py
===
--- django/trunk/django/db/models/fields/related.py 2010-03-31 11:34:32 UTC 
(rev 12894)
+++ django/trunk/django/db/models/fields/related.py 2010-03-31 12:33:10 UTC 
(rev 12895)
@@ -419,7 +419,8 @@
 
 def create(self, **kwargs):
 kwargs.update({rel_field.name: instance})
-return super(RelatedManager, self).create(**kwargs)
+db = router.db_for_write(rel_model, instance=instance)
+return super(RelatedManager, self).using(db).create(**kwargs)
 create.alters_data = True
 
 def get_or_create(self, **kwargs):

Modified: django/trunk/tests/regressiontests/multiple_database/tests.py
===
--- django/trunk/tests/regressiontests/multiple_database/tests.py   
2010-03-31 11:34:32 UTC (rev 12894)
+++ django/trunk/tests/regressiontests/multiple_database/tests.py   
2010-03-31 12:33:10 UTC (rev 12895)
@@ -971,6 +971,19 @@
 water = Book(title="Dive into Water", published=datetime.date(2001, 1, 
1), editor=mark)
 self.assertEquals(water._state.db, 'default')
 
+# If you create an object through a FK relation, it will be
+# written to the write database, even if the original object
+# was on the read database
+cheesecake = mark.edited.create(title='Dive into Cheesecake', 
published=datetime.date(2010, 3, 15))
+self.assertEquals(cheesecake._state.db, 'default')
+
+# Same goes for get_or_create, regardless of whether getting or 
creating
+cheesecake, created = mark.edited.get_or_create(title='Dive into 
Cheesecake', published=datetime.date(2010, 3, 15))
+self.assertEquals(cheesecake._state.db, 'default')
+
+puddles, created = mark.edited.get_or_create(title='Dive into 
Puddles', published=datetime.date(2010, 3, 15))
+self.assertEquals(puddles._state.db, 'default')
+
 def test_m2m_cross_database_protection(self):
 "M2M relations can cross databases if the database share a source"
 # Create books and authors on the inverse to the usual database
@@ -1074,6 +1087,19 @@
 
self.assertEquals(Book.authors.through.objects.using('default').count(), 1)
 self.assertEquals(Book.authors.through.objects.using('other').count(), 
0)
 
+# If you create an object through a M2M relation, it will be
+# written to the write database, even if the original object
+# was on the read database
+alice = dive.authors.create(name='Alice')
+self.assertEquals(alice._state.db, 'default')
+
+# Same goes for get_or_create, regardless of whether getting or 
creating
+alice, created = dive.authors.get_or_create(name='Alice')
+self.assertEquals(alice._state.db, 'default')
+
+bob, created = dive.authors.get_or_create(name='Bob')
+self.assertEquals(bob._state.db, 'default')
+
 def test_generic_key_cross_database_protection(self):
 "Generic Key operations can span databases if they share a source"
 # Create a book and author on the default database
@@ -1150,6 +1176,13 @@
 review3.content_object = dive
 

Re: [Django] #12749: "Please correct the error below." when saving add model form with inline formset and no auto primary key.

2010-03-31 Thread Django
#12749: "Please correct the error below." when saving add model form with inline
formset and no auto primary key.
-+--
  Reporter:  chris.wessel...@cwi.nl  | Owner:  jkocherhans
Status:  assigned| Milestone:  1.2
 Component:  django.contrib.admin|   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by anonymous):

 Replying to [comment:4 nessita]:
 >  * The design presented by the reporter doesn't seem to make sense,
 since it generates a mutual dependency between the model ''Fashionista''
 and ''ShoppingWeakness'': to create a ''Fashionista'', an instance of
 ''ShoppingWeakness'' is needed; and to create the latter, an instance of
 ''Fashionista'' is needed.

 It's legal to create a Fashionista without !ShoppingWeakness (blank=True).
 In fact, that's the only way to do it now: save the Fashionista, then
 apply Weaknesses. The UI shortcut of having inline forms for the
 Weaknesses is just broken.

 This Unittest was "designed" just to point that out.

 As for your little frustration.. I really relate to that. I bumped into
 this
 after some time without updating trunk. After a ''lot'' of weeding and
 searching, I could boil it down to this example and part of changeset.

 Fixing it was difficult cause the intention of [12206] wasn't really clear
 to
 me, and not fully documented/locked in a unittest.

 It would still be very helpful if all of the model validation would have a
 proper unittest so a rollback would break tests.

-- 
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-upda...@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] #13250: auth.Message ignores directions from database router

2010-03-31 Thread Django
#13250: auth.Message ignores directions from database router
---+
  Reporter:  ch...@xlevus.net  | Owner:  nobody 
 
Status:  new   | Milestone:  1.2
 
 Component:  Database layer (models, ORM)  |   Version:  1.2-beta   
 
Resolution:|  Keywords:  multidb, 
orm
 Stage:  Accepted  | Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * milestone:  => 1.2

Comment:

 This looks like an oversight in the create() call on foreign keys -- the
 write database isn't being correctly selected on the create call.
 Strangely, get_or_create() *is* implemented correctly. The fix is trivial;
 I just need to find the missing test case.

-- 
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-upda...@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] #11707: limit_choices_to on a ForeignKey can render duplicate options in formfield

2010-03-31 Thread Django
#11707: limit_choices_to on a ForeignKey can render duplicate options in 
formfield
-+--
  Reporter:  chris.wessel...@cwi.nl  | Owner:  nobody   
  
Status:  new | Milestone:   
  
 Component:  Forms   |   Version:  SVN  
  
Resolution:  |  Keywords:  ForeingKey 
limit_choices_to
 Stage:  Ready for checkin   | Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  0   |  
-+--
Comment (by chris.wessel...@cwi.nl ):

 Is there something I can do to get this checked in? I re-read the
 [http://docs.djangoproject.com/en/dev/internals/contributing/#ticket-
 triage Triage docs]. As far as I can see "A developer checks in the fix"
 is the only step left.

-- 
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-upda...@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] r12894 - django/branches/releases/1.1.X/django/core/management/commands

2010-03-31 Thread noreply
Author: russellm
Date: 2010-03-31 06:34:32 -0500 (Wed, 31 Mar 2010)
New Revision: 12894

Modified:
   django/branches/releases/1.1.X/django/core/management/commands/dumpdata.py
Log:
[1.1.X] Fixed #13253 -- Updated the help message for dumpdata to indicate that 
individual models can be serialized. Thanks to arowla for the report.

Backport of r12893 from trunk.

Modified: 
django/branches/releases/1.1.X/django/core/management/commands/dumpdata.py
===
--- django/branches/releases/1.1.X/django/core/management/commands/dumpdata.py  
2010-03-31 11:30:42 UTC (rev 12893)
+++ django/branches/releases/1.1.X/django/core/management/commands/dumpdata.py  
2010-03-31 11:34:32 UTC (rev 12894)
@@ -15,7 +15,7 @@
 help='App to exclude (use multiple --exclude to exclude multiple 
apps).'),
 )
 help = 'Output the contents of the database as a fixture of the given 
format.'
-args = '[appname ...]'
+args = '[appname appname.ModelName ...]'
 
 def handle(self, *app_labels, **options):
 from django.db.models import get_app, get_apps, get_models, get_model

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] r12893 - django/trunk/django/core/management/commands

2010-03-31 Thread noreply
Author: russellm
Date: 2010-03-31 06:30:42 -0500 (Wed, 31 Mar 2010)
New Revision: 12893

Modified:
   django/trunk/django/core/management/commands/dumpdata.py
Log:
Fixed #13253 -- Updated the help message for dumpdata to indicate that 
individual models can be serialized. Thanks to arowla for the report.

Modified: django/trunk/django/core/management/commands/dumpdata.py
===
--- django/trunk/django/core/management/commands/dumpdata.py2010-03-31 
08:08:29 UTC (rev 12892)
+++ django/trunk/django/core/management/commands/dumpdata.py2010-03-31 
11:30:42 UTC (rev 12893)
@@ -21,7 +21,7 @@
 help='Use natural keys if they are available.'),
 )
 help = 'Output the contents of the database as a fixture of the given 
format.'
-args = '[appname ...]'
+args = '[appname appname.ModelName ...]'
 
 def handle(self, *app_labels, **options):
 from django.db.models import get_app, get_apps, get_models, get_model

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] #10728: [PATCH] SubfieldBase classes can't be subclassed.

2010-03-31 Thread Django
#10728: [PATCH] SubfieldBase classes can't be subclassed.
---+
  Reporter:  G2P   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Ready for checkin | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by anonymous):

 I don't understand, what's the problem in applying an accepted, ready-for-
 checkin patch sitting here for a whole year ?

-- 
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-upda...@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] #11916: Extra params + aggregation creates incorrect SQL.

2010-03-31 Thread Django
#11916: Extra params + aggregation creates incorrect SQL.
---+
  Reporter:  jaklaas...@gmail.com  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by gabrielhurley):

 * cc: gabrielhurley (added)

Comment:

 I just ran into this bug myself, and I can say that paluh's
 ``ticket_11916.3.diff`` fixed it for me perfectly. I really hope this
 makes it into 1.2 since I'd hate to have to patch the Django core to make
 my current project run long-term!

-- 
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-upda...@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] #13249: Feature request: ModelForm validation error handling after commit=False

2010-03-31 Thread Django
#13249: Feature request: ModelForm validation error handling after commit=False
-+--
  Reporter:  orokusaki   | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Forms   |   Version:  SVN   
Resolution:  wontfix |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * status:  new => closed
  * resolution:  => wontfix
  * stage:  Design decision needed => Unreviewed

Comment:

 Please don't triage your own tickets. The DDN marker indicates that the
 idea has been accepted prima facie, but a final decision is required.

 Firstly, the assertion in the problem statement ("there is no way to use
 commit=False and still use ModelForm?'s built-in validation conveniences")
 is false. When you call 'form.save(clean=False)', you're saying that
 you're taking control of making sure the instance is saved properly. If
 you're using model validation, this means taking control of the validation
 process, including calls to full_clean(), and the handling of the
 resultant errors. The docs added in r12206 pretty much say this
 explicitly, and give examples of how it should be handled.

 As for potential fixes - the "data override" idea you suggest isn't
 required- it's already possible to do this by specifying an instance.
 {{{
 if request.method == 'POST':
 new_obj = Administrator()
 new_obj.account = request.account
 form = AdministratorForm(data=request.POST, instance=new_obj)
 if form.is_valid():
 form.save()
 ...
 }}}

-- 
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-upda...@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] #13251: Add ability to know where an object was deleted from to pre/post delete signals

2010-03-31 Thread Django
#13251: Add ability to know where an object was deleted from to pre/post delete
signals
---+
  Reporter:  skoom | Owner:  nobody 
Status:  new   | Milestone: 
 Component:  Database layer (models, ORM)  |   Version:  SVN
Resolution:|  Keywords:  signals
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  1 |   Needs_tests:  1  
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Core framework => Database layer (models, ORM)
  * 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-upda...@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] #12534: django.contrib.auth.views.login refuses to redirect to urls with spaces

2010-03-31 Thread Django
#12534: django.contrib.auth.views.login refuses to redirect to urls with spaces
-+--
  Reporter:  sharky  | Owner:  nobody
Status:  reopened| Milestone:
 Component:  Authentication  |   Version:  1.1   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * stage:  Unreviewed => Accepted

Comment:

 Ok - #11457 *was* a duplicate; but it got committed without addressing
 this issue.

-- 
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-upda...@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] r12892 - in django/branches/releases/1.1.X: django/forms tests/modeltests/model_forms

2010-03-31 Thread noreply
Author: brosner
Date: 2010-03-31 03:08:29 -0500 (Wed, 31 Mar 2010)
New Revision: 12892

Modified:
   django/branches/releases/1.1.X/django/forms/models.py
   django/branches/releases/1.1.X/tests/modeltests/model_forms/models.py
Log:
[1.1.X] Restored pre-r10062 behavior allowing None from formfield_callback to 
exclude itself from the form

Backported from r12891 from trunk

Modified: django/branches/releases/1.1.X/django/forms/models.py
===
--- django/branches/releases/1.1.X/django/forms/models.py   2010-03-31 
07:43:52 UTC (rev 12891)
+++ django/branches/releases/1.1.X/django/forms/models.py   2010-03-31 
08:08:29 UTC (rev 12892)
@@ -154,6 +154,7 @@
 in the ``fields`` argument.
 """
 field_list = []
+ignored = []
 opts = model._meta
 for f in opts.fields + opts.many_to_many:
 if not f.editable:
@@ -165,9 +166,14 @@
 formfield = formfield_callback(f)
 if formfield:
 field_list.append((f.name, formfield))
+else:
+ignored.append(f.name)
 field_dict = SortedDict(field_list)
 if fields:
-field_dict = SortedDict([(f, field_dict.get(f)) for f in fields if 
(not exclude) or (exclude and f not in exclude)])
+field_dict = SortedDict(
+[(f, field_dict.get(f)) for f in fields
+if ((not exclude) or (exclude and f not in exclude)) and (f 
not in ignored)]
+)
 return field_dict
 
 class ModelFormOptions(object):

Modified: django/branches/releases/1.1.X/tests/modeltests/model_forms/models.py
===
--- django/branches/releases/1.1.X/tests/modeltests/model_forms/models.py   
2010-03-31 07:43:52 UTC (rev 12891)
+++ django/branches/releases/1.1.X/tests/modeltests/model_forms/models.py   
2010-03-31 08:08:29 UTC (rev 12892)
@@ -205,6 +205,22 @@
 def __unicode__(self):
 return self.name
 
+class MarkupField(models.CharField):
+def __init__(self, *args, **kwargs):
+kwargs["max_length"] = 20
+super(MarkupField, self).__init__(*args, **kwargs)
+
+def formfield(self, **kwargs):
+# don't allow this field to be used in form (real use-case might be
+# that you know the markup will always be X, but it is among an app
+# that allows the user to say it could be something else)
+# regressed at r10062
+return None
+
+class CustomFieldForExclusionModel(models.Model):
+name = models.CharField(max_length=10)
+markup = MarkupField()
+
 __test__ = {'API_TESTS': """
 >>> from django import forms
 >>> from django.forms.models import ModelForm, model_to_dict
@@ -1547,6 +1563,19 @@
 >>> f.is_valid()
 True
 
+# Model field that returns None to exclude itself with explicit fields 
+
+>>> class CustomFieldForExclusionForm(ModelForm):
+... class Meta:
+... model = CustomFieldForExclusionModel
+... fields = ['name', 'markup']
+
+>>> CustomFieldForExclusionForm.base_fields.keys()
+['name']
+
+>>> print CustomFieldForExclusionForm()
+Name:
+
 # Clean up
 >>> import shutil
 >>> shutil.rmtree(temp_storage_dir)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] #13252: Use the natural key instead of the primary key when serializing

2010-03-31 Thread Django
#13252: Use the natural key instead of the primary key when serializing
+---
  Reporter:  SmileyChris| Owner:  nobody
Status:  new| Milestone:
 Component:  Serialization  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  1 
Needs_better_patch:  1  |  
+---
Changes (by russellm):

  * needs_better_patch:  0 => 1
  * stage:  Unreviewed => Accepted

Comment:

 I accept the use case - that you should be able to say "update the
 existing object that matches the natural key, or create a new object if
 one doesn't exist". However I'm not convinced that providing a natural key
 for the PK value is the right way to do this.

 Essentially, this approach means specifying the natural key data twice -
 once in the fields of the object, and once in the primary key value. This
 strikes me as especially un-DRY.

 I haven't given this a lot of thought, but there might be a way of using
 the natural key without to specify it in the pk attribute. A natural key
 needs to be unique, so if a model defines a natural key, you shouldn't
 need to have the PK value specifically (or the natural key value as the
 primary key) in order to reconstruct the natural key for an object. This
 does leave the question of when the 'update or create' behavior should be
 invoked, but I think this will be less prone to error than reproducing the
 natural key.

-- 
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-upda...@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] r12891 - in django/trunk: django/forms tests/modeltests/model_forms

2010-03-31 Thread noreply
Author: brosner
Date: 2010-03-31 02:43:52 -0500 (Wed, 31 Mar 2010)
New Revision: 12891

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/modeltests/model_forms/models.py
Log:
Restored pre-r10062 behavior allowing None from formfield_callback to exclude 
itself from the form

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2010-03-30 23:15:43 UTC (rev 12890)
+++ django/trunk/django/forms/models.py 2010-03-31 07:43:52 UTC (rev 12891)
@@ -167,6 +167,7 @@
 in the ``fields`` argument.
 """
 field_list = []
+ignored = []
 opts = model._meta
 for f in opts.fields + opts.many_to_many:
 if not f.editable:
@@ -182,9 +183,14 @@
 formfield = formfield_callback(f, **kwargs)
 if formfield:
 field_list.append((f.name, formfield))
+else:
+ignored.append(f.name)
 field_dict = SortedDict(field_list)
 if fields:
-field_dict = SortedDict([(f, field_dict.get(f)) for f in fields if 
(not exclude) or (exclude and f not in exclude)])
+field_dict = SortedDict(
+[(f, field_dict.get(f)) for f in fields
+if ((not exclude) or (exclude and f not in exclude)) and (f 
not in ignored)]
+)
 return field_dict
 
 class ModelFormOptions(object):

Modified: django/trunk/tests/modeltests/model_forms/models.py
===
--- django/trunk/tests/modeltests/model_forms/models.py 2010-03-30 23:15:43 UTC 
(rev 12890)
+++ django/trunk/tests/modeltests/model_forms/models.py 2010-03-31 07:43:52 UTC 
(rev 12891)
@@ -220,6 +220,22 @@
 def __unicode__(self):
 return unicode(self.biggie)
 
+class MarkupField(models.CharField):
+def __init__(self, *args, **kwargs):
+kwargs["max_length"] = 20
+super(MarkupField, self).__init__(*args, **kwargs)
+
+def formfield(self, **kwargs):
+# don't allow this field to be used in form (real use-case might be
+# that you know the markup will always be X, but it is among an app
+# that allows the user to say it could be something else)
+# regressed at r10062
+return None
+
+class CustomFieldForExclusionModel(models.Model):
+name = models.CharField(max_length=10)
+markup = MarkupField()
+
 __test__ = {'API_TESTS': """
 >>> from django import forms
 >>> from django.forms.models import ModelForm, model_to_dict
@@ -1540,6 +1556,19 @@
 Description:
 The URL:
 
+# Model field that returns None to exclude itself with explicit fields 
+
+>>> class CustomFieldForExclusionForm(ModelForm):
+... class Meta:
+... model = CustomFieldForExclusionModel
+... fields = ['name', 'markup']
+
+>>> CustomFieldForExclusionForm.base_fields.keys()
+['name']
+
+>>> print CustomFieldForExclusionForm()
+Name:
+
 # Clean up
 >>> import shutil
 >>> shutil.rmtree(temp_storage_dir)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@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] #13247: GIS google-map.js maxHeight, dragCrossSize options

2010-03-31 Thread Django
#13247: GIS google-map.js maxHeight, dragCrossSize options
---+
  Reporter:  wardi | Owner:  nobody
Status:  new   | Milestone:
 Component:  GIS   |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * 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-upda...@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] #13253: Help for manage.py dumpdata doesn't include models in possible arguments

2010-03-31 Thread Django
#13253: Help for manage.py dumpdata doesn't include models in possible arguments
+---
  Reporter:  arowla | Owner:  nobody
Status:  new| Milestone:  1.2   
 Component:  Serialization  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * stage:  Unreviewed => Ready for checkin
  * component:  Uncategorized => Serialization
  * milestone:  => 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-upda...@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] #13249: Feature request: ModelForm validation error handling after commit=False

2010-03-31 Thread Django
#13249: Feature request: ModelForm validation error handling after commit=False
-+--
  Reporter:  orokusaki   | Owner:  nobody
Status:  new | Milestone:
 Component:  Forms   |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by orokusaki):

 One solution I could propose as an abstract idea is to allow for the
 inclusion of extra data during the creation of a ModelForm instance:

 {{{
 form = MySpamModelForm(request.POST, data_override={'account':
 request.account})
 if form.is_valid():
 instance = form.save()
 }}}

 This doesn't allow for the use of instance.pk, but it at lease allows you
 to add request related data to the instance before creation.

-- 
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-upda...@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.