Re: [Django] #10349: ManyToMany field does not take dynamic initial values into account

2009-04-12 Thread Django
#10349: ManyToMany field does not take dynamic initial values into account
---+
  Reporter:  fas   | Owner:  fas
 
Status:  new   | Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  1.0
 
Resolution:|  Keywords:  
ManyToMany, initial, dynamic, lambda
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  1  
 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * needs_tests:  0 => 1

Comment:

 It would also be helpful if you provided a testcase as part of your patch
 - or, at the very least, an example of the usage that is corrected by
 applying the patch. It isn't immediately obvious to me what problem this
 patch is trying to solve.

-- 
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] r10551 - in django/branches/releases/1.0.X: . django/db/models/fields tests/regressiontests/m2m_regress

2009-04-12 Thread noreply

Author: russellm
Date: 2009-04-12 22:07:59 -0500 (Sun, 12 Apr 2009)
New Revision: 10551

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/django/db/models/fields/related.py
   django/branches/releases/1.0.X/tests/regressiontests/m2m_regress/models.py
Log:
[1.0.X] Fixed #10237 -- Corrected the handling of self-referential m2m fields 
when using multi-table inheritance. Thanks to Justin Lilly for the report and 
patch.

Merge of r10550 from trunk.



Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10325,10328-10329,10333-10344,10348-10351,10354-10356,10358-10363,10365-10368,10371-10380,10386-10406,10411,10413-10414,10418-10427,10429-10437,10440,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10500,10508,10511,10513,10517,10519
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10325,10328-10329,10333-10344,10348-10351,10354-10356,10358-10363,10365-10368,10371-10380,10386-10406,10411,10413-10414,10418-10427,10429-10437,10440,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10500,10508,10511,10513,10517,10519,10550

Modified: django/branches/releases/1.0.X/django/db/models/fields/related.py
===
--- django/branches/releases/1.0.X/django/db/models/fields/related.py   
2009-04-13 02:59:40 UTC (rev 10550)
+++ django/branches/releases/1.0.X/django/db/models/fields/related.py   
2009-04-13 03:07:59 UTC (rev 10551)
@@ -575,7 +575,7 @@
 model=rel_model,
 core_filters={'%s__pk' % self.field.related_query_name(): 
instance._get_pk_val()},
 instance=instance,
-symmetrical=(self.field.rel.symmetrical and instance.__class__ == 
rel_model),
+symmetrical=(self.field.rel.symmetrical and isinstance(instance, 
rel_model)),
 join_table=qn(self.field.m2m_db_table()),
 source_col_name=qn(self.field.m2m_column_name()),
 target_col_name=qn(self.field.m2m_reverse_name())

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/m2m_regress/models.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/m2m_regress/models.py  
2009-04-13 02:59:40 UTC (rev 10550)
+++ django/branches/releases/1.0.X/tests/regressiontests/m2m_regress/models.py  
2009-04-13 03:07:59 UTC (rev 10551)
@@ -26,6 +26,13 @@
 def __unicode__(self):
 return self.name
 
+# Two

Re: [Django] #10237: Symmetry is lost when inheriting a self-referential m2m field

2009-04-12 Thread Django
#10237: Symmetry is lost when inheriting a self-referential m2m field
---+
  Reporter:  justinlilly   | Owner:  
justinlilly  
Status:  closed| Milestone:  1.1
  
 Component:  Database layer (models, ORM)  |   Version:  1.0
  
Resolution:  fixed |  Keywords:  mti, m2m, 
inheritance
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 (In [10550]) Fixed #10237 -- Corrected the handling of self-referential
 m2m fields when using multi-table inheritance. Thanks to Justin Lilly for
 the report and 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
-~--~~~~--~~--~--~---



[Changeset] r10550 - in django/trunk: django/db/models/fields tests/regressiontests/m2m_regress

2009-04-12 Thread noreply

Author: russellm
Date: 2009-04-12 21:59:40 -0500 (Sun, 12 Apr 2009)
New Revision: 10550

Modified:
   django/trunk/django/db/models/fields/related.py
   django/trunk/tests/regressiontests/m2m_regress/models.py
Log:
Fixed #10237 -- Corrected the handling of self-referential m2m fields when 
using multi-table inheritance. Thanks to Justin Lilly for the report and patch.

Modified: django/trunk/django/db/models/fields/related.py
===
--- django/trunk/django/db/models/fields/related.py 2009-04-12 07:19:56 UTC 
(rev 10549)
+++ django/trunk/django/db/models/fields/related.py 2009-04-13 02:59:40 UTC 
(rev 10550)
@@ -582,7 +582,7 @@
 model=rel_model,
 core_filters={'%s__pk' % self.field.related_query_name(): 
instance._get_pk_val()},
 instance=instance,
-symmetrical=(self.field.rel.symmetrical and instance.__class__ == 
rel_model),
+symmetrical=(self.field.rel.symmetrical and isinstance(instance, 
rel_model)),
 join_table=qn(self.field.m2m_db_table()),
 source_col_name=qn(self.field.m2m_column_name()),
 target_col_name=qn(self.field.m2m_reverse_name())

Modified: django/trunk/tests/regressiontests/m2m_regress/models.py
===
--- django/trunk/tests/regressiontests/m2m_regress/models.py2009-04-12 
07:19:56 UTC (rev 10549)
+++ django/trunk/tests/regressiontests/m2m_regress/models.py2009-04-13 
02:59:40 UTC (rev 10550)
@@ -26,6 +26,13 @@
 def __unicode__(self):
 return self.name
 
+# Two models both inheriting from a base model with a self-referential m2m 
field
+class SelfReferChild(SelfRefer):
+pass
+
+class SelfReferChildSibling(SelfRefer):
+pass
+
 __test__ = {"regressions": """
 # Multiple m2m references to the same model or a different model must be
 # distinguished when accessing the relations through an instance attribute.
@@ -57,7 +64,20 @@
 >>> SelfRefer.objects.filter(porcupine='fred')
 Traceback (most recent call last):
 ...
-FieldError: Cannot resolve keyword 'porcupine' into field. Choices are: id, 
name, references, related
+FieldError: Cannot resolve keyword 'porcupine' into field. Choices are: id, 
name, references, related, selfreferchild, selfreferchildsibling
 
+# Test to ensure that the relationship between two inherited models
+# with a self-referential m2m field maintains symmetry
+>>> sr_child = SelfReferChild(name="Hanna")
+>>> sr_child.save()
+
+>>> sr_sibling = SelfReferChildSibling(name="Beth")
+>>> sr_sibling.save()
+>>> sr_child.related.add(sr_sibling)
+>>> sr_child.related.all()
+[]
+>>> sr_sibling.related.all()
+[]
+
 """
 }


--~--~-~--~~~---~--~~
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] #9619: to_python not called when fetching data with .values(...)

2009-04-12 Thread Django
#9619: to_python not called when fetching data with .values(...)
---+
  Reporter:  Valera Grishin| Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * milestone:  1.1 =>

Comment:

 Having thought about this a lot more, it isn't really a bug in existing
 functionality since `values()` has always behaved this way and the name is
 pretty descriptive. Worthwhile having a discussion about adding some
 feature to this in the future, but I can't see that it's a bug in the
 1.1-release sense.

-- 
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] #7048: Support clearing FileFields with ModelForms

2009-04-12 Thread Django
#7048: Support clearing FileFields with ModelForms
---+
  Reporter:  jarrow| Owner:  brosner
Status:  assigned  | Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  1  
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 I'd like to suggest, in the strongest terms possible, that this shouldn't
 be a Meta option, it should be an option on the Field.  Meta is for
 formwide options.

-- 
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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
+---
  Reporter:  br...@z2a.org  | Owner:  mtredinnick
Status:  new| Milestone:  1.1
 Component:  Documentation  |   Version:  1.0
Resolution: |  Keywords: 
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by mtredinnick):

 Yeah, don't worry ... I'm going to work through the whole tutorial to
 check it. It's not clear to me that this change is an improvement at all
 at the moment and since it's the beginner's tutorial, covering every
 single portable application practice is clearly out of scope in the
 interests of pragmatism. Reverting the change is definitely still an
 option for you.

-- 
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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
+---
  Reporter:  br...@z2a.org  | Owner:  mtredinnick
Status:  new| Milestone:  1.1
 Component:  Documentation  |   Version:  1.0
Resolution: |  Keywords: 
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by kmtracey):

 Sorry, #9771 is the right original ticket number, somehow my mind tends to
 morph numbers when copying.  I'm not sure `../vote/` is going to work
 either, given per that ticket description the form is displayed on a page
 with a url such as `/polls/123/`.  I haven't looked in detail at the
 tutorial though to see if other stuff has changed to make a `../vote/`
 action work

-- 
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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
+---
  Reporter:  br...@z2a.org  | Owner:  mtredinnick
Status:  new| Milestone:  1.1
 Component:  Documentation  |   Version:  1.0
Resolution: |  Keywords: 
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by mtredinnick):

  * owner:  nobody => mtredinnick
  * status:  reopened => new

Comment:

 That looks like a typo in the change. Form action should have been
 `../vote/`, which does make things a little simpler (maybe; also a bit
 trappier in other ways). I'll poke at this today if nobody else gets to
 it.

-- 
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] #10795: Add Link to modelformset_factory

2009-04-12 Thread Django
#10795: Add Link to modelformset_factory
+---
  Reporter:  csshef | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by csshef):

  * needs_better_patch:  => 0
  * 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-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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
+---
  Reporter:  br...@z2a.org  | Owner:  nobody
Status:  reopened   | Milestone:  1.1   
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by kmtracey):

  * milestone:  => 1.1

Comment:

 #9711 was the ticket for which this change was made.  I don't know that
 making the tutorial polls app more pluggable warrants re-writing the view
 so my initial impression is the #9711 change ought just be reverted.

-- 
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] #9771: Wrong form action

2009-04-12 Thread Django
#9771: Wrong form action
+---
  Reporter:  tutonien   | Owner:  jacob 

Status:  closed | Milestone:  1.1   

 Component:  Documentation  |   Version:  1.0   

Resolution:  fixed  |  Keywords:  tutorial, form, post, 
action, absolute
 Stage:  Accepted   | Has_patch:  0 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Comment (by kmtracey):

 Note this change broke the error path through the associated view.  See
 #10801.

-- 
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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
+---
  Reporter:  br...@z2a.org  | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by kmtracey):

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

Comment:

 Replying to [comment:2 anonymous]:
 > if you say so... but if you vote on the resulting page you get a 404
 error for the URL "http://127.0.0.1:8000/polls/1/vote/vote/";.  Doesn't
 seem right to me.

 You might have mentioned that detail in the original report! That actually
 points to something that was recently changed -- the form action in the
 template was changed from `/polls/{{ poll.id }}/vote/` to just `vote/` as
 part of changeset r10371.  That changeset fixed a bajillion tickets so I'm
 not sure yet what problem exactly that it was supposed to address, but it
 does seem to have introduced a problem in the error path for the view.

-- 
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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
+---
  Reporter:  br...@z2a.org  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by anonymous):

 if you say so... but if you vote on the resulting page you get a 404 error
 for the URL "http://127.0.0.1:8000/polls/1/vote/vote/";.  Doesn't seem
 right to 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-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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
+---
  Reporter:  br...@z2a.org  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 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:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 No, in the case of an error in the submitted data you want to re-display
 the poll form with the error message.  The tutorial code is correct.
 Please post to django-users if you are having trouble understanding
 something; the tutorial has gotten plenty of attention and people using
 it, so it is unlikely to have an error at this point.

-- 
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] #10799: List editable breaks with model inheritance and parent_link=True

2009-04-12 Thread Django
#10799: List editable breaks with model inheritance and parent_link=True
---+
  Reporter:  willhardy | Owner:  nobody 
  
Status:  new   | Milestone:  1.1
  
 Component:  django.contrib.admin  |   Version:  SVN
  
Resolution:|  Keywords:  list_editable 
parent_link inheritance
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by willhardy):

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

Comment:

 A couple of extra bits of potentially useful information:

 1. exception appears whether or not `parent_link` is set as a
 `primary_key`.

 2. looking at line 950 of `django/contrib/admin/options.py`:
 {{{
 elif self.list_editable:
 FormSet = self.get_changelist_formset(request)
 formset = cl.formset = FormSet(queryset=cl.result_list)
 }}}
 The `FormSet` here looks ok (`parent_link` and non-`parent_link` version
 appear to be the same), but each of the forms in `formset.forms` is
 missing the field for the primary key. The `result_list` is of course the
 same with or without `parent_link`.

 I find this strange because it appears to use the (no doubt well-tested)
 generic factory functions from forms.models.

 I don't know the internal django code well enough to give a useful opinion
 here, but this is what I was able to observe.

-- 
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] #10801: tutorial part 4 vote view needs to redirect in the error case

2009-04-12 Thread Django
#10801: tutorial part 4 vote view needs to redirect in the error case
---+
 Reporter:  br...@z2a.org  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 In part 4 of the tutorial the vote view has the following code for the
 case that no choice was picked:
 {{{
  return render_to_response('polls/detail.html', {
 'poll': p,
 'error_message': "You didn't select a choice.",
 })
 }}}
 However, the resulting URL is of the form
 "http://127.0.0.1:8000/polls/1/vote/"; rather than what is should be
 "http://127.0.0.1:8000/polls/1/";.  So a redirect is needed.  I don't know
 the best way to do 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
-~--~~~~--~~--~--~---



Re: [Django] #10781: Wrong way to style forms demonstrated in docs

2009-04-12 Thread Django
#10781: Wrong way to style forms demonstrated in docs
+---
  Reporter:  boxed  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by boxed):

 Invalid HTML because an invisible input element is not inside a div? Now
 you're just jerking my chain. The proposed change would make the code
 smaller, easier to read, cover all cases instead of just a subset and be
 perfectly valid HTML.

-- 
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] #10800: render_to_string and render_to_response use select_template

2009-04-12 Thread Django
#10800: render_to_string and render_to_response use select_template
---+
 Reporter:  p.patr...@iperbole.bologna.it  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.0   
 Keywords:  render_to_string   |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 In documentaztion:
 "The Django template language: For Python programmers"
 http://docs.djangoproject.com/en/dev/ref/templates/api/

 accordind with:
 http://code.djangoproject.com/ticket/546

 render_to_string and render_to_response can use select_template

 so:
 "The render_to_string shortcut takes one required argument --
 template_name, which should be the name of the template to load and render
 -- and two optional arguments:"

 should be:
 "The render_to_string shortcut takes one required argument --
 template_name, which should be a string with the name of the template to
 load and render or a list or tuple containing templates arguments for
 select_template -- and two optional arguments:"

-- 
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] #10420: Running gis tests via runtests doesn't work.

2009-04-12 Thread Django
#10420: Running gis tests via runtests doesn't work.
--+-
  Reporter:  mtredinnick  | Owner:  nobody
Status:  new  | Milestone:
 Component:  GIS  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by mtredinnick):

  * milestone:  1.1 =>

Comment:

 Punting to later, since apparently Justin has plans to hammer on the gis
 db interaction later. We can address that then instead of wasting time
 hacking away now.

-- 
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] r10549 - django/trunk/django/contrib/gis/db/backend/postgis

2009-04-12 Thread noreply

Author: adrian
Date: 2009-04-12 02:19:56 -0500 (Sun, 12 Apr 2009)
New Revision: 10549

Modified:
   django/trunk/django/contrib/gis/db/backend/postgis/query.py
Log:
Added experimental support for a POSTGIS_VERSION setting for GeoDjango. If set, 
it will tell GeoDjango not to do the postgis_lib_version() query every time the 
server starts up (assuming a PostGIS backend). This is intentionally 
undocumented because Justin mentioned he might be refactoring the backends for 
Django 1.2 such that this setting would be unnecessary. Until then, people can 
use this hook.

Modified: django/trunk/django/contrib/gis/db/backend/postgis/query.py
===
--- django/trunk/django/contrib/gis/db/backend/postgis/query.py 2009-04-12 
05:56:59 UTC (rev 10548)
+++ django/trunk/django/contrib/gis/db/backend/postgis/query.py 2009-04-12 
07:19:56 UTC (rev 10549)
@@ -2,16 +2,30 @@
  This module contains the spatial lookup types, and the get_geo_where_clause()
  routine for PostGIS.
 """
+
 import re
 from decimal import Decimal
 from django.db import connection
+from django.conf import settings
 from django.contrib.gis.measure import Distance
-from django.contrib.gis.db.backend.postgis.management import 
postgis_version_tuple
 from django.contrib.gis.db.backend.util import SpatialOperation, 
SpatialFunction
+
 qn = connection.ops.quote_name
 
-# Getting the PostGIS version information
-POSTGIS_VERSION, MAJOR_VERSION, MINOR_VERSION1, MINOR_VERSION2 = 
postgis_version_tuple()
+# Get the PostGIS version information.
+# To avoid the need to do a database query to determine the PostGIS version
+# each time the server starts up, one can optionally specify a
+# POSTGIS_VERSION setting. This setting is intentionally undocumented and
+# should be considered experimental, because an upcoming GIS backend
+# refactoring might remove the need for it.
+if hasattr(settings, 'POSTGIS_VERSION') and settings.POSTGIS_VERSION is not 
None:
+version_tuple = settings.POSTGIS_VERSION
+else:
+# This import is intentionally within the 'else' so that it isn't executed
+# if the POSTGIS_VERSION setting is available.
+from django.contrib.gis.db.backend.postgis.management import 
postgis_version_tuple
+version_tuple = postgis_version_tuple()
+POSTGIS_VERSION, MAJOR_VERSION, MINOR_VERSION1, MINOR_VERSION2 = version_tuple
 
 # The supported PostGIS versions.
 #  TODO: Confirm tests with PostGIS versions 1.1.x -- should work.  


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---