Re: [Django] #7977: add geo support to admindocs

2009-04-07 Thread Django
#7977: add geo support to admindocs
--+-
  Reporter:  andreplebl...@gmail.com  | Owner:  jbronn
Status:  assigned | Milestone:
 Component:  GIS  |   Version:  gis   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  1|  
--+-
Changes (by baumer1122):

 * cc: pete+djangot...@lincolnloop.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-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] #9459: forms.DateTimeField() rendered with HiddenInput looses microseconds

2009-04-07 Thread Django
#9459: forms.DateTimeField() rendered with HiddenInput looses microseconds
---+
  Reporter:  guettli   | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Forms |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by stryderjzw):

 On a related note:

 Rendering the DateTimeField as a hidden field, {{ field.as_hidden }}, will
 make the form invalid when submitting because the HiddenInput keeps the
 microseconds and the field validation does not.

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



[Changeset] r10443 - django/trunk/django/contrib/gis/db/backend/spatialite

2009-04-07 Thread noreply

Author: jbronn
Date: 2009-04-07 19:09:06 -0500 (Tue, 07 Apr 2009)
New Revision: 10443

Modified:
   django/trunk/django/contrib/gis/db/backend/spatialite/field.py
Log:
Now take advantage of new argument accepted by `AddGeometryColumn` in 
SpatiaLite 2.3 that allows geometry columns to specified as `NOT NULL`.


Modified: django/trunk/django/contrib/gis/db/backend/spatialite/field.py
===
--- django/trunk/django/contrib/gis/db/backend/spatialite/field.py  
2009-04-07 22:21:10 UTC (rev 10442)
+++ django/trunk/django/contrib/gis/db/backend/spatialite/field.py  
2009-04-08 00:09:06 UTC (rev 10443)
@@ -25,8 +25,9 @@
style.SQL_FIELD(gqn(self.column)) + ', ' +
style.SQL_FIELD(str(self.srid)) + ', ' +
style.SQL_COLTYPE(gqn(self.geom_type)) + ', ' +
-   style.SQL_KEYWORD(str(self.dim)) + ');')
-
+   style.SQL_KEYWORD(str(self.dim)) + ', ' +
+   style.SQL_KEYWORD(str(int(not self.null))) +
+   ');')
 return sql
 
 def _geom_index(self, style, db_table):


--~--~-~--~~~---~--~~
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] #9682: icontains can be case-sensitive on MySQL

2009-04-07 Thread Django
#9682: icontains can be case-sensitive on MySQL
-+--
  Reporter:  to.roma.from.dj...@qwertty.com  | Owner:  nobody
Status:  new | Milestone:
 Component:  Database layer (models, ORM)|   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Someday/Maybe   | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by mykhal):

 I strongly vote for this. It solves the problem how to insert "COLLATE
 " into the query, invoked by normal filters (without writing
 SQL from scratch).

 Why would one need to use COLLATE? E.g. in case, when he has a database
 containing strings with accented characters, and this database is in the
 different collation than utf8_general_ci - e.g. utf8_czech_ci. In this
 case, sql select e.g. "{{{SELECT ... LIKE %cviceni% ...}}}" does not hit
 strings containing "cvičení", but it does, when "{{{SELECT ... COLLATE
 utf8_general_ci LIKE %cviceni% ...}}}" . What is interesting, if {{{ORDER
 BY}}} is used, results are ordered by the original database collation
 (czech in this case), what might be exactly what he needs.

-- 
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] r10442 - django/branches/releases/1.0.X

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 17:21:10 -0500 (Tue, 07 Apr 2009)
New Revision: 10442

Modified:
   django/branches/releases/1.0.X/
Log:
Updated svnmerge metadata.


Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-blocked
   - 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792,9799-9800,9803-9805,9808,9814-9820,9838-9841,9844-9846,9860,9862,9876,9882,9888-9898,9904-9905,9910-9911,9913,9915,9918,9921,9928,9930,9938,9940-9941,9944,9951-9952,9955,9963-9965,9978,9985,9989,10002,10005-10006,10008,10011-10012,10018,10021,10026-10030,10032-10035,10042-10048,10053,10062-10065,10070,10077,10080-10084,10088-10103,10105,10107-10124,10128-10135,10137,10141-10142,10144,10148,10161-10162,10168-10169,10171-10172,10174,10177-10179,10181-10184,10186-10188,10190-10191,10197,10222,10229,10235,10248-10249,10258,10271-10272,10275,10281,10315,10317-10318,10323-10324,10326-10327,10330-10332,10345-10347,10352-10353,10357,10364,10369-10370,10381-10385,10408-10410,10412
   + 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792,9799-9800,9803-9805,9808,9814-9820,9838-9841,9844-9846,9860,9862,9876,9882,9888-9898,9904-9905,9910-9911,9913,9915,9918,9921,9928,9930,9938,9940-9941,9944,9951-9952,9955,9963-9965,9978,9985,9989,10002,10005-10006,10008,10011-10012,10018,10021,10026-10030,10032-10035,10042-10048,10053,10062-10065,10070,10077,10080-10084,10088-10103,10105,10107-10124,10128-10135,10137,10141-10142,10144,10148,10161-10162,10168-10169,10171-10172,10174,10177-10179,10181-10184,10186-10188,10190-10191,10197,10222,10229,10235,10248-10249,10258,10271-10272,10275,10281,10315,10317-10318,10323-10324,10326-10327,10330-10332,10345-10347,10352-10353,10357,10364,10369-10370,10381-10385,10408-10410,10412,10428,10438-10439
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
   + 

Re: [Django] #9756: Recent changes to for tag (adding empty clause) leave context stack imbalanced when iterable is empty

2009-04-07 Thread Django
#9756: Recent changes to for tag (adding empty clause) leave context stack
imbalanced when iterable is empty
--+-
  Reporter:  seanl| Owner:  nobody
Status:  closed   | Milestone:  1.1   
 Component:  Template system  |   Version:  1.0   
Resolution:  fixed|  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by jacob):

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

Comment:

 Fixed in r10439.

-- 
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] r10441 - django/branches/releases/1.0.X/tests/regressiontests/utils

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 17:13:30 -0500 (Tue, 07 Apr 2009)
New Revision: 10441

Modified:
   django/branches/releases/1.0.X/tests/regressiontests/utils/timesince.py
Log:
[1.0.X] Added some tests to show that #9672 has been fixed ever since [10215]. 
Refs #9672. Backport of r10440 from trunk.

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/utils/timesince.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/utils/timesince.py 
2009-04-07 22:12:53 UTC (rev 10440)
+++ django/branches/releases/1.0.X/tests/regressiontests/utils/timesince.py 
2009-04-07 22:13:30 UTC (rev 10441)
@@ -1,18 +1,18 @@
 """
->>> from datetime import datetime, timedelta
+>>> import datetime
 >>> from django.utils.timesince import timesince, timeuntil
 >>> from django.utils.tzinfo import LocalTimezone, FixedOffset
 
->>> t = datetime(2007, 8, 14, 13, 46, 0)
+>>> t = datetime.datetime(2007, 8, 14, 13, 46, 0)
 
->>> onemicrosecond = timedelta(microseconds=1)
->>> onesecond = timedelta(seconds=1)
->>> oneminute = timedelta(minutes=1)
->>> onehour = timedelta(hours=1)
->>> oneday = timedelta(days=1)
->>> oneweek = timedelta(days=7)
->>> onemonth = timedelta(days=30)
->>> oneyear = timedelta(days=365)
+>>> onemicrosecond = datetime.timedelta(microseconds=1)
+>>> onesecond = datetime.timedelta(seconds=1)
+>>> oneminute = datetime.timedelta(minutes=1)
+>>> onehour = datetime.timedelta(hours=1)
+>>> oneday = datetime.timedelta(days=1)
+>>> oneweek = datetime.timedelta(days=7)
+>>> onemonth = datetime.timedelta(days=30)
+>>> oneyear = datetime.timedelta(days=365)
 
 # equal datetimes.
 >>> timesince(t, t)
@@ -77,13 +77,22 @@
 u'0 minutes'
 
 # When using two different timezones.
->>> now = datetime.now()
->>> now_tz = datetime.now(LocalTimezone(now))
->>> now_tz_i = datetime.now(FixedOffset((3 * 60) + 15))
+>>> now = datetime.datetime.now()
+>>> now_tz = datetime.datetime.now(LocalTimezone(now))
+>>> now_tz_i = datetime.datetime.now(FixedOffset((3 * 60) + 15))
 >>> timesince(now)
 u'0 minutes'
 >>> timesince(now_tz)
 u'0 minutes'
 >>> timeuntil(now_tz, now_tz_i)
 u'0 minutes'
+
+# Timesince should work with both date objects (#9672)
+>>> today = datetime.date.today() 
+>>> timeuntil(today+oneday, today) 
+u'1 day' 
+>>> timeuntil(today-oneday, today) 
+u'0 minutes' 
+>>> timeuntil(today+oneweek, today) 
+u'1 week' 
 """


--~--~-~--~~~---~--~~
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] r10440 - django/trunk/tests/regressiontests/utils

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 17:12:53 -0500 (Tue, 07 Apr 2009)
New Revision: 10440

Modified:
   django/trunk/tests/regressiontests/utils/timesince.py
Log:
Added some tests to show that #9672 has been fixed ever since [10215]. Refs 
#9672.

Modified: django/trunk/tests/regressiontests/utils/timesince.py
===
--- django/trunk/tests/regressiontests/utils/timesince.py   2009-04-07 
22:02:34 UTC (rev 10439)
+++ django/trunk/tests/regressiontests/utils/timesince.py   2009-04-07 
22:12:53 UTC (rev 10440)
@@ -1,18 +1,18 @@
 """
->>> from datetime import datetime, timedelta
+>>> import datetime
 >>> from django.utils.timesince import timesince, timeuntil
 >>> from django.utils.tzinfo import LocalTimezone, FixedOffset
 
->>> t = datetime(2007, 8, 14, 13, 46, 0)
+>>> t = datetime.datetime(2007, 8, 14, 13, 46, 0)
 
->>> onemicrosecond = timedelta(microseconds=1)
->>> onesecond = timedelta(seconds=1)
->>> oneminute = timedelta(minutes=1)
->>> onehour = timedelta(hours=1)
->>> oneday = timedelta(days=1)
->>> oneweek = timedelta(days=7)
->>> onemonth = timedelta(days=30)
->>> oneyear = timedelta(days=365)
+>>> onemicrosecond = datetime.timedelta(microseconds=1)
+>>> onesecond = datetime.timedelta(seconds=1)
+>>> oneminute = datetime.timedelta(minutes=1)
+>>> onehour = datetime.timedelta(hours=1)
+>>> oneday = datetime.timedelta(days=1)
+>>> oneweek = datetime.timedelta(days=7)
+>>> onemonth = datetime.timedelta(days=30)
+>>> oneyear = datetime.timedelta(days=365)
 
 # equal datetimes.
 >>> timesince(t, t)
@@ -77,13 +77,22 @@
 u'0 minutes'
 
 # When using two different timezones.
->>> now = datetime.now()
->>> now_tz = datetime.now(LocalTimezone(now))
->>> now_tz_i = datetime.now(FixedOffset((3 * 60) + 15))
+>>> now = datetime.datetime.now()
+>>> now_tz = datetime.datetime.now(LocalTimezone(now))
+>>> now_tz_i = datetime.datetime.now(FixedOffset((3 * 60) + 15))
 >>> timesince(now)
 u'0 minutes'
 >>> timesince(now_tz)
 u'0 minutes'
 >>> timeuntil(now_tz, now_tz_i)
 u'0 minutes'
+
+# Timesince should work with both date objects (#9672)
+>>> today = datetime.date.today() 
+>>> timeuntil(today+oneday, today) 
+u'1 day' 
+>>> timeuntil(today-oneday, today) 
+u'0 minutes' 
+>>> timeuntil(today+oneweek, today) 
+u'1 week' 
 """


--~--~-~--~~~---~--~~
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] #9672: timeuntil filters doesn't work with DateField since [8579]

2009-04-07 Thread Django
#9672: timeuntil filters doesn't work with DateField since [8579]
--+-
  Reporter:  anonymous| Owner:  mcroydon   
Status:  closed   | Milestone:  1.1
 Component:  Template system  |   Version:  SVN
Resolution:  fixed|  Keywords:  timeuntil timesince
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by jacob):

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

-- 
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] #9672: timeuntil filters doesn't work with DateField since [8579]

2009-04-07 Thread Django
#9672: timeuntil filters doesn't work with DateField since [8579]
--+-
  Reporter:  anonymous| Owner:  mcroydon   
Status:  new  | Milestone:  1.1
 Component:  Template system  |   Version:  SVN
Resolution:   |  Keywords:  timeuntil timesince
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Comment (by jacob):

 This actually appears to have been fixed in [10215].

-- 
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] #10571: FakePayload Truncates Unicode Content

2009-04-07 Thread Django
#10571: FakePayload Truncates Unicode Content
---+
  Reporter:  rwag...@physics.ucsd.edu  | Owner:  nobody
Status:  closed| Milestone:  1.1   
 Component:  Testing framework |   Version:  SVN   
Resolution:  worksforme|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by rwag...@physics.ucsd.edu):

 I suspect Russ is right that it's something to do with my environment. I
 added a test to the client regression tests as suggested, and it's failing
 only on one of my installed version of Python. For reference, it's the
 [http://www.enthought.com/products/epd.php Enthought Python Distribution],
 which is a big bundle of scientific packages. My build of Python 2.5 from
 source is fine. I take this as an indicator that it's probably not Django,
 but the Enthought build. I may be headed over to their bug tracker
 shortly.

 Thanks for looking at this!

 --Rick

 P.S. Here's the unnecessary test case:

 {{{
 #!python
 class FakePayloadTests(TestCase):
 def test_fake_payload_stringio(self):
 # Ensure that StringIO doesn't truncate Unicode strings
 json = u'{"name": "Rick"}'
 payload = FakePayload(json)
 new_json = payload.read()
 self.assertEqual(json, new_json)
 }}}

-- 
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] r10438 - django/trunk/django/template

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 16:55:39 -0500 (Tue, 07 Apr 2009)
New Revision: 10438

Modified:
   django/trunk/django/template/defaulttags.py
Log:
Fixed #10644: removed an undocumented, unused, and (as far as I can tell) 
unnecessary "feature" of the ifchanged tag. Thanks, akaihola.

Modified: django/trunk/django/template/defaulttags.py
===
--- django/trunk/django/template/defaulttags.py 2009-04-07 21:33:43 UTC (rev 
10437)
+++ django/trunk/django/template/defaulttags.py 2009-04-07 21:55:39 UTC (rev 
10438)
@@ -186,10 +186,7 @@
 if compare_to != self._last_seen:
 firstloop = (self._last_seen == None)
 self._last_seen = compare_to
-context.push()
-context['ifchanged'] = {'firstloop': firstloop}
 content = self.nodelist_true.render(context)
-context.pop()
 return content
 elif self.nodelist_false:
 return self.nodelist_false.render(context)


--~--~-~--~~~---~--~~
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] #8274: Auth views should allow form customization

2009-04-07 Thread Django
#8274: Auth views should allow form customization
+---
  Reporter:  julien | Owner:  julien
Status:  assigned   | Milestone:
 Component:  Authentication |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by chronos):

 * cc: philipe...@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-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] #10763: Allow custom AuthenticationForm in django.contrib.auth login view.

2009-04-07 Thread Django
#10763: Allow custom AuthenticationForm in django.contrib.auth login view.
-+--
  Reporter:  chronos | Owner:  nobody   
  
Status:  closed  | Milestone:  1.2  
  
 Component:  Authentication  |   Version:  1.1-beta-1   
  
Resolution:  duplicate   |  Keywords:  login, forms, 
authentication, customization, custom
 Stage:  Unreviewed  | Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

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

Comment:

 Dupe #8274.

-- 
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] #10571: FakePayload Truncates Unicode Content

2009-04-07 Thread Django
#10571: FakePayload Truncates Unicode Content
---+
  Reporter:  rwag...@physics.ucsd.edu  | Owner:  nobody
Status:  closed| Milestone:  1.1   
 Component:  Testing framework |   Version:  SVN   
Resolution:  worksforme|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jacob):

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

Comment:

 I can't reproduce this, and since Russ can't either I'm marking
 worksforme. If you can provide more information along the lines Russ asked
 please feel free to reopen.

-- 
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] r10437 - in django/branches/releases/1.0.X/django/contrib/gis: db/models/sql tests/relatedapp

2009-04-07 Thread noreply

Author: jbronn
Date: 2009-04-07 16:33:43 -0500 (Tue, 07 Apr 2009)
New Revision: 10437

Modified:
   django/branches/releases/1.0.X/django/contrib/gis/db/models/sql/query.py
   django/branches/releases/1.0.X/django/contrib/gis/tests/relatedapp/tests.py
Log:
[1.0.X] Fixed #10757 -- Fixed improper selection of primary keys across 
relations when using `GeoManager.values`.  Thanks, David Gouldin for ticket and 
initial patch.

Backport of r10434 from trunk.


Modified: 
django/branches/releases/1.0.X/django/contrib/gis/db/models/sql/query.py
===
--- django/branches/releases/1.0.X/django/contrib/gis/db/models/sql/query.py
2009-04-07 21:21:17 UTC (rev 10436)
+++ django/branches/releases/1.0.X/django/contrib/gis/db/models/sql/query.py
2009-04-07 21:33:43 UTC (rev 10437)
@@ -66,7 +66,7 @@
 # This loop customized for GeoQuery.
 for col, field in izip(self.select, self.select_fields):
 if isinstance(col, (list, tuple)):
-r = self.get_field_select(field, col[0])
+r = self.get_field_select(field, col[0], col[1])
 if with_aliases and col[1] in col_aliases:
 c_alias = 'Col%d' % len(col_aliases)
 result.append('%s AS %s' % (r, c_alias))
@@ -89,7 +89,7 @@
 # This loop customized for GeoQuery.
 if not self.aggregate:
 for (table, col), field in izip(self.related_select_cols, 
self.related_select_fields):
-r = self.get_field_select(field, table)
+r = self.get_field_select(field, table, col)
 if with_aliases and col in col_aliases:
 c_alias = 'Col%d' % len(col_aliases)
 result.append('%s AS %s' % (r, c_alias))
@@ -219,19 +219,20 @@
 sel_fmt = sel_fmt % self.custom_select[alias]
 return sel_fmt
 
-def get_field_select(self, fld, alias=None):
+def get_field_select(self, field, alias=None, column=None):
 """
 Returns the SELECT SQL string for the given field.  Figures out
-if any custom selection SQL is needed for the column  The `alias` 
-keyword may be used to manually specify the database table where 
-the column exists, if not in the model associated with this 
-`GeoQuery`.
+if any custom selection SQL is needed for the column  The `alias`
+keyword may be used to manually specify the database table where
+the column exists, if not in the model associated with this
+`GeoQuery`.  Similarly, `column` may be used to specify the exact
+column name, rather than using the `column` attribute on `field`.
 """
-sel_fmt = self.get_select_format(fld)
-if fld in self.custom_select:
-field_sel = sel_fmt % self.custom_select[fld]
+sel_fmt = self.get_select_format(field)
+if field in self.custom_select:
+field_sel = sel_fmt % self.custom_select[field]
 else:
-field_sel = sel_fmt % self._field_column(fld, alias)
+field_sel = sel_fmt % self._field_column(field, alias, column)
 return field_sel
 
 def get_select_format(self, fld):
@@ -293,17 +294,18 @@
 else:
 return False
 
-def _field_column(self, field, table_alias=None):
+def _field_column(self, field, table_alias=None, column=None):
 """
 Helper function that returns the database column for the given field.
 The table and column are returned (quoted) in the proper format, e.g.,
-`"geoapp_city"."point"`.  If `table_alias` is not specified, the 
+`"geoapp_city"."point"`.  If `table_alias` is not specified, the
 database table associated with the model of this `GeoQuery` will be
-used.
+used.  If `column` is specified, it will be used instead of the value
+in `field.column`.
 """
 if table_alias is None: table_alias = self.model._meta.db_table
-return "%s.%s" % (self.quote_name_unless_alias(table_alias), 
-  self.connection.ops.quote_name(field.column))
+return "%s.%s" % (self.quote_name_unless_alias(table_alias),
+  self.connection.ops.quote_name(column or 
field.column))
 
 def _geo_field(self, field_name=None):
 """

Modified: 
django/branches/releases/1.0.X/django/contrib/gis/tests/relatedapp/tests.py
===
--- django/branches/releases/1.0.X/django/contrib/gis/tests/relatedapp/tests.py 
2009-04-07 21:21:17 UTC (rev 10436)
+++ django/branches/releases/1.0.X/django/contrib/gis/tests/relatedapp/tests.py 
2009-04-07 21:33:43 UTC (rev 10437)
@@ -95,6 +95,26 @@
 # Regression test for #9752.
 l = list(DirectoryEntry.objects.all().select_related())
 
+def 

[Django] #10763: Allow custom AuthenticationForm in django.contrib.auth login view.

2009-04-07 Thread Django
#10763: Allow custom AuthenticationForm in django.contrib.auth login view.
-+--
 Reporter:  chronos  |   Owner: 
 nobody
   Status:  new  |   Milestone: 
 1.2   
Component:  Authentication   | Version: 
 1.1-beta-1
 Keywords:  login, forms, authentication, customization, custom  |   Stage: 
 Unreviewed
Has_patch:  1|  
-+--
 The idea is: allow develop to set a custom authentication form in login
 view without change much code.

 Support of custom forms is usefull if developer use a custom form class,
 if plan to make more things in authentication that default form does (if
 for some motive he not want to write your own view) and, after all, form
 is better place to validate trought e-mail instead username (a common
 request I think).

 This patch allow develop to send own authentication form to login view in
 urls.py and do what he wants in form.
 I attach patch, a urls.py snippet and a form that I used to show example.
 My form use https://launchpad.net/django-form-utils;>django-form-
 utils in case to allow more customizable forms.

-- 
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] #10742: ModelAdmin.list_select_related needs three-valued logic to support custom select_related() calls

2009-04-07 Thread Django
#10742: ModelAdmin.list_select_related needs three-valued logic to support 
custom
select_related() calls
---+
  Reporter:  mrts  | Owner:  nobody 
Status:  closed| Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:  duplicate |  Keywords:  efficient-admin
 Stage:  Unreviewed| Has_patch:  1  
Needs_docs:  1 |   Needs_tests:  1  
Needs_better_patch:  1 |  
---+
Changes (by jacob):

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

Comment:

 Duplicate of #10348

-- 
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] #10757: GeoManager.values does not properly select primary keys across relations

2009-04-07 Thread Django
#10757: GeoManager.values does not properly select primary keys across relations
---+
  Reporter:  dgouldin  | Owner:  nobody
Status:  closed| Milestone:  1.1   
 Component:  GIS   |   Version:  SVN   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 Closed in r10434

-- 
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] r10436 - in django/branches/releases/1.0.X: django/contrib/syndication tests/regressiontests/syndication

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 16:21:17 -0500 (Tue, 07 Apr 2009)
New Revision: 10436

Modified:
   django/branches/releases/1.0.X/django/contrib/syndication/feeds.py
   django/branches/releases/1.0.X/tests/regressiontests/syndication/feeds.py
   django/branches/releases/1.0.X/tests/regressiontests/syndication/tests.py
   django/branches/releases/1.0.X/tests/regressiontests/syndication/urls.py
Log:
[1.0.X] Fixed #9957: feeds now respect time zone information provided by the 
pub date. Backport of r10435 from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/syndication/feeds.py
===
--- django/branches/releases/1.0.X/django/contrib/syndication/feeds.py  
2009-04-07 21:20:14 UTC (rev 10435)
+++ django/branches/releases/1.0.X/django/contrib/syndication/feeds.py  
2009-04-07 21:21:17 UTC (rev 10436)
@@ -145,7 +145,7 @@
 author_email = author_link = None
 
 pubdate = self.__get_dynamic_attr('item_pubdate', item)
-if pubdate:
+if pubdate and not pubdate.tzinfo:
 now = datetime.now()
 utcnow = datetime.utcnow()
 

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/syndication/feeds.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/syndication/feeds.py   
2009-04-07 21:20:14 UTC (rev 10435)
+++ django/branches/releases/1.0.X/tests/regressiontests/syndication/feeds.py   
2009-04-07 21:21:17 UTC (rev 10436)
@@ -1,6 +1,7 @@
 from django.core.exceptions import ObjectDoesNotExist
 from django.contrib.syndication import feeds
 from django.utils.feedgenerator import Atom1Feed
+from django.utils import tzinfo
 
 class ComplexFeed(feeds.Feed):
 def get_object(self, bits):
@@ -46,3 +47,20 @@
 
 class TestCustomFeed(TestAtomFeed):
 feed_type = MyCustomAtom1Feed
+
+class NaiveDatesFeed(TestAtomFeed):
+"""
+A feed with naive (non-timezone-aware) dates.
+"""
+def item_pubdate(self, item):
+return item.date
+
+class TZAwareDatesFeed(TestAtomFeed):
+"""
+A feed with timezone-aware dates.
+"""
+def item_pubdate(self, item):
+# Provide a weird offset so that the test can know it's getting this
+# specific offset and not accidentally getting on from 
+# settings.TIME_ZONE.
+return item.date.replace(tzinfo=tzinfo.FixedOffset(42))
\ No newline at end of file

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/syndication/tests.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/syndication/tests.py   
2009-04-07 21:20:14 UTC (rev 10435)
+++ django/branches/releases/1.0.X/tests/regressiontests/syndication/tests.py   
2009-04-07 21:21:17 UTC (rev 10436)
@@ -1,8 +1,10 @@
 # -*- coding: utf-8 -*-
 
+import datetime
 from xml.dom import minidom
 from django.test import TestCase
 from django.test.client import Client
+from django.utils import tzinfo
 from models import Entry
 try:
 set
@@ -91,4 +93,27 @@
 link = item.getElementsByTagName('link')[0]
 if link.firstChild.wholeText == 'http://example.com/blog/4/':
 title = item.getElementsByTagName('title')[0]
-self.assertEquals(title.firstChild.wholeText, u'A  B  
C  D')
\ No newline at end of file
+self.assertEquals(title.firstChild.wholeText, u'A  B  
C  D')
+
+def test_naive_datetime_conversion(self):
+"""
+Test that datetimes are correctly converted to the local time zone.
+"""
+# Naive date times passed in get converted to the local time zone, so
+# check the recived zone offset against the local offset.
+response = self.client.get('/syndication/feeds/naive-dates/')
+doc = minidom.parseString(response.content)
+updated = doc.getElementsByTagName('updated')[0].firstChild.wholeText  
  
+tz = tzinfo.LocalTimezone(datetime.datetime.now())
+now = datetime.datetime.now(tz)
+self.assertEqual(updated[-6:], str(now)[-6:])
+
+def test_aware_datetime_conversion(self):
+"""
+Test that datetimes with timezones don't get trodden on.
+"""
+response = self.client.get('/syndication/feeds/aware-dates/')
+doc = minidom.parseString(response.content)
+updated = doc.getElementsByTagName('updated')[0].firstChild.wholeText
+self.assertEqual(updated[-6:], '+00:42')
+
\ No newline at end of file

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/syndication/urls.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/syndication/urls.py
2009-04-07 21:20:14 UTC (rev 10435)
+++ 

[Changeset] r10435 - in django/trunk: django/contrib/syndication tests/regressiontests/syndication

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 16:20:14 -0500 (Tue, 07 Apr 2009)
New Revision: 10435

Modified:
   django/trunk/django/contrib/syndication/feeds.py
   django/trunk/tests/regressiontests/syndication/feeds.py
   django/trunk/tests/regressiontests/syndication/tests.py
   django/trunk/tests/regressiontests/syndication/urls.py
Log:
Fixed #9957: feeds now respect time zone information provided by the pub date.

Modified: django/trunk/django/contrib/syndication/feeds.py
===
--- django/trunk/django/contrib/syndication/feeds.py2009-04-07 21:18:41 UTC 
(rev 10434)
+++ django/trunk/django/contrib/syndication/feeds.py2009-04-07 21:20:14 UTC 
(rev 10435)
@@ -145,7 +145,7 @@
 author_email = author_link = None
 
 pubdate = self.__get_dynamic_attr('item_pubdate', item)
-if pubdate:
+if pubdate and not pubdate.tzinfo:
 now = datetime.now()
 utcnow = datetime.utcnow()
 

Modified: django/trunk/tests/regressiontests/syndication/feeds.py
===
--- django/trunk/tests/regressiontests/syndication/feeds.py 2009-04-07 
21:18:41 UTC (rev 10434)
+++ django/trunk/tests/regressiontests/syndication/feeds.py 2009-04-07 
21:20:14 UTC (rev 10435)
@@ -1,6 +1,7 @@
 from django.core.exceptions import ObjectDoesNotExist
 from django.contrib.syndication import feeds
 from django.utils.feedgenerator import Atom1Feed
+from django.utils import tzinfo
 
 class ComplexFeed(feeds.Feed):
 def get_object(self, bits):
@@ -46,3 +47,20 @@
 
 class TestCustomFeed(TestAtomFeed):
 feed_type = MyCustomAtom1Feed
+
+class NaiveDatesFeed(TestAtomFeed):
+"""
+A feed with naive (non-timezone-aware) dates.
+"""
+def item_pubdate(self, item):
+return item.date
+
+class TZAwareDatesFeed(TestAtomFeed):
+"""
+A feed with timezone-aware dates.
+"""
+def item_pubdate(self, item):
+# Provide a weird offset so that the test can know it's getting this
+# specific offset and not accidentally getting on from 
+# settings.TIME_ZONE.
+return item.date.replace(tzinfo=tzinfo.FixedOffset(42))
\ No newline at end of file

Modified: django/trunk/tests/regressiontests/syndication/tests.py
===
--- django/trunk/tests/regressiontests/syndication/tests.py 2009-04-07 
21:18:41 UTC (rev 10434)
+++ django/trunk/tests/regressiontests/syndication/tests.py 2009-04-07 
21:20:14 UTC (rev 10435)
@@ -1,8 +1,10 @@
 # -*- coding: utf-8 -*-
 
+import datetime
 from xml.dom import minidom
 from django.test import TestCase
 from django.test.client import Client
+from django.utils import tzinfo
 from models import Entry
 try:
 set
@@ -91,4 +93,27 @@
 link = item.getElementsByTagName('link')[0]
 if link.firstChild.wholeText == 'http://example.com/blog/4/':
 title = item.getElementsByTagName('title')[0]
-self.assertEquals(title.firstChild.wholeText, u'A  B  
C  D')
\ No newline at end of file
+self.assertEquals(title.firstChild.wholeText, u'A  B  
C  D')
+
+def test_naive_datetime_conversion(self):
+"""
+Test that datetimes are correctly converted to the local time zone.
+"""
+# Naive date times passed in get converted to the local time zone, so
+# check the recived zone offset against the local offset.
+response = self.client.get('/syndication/feeds/naive-dates/')
+doc = minidom.parseString(response.content)
+updated = doc.getElementsByTagName('updated')[0].firstChild.wholeText  
  
+tz = tzinfo.LocalTimezone(datetime.datetime.now())
+now = datetime.datetime.now(tz)
+self.assertEqual(updated[-6:], str(now)[-6:])
+
+def test_aware_datetime_conversion(self):
+"""
+Test that datetimes with timezones don't get trodden on.
+"""
+response = self.client.get('/syndication/feeds/aware-dates/')
+doc = minidom.parseString(response.content)
+updated = doc.getElementsByTagName('updated')[0].firstChild.wholeText
+self.assertEqual(updated[-6:], '+00:42')
+
\ No newline at end of file

Modified: django/trunk/tests/regressiontests/syndication/urls.py
===
--- django/trunk/tests/regressiontests/syndication/urls.py  2009-04-07 
21:18:41 UTC (rev 10434)
+++ django/trunk/tests/regressiontests/syndication/urls.py  2009-04-07 
21:20:14 UTC (rev 10435)
@@ -1,12 +1,13 @@
-from feeds import TestRssFeed, TestAtomFeed, TestCustomFeed, ComplexFeed
+import feeds
 from django.conf.urls.defaults import patterns
 
 feed_dict = {
-'complex': ComplexFeed,
-'rss': TestRssFeed,
-'atom': TestAtomFeed,
-

[Django] #10762: Gzip Middleware Should Compress 201 (Created) Responses

2009-04-07 Thread Django
#10762: Gzip Middleware Should Compress 201 (Created) Responses
--+-
 Reporter:  rwag...@physics.ucsd.edu  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  HTTP handling | Version:  SVN   
 Keywords:  middleware gzip   |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 Hi,

 RESTful web services that use POST for creation of resources often respond
 with a representation of the newly created resource, which can be lengthy.
 However, the appropriate status code is 201, which the Gzip middleware
 ignores. There's a trivial patch attached that contains these lines:

 {{{
 -if response.status_code != 200 or len(response.content) < 200:
 +if response.status_code not in (200, 201) or
 len(response.content) < 200:
 }}}

 This is not a particularly big deal, just a convenience.

 Thanks,
 Rick

-- 
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] r10434 - in django/trunk/django/contrib/gis: db/models/sql tests/relatedapp

2009-04-07 Thread noreply

Author: jbronn
Date: 2009-04-07 16:18:41 -0500 (Tue, 07 Apr 2009)
New Revision: 10434

Modified:
   django/trunk/django/contrib/gis/db/models/sql/query.py
   django/trunk/django/contrib/gis/tests/relatedapp/tests.py
Log:
Fixed #10757 -- Fixed improper selection of primary keys across relations when 
using `GeoManager.values`.


Modified: django/trunk/django/contrib/gis/db/models/sql/query.py
===
--- django/trunk/django/contrib/gis/db/models/sql/query.py  2009-04-07 
20:30:04 UTC (rev 10433)
+++ django/trunk/django/contrib/gis/db/models/sql/query.py  2009-04-07 
21:18:41 UTC (rev 10434)
@@ -74,7 +74,7 @@
 table = self.alias_map[alias][TABLE_NAME]
 if table in only_load and col not in only_load[table]:
 continue
-r = self.get_field_select(field, alias)
+r = self.get_field_select(field, alias, column)
 if with_aliases:
 if col[1] in col_aliases:
 c_alias = 'Col%d' % len(col_aliases)
@@ -112,7 +112,7 @@
 
 # This loop customized for GeoQuery.
 for (table, col), field in izip(self.related_select_cols, 
self.related_select_fields):
-r = self.get_field_select(field, table)
+r = self.get_field_select(field, table, col)
 if with_aliases and col in col_aliases:
 c_alias = 'Col%d' % len(col_aliases)
 result.append('%s AS %s' % (r, c_alias))
@@ -213,7 +213,8 @@
 values = [self.convert_values(v, self.extra_select_fields.get(a, None))
   for v, a in izip(row[rn_offset:index_start], aliases)]
 if SpatialBackend.oracle or getattr(self, 'geo_values', False):
-# We resolve the columns 
+# We resolve the rest of the columns if we're on Oracle or if
+# the `geo_values` attribute is defined.
 for value, field in izip(row[index_start:], fields):
 values.append(self.convert_values(value, field))
 else:
@@ -260,19 +261,20 @@
 sel_fmt = sel_fmt % self.custom_select[alias]
 return sel_fmt
 
-def get_field_select(self, fld, alias=None):
+def get_field_select(self, field, alias=None, column=None):
 """
 Returns the SELECT SQL string for the given field.  Figures out
 if any custom selection SQL is needed for the column  The `alias`
 keyword may be used to manually specify the database table where
 the column exists, if not in the model associated with this
-`GeoQuery`.
+`GeoQuery`.  Similarly, `column` may be used to specify the exact
+column name, rather than using the `column` attribute on `field`.
 """
-sel_fmt = self.get_select_format(fld)
-if fld in self.custom_select:
-field_sel = sel_fmt % self.custom_select[fld]
+sel_fmt = self.get_select_format(field)
+if field in self.custom_select:
+field_sel = sel_fmt % self.custom_select[field]
 else:
-field_sel = sel_fmt % self._field_column(fld, alias)
+field_sel = sel_fmt % self._field_column(field, alias, column)
 return field_sel
 
 def get_select_format(self, fld):
@@ -302,17 +304,18 @@
 return sel_fmt
 
 # Private API utilities, subject to change.
-def _field_column(self, field, table_alias=None):
+def _field_column(self, field, table_alias=None, column=None):
 """
 Helper function that returns the database column for the given field.
 The table and column are returned (quoted) in the proper format, e.g.,
 `"geoapp_city"."point"`.  If `table_alias` is not specified, the
 database table associated with the model of this `GeoQuery` will be
-used.
+used.  If `column` is specified, it will be used instead of the value
+in `field.column`.
 """
 if table_alias is None: table_alias = self.model._meta.db_table
 return "%s.%s" % (self.quote_name_unless_alias(table_alias),
-  self.connection.ops.quote_name(field.column))
+  self.connection.ops.quote_name(column or 
field.column))
 
 def _geo_field(self, field_name=None):
 """

Modified: django/trunk/django/contrib/gis/tests/relatedapp/tests.py
===
--- django/trunk/django/contrib/gis/tests/relatedapp/tests.py   2009-04-07 
20:30:04 UTC (rev 10433)
+++ django/trunk/django/contrib/gis/tests/relatedapp/tests.py   2009-04-07 
21:18:41 UTC (rev 10434)
@@ -183,7 +183,6 @@
 self.assertEqual(m.point, d['point'])
 self.assertEqual(m.point, t[1])
 
-# Test disabled until #10572 is resolved.
 def test08_defer_only(self):
 "Testing defer() and only() on 

[Django] #10761: ModelAdmin.queryset() is missing a mechanism for specifying different querysets for changelist and change object views

2009-04-07 Thread Django
#10761: ModelAdmin.queryset() is missing a mechanism for specifying different
querysets for changelist and change object views
--+-
 Reporter:  mrts  |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 `ModelAdmin.queryset()` is used both in the changelist and change object
 views.

 Suppose some fields are deferred in the returned queryset to speed up
 changelist rendering. As a result, the object change view has to perform
 additional queries for all the deferred fields to pull them in.

 The proposed solution is to add another parameter to `queryset()` that
 specifies whether a changelist or change object queryset should be
 returned as follows:
 {{{
 def queryset(self, request, for_change_object_view=False):
 }}}

-- 
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] #10738: ContentType and model instances with deferred fields

2009-04-07 Thread Django
#10738: ContentType and model instances with deferred fields
---+
  Reporter:  tomasz.elendt | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Changes (by tomasz.elendt):

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

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



Re: [Django] #10060: Multiple table annotation failure

2009-04-07 Thread Django
#10060: Multiple table annotation failure
--+-
  Reporter:  svsha...@intellecap.net  | Owner: 
Status:  new  | Milestone:  1.1
 Component:  ORM aggregation  |   Version:  SVN
Resolution:   |  Keywords: 
 Stage:  Accepted | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Comment (by bendavis78):

 From what I've researched,  joining on subqueries would be faster than
 subqueries in the SELECT clause.  So instead of this:
 {{{
 #!sql
 SELECT
   u.email,
   (SELECT SUM(points) FROM point_earning WHERE user_id=u.id) AS
 points_earned,
   (SELECT SUM(points) FROM point_expense WHERE user_id=u.id) AS
 points_spent
 FROM
   "user" u
 }}}

 ...we would want this:
 {{{
 #!sql
 SELECT
   u.email,
   a.points AS points_earned,
   b.points AS points_spent
 FROM
   "user" u
   LEFT OUTER JOIN (SELECT user_id, SUM(points) AS points FROM
 point_earning GROUP BY user_id) a ON a.user_id=u.id
   LEFT OUTER JOIN (SELECT user_id, SUM(points) AS points FROM
 point_expense GROUP BY user_id) b ON b.user_id=u.id
 ORDER BY u.id
 }}}

 What this does, essentially, is move the aggregate function into a derived
 table which we join onto the main table.  I would imagine a solution to
 this bug would detect if annotations are being used across multiple
 relations, and if so, would adjust the join and select clauses as
 necessary.  I may attempt to write a patch for this soon,  but it seems
 like it would be tough, so there's no guarantees :-p

 Thoughts?

-- 
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] #10739: MySQL and order_by()

2009-04-07 Thread Django
#10739: MySQL and order_by()
---+
  Reporter:  stephaner | Owner:  nobody
Status:  closed| Milestone:  1.0.3 
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:  invalid   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by stephaner):

 Russel,
 you're right my bug report sucks and I won't take offense for that!
 You're kind to reply with a long explanation :)

 I'll try to create a real bug report as soon as I've free time. The bug is
 really nasty because I can reproduce it on 2 of my PC but another Damned
 Lies developer can't so I'm intend to create a minimal Django project with
 fixtures and the failing test (I hope to be able to isolate the bug) then
 I'll test this minimal project on other Linux distributions before
 submitting the new report. I've also begun to test different MySQL
 settings.

 PS: I don't like MySQL, grrr!

-- 
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] #9800: Syndication Framework could implement isPermaLink": "false" to better follow the recommendations of the RSS Advisory Board

2009-04-07 Thread Django
#9800: Syndication Framework could implement isPermaLink": "false"  to better
follow the recommendations of the RSS Advisory Board
+---
  Reporter:  martin   | Owner:  nobody
Status:  closed | Milestone:  1.1   
 Component:  RSS framework  |   Version:  1.0   
Resolution:  wontfix|  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by jacob):

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

Comment:

 Unfortunately, we can't know just from the guid/link whether it is in fact
 a valid permalink or not. So this patch won't actually work for everyone.
 If you want validity, use Atom.

-- 
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] r10433 - django/branches/releases/1.0.X/django/contrib/syndication

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 15:30:04 -0500 (Tue, 07 Apr 2009)
New Revision: 10433

Modified:
   django/branches/releases/1.0.X/django/contrib/syndication/feeds.py
Log:
[1.0.X] Fixed #9555: respect the `feed_url` feed parameter. Thanks, sedden. 
Backport of r10432 from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/syndication/feeds.py
===
--- django/branches/releases/1.0.X/django/contrib/syndication/feeds.py  
2009-04-07 20:29:33 UTC (rev 10432)
+++ django/branches/releases/1.0.X/django/contrib/syndication/feeds.py  
2009-04-07 20:30:04 UTC (rev 10433)
@@ -23,13 +23,14 @@
 item_pubdate = None
 item_enclosure_url = None
 feed_type = feedgenerator.DefaultFeed
+feed_url = None
 title_template = None
 description_template = None
 
 def __init__(self, slug, request):
 self.slug = slug
 self.request = request
-self.feed_url = request.path
+self.feed_url = self.feed_url or request.path
 self.title_template_name = self.title_template or 
('feeds/%s_title.html' % slug)
 self.description_template_name = self.description_template or 
('feeds/%s_description.html' % slug)
 


--~--~-~--~~~---~--~~
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] r10432 - django/trunk/django/contrib/syndication

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 15:29:33 -0500 (Tue, 07 Apr 2009)
New Revision: 10432

Modified:
   django/trunk/django/contrib/syndication/feeds.py
Log:
Fixed #9555: respect the `feed_url` feed parameter. Thanks, sedden.

Modified: django/trunk/django/contrib/syndication/feeds.py
===
--- django/trunk/django/contrib/syndication/feeds.py2009-04-07 20:23:54 UTC 
(rev 10431)
+++ django/trunk/django/contrib/syndication/feeds.py2009-04-07 20:29:33 UTC 
(rev 10432)
@@ -23,13 +23,14 @@
 item_pubdate = None
 item_enclosure_url = None
 feed_type = feedgenerator.DefaultFeed
+feed_url = None
 title_template = None
 description_template = None
 
 def __init__(self, slug, request):
 self.slug = slug
 self.request = request
-self.feed_url = request.path
+self.feed_url = self.feed_url or request.path
 self.title_template_name = self.title_template or 
('feeds/%s_title.html' % slug)
 self.description_template_name = self.description_template or 
('feeds/%s_description.html' % slug)
 


--~--~-~--~~~---~--~~
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] #8412: When there is a DateTimeField in, data saved with dumpdata cannot be reloaded using loaddata (on German Systems)

2009-04-07 Thread Django
#8412: When there is a DateTimeField in, data saved with dumpdata cannot be
reloaded using loaddata (on German Systems)
-+--
  Reporter:  Mark Essien   | Owner:  
nobody 
Status:  closed  | Milestone:  1.1  
  
 Component:  Serialization   |   Version:  SVN  
  
Resolution:  worksforme  |  Keywords:  
loaddata dumpdata DateTimeField
 Stage:  Accepted| Has_patch:  0
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  0   |  
-+--
Changes (by jacob):

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

-- 
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] #5563: BooleanField should raise an error if null=True

2009-04-07 Thread Django
#5563: BooleanField should raise an error if null=True
---+
  Reporter:  shaunc   | Owner:  SamBull
Status:  assigned  | Milestone:  1.1
 Component:  Serialization |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Design decision needed| Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * stage:  Accepted => Design decision needed

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



Re: [Django] #10169: Redirect in contrib.comments incorrect with default template

2009-04-07 Thread Django
#10169: Redirect in contrib.comments incorrect with default template
--+-
  Reporter:  ryan_freckleton  | Owner:  nobody  
 
Status:  closed   | Milestone:  1.1 
 
 Component:  django.contrib.comments  |   Version:  1.0 
 
Resolution:  fixed|  Keywords:  comments 
redirect bug
 Stage:  Accepted | Has_patch:  0   
 
Needs_docs:  0|   Needs_tests:  0   
 
Needs_better_patch:  0|  
--+-
Changes (by jacob):

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

Comment:

 Fixed in r10429.

-- 
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] r10431 - django/branches/releases/1.0.X/django/contrib/comments/templates/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 15:23:54 -0500 (Tue, 07 Apr 2009)
New Revision: 10431

Modified:
   
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/approve.html
   
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/delete.html
   
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/flag.html
Log:
[1.0.X] Fixed #10169: don't accidentally try to redirect to "None" after 
posting a comment. Backport of r10429 from trunk.

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/approve.html
===
--- 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/approve.html
  2009-04-07 20:23:42 UTC (rev 10430)
+++ 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/approve.html
  2009-04-07 20:23:54 UTC (rev 10431)
@@ -7,7 +7,7 @@
   {% trans "Really make this comment public?" %}
   {{ comment|linebreaks }}
   
-
+{% if next %}{% endif %}
 
or 
cancel
 

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/delete.html
===
--- 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/delete.html
   2009-04-07 20:23:42 UTC (rev 10430)
+++ 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/delete.html
   2009-04-07 20:23:54 UTC (rev 10431)
@@ -7,7 +7,7 @@
 {% trans "Really remove this comment?" %}
   {{ comment|linebreaks }}
   
-
+{% if next %}{% endif %}
 
  or cancel
 

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/flag.html
===
--- 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/flag.html
 2009-04-07 20:23:42 UTC (rev 10430)
+++ 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/flag.html
 2009-04-07 20:23:54 UTC (rev 10431)
@@ -7,7 +7,7 @@
 {% trans "Really flag this comment?" %}
   {{ comment|linebreaks }}
   
-
+{% if next %}{% endif %}
 
  or cancel
 


--~--~-~--~~~---~--~~
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] r10429 - django/trunk/django/contrib/comments/templates/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 15:22:36 -0500 (Tue, 07 Apr 2009)
New Revision: 10429

Modified:
   django/trunk/django/contrib/comments/templates/comments/approve.html
   django/trunk/django/contrib/comments/templates/comments/delete.html
   django/trunk/django/contrib/comments/templates/comments/flag.html
Log:
Fixed #10169: don't accidentally try to redirect to "None" after posting a 
comment.

Modified: django/trunk/django/contrib/comments/templates/comments/approve.html
===
--- django/trunk/django/contrib/comments/templates/comments/approve.html
2009-04-07 20:12:08 UTC (rev 10428)
+++ django/trunk/django/contrib/comments/templates/comments/approve.html
2009-04-07 20:22:36 UTC (rev 10429)
@@ -7,7 +7,7 @@
   {% trans "Really make this comment public?" %}
   {{ comment|linebreaks }}
   
-
+{% if next %}{% endif %}
 
or 
cancel
 

Modified: django/trunk/django/contrib/comments/templates/comments/delete.html
===
--- django/trunk/django/contrib/comments/templates/comments/delete.html 
2009-04-07 20:12:08 UTC (rev 10428)
+++ django/trunk/django/contrib/comments/templates/comments/delete.html 
2009-04-07 20:22:36 UTC (rev 10429)
@@ -7,7 +7,7 @@
 {% trans "Really remove this comment?" %}
   {{ comment|linebreaks }}
   
-
+{% if next %}{% endif %}
 
  or cancel
 

Modified: django/trunk/django/contrib/comments/templates/comments/flag.html
===
--- django/trunk/django/contrib/comments/templates/comments/flag.html   
2009-04-07 20:12:08 UTC (rev 10428)
+++ django/trunk/django/contrib/comments/templates/comments/flag.html   
2009-04-07 20:22:36 UTC (rev 10429)
@@ -7,7 +7,7 @@
 {% trans "Really flag this comment?" %}
   {{ comment|linebreaks }}
   
-
+{% if next %}{% endif %}
 
  or cancel
 


--~--~-~--~~~---~--~~
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] r10428 - in django/trunk/django/contrib/gis: db/backend/spatialite db/models tests/geoapp

2009-04-07 Thread noreply

Author: jbronn
Date: 2009-04-07 15:12:08 -0500 (Tue, 07 Apr 2009)
New Revision: 10428

Modified:
   django/trunk/django/contrib/gis/db/backend/spatialite/__init__.py
   django/trunk/django/contrib/gis/db/backend/spatialite/query.py
   django/trunk/django/contrib/gis/db/models/query.py
   django/trunk/django/contrib/gis/tests/geoapp/tests.py
Log:
Now support SVG output in SpatiaLite; added tests for SVG output.


Modified: django/trunk/django/contrib/gis/db/backend/spatialite/__init__.py
===
--- django/trunk/django/contrib/gis/db/backend/spatialite/__init__.py   
2009-04-07 19:57:01 UTC (rev 10427)
+++ django/trunk/django/contrib/gis/db/backend/spatialite/__init__.py   
2009-04-07 20:12:08 UTC (rev 10428)
@@ -47,6 +47,7 @@
 point_on_surface=POINT_ON_SURFACE,
 scale=SCALE,
 select=GEOM_SELECT,
+svg=ASSVG,
 sym_difference=SYM_DIFFERENCE,
 transform=TRANSFORM,
 translate=TRANSLATE,

Modified: django/trunk/django/contrib/gis/db/backend/spatialite/query.py
===
--- django/trunk/django/contrib/gis/db/backend/spatialite/query.py  
2009-04-07 19:57:01 UTC (rev 10427)
+++ django/trunk/django/contrib/gis/db/backend/spatialite/query.py  
2009-04-07 20:12:08 UTC (rev 10428)
@@ -17,6 +17,7 @@
 
 # Functions used by the GeoManager & GeoQuerySet
 AREA = get_func('Area')
+ASSVG = get_func('AsSVG')
 CENTROID = get_func('Centroid')
 CONTAINED = get_func('MbrWithin')
 DIFFERENCE = get_func('Difference')

Modified: django/trunk/django/contrib/gis/db/models/query.py
===
--- django/trunk/django/contrib/gis/db/models/query.py  2009-04-07 19:57:01 UTC 
(rev 10427)
+++ django/trunk/django/contrib/gis/db/models/query.py  2009-04-07 20:12:08 UTC 
(rev 10428)
@@ -275,15 +275,26 @@
 
 return self._spatial_attribute('snap_to_grid', s, **kwargs)
 
-def svg(self, **kwargs):
+def svg(self, relative=False, precision=8, **kwargs):
 """
 Returns SVG representation of the geographic field in a `svg`
 attribute on each element of this GeoQuerySet.
+
+Keyword Arguments:
+ `relative`  => If set to True, this will evaluate the path in
+terms of relative moves (rather than absolute).
+
+ `precision` => May be used to set the maximum number of decimal
+digits used in output (defaults to 8).
 """
+relative = int(bool(relative))
+if not isinstance(precision, (int, long)): 
+raise TypeError('SVG precision keyword argument must be an 
integer.')
 s = {'desc' : 'SVG',
  'procedure_fmt' : '%(geo_col)s,%(rel)s,%(precision)s',
- 'procedure_args' : {'rel' : int(kwargs.pop('relative', 0)),
- 'precision' : kwargs.pop('precision', 8)},
+ 'procedure_args' : {'rel' : relative,
+ 'precision' : precision,
+ }
  }
 return self._spatial_attribute('svg', s, **kwargs)
 

Modified: django/trunk/django/contrib/gis/tests/geoapp/tests.py
===
--- django/trunk/django/contrib/gis/tests/geoapp/tests.py   2009-04-07 
19:57:01 UTC (rev 10427)
+++ django/trunk/django/contrib/gis/tests/geoapp/tests.py   2009-04-07 
20:12:08 UTC (rev 10428)
@@ -196,6 +196,19 @@
 # Finally, we set every available keyword.
 self.assertEqual(City.objects.geojson(bbox=True, crs=True, 
precision=5).get(name='Chicago').geojson, json)
 
+@no_oracle
+def test03d_svg(self):
+"Testing SVG output using GeoQuerySet.svg()."
+if DISABLE: return
+self.assertRaises(TypeError, City.objects.svg, precision='foo')
+# SELECT AsSVG(geoapp_city.point, 0, 8) FROM geoapp_city WHERE name = 
'Pueblo';
+svg1 = 'cx="-104.609252" cy="-38.255001"'
+# Even though relative, only one point so it's practically the same 
except for
+# the 'c' letter prefix on the x,y values.
+svg2 = svg1.replace('c', '')
+self.assertEqual(svg1, City.objects.svg().get(name='Pueblo').svg)
+self.assertEqual(svg2, 
City.objects.svg(relative=5).get(name='Pueblo').svg)
+
 def test04_transform(self):
 "Testing the transform() GeoManager method."
 if DISABLE: return
@@ -499,10 +512,8 @@
 union = union1
 self.assertEqual(True, union.equals_exact(u1, tol))
 self.assertEqual(True, union.equals_exact(u2, tol))
-# SpatiaLite will segfault trying to union a NULL geometry.
-  

[Changeset] r10421 - django/branches/releases/1.0.X/django/contrib/comments/templates/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:35:11 -0500 (Tue, 07 Apr 2009)
New Revision: 10421

Modified:
   
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
   
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
Log:
[1.0.X] Fixed #9792: corrected invalid HTML in the comment form and comment 
preview. Backport of r10420 from trunk.

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
===
--- 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
 2009-04-07 19:34:21 UTC (rev 10420)
+++ 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
 2009-04-07 19:35:11 UTC (rev 10421)
@@ -5,10 +5,10 @@
 {% if field.is_hidden %}
   {{ field }}
 {% else %}
+  {% if field.errors %}{{ field.errors }}{% endif %}
   
-{% if field.errors %}{{ field.errors }}{% endif %}
 {{ field.label_tag }} {{ field }}
   
 {% endif %}

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
===
--- 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
  2009-04-07 19:34:21 UTC (rev 10420)
+++ 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
  2009-04-07 19:35:11 UTC (rev 10421)
@@ -20,10 +20,10 @@
   {% if field.is_hidden %}
 {{ field }}
   {% else %}
+{% if field.errors %}{{ field.errors }}{% endif %}
 
-  {% if field.errors %}{{ field.errors }}{% endif %}
   {{ field.label_tag }} {{ field }}
 
   {% endif %}


--~--~-~--~~~---~--~~
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] #10677: post_save_moderation breaks confirmation view

2009-04-07 Thread Django
#10677: post_save_moderation breaks confirmation view
--+-
  Reporter:  nate-dja...@refried.org  | Owner:  nobody  
  
Status:  new  | Milestone:  1.1 
  
 Component:  django.contrib.comments  |   Version:  1.1-beta-1  
  
Resolution:   |  Keywords:  django comments 
moderation
 Stage:  Accepted | Has_patch:  1   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  0|  
--+-
Comment (by jacob):

 If you make this change the comment moderators tests start failing.
 Someone will need to explain why before this can go in.

-- 
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] r10423 - django/branches/releases/1.0.X/django/contrib/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:41:31 -0500 (Tue, 07 Apr 2009)
New Revision: 10423

Modified:
   django/branches/releases/1.0.X/django/contrib/comments/urls.py
Log:
[1.0.X] Fixed #9956: relax the URL pattern for primary keys in the comment 
redirect so that models with custom PKs aren't cut out of the loop. Backport of 
r10422 from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/comments/urls.py
===
--- django/branches/releases/1.0.X/django/contrib/comments/urls.py  
2009-04-07 19:40:59 UTC (rev 10422)
+++ django/branches/releases/1.0.X/django/contrib/comments/urls.py  
2009-04-07 19:41:31 UTC (rev 10423)
@@ -13,6 +13,6 @@
 )
 
 urlpatterns += patterns('',
-url(r'^cr/(\d+)/(\w+)/$', 'django.views.defaults.shortcut', 
name='comments-url-redirect'),
+url(r'^cr/(\d+)/(.+)/$', 'django.views.defaults.shortcut', 
name='comments-url-redirect'),
 )
 


--~--~-~--~~~---~--~~
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] r10418 - in django/trunk: django/contrib/comments/templates/comments django/contrib/comments/views docs/ref/contrib/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:28:13 -0500 (Tue, 07 Apr 2009)
New Revision: 10418

Modified:
   django/trunk/django/contrib/comments/templates/comments/form.html
   django/trunk/django/contrib/comments/templates/comments/preview.html
   django/trunk/django/contrib/comments/views/comments.py
   django/trunk/docs/ref/contrib/comments/index.txt
Log:
Fixed #9268: pass the "next" param through in the comment preview/post view. 
Also updated the docs to make this a bit clearer.

Modified: django/trunk/django/contrib/comments/templates/comments/form.html
===
--- django/trunk/django/contrib/comments/templates/comments/form.html   
2009-04-07 19:13:15 UTC (rev 10417)
+++ django/trunk/django/contrib/comments/templates/comments/form.html   
2009-04-07 19:28:13 UTC (rev 10418)
@@ -1,5 +1,6 @@
 {% load comments i18n %}
 
+  {% if next %}{% endif 
%}
   {% for field in form %}
 {% if field.is_hidden %}
   {{ field }}

Modified: django/trunk/django/contrib/comments/templates/comments/preview.html
===
--- django/trunk/django/contrib/comments/templates/comments/preview.html
2009-04-07 19:13:15 UTC (rev 10417)
+++ django/trunk/django/contrib/comments/templates/comments/preview.html
2009-04-07 19:28:13 UTC (rev 10418)
@@ -6,6 +6,7 @@
 {% block content %}
   {% load comments %}
   
+{% if next %}{% 
endif %}
 {% if form.errors %}
 {% blocktrans count form.errors|length as counter %}Please correct the 
error below{% plural %}Please correct the errors below{% endblocktrans %}
 {% else %}

Modified: django/trunk/django/contrib/comments/views/comments.py
===
--- django/trunk/django/contrib/comments/views/comments.py  2009-04-07 
19:13:15 UTC (rev 10417)
+++ django/trunk/django/contrib/comments/views/comments.py  2009-04-07 
19:28:13 UTC (rev 10418)
@@ -80,6 +80,7 @@
 template_list, {
 "comment" : form.data.get("comment", ""),
 "form" : form,
+"next": next,
 },
 RequestContext(request, {})
 )

Modified: django/trunk/docs/ref/contrib/comments/index.txt
===
--- django/trunk/docs/ref/contrib/comments/index.txt2009-04-07 19:13:15 UTC 
(rev 10417)
+++ django/trunk/docs/ref/contrib/comments/index.txt2009-04-07 19:28:13 UTC 
(rev 10418)
@@ -180,6 +180,14 @@
 
 
 
+Redirecting after the comment post
+~~
+
+To specify the URL you want to redirect to after the comment has been posted,
+you can include a hidden form input called ``next`` in your comment form. For 
example::
+ 
+
+
 .. _notes-on-the-comment-form:
 
 Notes on the comment form


--~--~-~--~~~---~--~~
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] r10422 - django/trunk/django/contrib/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:40:59 -0500 (Tue, 07 Apr 2009)
New Revision: 10422

Modified:
   django/trunk/django/contrib/comments/urls.py
Log:
Fixed #9956: relax the URL pattern for primary keys in the comment redirect so 
that models with custom PKs aren't cut out of the loop.

Modified: django/trunk/django/contrib/comments/urls.py
===
--- django/trunk/django/contrib/comments/urls.py2009-04-07 19:35:11 UTC 
(rev 10421)
+++ django/trunk/django/contrib/comments/urls.py2009-04-07 19:40:59 UTC 
(rev 10422)
@@ -13,6 +13,6 @@
 )
 
 urlpatterns += patterns('',
-url(r'^cr/(\d+)/(\w+)/$', 'django.views.defaults.shortcut', 
name='comments-url-redirect'),
+url(r'^cr/(\d+)/(.+)/$', 'django.views.defaults.shortcut', 
name='comments-url-redirect'),
 )
 


--~--~-~--~~~---~--~~
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] r10424 - in django/trunk: django/contrib/comments/views tests/regressiontests/comment_tests/tests

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:49:07 -0500 (Tue, 07 Apr 2009)
New Revision: 10424

Modified:
   django/trunk/django/contrib/comments/views/utils.py
   django/trunk/tests/regressiontests/comment_tests/tests/comment_view_tests.py
Log:
Fixed #10585: comment redirects built from the `next` parameter now work 
correctly when `next` already contains a query string.

Modified: django/trunk/django/contrib/comments/views/utils.py
===
--- django/trunk/django/contrib/comments/views/utils.py 2009-04-07 19:41:31 UTC 
(rev 10423)
+++ django/trunk/django/contrib/comments/views/utils.py 2009-04-07 19:49:07 UTC 
(rev 10424)
@@ -25,7 +25,8 @@
 if next is None:
 next = urlresolvers.reverse(default_view)
 if get_kwargs:
-next += "?" + urllib.urlencode(get_kwargs)
+joiner = ('?' in next) and '&' or '?'
+next += joiner + urllib.urlencode(get_kwargs)
 return HttpResponseRedirect(next)
 
 def confirmation_view(template, doc="Display a confirmation view."):

Modified: 
django/trunk/tests/regressiontests/comment_tests/tests/comment_view_tests.py
===
--- 
django/trunk/tests/regressiontests/comment_tests/tests/comment_view_tests.py
2009-04-07 19:41:31 UTC (rev 10423)
+++ 
django/trunk/tests/regressiontests/comment_tests/tests/comment_view_tests.py
2009-04-07 19:49:07 UTC (rev 10424)
@@ -207,3 +207,16 @@
 self.assertTemplateUsed(response, "comments/posted.html")
 self.assertEqual(response.context[0]["comment"], 
Comment.objects.get(pk=pk))
 
+def testCommentNextWithQueryString(self):
+"""
+The `next` key needs to handle already having a query string (#10585)
+"""
+a = Article.objects.get(pk=1)
+data = self.getValidData(a)
+data["next"] = "/somewhere/else/?foo=bar"
+data["comment"] = "This is another comment"
+response = self.client.post("/post/", data)
+location = response["Location"]
+match = 
re.search(r"^http://testserver/somewhere/else/\?foo=bar=\d+$;, location)
+self.failUnless(match != None, "Unexpected redirect location: %s" % 
location)
+
\ No newline at end of file


--~--~-~--~~~---~--~~
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] r10427 - django/trunk/django/contrib/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:57:01 -0500 (Tue, 07 Apr 2009)
New Revision: 10427

Modified:
   django/trunk/django/contrib/comments/feeds.py
   django/trunk/django/contrib/comments/models.py
Log:
Fixed #10633, #10691: marked strings in the comments app for translation. 
Thanks, zgoda.

Modified: django/trunk/django/contrib/comments/feeds.py
===
--- django/trunk/django/contrib/comments/feeds.py   2009-04-07 19:53:42 UTC 
(rev 10426)
+++ django/trunk/django/contrib/comments/feeds.py   2009-04-07 19:57:01 UTC 
(rev 10427)
@@ -2,6 +2,7 @@
 from django.contrib.syndication.feeds import Feed
 from django.contrib.sites.models import Site
 from django.contrib import comments
+from django.utils.translation import ugettext as _
 
 class LatestCommentFeed(Feed):
 """Feed of latest comments on the current site."""
@@ -9,7 +10,7 @@
 def title(self):
 if not hasattr(self, '_site'):
 self._site = Site.objects.get_current()
-return u"%s comments" % self._site.name
+return _("%(site_name)s comments") % dict(site_name=self._site.name)
 
 def link(self):
 if not hasattr(self, '_site'):
@@ -19,7 +20,7 @@
 def description(self):
 if not hasattr(self, '_site'):
 self._site = Site.objects.get_current()
-return u"Latest comments on %s" % self._site.name
+return _("Latest comments on %(site_name)s") % 
dict(site_name=self._site.name)
 
 def items(self):
 qs = comments.get_model().objects.filter(

Modified: django/trunk/django/contrib/comments/models.py
===
--- django/trunk/django/contrib/comments/models.py  2009-04-07 19:53:42 UTC 
(rev 10426)
+++ django/trunk/django/contrib/comments/models.py  2009-04-07 19:57:01 UTC 
(rev 10427)
@@ -19,6 +19,7 @@
 
 # Content-object field
 content_type   = models.ForeignKey(ContentType,
+verbose_name=_('content type'),
 related_name="content_type_set_for_%(class)s")
 object_pk  = models.TextField(_('object ID'))
 content_object = generic.GenericForeignKey(ct_field="content_type", 
fk_field="object_pk")
@@ -46,7 +47,8 @@
 # Who posted this comment? If ``user`` is set then it was an authenticated
 # user; otherwise at least user_name should have been set and the comment
 # was posted by a non-authenticated user.
-user= models.ForeignKey(User, blank=True, null=True, 
related_name="%(class)s_comments")
+user= models.ForeignKey(User, verbose_name=_('user'),
+blank=True, null=True, related_name="%(class)s_comments")
 user_name   = models.CharField(_("user's name"), max_length=50, blank=True)
 user_email  = models.EmailField(_("user's email address"), blank=True)
 user_url= models.URLField(_("user's URL"), blank=True)
@@ -71,6 +73,8 @@
 db_table = "django_comments"
 ordering = ('submit_date',)
 permissions = [("can_moderate", "Can moderate comments")]
+verbose_name = _('comment')
+verbose_name_plural = _('comments')
 
 def __unicode__(self):
 return "%s: %s..." % (self.name, self.comment[:50])
@@ -161,10 +165,10 @@
 design users are only allowed to flag a comment with a given flag once;
 if you want rating look elsewhere.
 """
-user  = models.ForeignKey(User, related_name="comment_flags")
-comment   = models.ForeignKey(Comment, related_name="flags")
-flag  = models.CharField(max_length=30, db_index=True)
-flag_date = models.DateTimeField(default=None)
+user  = models.ForeignKey(User, verbose_name=_('user'), 
related_name="comment_flags")
+comment   = models.ForeignKey(Comment, verbose_name=_('comment'), 
related_name="flags")
+flag  = models.CharField(_('flag'), max_length=30, db_index=True)
+flag_date = models.DateTimeField(_('date'), default=None)
 
 # Constants for flag types
 SUGGEST_REMOVAL = "removal suggestion"
@@ -174,6 +178,8 @@
 class Meta:
 db_table = 'django_comment_flags'
 unique_together = [('user', 'comment', 'flag')]
+verbose_name = _('comment flag')
+verbose_name_plural = _('comment flags')
 
 def __unicode__(self):
 return "%s flag of comment ID %s by %s" % \


--~--~-~--~~~---~--~~
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] r10419 - in django/branches/releases/1.0.X: django/contrib/comments/templates/comments django/contrib/comments/views docs/ref/contrib/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:29:34 -0500 (Tue, 07 Apr 2009)
New Revision: 10419

Modified:
   
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
   
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
   django/branches/releases/1.0.X/django/contrib/comments/views/comments.py
   django/branches/releases/1.0.X/docs/ref/contrib/comments/index.txt
Log:
[1.0.X] Fixed #9268: pass the "next" param through in the comment preview/post 
view. Also updated the docs to make this a bit clearer. Backport of r10418 from 
trunk.

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
===
--- 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
 2009-04-07 19:28:13 UTC (rev 10418)
+++ 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/form.html
 2009-04-07 19:29:34 UTC (rev 10419)
@@ -1,5 +1,6 @@
 {% load comments i18n %}
 
+  {% if next %}{% endif 
%}
   {% for field in form %}
 {% if field.is_hidden %}
   {{ field }}

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
===
--- 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
  2009-04-07 19:28:13 UTC (rev 10418)
+++ 
django/branches/releases/1.0.X/django/contrib/comments/templates/comments/preview.html
  2009-04-07 19:29:34 UTC (rev 10419)
@@ -6,6 +6,7 @@
 {% block content %}
   {% load comments %}
   
+{% if next %}{% 
endif %}
 {% if form.errors %}
 {% blocktrans count form.errors|length as counter %}Please correct the 
error below{% plural %}Please correct the errors below{% endblocktrans %}
 {% else %}

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/views/comments.py
===
--- django/branches/releases/1.0.X/django/contrib/comments/views/comments.py
2009-04-07 19:28:13 UTC (rev 10418)
+++ django/branches/releases/1.0.X/django/contrib/comments/views/comments.py
2009-04-07 19:29:34 UTC (rev 10419)
@@ -80,6 +80,7 @@
 template_list, {
 "comment" : form.data.get("comment", ""),
 "form" : form,
+"next": next,
 },
 RequestContext(request, {})
 )

Modified: django/branches/releases/1.0.X/docs/ref/contrib/comments/index.txt
===
--- django/branches/releases/1.0.X/docs/ref/contrib/comments/index.txt  
2009-04-07 19:28:13 UTC (rev 10418)
+++ django/branches/releases/1.0.X/docs/ref/contrib/comments/index.txt  
2009-04-07 19:29:34 UTC (rev 10419)
@@ -42,7 +42,7 @@
 #. Use the `comment template tags`_ below to embed comments in your
templates.
 
-You might also want to examine the :ref:`ref-contrib-comments-settings`
+You might also want to examine :ref:`ref-contrib-comments-settings`.
 
 Comment template tags
 =
@@ -166,7 +166,7 @@
 
 
 Be sure to read the `notes on the comment form`_, below, for some special
-considerations you'll need to make if you're using this aproach.
+considerations you'll need to make if you're using this approach.
 
 .. templatetag:: comment_form_target
 
@@ -180,6 +180,16 @@
 
 
 
+Redirecting after the comment post
+~~
+
+To specify the URL you want to redirect to after the comment has been posted,
+you can include a hidden form input called ``next`` in your comment form. For 
example::
+ 
+
+
+.. _notes-on-the-comment-form:
+
 Notes on the comment form
 -
 


--~--~-~--~~~---~--~~
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] r10426 - django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:53:42 -0500 (Tue, 07 Apr 2009)
New Revision: 10426

Modified:
   
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
Log:
[1.0.X] Replaced a misplaced import from [10425].

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
===
--- 
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
  2009-04-07 19:50:42 UTC (rev 10425)
+++ 
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
  2009-04-07 19:53:42 UTC (rev 10426)
@@ -1,3 +1,4 @@
+import re
 from django.conf import settings
 from django.contrib.auth.models import User
 from django.contrib.comments import signals


--~--~-~--~~~---~--~~
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] #8968: No way to utilize `next` parameter to redirect after comment deletion

2009-04-07 Thread Django
#8968: No way to utilize `next` parameter to redirect after comment deletion
--+-
  Reporter:  Dzhus| Owner:  kkubasik
Status:  closed   | Milestone:  1.1 
 Component:  django.contrib.comments  |   Version:  1.0 
Resolution:  wontfix  |  Keywords:  comments
 Stage:  Accepted | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by jacob):

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

Comment:

 There isn't a bug here. The `next` param is meant for people who want to
 wrap one of these views either with a custom URLconf like

 {{{
 (r'^flag/(\d+)/$', flag, {'next': '/I/am/done/'})
 }}}

 or with a function that wraps the view. If it's not given, the next param
 will be pulled out of `GET` or `POST` (depending), so you can use an
 `` in your 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
-~--~~~~--~~--~--~---



[Changeset] r10417 - django/branches/releases/1.0.X

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:13:15 -0500 (Tue, 07 Apr 2009)
New Revision: 10417

Modified:
   django/branches/releases/1.0.X/
Log:
[1.0.X] Updated svnmerge metadata.


Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-blocked
   - 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792,9799-9800,9803-9805,9808,9814-9820,9838-9841,9844-9846,9860,9862,9876,9882,9888-9898,9904-9905,9910-9911,9913,9915,9918,9921,9928,9930,9938,9940-9941,9944,9951-9952,9955,9963-9965,9978,9985,9989,10002,10005-10006,10008,10011-10012,10018,10021,10026-10030,10032-10035,10042-10048,10053,10062-10065,10070,10077,10080-10084,10088-10103,10105,10107-10124,10128-10135,10137,10141-10142,10144,10148,10161-10162,10168-10169,10171-10172,10174,10177-10179,10181-10184,10186-10188,10190-10191,10197,10222,10229,10235,10248-10249,10258,10271-10272,10275,10281,10315,10317-10318,10323-10324,10326-10327,10330-10332,10345-10347,10352-10353,10357,10364,10369-10370,10381-10385
   + 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792,9799-9800,9803-9805,9808,9814-9820,9838-9841,9844-9846,9860,9862,9876,9882,9888-9898,9904-9905,9910-9911,9913,9915,9918,9921,9928,9930,9938,9940-9941,9944,9951-9952,9955,9963-9965,9978,9985,9989,10002,10005-10006,10008,10011-10012,10018,10021,10026-10030,10032-10035,10042-10048,10053,10062-10065,10070,10077,10080-10084,10088-10103,10105,10107-10124,10128-10135,10137,10141-10142,10144,10148,10161-10162,10168-10169,10171-10172,10174,10177-10179,10181-10184,10186-10188,10190-10191,10197,10222,10229,10235,10248-10249,10258,10271-10272,10275,10281,10315,10317-10318,10323-10324,10326-10327,10330-10332,10345-10347,10352-10353,10357,10364,10369-10370,10381-10385,10408-10410,10412
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,10414
   + 

[Changeset] r10425 - in django/branches/releases/1.0.X: django/contrib/comments/views tests/regressiontests/comment_tests/tests

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:50:42 -0500 (Tue, 07 Apr 2009)
New Revision: 10425

Modified:
   django/branches/releases/1.0.X/django/contrib/comments/views/utils.py
   
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
Log:
[1.0.X] Fixed #10585: comment redirects built from the `next` parameter now 
work correctly when `next` already contains a query string. Backport of r10424 
from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/comments/views/utils.py
===
--- django/branches/releases/1.0.X/django/contrib/comments/views/utils.py   
2009-04-07 19:49:07 UTC (rev 10424)
+++ django/branches/releases/1.0.X/django/contrib/comments/views/utils.py   
2009-04-07 19:50:42 UTC (rev 10425)
@@ -25,7 +25,8 @@
 if next is None:
 next = urlresolvers.reverse(default_view)
 if get_kwargs:
-next += "?" + urllib.urlencode(get_kwargs)
+joiner = ('?' in next) and '&' or '?'
+next += joiner + urllib.urlencode(get_kwargs)
 return HttpResponseRedirect(next)
 
 def confirmation_view(template, doc="Display a confirmation view."):

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
===
--- 
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
  2009-04-07 19:49:07 UTC (rev 10424)
+++ 
django/branches/releases/1.0.X/tests/regressiontests/comment_tests/tests/comment_view_tests.py
  2009-04-07 19:50:42 UTC (rev 10425)
@@ -196,3 +196,16 @@
 self.assertTemplateUsed(response, "comments/posted.html")
 self.assertEqual(response.context[0]["comment"], 
Comment.objects.get(pk=1))
 
+def testCommentNextWithQueryString(self):
+"""
+The `next` key needs to handle already having a query string (#10585)
+"""
+a = Article.objects.get(pk=1)
+data = self.getValidData(a)
+data["next"] = "/somewhere/else/?foo=bar"
+data["comment"] = "This is another comment"
+response = self.client.post("/post/", data)
+location = response["Location"]
+match = 
re.search(r"^http://testserver/somewhere/else/\?foo=bar=\d+$;, location)
+self.failUnless(match != None, "Unexpected redirect location: %s" % 
location)
+
\ No newline at end of file


--~--~-~--~~~---~--~~
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] #10559: Documentation fix in comments customization page

2009-04-07 Thread Django
#10559: Documentation fix in comments customization page
+---
  Reporter:  thejaswi_puthraya  | Owner:  nobody

Status:  new| Milestone:  1.1   

 Component:  Documentation  |   Version:  SVN   

Resolution: |  Keywords:  comments, 
customization, documentation
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

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

  * component:  django.contrib.comments => Documentation

-- 
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] r10416 - django/branches/releases/1.0.X/docs/howto/deployment

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:11:20 -0500 (Tue, 07 Apr 2009)
New Revision: 10416

Modified:
   django/branches/releases/1.0.X/docs/howto/deployment/fastcgi.txt
   django/branches/releases/1.0.X/docs/howto/deployment/index.txt
   django/branches/releases/1.0.X/docs/howto/deployment/modpython.txt
Log:
[1.0.X] Fixed #10714 - made mod_wsgi recommendation consistent across 
deployment documentation, and removed duplicate modwsgi nav link. Backport of 
r10411 and r10413 from trunk.

Modified: django/branches/releases/1.0.X/docs/howto/deployment/fastcgi.txt
===
--- django/branches/releases/1.0.X/docs/howto/deployment/fastcgi.txt
2009-04-07 12:15:25 UTC (rev 10415)
+++ django/branches/releases/1.0.X/docs/howto/deployment/fastcgi.txt
2009-04-07 19:11:20 UTC (rev 10416)
@@ -7,10 +7,9 @@
 .. highlight:: bash
 
 Although the current preferred setup for running Django is :ref:`Apache with
-mod_python `, many people use shared hosting, on
+mod_wsgi `, many people use shared hosting, on
 which protocols such as FastCGI, SCGI or AJP are the only viable options. In
-some setups, these protocols also allow better security -- and, possibly, 
better
-performance -- than mod_python_.
+some setups, these protocols may provide better performance than mod_wsgi_.
 
 .. admonition:: Note
 
@@ -28,8 +27,9 @@
 process doesn't run inside the Web server process, but in a separate,
 persistent process.
 
+.. _mod_wsgi: http://code.google.com/p/modwsgi/
+.. _mod_perl: http://perl.apache.org/
 .. _mod_python: http://www.modpython.org/
-.. _mod_perl: http://perl.apache.org/
 
 .. admonition:: Why run code in a separate process?
 

Modified: django/branches/releases/1.0.X/docs/howto/deployment/index.txt
===
--- django/branches/releases/1.0.X/docs/howto/deployment/index.txt  
2009-04-07 12:15:25 UTC (rev 10415)
+++ django/branches/releases/1.0.X/docs/howto/deployment/index.txt  
2009-04-07 19:11:20 UTC (rev 10416)
@@ -13,7 +13,6 @@

modwsgi
modpython
-   modwsgi
fastcgi

 If you're new to deploying Django and/or Python, we'd recommend you try

Modified: django/branches/releases/1.0.X/docs/howto/deployment/modpython.txt
===
--- django/branches/releases/1.0.X/docs/howto/deployment/modpython.txt  
2009-04-07 12:15:25 UTC (rev 10415)
+++ django/branches/releases/1.0.X/docs/howto/deployment/modpython.txt  
2009-04-07 19:11:20 UTC (rev 10416)
@@ -6,8 +6,9 @@
 
 .. highlight:: apache
 
-Apache_ with `mod_python`_ currently is the preferred setup for using Django
-on a production server.
+The `mod_python`_ module for Apache_ can be used to deploy Django to a 
+production server, although it has been mostly superseded by the simpler 
+:ref:`mod_wsgi deployment option `.
 
 mod_python is similar to (and inspired by) `mod_perl`_ : It embeds Python 
within
 Apache and loads Python code into memory when the server starts. Code stays in


--~--~-~--~~~---~--~~
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] #9956: Problematic Regexp in django.contrib.comments.urls

2009-04-07 Thread Django
#9956: Problematic Regexp in django.contrib.comments.urls
--+-
  Reporter:  james_stevenson  | Owner:  kkubasik 
Status:  closed   | Milestone:  1.1  
 Component:  django.contrib.comments  |   Version:  1.0  
Resolution:  fixed|  Keywords:  comments urls
 Stage:  Accepted | Has_patch:  1
Needs_docs:  0|   Needs_tests:  0
Needs_better_patch:  0|  
--+-
Changes (by jacob):

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

Comment:

 Fixed in [10422].

-- 
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] r10420 - django/trunk/django/contrib/comments/templates/comments

2009-04-07 Thread noreply

Author: jacob
Date: 2009-04-07 14:34:21 -0500 (Tue, 07 Apr 2009)
New Revision: 10420

Modified:
   django/trunk/django/contrib/comments/templates/comments/form.html
   django/trunk/django/contrib/comments/templates/comments/preview.html
Log:
Fixed #9792: corrected invalid HTML in the comment form and comment preview.

Modified: django/trunk/django/contrib/comments/templates/comments/form.html
===
--- django/trunk/django/contrib/comments/templates/comments/form.html   
2009-04-07 19:29:34 UTC (rev 10419)
+++ django/trunk/django/contrib/comments/templates/comments/form.html   
2009-04-07 19:34:21 UTC (rev 10420)
@@ -5,10 +5,10 @@
 {% if field.is_hidden %}
   {{ field }}
 {% else %}
+  {% if field.errors %}{{ field.errors }}{% endif %}
   
-{% if field.errors %}{{ field.errors }}{% endif %}
 {{ field.label_tag }} {{ field }}
   
 {% endif %}

Modified: django/trunk/django/contrib/comments/templates/comments/preview.html
===
--- django/trunk/django/contrib/comments/templates/comments/preview.html
2009-04-07 19:29:34 UTC (rev 10419)
+++ django/trunk/django/contrib/comments/templates/comments/preview.html
2009-04-07 19:34:21 UTC (rev 10420)
@@ -20,10 +20,10 @@
   {% if field.is_hidden %}
 {{ field }}
   {% else %}
+{% if field.errors %}{{ field.errors }}{% endif %}
 
-  {% if field.errors %}{{ field.errors }}{% endif %}
   {{ field.label_tag }} {{ field }}
 
   {% endif %}


--~--~-~--~~~---~--~~
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] #10134: unique_for_* broken?

2009-04-07 Thread Django
#10134: unique_for_* broken?
---+
  Reporter:  wdoekes   | Owner:  Alex   
 
Status:  new   | Milestone:  1.1
 
 Component:  Forms |   Version:  SVN
 
Resolution:|  Keywords:  unique_for_date 
unique_for_month unique_for_year
 Stage:  Accepted  | Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 That comment was supposed to say, "long function is no longer long" so as
 to be witty, now I just sound like an idiot :/

-- 
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] #10757: GeoManager.values does not properly select primary keys across relations

2009-04-07 Thread Django
#10757: GeoManager.values does not properly select primary keys across relations
---+
  Reporter:  dgouldin  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  GIS   |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by dgouldin):

 * cc: dgoul...@gmail.com (added)
  * has_patch:  0 => 1

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



Re: [Django] #10759: UserAdmin views should use the current model to lookup the template paths

2009-04-07 Thread Django
#10759: UserAdmin views should use the current model to lookup the template 
paths
---+
  Reporter:  jturnbull | Owner:  nobody 
  
Status:  new   | Milestone:  1.2
  
 Component:  django.contrib.admin  |   Version:  SVN
  
Resolution:|  Keywords:  UserAdmin, 
add_view, user_change_password
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 That's a bug, this is, in my view, a feature, admittingly a totally low
 overhead, noncontroversial no work one, but where that bar lies is for a
 committer to decide, so I've been intentionally rather conservative here.

-- 
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] #10759: UserAdmin views should use the current model to lookup the template paths

2009-04-07 Thread Django
#10759: UserAdmin views should use the current model to lookup the template 
paths
---+
  Reporter:  jturnbull | Owner:  nobody 
  
Status:  new   | Milestone:  1.2
  
 Component:  django.contrib.admin  |   Version:  SVN
  
Resolution:|  Keywords:  UserAdmin, 
add_view, user_change_password
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by jturnbull):

 Any chance this could get set for 1.1 rather than 1.2?

 I only ask as it goes very well with my other (set for 1.1) patch here:
 #10694

-- 
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] #10759: UserAdmin views should use the current model to lookup the template paths

2009-04-07 Thread Django
#10759: UserAdmin views should use the current model to lookup the template 
paths
---+
  Reporter:  jturnbull | Owner:  nobody 
  
Status:  new   | Milestone:  1.2
  
 Component:  django.contrib.admin  |   Version:  SVN
  
Resolution:|  Keywords:  UserAdmin, 
add_view, user_change_password
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * 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-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] #10759: UserAdmin views should use the current model to lookup the template paths

2009-04-07 Thread Django
#10759: UserAdmin views should use the current model to lookup the template 
paths
---+
 Reporter:  jturnbull  |   Owner:  nobody   
 
   Status:  new|   Milestone:   
 
Component:  django.contrib.admin   | Version:  SVN  
 
 Keywords:  UserAdmin, add_view, user_change_password  |   Stage:  
Unreviewed
Has_patch:  1  |  
---+
 When overriding the add_view() and user_change_password() in UserAdmin I
 expected it to use the current model names to find the templates (like the
 rest of admin).

 However, it was hardcoded to use admin/auth/user/add_form.html and
 admin/auth/user/change_password.html.

 Attached patch adds in the path for the current model, falling back to the
 above for backwards compatibility.

-- 
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] #10757: GeoManager.values does not properly select primary keys across relations

2009-04-07 Thread Django
#10757: GeoManager.values does not properly select primary keys across relations
---+
  Reporter:  dgouldin  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  GIS   |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * needs_better_patch:  => 0
  * component:  Uncategorized => GIS
  * needs_tests:  => 0
  * version:  1.0 => SVN
  * milestone:  => 1.1
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted

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



Re: [Django] #10754: post and pre_delete signal documentation imprecise

2009-04-07 Thread Django
#10754: post and pre_delete signal documentation imprecise
+---
  Reporter:  runeh  | Owner:  nobody 
Status:  reopened   | Milestone: 
 Component:  Documentation  |   Version:  SVN
Resolution: |  Keywords:  signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by kmtracey):

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

Comment:

 Ah, sorry I misread the original description (I thought it was saying that
 signal handlers were NOT being called) and didn't check the code.  Agreed
 the signals doc here is misleading, it reads like the sending of the
 signal is tied to the instance's delete() method.  If signals are sent
 even for bulk delete operations then that should probably be noted in the
 signals doc, and in the brief scan I have time for at the moment I don't
 see 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] #5423: "dumpdata" should stream output one row at a time

2009-04-07 Thread Django
#5423: "dumpdata" should stream output one row at a time
--+-
  Reporter:  adrian   | Owner:  nobody  
 
Status:  new  | Milestone:  
 
 Component:  django-admin.py  |   Version:  SVN 
 
Resolution:   |  Keywords:  dumpdata loaddata 
fixtures memory
 Stage:  Accepted | Has_patch:  1   
 
Needs_docs:  0|   Needs_tests:  0   
 
Needs_better_patch:  0|  
--+-
Comment (by peterbe):

 @jmcvetta I don't think this has yet been added to trunk. Just checked
 today, 7 Apr 2009.
 Glad to hear that you got it working with your patch but I don't think I
 can use that patch any more on the trunk since it appears to be very
 different.

-- 
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] #10751: Admin actions not calling model's delete() method

2009-04-07 Thread Django
#10751: Admin actions not calling model's delete() method
-+--
  Reporter:  msurdi  | Owner:  nobody
Status:  new | Milestone:  1.1   
 Component:  django.contrib.admin|   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by runeh):

 #10754 said the opposite. Signal handlers are called but not delete()

-- 
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] #10754: post and pre_delete signal documentation imprecise

2009-04-07 Thread Django
#10754: post and pre_delete signal documentation imprecise
+---
  Reporter:  runeh  | Owner:  nobody 
Status:  closed | Milestone: 
 Component:  Documentation  |   Version:  SVN
Resolution:  duplicate  |  Keywords:  signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by runeh):

 You say "If the individual detele() methods are not called, it follows
 that the associated signal handlers won't be either.". That's not what the
 code does. When doing bulk deletes the signal handlers _are_ called.
 
http://code.djangoproject.com/browser/django/trunk/django/db/models/query.py#L981

 The signals docs says that pre and post delete signal handlers are called
 before and after calling delete(). In the case of bulk deletes, the signal
 handlers are called, but delete() is not called.

-- 
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] #9799: django.db.models.sql.query.BaseQuery.get_count() works wrong with GROUP BY

2009-04-07 Thread Django
#9799: django.db.models.sql.query.BaseQuery.get_count() works wrong with GROUP 
BY
---+
  Reporter:  syabro| Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:  wontfix   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by bcurtu):

 I know this bug/feature is fixed/implemented in django 1.1, however, since
 I can not move from 1.0 I have patched this problem:

 {{{
 Index: /home/bcm/wsp/www/django/db/models/sql/query.py
 ===
 --- /home/bcm/wsp/www/django/db/models/sql/query.py (revision 2833)
 +++ /home/bcm/wsp/www/django/db/models/sql/query.py (working copy)
 @@ -228,6 +228,7 @@
  obj.select_related = False
  obj.related_select_cols = []
  obj.related_select_fields = []
 +obj.group_by=[]
  if len(obj.select) > 1:
  obj = self.clone(CountQuery, _query=obj,
 where=self.where_class(),
  distinct=False)

 }}}

-- 
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] #4501: Coverage support for tests

2009-04-07 Thread Django
#4501: Coverage support for tests
+---
  Reporter:  b...@almad.net | Owner:  ericholscher
Status:  new| Milestone:  
 Component:  Testing framework  |   Version:  SVN 
Resolution: |  Keywords:  
 Stage:  Accepted   | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Comment (by ericholscher):

 gsong: Neat! Thanks for sharing. Bonus points for the pretty output :)

 If you could post a patch or a link to a third party place where this code
 is hosted, that would be awesome. It looks like your code is doing things
 correctly. I haven't had time to come back to this ticket. My patch on it
 is lacking, and your approach is looks better.

 Releasing it as a third party package probably makes sense since the 1.2
 release is a long ways off, but hopefully we can work on getting it in for
 that release as well.

-- 
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] #10758: sys.exc_info() should not be stored on a local variable

2009-04-07 Thread Django
#10758: sys.exc_info() should not be stored on a local variable
---+
 Reporter:  piotr.findei...@azouk.com  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 In {{{get_response()}}} function in file
 
http://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py#L132
 there is a code like this:

 {{{
 #!python
 ...
 except:
 exc_info = sys.exc_info()
 receivers = signals.got_request_exception.send(sender=self.__class__,
 request=request)
 return self.handle_uncaught_exception(request, resolver, exc_info)
 }}}

 First: according to python docs
 http://docs.python.org/library/sys.html#sys.exc_info you should

  * save only {{{sys.exc_info()[:2]}}} or
  * wrap it in try-finally to ensure {{{exc_info}}} variable is always
 deleted

 Second: why do you catch all exceptions instead of Exception? Is there a
 good reason to catch e.g. {{{KeyboardInterrupt}}}?

-- 
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] #9289: Swedish (se) localflavor

2009-04-07 Thread Django
#9289: Swedish (se) localflavor
-+--
  Reporter:  peritus | Owner:   

Status:  new | Milestone:  1.1  

 Component:  django.contrib.localflavor  |   Version:  SVN  

Resolution:  |  Keywords:  
localflavor,sv,se
 Stage:  Accepted| Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

  * milestone:  => 1.1

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



Re: [Django] #10060: Multiple table annotation failure

2009-04-07 Thread Django
#10060: Multiple table annotation failure
--+-
  Reporter:  svsha...@intellecap.net  | Owner: 
Status:  new  | Milestone:  1.1
 Component:  ORM aggregation  |   Version:  SVN
Resolution:   |  Keywords: 
 Stage:  Accepted | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by anonymous):

 * cc: bendavi...@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-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] #10757: GeoManager.values does not properly select primary keys across relations

2009-04-07 Thread Django
#10757: GeoManager.values does not properly select primary keys across relations
---+
 Reporter:  dgouldin   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 When using GeoManager.values to select a primary key from a foreign
 relation, GeoManager selects the primary key from its model rather than
 joining to the related model and selecting that model's primary key.  See
 code sample below:

 {{{
 from django.contrib.gis.db import models

 class Bar(models.Model):
 bar_field = models.BooleanField()

 objects = models.GeoManager()

 class Foo(models.Model):
 foo_field = models.BooleanField()
 bar = models.ForeignKey(Bar)

 objects = models.GeoManager()

 # ---

 >>> from djtest.models import *

 >>> Foo.objects.all().delete()
 >>> Bar.objects.all().delete()

 >>> b = Bar(id=50, bar_field=True)
 >>> b.save()

 >>> f = Foo(foo_field=True, bar=b)
 >>> f.save()

 >>> Foo.objects.values('id', 'bar__id').query.as_sql()
 ('SELECT "djtest_foo"."id", "djtest_foo"."id" FROM "djtest_foo"', ())

 >>> Foo.objects.values('id', 'bar__id')[0]
 {'bar__id': 1, 'id': 1}
 }}}

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



Re: [Django] #10753: Test client fails after 10398

2009-04-07 Thread Django
#10753: Test client fails after 10398
+---
  Reporter:  Uninen | Owner:  minmax 
Status:  reopened   | Milestone:  1.1
 Component:  Uncategorized  |   Version:  SVN
Resolution: |  Keywords:  testing signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by minmax):

 sorry

 {{{
 >>> s = Signal()
 >>> r1 = lambda **kw: None
 >>> r2 = lambda **kw: None
 >>> s.connect(r1)
 >>> s.connect(r2)
 >>> s.disconnect(r1)
 Traceback (most recent call last):
   File "", line 1, in 
   File "/home/minmax/projects/lib/django/dispatch/dispatcher.py", line
 124, in disconnect
 (r_key, _) = self.receivers[index]
 IndexError: list index out of range
 }}}

-- 
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] #10753: Test client fails after 10398

2009-04-07 Thread Django
#10753: Test client fails after 10398
+---
  Reporter:  Uninen | Owner:  minmax 
Status:  reopened   | Milestone:  1.1
 Component:  Uncategorized  |   Version:  SVN
Resolution: |  Keywords:  testing signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by minmax):

 This issue occurs when there are more than one listener and the last one
 is disconnected.

 test case with django:

 >>> s = Signal()
 >>> r1 = lambda **kw: None
 >>> r2 = lambda **kw: None
 >>> s.connect(r1)
 >>> s.connect(r2)
 >>> s.disconnect(r1)
 Traceback (most recent call last):
   File "", line 1, in 
   File "/home/minmax/projects/lib/django/dispatch/dispatcher.py", line
 124, in disconnect
 (r_key, _) = self.receivers[index]
 IndexError: list index out of range

-- 
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] #10751: Admin actions not calling model's delete() method

2009-04-07 Thread Django
#10751: Admin actions not calling model's delete() method
-+--
  Reporter:  msurdi  | Owner:  nobody
Status:  new | Milestone:  1.1   
 Component:  django.contrib.admin|   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by kmtracey):

  * milestone:  => 1.1

Comment:

 #10754 brought this up again, mentioning that signal handlers aren't
 called.  I think beefing up the doc on admin actions to mention this
 behavior and indicate how to avoid it would address the issue.  Given
 we've had two people notice this so far it'd be good to get some doc
 mention for it into 1.1, so I set the milestone for that.

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



Re: [Django] #10571: FakePayload Truncates Unicode Content

2009-04-07 Thread Django
#10571: FakePayload Truncates Unicode Content
---+
  Reporter:  rwag...@physics.ucsd.edu  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Testing framework |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by russellm):

 Thanks for going to the trouble of trying to work out a test case, but
 there is something else going on here. I don't get the same behavior that
 you are reporting for your demonstration case:
 {{{
 In [1]: from django.test.client import FakePayload

 In [2]: json = u'{"name": "Rick"}'

 In [3]: payload = FakePayload(json)

 In [4]: len(json)

 Out[4]: 16

 In [5]: payload._FakePayload__len

 Out[5]: 16

 In [6]: payload.read()

 Out[6]: '{"name": "Rick"}'

 }}}

 Now, this could be caused by a discrepancy in the runtime environment, but
 you haven't provided any details on how your environment is configured.
 I've fiddled around for a bit with the test case that I provided for
 #9480, but I couldn't get that to break either.

 I don't doubt that you're seeing a truncation problem, and I can certainly
 see how UTF-16 could be the missing piece. Your hunch that this is related
 to #9480 is probably correct.

 The best way to help close out this bug is to provide a failing test case
 against Django itself. If you can drop a failing test case into the end of
 `tests/regressiontests/test_client_regress/models.py` (see the
 [http://docs.djangoproject.com/en/dev/internals/contributing/#unit-tests
 docs] for details on how to run the Django test suite), then it will be
 much easier to narrow down and fix the problem.

-- 
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] #10754: post and pre_delete signal documentation imprecise

2009-04-07 Thread Django
#10754: post and pre_delete signal documentation imprecise
+---
  Reporter:  runeh  | Owner:  nobody 
Status:  closed | Milestone: 
 Component:  Documentation  |   Version:  SVN
Resolution:  duplicate  |  Keywords:  signals
 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:

 The fact that the individual model delete() methods are not called is
 documented:

 http://docs.djangoproject.com/en/dev/topics/db/queries/#deleting-objects

 "Keep in mind that this will, whenever possible, be executed purely in
 SQL, and so the delete() methods of individual object instances will not
 necessarily be called during the process. If you've provided a custom
 delete() method on a model class and want to ensure that it is called, you
 will need to "manually" delete instances of that model (e.g., by iterating
 over a !QuerySet and calling delete() on each object individually) rather
 than using the bulk delete() method of a !QuerySet."

 If the individual detele() methods are not called, it follows that the
 associated signal handlers won't be either.

 #10751 is already open for the issue of bulk delete in admin bypassing
 individual instance methods.  I think where doc is missing is for admin
 actions: a note about how, by default, bulk delete in admin will use
 queryset delete() and therefore bypass instance method customizations, and
 an indication of how to change this behavior (provide your own customized
 delete action), if you always want your individual methods called.

-- 
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] #10753: Test client fails after 10398

2009-04-07 Thread Django
#10753: Test client fails after 10398
+---
  Reporter:  Uninen | Owner:  minmax 
Status:  reopened   | Milestone:  1.1
 Component:  Uncategorized  |   Version:  SVN
Resolution: |  Keywords:  testing signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by Uninen):

 Replying to [comment:1 russellm]:

 > Any chance you could give us an example of a test that is actually
 failing?

 I wrote a small test project + testapp to demonstrate this but I couldn't
 reproduce the bug in there. I'll try to strip out the problematic app+test
 from the original project next.

 Weird thing is, this was the only test that broke in dozens of projects
 with lots of tests. But I'm still quite sure it's a bug in Django.

-- 
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] #10756: Correct PLNIPField

2009-04-07 Thread Django
#10756: Correct PLNIPField
+---
 Reporter:  remik   |   Owner:  nobody
   Status:  new |   Milestone:
Component:  django.contrib.localflavor  | Version:  1.0   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 Valid forms are: XXX-XXX-YY-YY or XXX-XX-YY-YYY.

 see http://pl.wikipedia.org/wiki/Nip

-- 
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] #10753: Test client fails after 10398

2009-04-07 Thread Django
#10753: Test client fails after 10398
+---
  Reporter:  Uninen | Owner:  minmax 
Status:  reopened   | Milestone:  1.1
 Component:  Uncategorized  |   Version:  SVN
Resolution: |  Keywords:  testing signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 1. This isn't fixed until the patch is applied to trunk.
  2. The patch doesn't contain a test case.
  3. The test case you have provided in the comments is pure python - it
 doesn't contain any Django code. The example breaks for a very good reason
 - after deleting two items from the list, there isn't an l[2] to delete.
 This is purely normal python behaviour.

-- 
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] r10414 - in django/trunk: django/test tests/regressiontests/test_client_regress tests/regressiontests/test_client_regress/templates

2009-04-07 Thread noreply
Author: russellm
Date: 2009-04-07 07:06:05 -0500 (Tue, 07 Apr 2009)
New Revision: 10414

Added:
   django/trunk/tests/regressiontests/test_client_regress/templates/
   django/trunk/tests/regressiontests/test_client_regress/templates/unicode.html
Modified:
   django/trunk/django/test/testcases.py
   django/trunk/tests/regressiontests/test_client_regress/models.py
   django/trunk/tests/regressiontests/test_client_regress/urls.py
   django/trunk/tests/regressiontests/test_client_regress/views.py
Log:
Fixed #10183 -- Corrected the handling of unicode in assertContains and 
assertNotContains. Thanks to trbs for the patch.

Modified: django/trunk/django/test/testcases.py
===
--- django/trunk/django/test/testcases.py   2009-04-07 00:01:49 UTC (rev 
10413)
+++ django/trunk/django/test/testcases.py   2009-04-07 12:06:05 UTC (rev 
10414)
@@ -12,6 +12,7 @@
 from django.test import _doctest as doctest
 from django.test.client import Client
 from django.utils import simplejson
+from django.utils.encoding import smart_str
 
 normalize_long_ints = lambda s: re.sub(r'(?

Re: [Django] #10753: Test client fails after 10398

2009-04-07 Thread Django
#10753: Test client fails after 10398
+---
  Reporter:  Uninen | Owner:  minmax 
Status:  closed | Milestone:  1.1
 Component:  Uncategorized  |   Version:  SVN
Resolution:  fixed  |  Keywords:  testing signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by minmax):

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

Comment:

 see attachment

-- 
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] #10753: Test client fails after 10398

2009-04-07 Thread Django
#10753: Test client fails after 10398
+---
  Reporter:  Uninen | Owner:  minmax 
Status:  assigned   | Milestone:  1.1
 Component:  Uncategorized  |   Version:  SVN
Resolution: |  Keywords:  testing signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by minmax):

 * cc: min...@inetss.com, sopel...@inetss.com (added)
  * owner:  nobody => minmax
  * status:  new => assigned

Comment:

 see http://code.djangoproject.com/changeset/10398 dispatcher.py

 example:

 In [1]: l = [1,2,3]
 In [2]: for i in xrange(len(l)):
...: del l[i]
 ---
 IndexErrorTraceback (most recent call
 last)

 IndexError: list assignment index out of range

-- 
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] #10739: MySQL and order_by()

2009-04-07 Thread Django
#10739: MySQL and order_by()
---+
  Reporter:  stephaner | Owner:  nobody
Status:  closed| Milestone:  1.0.3 
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:  invalid   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 In addition to using preview, if you could go so far as to, say, describe
 the actual problem, that would be just grand.

 I gather that you are getting unexpected output. The ticket title implies
 that the problem is related to MySQL and order_by(). Evidently a call to
 len() fixes the problem (or masks the problem in interesting ways).

 You provide a link to a 500 line test case, of which I'm guessing maybe
 the last 40 lines are relevant. Of course, that test case isn't
 standalone, and doesn't use standard Django model calls - it's deeply
 embedded in an application called "Damned Lies".

 Unfortunately, the fact that your project is open source doesn't mean that
 I'm going to find your problems for you.

 I have no doubt you have found a problem. If you want to get this problem
 resolved, you're going to need to meet us half way - with a minimal test
 case for reproducing the problem. "Download Damned Lies" is not that set
 of instructions. If you care to provide us with a minimal test case, feel
 free to reopen this ticket.

-- 
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] #10755: contrib.auth.tests.views.PasswordResetTest fails with custom template

2009-04-07 Thread Django
#10755: contrib.auth.tests.views.PasswordResetTest fails with custom template
--+-
 Reporter:  Atamert Ölçgen   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Authentication| Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 contrib.auth.tests.views.PasswordResetTest assumes templates are
 compatible with `registration/` templates and installs its own urlconf. My
 custom `registration/` template has a url tag that naturally doesn't exist
 in django.contrib.auth.urls conf, causing these tests to fail.

 ChangePasswordTest OTOH plays nice and installs its own templates.
 (setUp() & tearDown())

-- 
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] #5617: Default server_error view should render with RequestContext

2009-04-07 Thread Django
#5617: Default server_error view should render with RequestContext
-+--
  Reporter:  Nick Fishman   | Owner:  
nobody
Status:  closed  | Milestone:   
 
 Component:  HTTP handling   |   Version:  
SVN   
Resolution:  wontfix |  Keywords:  
server_error, RequestContext, error, templates
 Stage:  Unreviewed  | Has_patch:  
1 
Needs_docs:  0   |   Needs_tests:  
0 
Needs_better_patch:  0   |  
-+--
Comment (by stavros):

 I would like to second this. I find tobias's approach best, as it doesn't
 break the handler on error and still allows people to use the
 RequestContext. I think that every site that uses MEDIA_URL will have a
 hacky handler500 to pass this to the template, and I think it would be
 much better if this was default Django bejaviour.

-- 
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] #9366: date and time filters do not use localized strings, missing datetime filter

2009-04-07 Thread Django
#9366: date and time filters do not use localized strings, missing datetime 
filter
---+
  Reporter:  bthomas   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Internationalization  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

 * cc: h...@tbz-pariv.de (added)

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



[Django] #10754: post and pre_delete signal documentation imprecise

2009-04-07 Thread Django
#10754: post and pre_delete signal documentation imprecise
---+
 Reporter:  runeh  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  SVN   
 Keywords:  signals|   Stage:  Unreviewed
Has_patch:  0  |  
---+
 The documentation claims that the pre and post_delete signals is "Sent
 before or after a model’s delete() method is called." (
 http://docs.djangoproject.com/en/dev/topics/signals/ ). This is not the
 case when QuerySet.delete() is used to delete multiple objects. The
 signals are sent, but the object.delete() method is not called. One case
 where this happens is in the admin, when selecting multiple objects to
 delete.

 Unsure if this is a documentation bug or if the docs are correct and the
 behaviour when using QuerySet.delete() is wrong.

-- 
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] #10753: Test client fails after 10398

2009-04-07 Thread Django
#10753: Test client fails after 10398
+---
  Reporter:  Uninen | Owner:  nobody 
Status:  new| Milestone:  1.1
 Component:  Uncategorized  |   Version:  SVN
Resolution: |  Keywords:  testing signals
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by ratsam):

 * cc: rat...@inetss.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-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] #4501: Coverage support for tests

2009-04-07 Thread Django
#4501: Coverage support for tests
+---
  Reporter:  b...@almad.net | Owner:  ericholscher
Status:  new| Milestone:  
 Component:  Testing framework  |   Version:  SVN 
Resolution: |  Keywords:  
 Stage:  Accepted   | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Comment (by gsong):

 I ran `runtests` without any modifications and came up with the following
 report:

 http://test.55minutes.com/test_report/

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