Re: [Django] #13061: Default login template is on bad place - registration/login.html TemplateDoesNotExist

2010-03-08 Thread Django
#13061: Default login template is on bad place - registration/login.html
TemplateDoesNotExist
-+--
  Reporter:  sopuch  | Owner:  nobody
Status:  reopened| Milestone:  1.2   
 Component:  Authentication  |   Version:  1.1   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by sopuch):

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

Comment:

 Ah, OK. But There isn't login.html template in registration directory. So
 it's not on bad place but is missing.

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

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



Re: [Django] #13063: Documentation Clarification - Django 1.1.1 Tutorial Part 1 and __unicode__ methods

2010-03-08 Thread Django
#13063: Documentation Clarification - Django 1.1.1 Tutorial Part 1 and 
__unicode__
methods
+---
  Reporter:  rwalsh | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by rwalsh):

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

Comment:

 Sorry...I probably just needed to stop and then restart the interactive
 shell (which I had also done) in order for the new methods to be
 recognized after they were added and saved in the source file. In any
 case, the current documentation is still unclear (at least to me).

   Rich

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

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



[Django] #13063: Documentation Clarification - Django 1.1.1 Tutorial Part 1 and __unicode__ methods

2010-03-08 Thread Django
#13063: Documentation Clarification - Django 1.1.1 Tutorial Part 1 and 
__unicode__
methods
---+
 Reporter:  rwalsh |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.1   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Hi. I was going through part 1 of the 'Writing your first Django app'
 tutorial and in the part where you are asked to add __unicode__() methods
 to the Polls application data model, the tutorial does not tell you to do
 another syncdb which is what I needed to do in order for the
 Poll.objects.all() command to work correctly in the Python interpreter.
 (I'm using a Mac running Snow Leopard and Python 2.6.4.)

 My specific concern in this regard is that the tutorial immediately goes
 into a note about what to do if the method addition does not seem to work
 which will likely lead people down wrong paths.

 Regards,
 Rich Walsh

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

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



Re: [Django] #12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE

2010-03-08 Thread Django
#12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE
---+
  Reporter:  andrewbadr| Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by andrewbadr):

 Yeah, I know -- I was proposing to accelerate the process in a rash
 violation of policy.

 I can't figure out how to install this without downgrading python.

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

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



Re: [Django] #12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE

2010-03-08 Thread Django
#12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE
---+
  Reporter:  andrewbadr| Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 Thanks for responding. I don't know how to get it on Ubuntu, I've only
 managed to get binaries for it on Windows. Could be what I've managed to
 find for Windows is not quite a match for what you were running. (I don't
 actually use it myself, just tried to get a test setup with it working
 after seeing some problems reported against it.)

 It's been put on the deprecation path
 (http://docs.djangoproject.com/en/dev/releases/1.2/#postgresql-database-
 backend) but that's a mutli-release cycle thing before it's completely
 cut. In the meantime we've got a few things not working right with it.
 psycopg2 is definitely a better bet unless there's some reason you can't
 use it (which I have not heard anyone report yet).

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

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



Re: [Django] #12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE

2010-03-08 Thread Django
#12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE
---+
  Reporter:  andrewbadr| Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by russellm):

 Replying to [comment:10 andrewbadr]:
 > Maybe the BDFLs should consider dropping psycopg1 support for 1.2?)

 We can't just drop support, but we have put the postgresql backend on the
 deprecation path: See [12510]

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

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



Re: [Django] #12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE

2010-03-08 Thread Django
#12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE
---+
  Reporter:  andrewbadr| Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by andrewbadr):

 I really don't think I did anything to fix the exception mismatch you're
 seeing. I don't remember encountering it at all. Could it be that my test
 case was using a field with a unique constraint?

 How do I install psycopg1 on Ubuntu? Not sure how I was able to do this
 before.

 (I'm not using it anymore, and when I was it was only by accident. Maybe
 the BDFLs should consider dropping psycopg1 support for 1.2?)

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

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



[Changeset] r12736 - in django/branches/releases/1.1.X: . django/forms tests/regressiontests/model_forms_regress

2010-03-08 Thread noreply
Author: lukeplant
Date: 2010-03-08 20:03:09 -0600 (Mon, 08 Mar 2010)
New Revision: 12736

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/forms/models.py
   
django/branches/releases/1.1.X/tests/regressiontests/model_forms_regress/tests.py
Log:
[1.1.X] Fixed #11183 - BaseForm init leaves pointers pointing back to 
base_fields
  
Thanks to margieroginski for the report

Backport of [12733] from trunk



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12710-12712,12719,12721,12723,12725-12726,12728,12734
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12710-12712,12719,12721,12723,12725-12726,12728,12733-12734

Modified: django/branches/releases/1.1.X/django/forms/models.py
===
--- django/branches/releases/1.1.X/django/forms/models.py   2010-03-09 
00:52:38 UTC (rev 12735)
+++ django/branches/releases/1.1.X/django/forms/models.py   2010-03-09 
02:03:09 UTC (rev 12736)
@@ -952,6 +952,12 @@
 self.choice_cache = None
 self.to_field_name = to_field_name
 
+def __deepcopy__(self, memo):
+result = super(ChoiceField, self).__deepcopy__(memo)
+# Need to force a new ModelChoiceIterator to be created, bug #11183
+result.queryset = result.queryset
+return result
+
 def _get_queryset(self):
 return self._queryset
 

Modified: 
django/branches/releases/1.1.X/tests/regressiontests/model_forms_regress/tests.py
===
--- 
django/branches/releases/1.1.X/tests/regressiontests/model_forms_regress/tests.py
   2010-03-09 00:52:38 UTC (rev 12735)
+++ 
django/branches/releases/1.1.X/tests/regressiontests/model_forms_regress/tests.py
   2010-03-09 02:03:09 UTC (rev 12736)
@@ -2,7 +2,7 @@
 
 from django import db
 from django import forms
-from django.forms.models import modelform_factory
+from django.forms.models import model

Re: [Django] #11183: BaseForm init leaves pointers pointing back to base_fields when widget is a Select

2010-03-08 Thread Django
#11183: BaseForm init leaves pointers pointing back to base_fields when widget 
is a
Select
-+--
  Reporter:  margieroginski  | Owner:  lukeplant
Status:  closed  | Milestone:  1.2  
 Component:  Forms   |   Version:  1.0  
Resolution:  fixed   |  Keywords:   
 Stage:  Accepted| Has_patch:  0
Needs_docs:  0   |   Needs_tests:  1
Needs_better_patch:  0   |  
-+--
Changes (by lukeplant):

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

Comment:

 Fixed in [12733]

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

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



[Django] #13062: Can't see PendingDeprecationWarnings in the development server on Linux

2010-03-08 Thread Django
#13062: Can't see PendingDeprecationWarnings in the development server on Linux
---+
 Reporter:  gremmie|   Owner:  nobody
   Status:  new|   Milestone:  1.3   
Component:  django-admin.py runserver  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 When running

 {{{
 $ python -Wall manage.py runserver
 }}}

 !PendingDeprecationWarnings are not seen in the dev. server output unless
 you use the --noreload option on Ubuntu. For reference, see
 [http://groups.google.com/group/django-
 users/browse_frm/thread/cc9821b4210654ad# this thread on the user's
 mailing list]. Karen Tracey has reported in that thread that this does
 seem to work as expected under Windows (no --reload is needed there).

 I can try working up a patch if anyone more experienced can point me in
 the right direction. Thanks.

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

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



[Changeset] r12735 - in django/branches/releases/1.1.X: . django/contrib/admin tests/regressiontests/admin_validation

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 18:52:38 -0600 (Mon, 08 Mar 2010)
New Revision: 12735

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/contrib/admin/validation.py
   
django/branches/releases/1.1.X/tests/regressiontests/admin_validation/models.py
Log:
[1.1.X] Fixed #12689: Fixed admin validation to report an error on invalid 
exclude specification. Thanks for report to bparker and for patch with tests to 
ramiro. 

r12734 from trunk.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-blocked
   - 
/django/trunk:11526,11586-11587,11590,11593-11595,11600,11618,11627,11636,11639-11642,11645-11647,11654-11655,11660-11661,11663-11669,11672-11673,11675-11677,11680,11683,11709-11713,11716-11718,11721-11731,11736-11739,11742-11747,11752,11755,11778-11799,11803-11807,11810,11814,11830,11843,11846-11848,11850,11854-11855,11858,11861-11863,11880,11883-11884,11887,11900,11907,11910,11915-11916,11921,11923-11924,11937,11943,11952,11955-11956,11959-11960,11964-11976,11981-11983,12008-12010,12013,12021,12026-12037,12041-12043,12046-12047,12049-12053,12057-12058,12060,12080-12085,12089,12097-12103,12106-12117,12120-12125,12127,12135,12139,12142,12146,12148,12153-12157,12159-12160,12164,12174,12176-12177,12180,12185,12191-12192,12194-12196,12198,12203-12219,1-12228,12232,12247-12248,12255-12262,12264-12275,12278-12281,12285,12287-12292,12295-12312,12315-12316,12335-12338,12345,12348,12349-12352,12354,12357-12361,12364-12378,12381-12383,12386-12397,12399-12403,12407,12417-12418,12431-12433,12438,12443-12446,12454-12456,12458-12460,12465-12466,12468-12470,12472,12474,12476,12486-12488,12493-12494,12496,12500,12504,12508-12512,12514,12517,12527,12532,12543-12547,12551-12552,12555,12561,12574,12578,12580,12586,12588,12590,12597,12611-12612,12618-12620,12624-12626,12633-12634,12643,12656,12675,12684-12685,12690-12691,12693,12701,12707-12709,12717-12718,12730

   + 
/django/trunk:11526,11586-11587,11590,11593-11595,11600,11618,11627,11636,11639-11642,11645-11647,11654-11655,11660-11661,11663-11669,11672-11673,11675-11677,11680,11683,11709-11713,11716-11718,11721-11731,11736-11739,11742-11747,11752,11755,11778-11799,11803-11807,11810,11814,11830,11843,11846-11848,11850,11854-11855,11858,11861-11863,11880,11883-11884,11887,11900,11907,11910,11915-11916,11921,11923-11924,11937,11943,11952,11955-11956,11959-11960,11964-11976,11981-11983,12008-12010,12013,12021,12026-12037,12041-12043,12046-12047,12049-12053,12057-12058,12060,12080-12085,12089,12097-12103,12106-12117,12120-12125,12127,12135,12139,12142,12146,12148,12153-12157,12159-12160,12164,12174,12176-12177,12180,12185,12191-12192,12194-12196,12198,12203-12219,1-12228,12232,12247-12248,12255-12262,12264-12275,12278-12281,12285,12287-12292,12295-12312,12315-12316,12335-12338,12345,12348,12349-12352,12354,12357-12361,12364-12378,12381-12383,12386-12397,12399-12403,12407,12417-12418,12431-12433,12438,12443-12446,12454-12456,12458-12460,12465-12466,12468-12470,12472,12474,12476,12486-12488,12493-12494,12496,12500,12504,12508-12512,12514,12517,12527,12532,12543-12547,12551-12552,12555,12561,12574,12578,12580,12586,12588,12590,12597,12611-12612,12618-12620,12624-12626,12633-12634,12643,12656,12675,12684-12685,12690-12691,12693,12701,12707-12709,12717-12718,12730
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12710-12712,12719,12721,12723,12725-12726,12728

   + 
/django/trunk:1-11500,11523,11527-11528,11531-115

Re: [Django] #12945: url tag breaks on spaces between delimiting commas since [12503]

2010-03-08 Thread Django
#12945: url tag breaks on spaces between delimiting commas since [12503]
--+-
  Reporter:  jklaiho  | Owner:  coleifer  
Status:  assigned | Milestone:  1.2   
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:  url tag pycamp2010
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by cmwslw):

 * cc: cwalke...@gmail.com (added)

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

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



[Changeset] r12734 - in django/trunk: django/contrib/admin tests/regressiontests/admin_validation

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 18:38:53 -0600 (Mon, 08 Mar 2010)
New Revision: 12734

Modified:
   django/trunk/django/contrib/admin/validation.py
   django/trunk/tests/regressiontests/admin_validation/models.py
Log:
Fixed #12689: Fixed admin validation to report an error on invalid exclude 
specification. Thanks for report to bparker and for patch with tests to ramiro.


Modified: django/trunk/django/contrib/admin/validation.py
===
--- django/trunk/django/contrib/admin/validation.py 2010-03-08 23:55:04 UTC 
(rev 12733)
+++ django/trunk/django/contrib/admin/validation.py 2010-03-09 00:38:53 UTC 
(rev 12734)
@@ -267,6 +267,19 @@
 if len(flattened_fieldsets) > len(set(flattened_fieldsets)):
 raise ImproperlyConfigured('There are duplicate field(s) in 
%s.fieldsets' % cls.__name__)
 
+# exclude
+if cls.exclude: # default value is None
+check_isseq(cls, 'exclude', cls.exclude)
+for field in cls.exclude:
+check_formfield(cls, model, opts, 'exclude', field)
+try:
+f = opts.get_field(field)
+except models.FieldDoesNotExist:
+# If we can't find a field on the model that matches,
+# it could be an extra field on the form.
+continue
+if len(cls.exclude) > len(set(cls.exclude)):
+raise ImproperlyConfigured('There are duplicate field(s) in 
%s.exclude' % cls.__name__)
 
 # form
 if hasattr(cls, 'form') and not issubclass(cls.form, BaseModelForm):

Modified: django/trunk/tests/regressiontests/admin_validation/models.py
===
--- django/trunk/tests/regressiontests/admin_validation/models.py   
2010-03-08 23:55:04 UTC (rev 12733)
+++ django/trunk/tests/regressiontests/admin_validation/models.py   
2010-03-09 00:38:53 UTC (rev 12734)
@@ -72,6 +72,37 @@
 ...
 ImproperlyConfigured: 'InvalidFields.fields' refers to field 'spam' that is 
missing from the form.
 
+# Tests for basic validation of 'exclude' option values (#12689)
+
+>>> class ExcludedFields1(admin.ModelAdmin):
+... exclude = ('foo')
+
+>>> validate(ExcludedFields1, Book)
+Traceback (most recent call last):
+...
+ImproperlyConfigured: 'ExcludedFields1.exclude' must be a list or tuple.
+
+>>> class ExcludedFields2(admin.ModelAdmin):
+... exclude = ('name', 'name')
+
+>>> validate(ExcludedFields2, Book)
+Traceback (most recent call last):
+...
+ImproperlyConfigured: There are duplicate field(s) in ExcludedFields2.exclude
+
+>>> class ExcludedFieldsInline(admin.TabularInline):
+... model = Song
+... exclude = ('foo')
+
+>>> class ExcludedFieldsAlbumAdmin(admin.ModelAdmin):
+... model = Album
+... inlines = [ExcludedFieldsInline]
+
+>>> validate(ExcludedFieldsAlbumAdmin, Album)
+Traceback (most recent call last):
+...
+ImproperlyConfigured: 'ExcludedFieldsInline.exclude' must be a list or tuple.
+
 # Regression test for #9932 - exclude in InlineModelAdmin
 # should not contain the ForeignKey field used in ModelAdmin.model
 

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



[Changeset] r12733 - in django/trunk: django/forms tests/regressiontests/model_forms_regress

2010-03-08 Thread noreply
Author: lukeplant
Date: 2010-03-08 17:55:04 -0600 (Mon, 08 Mar 2010)
New Revision: 12733

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/regressiontests/model_forms_regress/tests.py
Log:
Fixed #11183 - BaseForm init leaves pointers pointing back to base_fields

Thanks to margieroginski for the report



Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2010-03-08 23:25:37 UTC (rev 12732)
+++ django/trunk/django/forms/models.py 2010-03-08 23:55:04 UTC (rev 12733)
@@ -923,6 +923,12 @@
 self.choice_cache = None
 self.to_field_name = to_field_name
 
+def __deepcopy__(self, memo):
+result = super(ChoiceField, self).__deepcopy__(memo)
+# Need to force a new ModelChoiceIterator to be created, bug #11183
+result.queryset = result.queryset
+return result
+
 def _get_queryset(self):
 return self._queryset
 

Modified: django/trunk/tests/regressiontests/model_forms_regress/tests.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-03-08 23:25:37 UTC (rev 12732)
+++ django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-03-08 23:55:04 UTC (rev 12733)
@@ -2,7 +2,7 @@
 
 from django import db
 from django import forms
-from django.forms.models import modelform_factory
+from django.forms.models import modelform_factory, ModelChoiceField
 from django.conf import settings
 from django.test import TestCase
 
@@ -203,3 +203,16 @@
 form = AuthorForm({'publication':u'', 'full_name':'John Doe'}, 
instance=author)
 self.assert_(not form.is_valid())
 
+
+class ModelChoiceForm(forms.Form):
+person = ModelChoiceField(Person.objects.all())
+
+
+class TestTicket11183(TestCase):
+def test_11183(self):
+form1 = ModelChoiceForm()
+field1 = form1.fields['person']
+# To allow the widget to change the queryset of field1.widget.choices 
correctly, 
+# without affecting other forms, the following must hold:
+self.assert_(field1 is not ModelChoiceForm.base_fields['person'])
+self.assert_(field1.widget.choices.field is field1)

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



Re: [Django] #13055: Transaction decorators / multiple databases : using=

2010-03-08 Thread Django
#13055: Transaction decorators / multiple databases : using=
---+
  Reporter:  o...@nebkha.net| Owner:  nobody

Status:  new   | Milestone:  1.2
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:|  Keywords:  
transaction decorators
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by russellm):

 This is an example of internal implementation leaking to the external API.
 The argument is called 'func_or_using' because {...@transaction}}} and
 {...@transaction('my_alias')}}} are both allowed forms. The first case is
 required for backwards compatibility, and it's that case where you are
 providing a function.

 Practicality should trump the purity of internal variable naming; we
 should change the argument to 'using', and document the weirdness
 internally.

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

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



Re: [Django] #13040: Would like to add import statments for class documentation where needed

2010-03-08 Thread Django
#13040: Would like to add import statments for class documentation where needed
+---
  Reporter:  stherrien  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution:  wontfix|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 Broadly speaking, yes, but In this specific case, no. Like I said, Django
 can maintain the current package as context, and in this case, it already
 is.
 {{{
 .. currentmodule:: django.core.files
 .. class:: File(file_object)
 }}}
 and
 {{{
 .. class:: django.core.files File(file_object)
 }}}
 are equivalent.

 That is, Sphinx already has all the metadata it requires. If the rendering
 isn't exploiting that metadata, that's a separate issue. There may be
 places in code where classes aren't fully marked up, in which case, yes --
 the ..class decorations need to be corrected.

 Closing wontfix because the specific example you have given doesn't
 require any modification (side note - please generate patches from the
 root of the source tree, not just of a single file)

 If you want to propose changing the Sphinx rendering, or can provide a
 patch that identifies classes that don't have the right class markup,
 please 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11183: BaseForm init leaves pointers pointing back to base_fields when widget is a Select

2010-03-08 Thread Django
#11183: BaseForm init leaves pointers pointing back to base_fields when widget 
is a
Select
-+--
  Reporter:  margieroginski  | Owner:  lukeplant
Status:  assigned| Milestone:  1.2  
 Component:  Forms   |   Version:  1.0  
Resolution:  |  Keywords:   
 Stage:  Accepted| Has_patch:  0
Needs_docs:  0   |   Needs_tests:  1
Needs_better_patch:  0   |  
-+--
Comment (by lukeplant):

 Thanks for responding Margie.

 It seems to me that the bug cornered in my patch is a genuine bug.  I
 don't know about the `__deepcopy__` issues that Alex brought up, but I'll
 commit this fix for now, with the hope of finding/explaining the real
 problem in the future.

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

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



[Changeset] r12732 - in django/trunk: django/template docs/ref/templates docs/releases tests/regressiontests/templates

2010-03-08 Thread noreply
Author: lukeplant
Date: 2010-03-08 17:25:37 -0600 (Mon, 08 Mar 2010)
New Revision: 12732

Modified:
   django/trunk/django/template/defaulttags.py
   django/trunk/django/template/smartif.py
   django/trunk/docs/ref/templates/builtins.txt
   django/trunk/docs/releases/1.2.txt
   django/trunk/tests/regressiontests/templates/smartif.py
   django/trunk/tests/regressiontests/templates/tests.py
Log:
Fixed #13058 - "smart if" template tag doesn't support "if not in ..." 
condition   
  

Thanks to ramusus for the report.



Modified: django/trunk/django/template/defaulttags.py
===
--- django/trunk/django/template/defaulttags.py 2010-03-08 20:53:51 UTC (rev 
12731)
+++ django/trunk/django/template/defaulttags.py 2010-03-08 23:25:37 UTC (rev 
12732)
@@ -806,8 +806,8 @@
 Arguments and operators _must_ have a space between them, so
 ``{% if 1>2 %}`` is not a valid if tag.
 
-All supported operators are: ``or``, ``and``, ``in``, ``==`` (or ``=``),
-``!=``, ``>``, ``>=``, ``<`` and ``<=``.
+All supported operators are: ``or``, ``and``, ``in``, ``not in``
+``==`` (or ``=``), ``!=``, ``>``, ``>=``, ``<`` and ``<=``.
 
 Operator precedence follows Python.
 """

Modified: django/trunk/django/template/smartif.py
===
--- django/trunk/django/template/smartif.py 2010-03-08 20:53:51 UTC (rev 
12731)
+++ django/trunk/django/template/smartif.py 2010-03-08 23:25:37 UTC (rev 
12732)
@@ -97,6 +97,7 @@
 'and': infix(7, lambda x, y: x and y),
 'not': prefix(8, operator.not_),
 'in': infix(9, lambda x, y: x in y),
+'not in': infix(9, lambda x, y: x not in y),
 '=': infix(10, operator.eq),
 '==': infix(10, operator.eq),
 '!=': infix(10, operator.ne),
@@ -150,11 +151,23 @@
 error_class = ValueError
 
 def __init__(self, tokens):
-self.tokens = map(self.translate_tokens, tokens)
+# pre-pass necessary to turn  'not','in' into single token 
+l = len(tokens)
+mapped_tokens = []
+i = 0
+while i < l:
+token = tokens[i]
+if token == "not" and i + 1 < l and tokens[i+1] == "in":
+token = "not in"
+i += 1 # skip 'in'
+mapped_tokens.append(self.translate_token(token))
+i += 1
+
+self.tokens = mapped_tokens
 self.pos = 0
 self.current_token = self.next()
 
-def translate_tokens(self, token):
+def translate_token(self, token):
 try:
 op = OPERATORS[token]
 except (KeyError, TypeError):

Modified: django/trunk/docs/ref/templates/builtins.txt
===
--- django/trunk/docs/ref/templates/builtins.txt2010-03-08 20:53:51 UTC 
(rev 12731)
+++ django/trunk/docs/ref/templates/builtins.txt2010-03-08 23:25:37 UTC 
(rev 12732)
@@ -440,7 +440,12 @@
   instance that belongs to the QuerySet.
 {% endif %}
 
+``not in`` operator
+
 
+Not contained within.  This is the negation of the ``in`` operator.
+
+
 The comparison operators cannot be 'chained' like in Python or in mathematical
 notation. For example, instead of using::
 

Modified: django/trunk/docs/releases/1.2.txt
===
--- django/trunk/docs/releases/1.2.txt  2010-03-08 20:53:51 UTC (rev 12731)
+++ django/trunk/docs/releases/1.2.txt  2010-03-08 23:25:37 UTC (rev 12732)
@@ -636,9 +636,9 @@
 There's really no reason to use ``{% ifequal %}`` or ``{% ifnotequal %}``
 anymore, unless you're the nostalgic type.
 
-The operators supported are ``==``, ``!=``, ``<``, ``>``, ``<=``, ``>=`` and
-``in``, all of which work like the Python operators, in addition to ``and``,
-``or`` and ``not``, which were already supported.
+The operators supported are ``==``, ``!=``, ``<``, ``>``, ``<=``, ``>=``,
+``in`` and ``not in``, all of which work like the Python operators, in addition
+ to ``and``, ``or`` and ``not``, which were already supported.
 
 Also, filters may now be used in the ``if`` expression. For example:
 

Modified: django/trunk/tests/regressiontests/templates/smartif.py
===
--- django/trunk/tests/regressiontests/templates/smartif.py 2010-03-08 
20:53:51 UTC (rev 12731)
+++ django/trunk/tests/regressiontests/templates/smartif.py 2010-03-08 
23:25:37 UTC (rev 12732)
@@ -27,6 +27,13 @@
 self.assertCalcEqual(False, [1, 'in', None])
 self.assertCalcEqual(False, [None, 'in', list_])
 
+def test_not_in(self):
+list_ = [1,2,3]
+self.assertCalcEqual(False, [1, 'not', 'in', list_])
+self.assertCalcEqual(True, [4, 'not', 'in', list_])
+self.as

Re: [Django] #13058: New built-in "smart if" template tag doesn't support "if not in ..." condition

2010-03-08 Thread Django
#13058: New built-in "smart if" template tag doesn't support "if not in ..."
condition
--+-
  Reporter:  ramusus  | Owner:  lukeplant
Status:  assigned | Milestone:   
 Component:  Template system  |   Version:  1.1  
Resolution:   |  Keywords:   
 Stage:  Unreviewed   | Has_patch:  0
Needs_docs:  0|   Needs_tests:  0
Needs_better_patch:  0|  
--+-
Changes (by lukeplant):

  * owner:  nobody => lukeplant
  * status:  new => assigned

Comment:

 It was lost because:

  - the parser was rewritten completely
  - in the new parser it is slightly harder to add 'not in' because it
 involves two tokens
  - I didn't realise the old snippet supported 'not in'

 I will commit a fix soon.

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

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



Re: [Django] #12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE

2010-03-08 Thread Django
#12171: transaction.savepoint_rollback fails with postgresql DATABASE_ENGINE
---+
  Reporter:  andrewbadr| Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 I can't figure out how you are even getting to the point where
 `get_or_create` tries to rollback the transaction. At the revision
 mentioned (and now), `get_or_create` only tries the rollback when it
 catches an !IntegrityError (see
 
http://code.djangoproject.com/browser/django/trunk/django/db/models/query.py?rev=11724#L311).
 Yet when I try to run the `get_or_create` testcase with the old postgres
 backend, the first problem encountered is that no !IntegrityError is
 raised but rather a !ProgrammingError is raised. (This is true even with
 1.1 or trunk r11724). I have to change the `except IntegrityError, e` in
 `get_or_create` to `except Exception, e` and then I can see the subsequent
 problem that attempting to do a savepoint rollback will first try to set
 do that "SET client_encoding to 'UNICODE'":

 {{{
 > c:\u\kmt\django\django-1.1\django\test\_doctest.py(362)set_trace()->None
 -> pdb.Pdb.set_trace(self)
 (Pdb) n
 > c:\u\kmt\django\django-1.1\django\db\models\query.py(341)get_or_create()
 -> transaction.savepoint_rollback(sid)
 (Pdb) l
 336 transaction.savepoint_commit(sid)
 337 return obj, True
 338 #   except IntegrityError, e:
 339 except Exception, e:
 340 import pdb; pdb.set_trace()
 341  -> transaction.savepoint_rollback(sid)
 342 try:
 343 return self.get(**kwargs), False
 344 except self.model.DoesNotExist:
 345 raise e
 346
 (Pdb) n
 ProgrammingError: "ERROR:  current transaction is aborted, commands
 ignored until end of transaction block\n\nSET client
 _encoding to 'UNICODE'"
 > c:\u\kmt\django\django-1.1\django\db\models\query.py(341)get_or_create()
 -> transaction.savepoint_rollback(sid)
 (Pdb)
 }}}

 So, a question: have you done anything to your install to fix this
 !IntegrityError/!ProgrammingError mismatch I see? I'm also wondering why
 you are using the old backend instead of psycopg2?

 The error I see is reported in #12766 but since this is a bit different
 I'm going to leave both open for now.

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

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



Re: [Django] #13061: Default login template is on bad place - registration/login.html TemplateDoesNotExist

2010-03-08 Thread Django
#13061: Default login template is on bad place - registration/login.html
TemplateDoesNotExist
-+--
  Reporter:  sopuch  | Owner:  nobody
Status:  closed  | Milestone:  1.2   
 Component:  Authentication  |   Version:  1.1   
Resolution:  invalid |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by ubernostrum):

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

Comment:

 No, that's the correct location. The admin does its own separate login
 template.

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

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



[Django] #13061: Default login template is on bad place - registration/login.html TemplateDoesNotExist

2010-03-08 Thread Django
#13061: Default login template is on bad place - registration/login.html
TemplateDoesNotExist
+---
 Reporter:  sopuch  |   Owner:  nobody
   Status:  new |   Milestone:  1.2   
Component:  Authentication  | Version:  1.1   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 django.contrib.auth.views.login points to default template
 (template_name=registration/login.html) to bad place - produce
 TemplateDoesNotExist error. I think, this template is in admin/login.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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5415: Every SQL query should send a signal

2010-03-08 Thread Django
#5415: Every SQL query should send a signal
---+
  Reporter:  adrian| Owner:  gav

Status:  assigned  | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  
feature_request
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  1 |   Needs_tests:  0  

Needs_better_patch:  1 |  
---+
Comment (by tonyarkles):

 Any thoughts on this?  I'm working on a project that could really use this
 functionality, and I'd be willing to work on the patch and shepherd it
 through.

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

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



[Changeset] r12731 - django/branches/releases/1.1.X

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 14:53:51 -0600 (Mon, 08 Mar 2010)
New Revision: 12731

Modified:
   django/branches/releases/1.1.X/
Log:
[1.1.X] Updated svnmerge metadata to reflect changesets that have been and 
should not be merged.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-blocked
   - 
/django/trunk:11526,11586-11587,11590,11593-11595,11600,11618,11627,11636,11639-11642,11645-11647,11654-11655,11660-11661,11663-11669,11672-11673,11675-11677,11680,11683,11709-11713,11716-11718,11721-11731,11736-11739,11742-11747,11752,11755,11778-11799,11803-11807,11810,11814,11830,11843,11846-11848,11850,11854-11855,11858,11861-11863,11880,11883-11884,11887,11900,11907,11910,11915-11916,11921,11923-11924,11937,11943,11952,11955-11956,11959-11960,11964-11976,11981-11983,12008-12010,12013,12021,12026-12037,12041-12043,12046-12047,12049-12053,12057-12058,12060,12080-12085,12089,12097-12103,12106-12117,12120-12125,12127,12135,12139,12142,12146,12148,12153-12157,12159-12160,12164,12174,12176-12177,12180,12185,12191-12192,12194-12196,12198,12203-12219,1-12228,12232,12247-12248,12255-12262,12264-12275,12278-12281,12285,12287-12292,12295-12312,12315-12316,12335-12338,12345,12348,12349-12352,12354,12357-12361,12364-12378,12381-12383,12386-12397,12399-12403,12407,12417-12418,12431-12433,12438,12443-12446,12454-12456,12458-12460,12465-12466,12468-12470,12472,12474,12476,12486-12488,12493-12494,12496,12500,12504,12508-12512,12514,12517,12527,12532,12543-12547,12551-12552,12555,12561,12574,12578,12580,12586,12588,12590,12597,12611-12612,12618-12620,12624-12626,12633-12634,12643,12656,12675,12684-12685,12690-12691,12693,12701
   + 
/django/trunk:11526,11586-11587,11590,11593-11595,11600,11618,11627,11636,11639-11642,11645-11647,11654-11655,11660-11661,11663-11669,11672-11673,11675-11677,11680,11683,11709-11713,11716-11718,11721-11731,11736-11739,11742-11747,11752,11755,11778-11799,11803-11807,11810,11814,11830,11843,11846-11848,11850,11854-11855,11858,11861-11863,11880,11883-11884,11887,11900,11907,11910,11915-11916,11921,11923-11924,11937,11943,11952,11955-11956,11959-11960,11964-11976,11981-11983,12008-12010,12013,12021,12026-12037,12041-12043,12046-12047,12049-12053,12057-12058,12060,12080-12085,12089,12097-12103,12106-12117,12120-12125,12127,12135,12139,12142,12146,12148,12153-12157,12159-12160,12164,12174,12176-12177,12180,12185,12191-12192,12194-12196,12198,12203-12219,1-12228,12232,12247-12248,12255-12262,12264-12275,12278-12281,12285,12287-12292,12295-12312,12315-12316,12335-12338,12345,12348,12349-12352,12354,12357-12361,12364-12378,12381-12383,12386-12397,12399-12403,12407,12417-12418,12431-12433,12438,12443-12446,12454-12456,12458-12460,12465-12466,12468-12470,12472,12474,12476,12486-12488,12493-12494,12496,12500,12504,12508-12512,12514,12517,12527,12532,12543-12547,12551-12552,12555,12561,12574,12578,12580,12586,12588,12590,12597,12611-12612,12618-12620,12624-12626,12633-12634,12643,12656,12675,12684-12685,12690-12691,12693,12701,12707-12709,12717-12718,12730

Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721,12723,12725-12726,12728
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756

Re: [Django] #13055: Transaction decorators / multiple databases : using=

2010-03-08 Thread Django
#13055: Transaction decorators / multiple databases : using=
---+
  Reporter:  o...@nebkha.net| Owner:  nobody

Status:  new   | Milestone:  1.2
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:|  Keywords:  
transaction decorators
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by ubernostrum):

 Is there a reason why it's not just `using` everywhere (since all the
 other transaction-management functions take it as `using`)?  We don't
 provide any documentation for passing a function there or explaining why
 you'd want to do that, and from the code I can't figure out what that
 feature's useful for...

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

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



[Changeset] r12730 - in django/trunk: django/contrib/admin tests/regressiontests/admin_validation

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 14:36:37 -0600 (Mon, 08 Mar 2010)
New Revision: 12730

Added:
   django/trunk/tests/regressiontests/admin_validation/tests.py
Modified:
   django/trunk/django/contrib/admin/validation.py
   django/trunk/tests/regressiontests/admin_validation/models.py
Log:
Fixed #12481: Updated admin validation code to not reject non-editable fields 
in readonly_fields, since these are handled fine by the display code itself. 
Thanks lashni and Alex.


Modified: django/trunk/django/contrib/admin/validation.py
===
--- django/trunk/django/contrib/admin/validation.py 2010-03-08 18:41:26 UTC 
(rev 12729)
+++ django/trunk/django/contrib/admin/validation.py 2010-03-08 20:36:37 UTC 
(rev 12730)
@@ -245,6 +245,12 @@
 if type(fields) != tuple:
 fields = (fields,)
 for field in fields:
+if field in cls.readonly_fields:
+# Stuff can be put in fields that isn't actually a
+# model field if it's in readonly_fields,
+# readonly_fields will handle the validation of such
+# things.
+continue
 check_formfield(cls, model, opts, 
"fieldsets[%d][1]['fields']" % idx, field)
 try:
 f = opts.get_field(field)

Modified: django/trunk/tests/regressiontests/admin_validation/models.py
===
--- django/trunk/tests/regressiontests/admin_validation/models.py   
2010-03-08 18:41:26 UTC (rev 12729)
+++ django/trunk/tests/regressiontests/admin_validation/models.py   
2010-03-08 20:36:37 UTC (rev 12730)
@@ -12,6 +12,7 @@
 class Song(models.Model):
 title = models.CharField(max_length=150)
 album = models.ForeignKey(Album)
+original_release = models.DateField(editable=False)
 
 class Meta:
 ordering = ('title',)

Added: django/trunk/tests/regressiontests/admin_validation/tests.py
===
--- django/trunk/tests/regressiontests/admin_validation/tests.py
(rev 0)
+++ django/trunk/tests/regressiontests/admin_validation/tests.py
2010-03-08 20:36:37 UTC (rev 12730)
@@ -0,0 +1,18 @@
+from django.contrib import admin
+from django.contrib.admin.validation import validate
+from django.test import TestCase
+
+from models import Song
+
+
+class ValidationTestCase(TestCase):
+def test_readonly_and_editable(self):
+class SongAdmin(admin.ModelAdmin):
+readonly_fields = ["original_release"]
+fieldsets = [
+(None, {
+"fields": ["title", "original_release"],
+}),
+]
+
+validate(SongAdmin, Song)


Property changes on: 
django/trunk/tests/regressiontests/admin_validation/tests.py
___
Name: svn:eol-style
   + native

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



Re: [Django] #13040: Would like to add import statments for class documentation where needed

2010-03-08 Thread Django
#13040: Would like to add import statments for class documentation where needed
+---
  Reporter:  stherrien  | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by anonymous):

 * cc: shawntherr...@gmail.com (added)

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

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



Re: [Django] #13060: ManagementForm exception in case of bad prefix should be easier to understand

2010-03-08 Thread Django
#13060: ManagementForm exception in case of bad prefix should be easier to
understand
-+--
  Reporter:  Karel   | Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  Forms   |   Version:   
   
Resolution:  |  Keywords:  formset, ValidationError, 
ManagementForm
 Stage:  Unreviewed  | Has_patch:  1
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Changes (by anonymous):

 * cc: shawntherr...@gmail.com (added)
  * needs_better_patch:  => 0
  * has_patch:  0 => 1
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



Re: [Django] #12819: Problem with commit 12307 and null onetoone fields

2010-03-08 Thread Django
#12819: Problem with commit 12307 and null onetoone fields
---+
  Reporter:  s.an...@twidi.com | Owner:  nobody 
 
Status:  closed| Milestone:  1.2
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:  fixed |  Keywords:  
select_related onetoone null
 Stage:  Ready for checkin | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 Replying to [comment:8 subsume]:
 > see also #12937

 Please explain? You've added a comment to see another ticket (which
 already had a mention back to this ticket). Near as I can tell that ticket
 notes that the problem reported there includes an instance of the problem
 reported here, but that they are different problems. This one is supposed
 to be fixed by r12543, that one is still open. What are you trying to
 accomplish by noting 'see #12937'?

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

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



Re: [Django] #12819: Problem with commit 12307 and null onetoone fields

2010-03-08 Thread Django
#12819: Problem with commit 12307 and null onetoone fields
---+
  Reporter:  s.an...@twidi.com | Owner:  nobody 
 
Status:  closed| Milestone:  1.2
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:  fixed |  Keywords:  
select_related onetoone null
 Stage:  Ready for checkin | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by subsume):

 see also #12937

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

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



Re: [Django] #12870: ORM bug with using exclude in conjunction with Q objects

2010-03-08 Thread Django
#12870: ORM bug with using exclude in conjunction with Q objects
---+
  Reporter:  subsume   | Owner:  nobody   
Status:  closed| Milestone:  1.2  
 Component:  Database layer (models, ORM)  |   Version:  1.1  
Resolution:  worksforme|  Keywords:  exclude Q
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by subsume):

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

Comment:

 I'm going to have to retract the above. Apparently I misunderstood the SQL
 in question, and that those records with category = NULL were not going to
 be returned.

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

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



Re: [Django] #12481: admin readonly_fields not working with edtiable=False field named in fieldset

2010-03-08 Thread Django
#12481: admin readonly_fields not working with edtiable=False field named in
fieldset
---+
  Reporter:  lashni| Owner:  nobody  
Status:  reopened  | Milestone:  1.2 
 Component:  django.contrib.admin  |   Version:  1.2-beta
Resolution:|  Keywords:  
 Stage:  Ready for checkin | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * stage:  Accepted => Ready for checkin

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

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



Re: [Django] #13055: Transaction decorators / multiple databases : using=

2010-03-08 Thread Django
#13055: Transaction decorators / multiple databases : using=
---+
  Reporter:  o...@nebkha.net| Owner:  nobody

Status:  new   | Milestone:  1.2
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:|  Keywords:  
transaction decorators
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by kmtracey):

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

Comment:

 `autocommit`, `commit_on_success`, and `commit_manually` all have their
 one kwarg specified as `func_or_using`, not `using` as per the doc.

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

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



Re: [Django] #10361: Slightly complex built-in Field classes are undocumented

2010-03-08 Thread Django
#10361: Slightly complex built-in Field classes are undocumented
+---
  Reporter:  Leo| Owner:  nobody
Status:  new| Milestone:  1.2   
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Leo):

  * milestone:  => 1.2

Comment:

 Adding to 1.2 for consideration.

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

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



[Changeset] r12729 - in django/branches/releases/1.1.X: . django/contrib/admin docs/ref/models tests/regressiontests/admin_widgets

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 12:41:26 -0600 (Mon, 08 Mar 2010)
New Revision: 12729

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/contrib/admin/widgets.py
   django/branches/releases/1.1.X/docs/ref/models/fields.txt
   django/branches/releases/1.1.X/tests/regressiontests/admin_widgets/models.py
Log:
[1.1.X] Fixed #12024: Changed admin code to avoid raising an exception when a 
field listed
in raw_id_fields has limit_choices_to specified as a Q object.

Tweaked a test to trigger the condition and verify the fix.

Finally, documented that limit_choices_to specified as a Q object has no effect
on the choices available for fields listed in raw_id_fields, and removed another
incorrect note that claimed limit_choices_to had no effect on inlines in the 
admin. 

r12728 from trunk.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721,12723,12725-12726
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721,12723,12725-12726,12728

Modified: django/branches/releases/1.1.X/django/contrib/admin/widgets.py
===
--- django/branches/releases/1.1.X/django/contrib/admin/widgets.py  
2010-03-08 18:32:24 UTC (rev 12728)
+++ django/branches/releases/1.1.X/django/contrib/admin/widgets.py  
2010-03-08 18:41:26 UTC (rev 12729)
@@ -129,7 +129,7 @@
 
 def base_url_parameters(self):
 params = {}
-if self.rel.limit_choices_to:
+if self.rel.limit_choices_to and hasattr(self.rel.limit_choices_to, 
'items'):
 items = []
 for k, v in self.rel.limit_choices_to.items():
 if isinstance(v, list):

Modified: django/branches/releases/1.1.X/docs/ref/models/fields.txt
===
--- django/branches/releases/1.1.X/docs/ref/models/fields.txt   2010-03-08 
18:32:24 UTC (rev 12728)
+++ django/branches/releases/1.1.X/docs/r

Re: [Django] #13059: Portuguese translation patch for Django SVN

2010-03-08 Thread Django
#13059: Portuguese translation patch for Django SVN
+---
  Reporter:  nmariz | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  SVN   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by kmtracey):

 I'm not really up to speed on translations, but it would surprise me
 greatly if a diff against 1.2 beta would be preferred over a diff against
 current trunk. Strings may have been added/changed between beta and now,
 to get the best translation I believe you should be submitting
 translations against current trunk.

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

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



[Changeset] r12728 - in django/trunk: django/contrib/admin docs/ref/models tests/regressiontests/admin_widgets

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 12:32:24 -0600 (Mon, 08 Mar 2010)
New Revision: 12728

Modified:
   django/trunk/django/contrib/admin/widgets.py
   django/trunk/docs/ref/models/fields.txt
   django/trunk/tests/regressiontests/admin_widgets/models.py
Log:
Fixed #12024: Changed admin code to avoid raising an exception when a field 
listed 
in raw_id_fields has limit_choices_to specified as a Q object. 

Tweaked a test to trigger the condition and verify the fix. 

Finally, documented that limit_choices_to specified as a Q object has no effect 
on the choices available for fields listed in raw_id_fields, and removed 
another 
incorrect note that claimed limit_choices_to had no effect on inlines in the 
admin.



Modified: django/trunk/django/contrib/admin/widgets.py
===
--- django/trunk/django/contrib/admin/widgets.py2010-03-08 17:11:14 UTC 
(rev 12727)
+++ django/trunk/django/contrib/admin/widgets.py2010-03-08 18:32:24 UTC 
(rev 12728)
@@ -133,7 +133,7 @@
 
 def base_url_parameters(self):
 params = {}
-if self.rel.limit_choices_to:
+if self.rel.limit_choices_to and hasattr(self.rel.limit_choices_to, 
'items'):
 items = []
 for k, v in self.rel.limit_choices_to.items():
 if isinstance(v, list):

Modified: django/trunk/docs/ref/models/fields.txt
===
--- django/trunk/docs/ref/models/fields.txt 2010-03-08 17:11:14 UTC (rev 
12727)
+++ django/trunk/docs/ref/models/fields.txt 2010-03-08 18:32:24 UTC (rev 
12728)
@@ -872,11 +872,11 @@
 current date/time to be chosen.
 
 Instead of a dictionary this can also be a :class:`~django.db.models.Q`
-object for more :ref:`complex queries `.
+object for more :ref:`complex queries `. However, 
+if ``limit_choices_to`` is a :class:`~django.db.models.Q` object then it 
+will only have an effect on the choices available in the admin when the 
+field is not listed in ``raw_id_fields`` in the ``ModelAdmin`` for the 
model.
 
-``limit_choices_to`` has no effect on the inline FormSets that are created
-to display related objects in the admin.
-
 .. attribute:: ForeignKey.related_name
 
 The name to use for the relation from the related object back to this one.

Modified: django/trunk/tests/regressiontests/admin_widgets/models.py
===
--- django/trunk/tests/regressiontests/admin_widgets/models.py  2010-03-08 
17:11:14 UTC (rev 12727)
+++ django/trunk/tests/regressiontests/admin_widgets/models.py  2010-03-08 
18:32:24 UTC (rev 12728)
@@ -49,7 +49,7 @@
   return self.name
 
 class Event(models.Model):
-band = models.ForeignKey(Band)
+band = models.ForeignKey(Band, limit_choices_to=models.Q(pk__gt=0))
 start_date = models.DateField(blank=True, null=True)
 start_time = models.TimeField(blank=True, null=True)
 description = models.TextField(blank=True)

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



Re: [Django] #11183: BaseForm init leaves pointers pointing back to base_fields when widget is a Select

2010-03-08 Thread Django
#11183: BaseForm init leaves pointers pointing back to base_fields when widget 
is a
Select
-+--
  Reporter:  margieroginski  | Owner:  lukeplant
Status:  assigned| Milestone:  1.2  
 Component:  Forms   |   Version:  1.0  
Resolution:  |  Keywords:   
 Stage:  Accepted| Has_patch:  0
Needs_docs:  0   |   Needs_tests:  1
Needs_better_patch:  0   |  
-+--
Comment (by margieroginski):

 Hi Luke,

 I unfortunately am not using this code or functionality anymore.  Early on
 in my django work I was trying to use the admin app as my end user app,
 but I have long since abandoned that. It seems to me that in general
 choices does not get updated on the widget associated with fields that use
 choices.  For example, I think that if I create a ChoiceField in my form,
 and then recreate the ChoiceField with different choices, the underlying
 widget will not get those choices.  I believe I ran into this and Malcolm
 said this was the case, though I am a bit hazy on it now.

 In any case, I have not looked at the above code in almost a year since it
 is no longer an issue for me, so I don't think I can add a lot of value on
 it at this point. Sorry about that ...

 Margie

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

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



Re: [Django] #12998: RSS feed test fails on windows

2010-03-08 Thread Django
#12998: RSS feed test fails on windows
+---
  Reporter:  Leo| Owner:  nobody
Status:  new| Milestone:  1.2   
 Component:  RSS framework  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by anonymous):

 Is the workaround then to just set `TIMEZONE` in my settings for running
 the tests?

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

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



Re: [Django] #11461: DebugNodeList breaks exceptions

2010-03-08 Thread Django
#11461: DebugNodeList breaks exceptions
-+--
  Reporter:  Glenn   | Owner:  nobody
Status:  closed  | Milestone:  1.2   
 Component:  Template system |   Version:  SVN   
Resolution:  fixed   |  Keywords:
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by Glenn):

 Wrapping exceptions like this is evil.  I'm disappointed in this decision,
 but I don't have time to argue 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13059: Portuguese translation patch for Django SVN

2010-03-08 Thread Django
#13059: Portuguese translation patch for Django SVN
+---
  Reporter:  nmariz | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  SVN   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by nmariz):

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

Comment:

 Sorry.
 Please ignore this ticket, I've made a diff between SVN trunk and 1.2 beta
 and there are differences.
 I'll submit the correct patch for the 1.2 beta.

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

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



[Django] #13060: ManagementForm exception in case of bad prefix should be easier to understand

2010-03-08 Thread Django
#13060: ManagementForm exception in case of bad prefix should be easier to
understand
--+-
 Reporter:  Karel |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Forms | Version:
 Keywords:  formset, ValidationError, ManagementForm  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 If user adds multiple formsets with prefixes, and specifies the prefix
 incorrectly when binding the form and validating:
 {{{
 some_formset = SomeFormSet(request.POST, 'articles')
 }}}

 instead of:

 {{{
 some_formset = SomeFormSet(request.POST, prefix='articles')
 }}}

 Django "suppresses" the original exception and raises only relatively
 unhelpful "ManagementForm data is missing or has been tampered with".

 In file django/forms/formsets.py, line 57:
 {{{
   54. if self.data or self.files:
   55. form = ManagementForm(self.data, auto_id=self.auto_id,
 prefix=self.prefix)
   56. if not form.is_valid():
   57. raise ValidationError('ManagementForm data is missing or has
 been tampered with')
 }}}

 Suggestion: include form._errors in output, because for such a small bug
 in code, it can take a really long time find it.
 {{{
 {'INITIAL_FORMS': [u'This field is required.'],
  'MAX_NUM_FORMS': [u'This field is required.'],
  'TOTAL_FORMS': [u'This field is required.']}
 }}}

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

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



Re: [Django] #11183: BaseForm init leaves pointers pointing back to base_fields when widget is a Select

2010-03-08 Thread Django
#11183: BaseForm init leaves pointers pointing back to base_fields when widget 
is a
Select
-+--
  Reporter:  margieroginski  | Owner:  lukeplant
Status:  assigned| Milestone:  1.2  
 Component:  Forms   |   Version:  1.0  
Resolution:  |  Keywords:   
 Stage:  Accepted| Has_patch:  0
Needs_docs:  0   |   Needs_tests:  1
Needs_better_patch:  0   |  
-+--
Comment (by lukeplant):

 margieroginski - I came up with a slightly different patch.  Could you
 check that my patch fixes this bug in the context of your 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11183: BaseForm init leaves pointers pointing back to base_fields when widget is a Select

2010-03-08 Thread Django
#11183: BaseForm init leaves pointers pointing back to base_fields when widget 
is a
Select
-+--
  Reporter:  margieroginski  | Owner:  lukeplant
Status:  assigned| Milestone:  1.2  
 Component:  Forms   |   Version:  1.0  
Resolution:  |  Keywords:   
 Stage:  Accepted| Has_patch:  0
Needs_docs:  0   |   Needs_tests:  1
Needs_better_patch:  0   |  
-+--
Comment (by Alex):

 The {{{ __deepcopy__ }}} methods on Widgets/Fields seem to be becoming a
 nest full of random special casing for the different attributes different
 ones have.  I can't figure out why, for example, Field even bothers to
 define this __deepcopy__, the default implementation should suffice:
 http://code.djangoproject.com/browser/django/trunk/django/forms/fields.py#L167

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

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



Re: [Django] #9394: Reverse relation lookups with a multi-table inherited model produces extraneous queries

2010-03-08 Thread Django
#9394: Reverse relation lookups with a multi-table inherited model produces
extraneous queries
---+
  Reporter:  ikelly| Owner:  mtredinnick
Status:  assigned  | Milestone:  1.3
 Component:  Database layer (models, ORM)  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * milestone:  1.2 => 1.3

Comment:

 Likewise, pushing to 1.3: this is an optimization, not a bug.

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

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



Re: [Django] #11461: DebugNodeList breaks exceptions

2010-03-08 Thread Django
#11461: DebugNodeList breaks exceptions
-+--
  Reporter:  Glenn   | Owner:  nobody
Status:  closed  | Milestone:  1.2   
 Component:  Template system |   Version:  SVN   
Resolution:  fixed   |  Keywords:
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by kmtracey):

 For now I've gone with just ensuring the traceback is on the debug page,
 even when running Python 2.6+. That, at least, I feel needs to be in
 1.2/1.1.2. I'm less sure of the necessity of changing the type of
 exception raised away from !TemplateSyntaxError. It makes me a bit nervous
 from a backwards-compatibility standpoint, since I don't know what might
 be relying on it programmatically. Also, for a human looking at a deubg
 page, !TemplateSyntaxError at the top is a clue that if you scroll down in
 the info you should find a template error section showing the part of the
 template associated with the error; if we get rid of the
 !TemplateSyntaxError we remove that clue. Maybe minor but at this point
 I'm just not comfortable removing the !TemplateSyntaxError wrapping
 entirely.

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

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



Re: [Django] #13059: Portuguese translation patch for Django SVN

2010-03-08 Thread Django
#13059: Portuguese translation patch for Django SVN
+---
  Reporter:  nmariz | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by nmariz):

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

Comment:

 I think I've messed up, this diff is for SVN trunk not 1.2 beta. This is a
 problem for the next 1.2 release? Or I must re-translate for 1.2 beta?

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

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



[Changeset] r12727 - in django/branches/releases/1.1.X: . django/template tests/regressiontests/templates tests/regressiontests/views tests/regressiontests/views/templates tests/regressiontests/views/

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 11:11:14 -0600 (Mon, 08 Mar 2010)
New Revision: 12727

Added:
   django/branches/releases/1.1.X/tests/regressiontests/views/templates/
   django/branches/releases/1.1.X/tests/regressiontests/views/templates/debug/
   
django/branches/releases/1.1.X/tests/regressiontests/views/templates/debug/template_exception.html
   django/branches/releases/1.1.X/tests/regressiontests/views/templatetags/
   
django/branches/releases/1.1.X/tests/regressiontests/views/templatetags/__init__.py
   
django/branches/releases/1.1.X/tests/regressiontests/views/templatetags/debugtags.py
Removed:
   django/branches/releases/1.1.X/tests/regressiontests/views/templates/debug/
   
django/branches/releases/1.1.X/tests/regressiontests/views/templates/debug/template_exception.html
   
django/branches/releases/1.1.X/tests/regressiontests/views/templatetags/__init__.py
   
django/branches/releases/1.1.X/tests/regressiontests/views/templatetags/debugtags.py
Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/template/__init__.py
   django/branches/releases/1.1.X/django/template/debug.py
   django/branches/releases/1.1.X/tests/regressiontests/templates/tests.py
   django/branches/releases/1.1.X/tests/regressiontests/views/tests/debug.py
   django/branches/releases/1.1.X/tests/regressiontests/views/urls.py
   django/branches/releases/1.1.X/tests/regressiontests/views/views.py
Log:
[1.1.X] Fixed #11461: Ensured complete traceback is available on the debug page 
when an exception is encountered during template rendering, even when running 
on Python 2.6 or higher. Thanks Glenn. 

r12725 and r12726 from trunk.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721,12723
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721,12723,12725-12726

Modified: django/branches/releases/1.1.X/django/template/__init__.py
===
--- django/br

[Django] #13059: Portuguese translation patch for Django SVN

2010-03-08 Thread Django
#13059: Portuguese translation patch for Django SVN
---+
 Reporter:  nmariz |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r12726 - in django/trunk/tests/regressiontests/views: . templates templates/debug

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 11:04:06 -0600 (Mon, 08 Mar 2010)
New Revision: 12726

Added:
   django/trunk/tests/regressiontests/views/templates/
   django/trunk/tests/regressiontests/views/templates/debug/
   
django/trunk/tests/regressiontests/views/templates/debug/template_exception.html
Log:
Add files mistakenly left out of r12725.


Added: 
django/trunk/tests/regressiontests/views/templates/debug/template_exception.html
===
--- 
django/trunk/tests/regressiontests/views/templates/debug/template_exception.html
(rev 0)
+++ 
django/trunk/tests/regressiontests/views/templates/debug/template_exception.html
2010-03-08 17:04:06 UTC (rev 12726)
@@ -0,0 +1,2 @@
+{% load debugtags %}
+{% go_boom arg %}


Property changes on: 
django/trunk/tests/regressiontests/views/templates/debug/template_exception.html
___
Name: svn:eol-style
   + native

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



[Changeset] r12725 - in django/trunk: django/template tests/regressiontests/templates tests/regressiontests/views tests/regressiontests/views/templatetags tests/regressiontests/views/tests

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 11:01:21 -0600 (Mon, 08 Mar 2010)
New Revision: 12725

Added:
   django/trunk/tests/regressiontests/views/templatetags/
   django/trunk/tests/regressiontests/views/templatetags/__init__.py
   django/trunk/tests/regressiontests/views/templatetags/debugtags.py
Modified:
   django/trunk/django/template/__init__.py
   django/trunk/django/template/debug.py
   django/trunk/tests/regressiontests/templates/tests.py
   django/trunk/tests/regressiontests/views/tests/debug.py
   django/trunk/tests/regressiontests/views/urls.py
   django/trunk/tests/regressiontests/views/views.py
Log:
Fixed #11461: Ensured complete traceback is available on the debug page when an 
exception is encountered during template rendering, even when running on Python 
2.6 or higher. Thanks Glenn.


Modified: django/trunk/django/template/__init__.py
===
--- django/trunk/django/template/__init__.py2010-03-08 15:23:52 UTC (rev 
12724)
+++ django/trunk/django/template/__init__.py2010-03-08 17:01:21 UTC (rev 
12725)
@@ -104,20 +104,7 @@
 invalid_var_format_string = None
 
 class TemplateSyntaxError(Exception):
-def __str__(self):
-try:
-import cStringIO as StringIO
-except ImportError:
-import StringIO
-output = StringIO.StringIO()
-output.write(Exception.__str__(self))
-# Check if we wrapped an exception and print that too.
-if hasattr(self, 'exc_info'):
-import traceback
-output.write('\n\nOriginal ')
-e = self.exc_info
-traceback.print_exception(e[0], e[1], e[2], 500, output)
-return output.getvalue()
+pass
 
 class TemplateDoesNotExist(Exception):
 pass

Modified: django/trunk/django/template/debug.py
===
--- django/trunk/django/template/debug.py   2010-03-08 15:23:52 UTC (rev 
12724)
+++ django/trunk/django/template/debug.py   2010-03-08 17:01:21 UTC (rev 
12725)
@@ -76,10 +76,11 @@
 raise
 except Exception, e:
 from sys import exc_info
-wrapped = TemplateSyntaxError(u'Caught an exception while 
rendering: %s' % force_unicode(e, errors='replace'))
+wrapped = TemplateSyntaxError(u'Caught %s while rendering: %s' %
+(e.__class__.__name__, force_unicode(e, errors='replace')))
 wrapped.source = node.source
 wrapped.exc_info = exc_info()
-raise wrapped
+raise wrapped, None, wrapped.exc_info[2]
 return result
 
 class DebugVariableNode(VariableNode):

Modified: django/trunk/tests/regressiontests/templates/tests.py
===
--- django/trunk/tests/regressiontests/templates/tests.py   2010-03-08 
15:23:52 UTC (rev 12724)
+++ django/trunk/tests/regressiontests/templates/tests.py   2010-03-08 
17:01:21 UTC (rev 12725)
@@ -216,7 +216,7 @@
 except TemplateSyntaxError, e:
 # Assert that we are getting the template syntax error and not the
 # string encoding error.
-self.assertEquals(e.args[0], "Caught an exception while rendering: 
Reverse for 'will_not_match' with arguments '()' and keyword arguments '{}' not 
found.")
+self.assertEquals(e.args[0], "Caught NoReverseMatch while 
rendering: Reverse for 'will_not_match' with arguments '()' and keyword 
arguments '{}' not found.")
 
 settings.SETTINGS_MODULE = old_settings_module
 settings.TEMPLATE_DEBUG = old_template_debug

Added: django/trunk/tests/regressiontests/views/templatetags/__init__.py
===


Property changes on: 
django/trunk/tests/regressiontests/views/templatetags/__init__.py
___
Name: svn:eol-style
   + native

Added: django/trunk/tests/regressiontests/views/templatetags/debugtags.py
===
--- django/trunk/tests/regressiontests/views/templatetags/debugtags.py  
(rev 0)
+++ django/trunk/tests/regressiontests/views/templatetags/debugtags.py  
2010-03-08 17:01:21 UTC (rev 12725)
@@ -0,0 +1,10 @@
+from django import template
+ 
+from regressiontests.views import BrokenException
+
+register = template.Library()
+
+...@register.simple_tag
+def go_boom(arg):
+raise BrokenException(arg)
+


Property changes on: 
django/trunk/tests/regressiontests/views/templatetags/debugtags.py
___
Name: svn:eol-style
   + native

Modified: django/trunk/tests/regressiontests/views/tests/debug.py
===
--- django/trunk/tests/regressiontests/views/tests/debug.py 2010-03-08 
15:23:52 UTC (rev 12724)
+++ djan

Re: [Django] #12945: url tag breaks on spaces between delimiting commas since [12503]

2010-03-08 Thread Django
#12945: url tag breaks on spaces between delimiting commas since [12503]
--+-
  Reporter:  jklaiho  | Owner:  coleifer  
Status:  assigned | Milestone:  1.2   
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:  url tag pycamp2010
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by ramusus):

 * cc: ramu...@gmail.com (added)

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

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



Re: [Django] #12822: DatabaseError: aggregates not allowed in WHERE clause

2010-03-08 Thread Django
#12822: DatabaseError: aggregates not allowed in WHERE clause
--+-
  Reporter:  mat  | Owner:  
Status:  new  | Milestone:  1.2 
 Component:  ORM aggregation  |   Version:  1.2-beta
Resolution:   |  Keywords:  
 Stage:  Accepted | Has_patch:  0   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Comment (by mat):

 I've tried to come up with a unit test for this bug and found surprising
 results. I've attached
 [http://code.djangoproject.com/attachment/ticket/12822/more-aggregation-
 unittests.diff a patch adding my tests against the latest svn] and it
 fails with sqlite too, but not with a `DatabaseError` : the results seem
 simply wrong.

 Should I open another bug ? Either I'm completely wrong or it's a serious
 aggregation bug ; It passes correctly with django 1.1.

 Note that with `postgresql_psycopg2` the test does fail with the
 `DatabaseError`, so the original bug is still present.

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

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



Re: [Django] #13058: New built-in "smart if" template tag doesn't support "if not in ..." condition

2010-03-08 Thread Django
#13058: New built-in "smart if" template tag doesn't support "if not in ..."
condition
--+-
  Reporter:  ramusus  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by ramusus):

 * cc: ramu...@gmail.com (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Django] #13058: New built-in "smart if" template tag doesn't support "if not in ..." condition

2010-03-08 Thread Django
#13058: New built-in "smart if" template tag doesn't support "if not in ..."
condition
-+--
 Reporter:  ramusus  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Template system  | Version:  1.1   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 One thing is prevent to switch completely from
 [http://www.djangosnippets.org/snippets/1350/ old smart if snippet] to
 [http://docs.djangoproject.com/en/dev/ref/templates/builtins/#if new smart
 if built-in template tag] is "if not in ..." condition. This works in
 snippet, but in built-in template tag doesn't. It's important condition
 and very strange that this functionality lost while migration of
 templatetag to trunk.

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

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



Re: [Django] #11183: BaseForm init leaves pointers pointing back to base_fields when widget is a Select

2010-03-08 Thread Django
#11183: BaseForm init leaves pointers pointing back to base_fields when widget 
is a
Select
-+--
  Reporter:  margieroginski  | Owner:  lukeplant
Status:  assigned| Milestone:  1.2  
 Component:  Forms   |   Version:  1.0  
Resolution:  |  Keywords:   
 Stage:  Accepted| Has_patch:  0
Needs_docs:  0   |   Needs_tests:  1
Needs_better_patch:  0   |  
-+--
Changes (by lukeplant):

  * owner:  nobody => lukeplant
  * status:  new => assigned

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

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



[Changeset] r12724 - in django/branches/releases/1.1.X: . tests/regressiontests tests/regressiontests/views tests/regressiontests/views/tests

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 09:23:52 -0600 (Mon, 08 Mar 2010)
New Revision: 12724

Removed:
   django/branches/releases/1.1.X/tests/regressiontests/debug/
Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/tests/regressiontests/views/__init__.py
   django/branches/releases/1.1.X/tests/regressiontests/views/tests/debug.py
   django/branches/releases/1.1.X/tests/regressiontests/views/urls.py
   django/branches/releases/1.1.X/tests/regressiontests/views/views.py
Log:
[1.1.X] Move the tests added for #12302 to where some other tests for debug 
page responses already existed. 

r12723 from trunk.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721,12723

Modified: django/branches/releases/1.1.X/tests/regressiontests/views/__init__.py
===
--- django/branches/releases/1.1.X/tests/regressiontests/views/__init__.py  
2010-03-08 15:20:29 UTC (rev 12723)
+++ django/branches/releases/1.1.X/tests/regressiontests/views/__init__.py  
2010-03-08 15:23:52 UTC (rev 12724)
@@ -0,0 +1,10 @@
+# -*- coding: utf8 -*-
+
+class BrokenException(Exception):
+pass
+
+except_args = ('Broken!',   # plain exception with ASCII text
+   u'¡Broken!', # non-ASCII unicode data
+   '¡Broken!',  # non-ASCII, utf-8 encoded bytestring
+   '\xa1Broken!', ) # non-ASCII, latin1 bytestring
+

Modified: 
django/branches/releases/1.1.X/tests/regressiontests/views/tests/debug.py
===
--- django/branches/releases/1.1.X/tests/regressiontests/views/tests/debug.py   
2010-03-08 15:20:29 UTC (rev 12723)
+++ django/branches/releases/1.1.X/tests/regressiontests/views/tests/debug.py   
2010-03-08 15:23:52 UTC (rev 12724)
@@ -1,13 +1,17 @@
 from django.conf import settings
 from djang

[Changeset] r12723 - in django/trunk/tests/regressiontests: . views views/tests

2010-03-08 Thread noreply
Author: kmtracey
Date: 2010-03-08 09:20:29 -0600 (Mon, 08 Mar 2010)
New Revision: 12723

Removed:
   django/trunk/tests/regressiontests/debug/
Modified:
   django/trunk/tests/regressiontests/views/__init__.py
   django/trunk/tests/regressiontests/views/tests/debug.py
   django/trunk/tests/regressiontests/views/urls.py
   django/trunk/tests/regressiontests/views/views.py
Log:
Move the tests added for #12302 to where some other tests for debug page 
responses already existed.


Modified: django/trunk/tests/regressiontests/views/__init__.py
===
--- django/trunk/tests/regressiontests/views/__init__.py2010-03-08 
15:13:08 UTC (rev 12722)
+++ django/trunk/tests/regressiontests/views/__init__.py2010-03-08 
15:20:29 UTC (rev 12723)
@@ -0,0 +1,10 @@
+# -*- coding: utf8 -*-
+
+class BrokenException(Exception):
+pass
+
+except_args = ('Broken!',   # plain exception with ASCII text
+   u'¡Broken!', # non-ASCII unicode data
+   '¡Broken!',  # non-ASCII, utf-8 encoded bytestring
+   '\xa1Broken!', ) # non-ASCII, latin1 bytestring
+

Modified: django/trunk/tests/regressiontests/views/tests/debug.py
===
--- django/trunk/tests/regressiontests/views/tests/debug.py 2010-03-08 
15:13:08 UTC (rev 12722)
+++ django/trunk/tests/regressiontests/views/tests/debug.py 2010-03-08 
15:20:29 UTC (rev 12723)
@@ -1,13 +1,17 @@
 from django.conf import settings
 from django.core.files.uploadedfile import SimpleUploadedFile
 from django.test import TestCase
+from django.core.urlresolvers import reverse
 
+from regressiontests.views import BrokenException, except_args
+
 class DebugViewTests(TestCase):
 def setUp(self):
+self.old_debug = settings.DEBUG
 settings.DEBUG = True
 
 def tearDown(self):
-settings.DEBUG = False
+settings.DEBUG = self.old_debug
 
 def test_files(self):
 response = self.client.get('/views/raises/')
@@ -23,3 +27,9 @@
 def test_404(self):
 response = self.client.get('/views/raises404/')
 self.assertEquals(response.status_code, 404)
+
+def test_view_exceptions(self):
+for n in range(len(except_args)):
+self.assertRaises(BrokenException, self.client.get,
+reverse('view_exception', args=(n,)))
+

Modified: django/trunk/tests/regressiontests/views/urls.py
===
--- django/trunk/tests/regressiontests/views/urls.py2010-03-08 15:13:08 UTC 
(rev 12722)
+++ django/trunk/tests/regressiontests/views/urls.py2010-03-08 15:20:29 UTC 
(rev 12723)
@@ -107,3 +107,6 @@
 {'url': u'/views/中文/target/', 'permanent': True}),
 )
 
+urlpatterns += patterns('regressiontests.views.views',
+url(r'view_exception/(?P\d+)/$', 'view_exception', 
name='view_exception'),
+)

Modified: django/trunk/tests/regressiontests/views/views.py
===
--- django/trunk/tests/regressiontests/views/views.py   2010-03-08 15:13:08 UTC 
(rev 12722)
+++ django/trunk/tests/regressiontests/views/views.py   2010-03-08 15:20:29 UTC 
(rev 12723)
@@ -6,6 +6,8 @@
 from django.views.generic.create_update import create_object
 from django.core.urlresolvers import get_resolver
 
+from regressiontests.views import BrokenException, except_args
+
 from models import Article
 
 
@@ -40,10 +42,13 @@
 def raises404(request):
 resolver = get_resolver(None)
 resolver.resolve('')
-
+
 def redirect(request):
 """
 Forces an HTTP redirect.
 """
 return HttpResponseRedirect("target/")
 
+def view_exception(request, n):
+raise BrokenException(except_args[int(n)])
+

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



Re: [Django] #11264: "from django.db import models" clobbered in functions inside __init__.py of installed apps

2010-03-08 Thread Django
#11264: "from django.db import models" clobbered in functions inside 
__init__.py of
installed apps
-+--
  Reporter:  akaihola| Owner:  nobody   
Status:  new | Milestone:   
 Component:  Core framework  |   Version:  SVN  
Resolution:  |  Keywords:  importing
 Stage:  Accepted| Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by miracle2k):

 * cc: miracle2k (added)

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

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



[Changeset] r12722 - in django/branches/releases/1.1.X: . django/db/models/fields tests/modeltests/model_formsets tests/regressiontests/forms

2010-03-08 Thread noreply
Author: lukeplant
Date: 2010-03-08 09:13:08 -0600 (Mon, 08 Mar 2010)
New Revision: 12722

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/db/models/fields/__init__.py
   django/branches/releases/1.1.X/tests/modeltests/model_formsets/models.py
   django/branches/releases/1.1.X/tests/regressiontests/forms/models.py
Log:
[1.1.X] Fixed #11940 - ModelForm evaluates callable default values on form 
class creation
  
Thanks to Harm Geerts for the report and initial patch.

Backport of [12721] from trunk



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719,12721

Modified: django/branches/releases/1.1.X/django/db/models/fields/__init__.py
===
--- django/branches/releases/1.1.X/django/db/models/fields/__init__.py  
2010-03-08 15:03:30 UTC (rev 12721)
+++ django/branches/releases/1.1.X/django/db/models/fields/__init__.py  
2010-03-08 15:13:08 UTC (rev 12722)
@@ -322,9 +322,11 @@
 "Returns a django.forms.Field instance for this database Field."
 defaults = {'required': not self.blank, 'label': 
capfirst(self.verbose_name), 'help_text': self.help_text}
 if self.has_default():
-defaults['initial'] = self.get_default()
 if callable(self.default):
+defaults['initial'] = self.default
 defaults['show_hidden_initial'] = True
+else:
+defaults['initial'] = self.get_default()
 if self.choices:
 # Fields with choices get special treatment.
 include_blank = self.blank or not (self.has_default() or 'initial' 
in kwargs)

Modified: 
django/branches/releases/1.1.X/tests/modeltests/model_formsets/models.py
===
--- django/branches/releases/1.1.X/tests/modeltests/model_formsets/models.py
2010-03-08 

Re: [Django] #11732: ModelAdmin.get_changelist_form should use ModelAdmin.form

2010-03-08 Thread Django
#11732: ModelAdmin.get_changelist_form should use ModelAdmin.form
-+--
  Reporter:  edcrypt | Owner:  nobody
Status:  new | Milestone:
 Component:  django.contrib.admin|   Version:  1.1   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by andybak):

 * cc: a...@andybak.net (added)

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

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



[Changeset] r12721 - in django/trunk: django/db/models/fields tests/modeltests/model_formsets tests/regressiontests/forms

2010-03-08 Thread noreply
Author: lukeplant
Date: 2010-03-08 09:03:30 -0600 (Mon, 08 Mar 2010)
New Revision: 12721

Modified:
   django/trunk/django/db/models/fields/__init__.py
   django/trunk/tests/modeltests/model_formsets/models.py
   django/trunk/tests/regressiontests/forms/models.py
Log:
Fixed #11940 - ModelForm evaluates callable default values on form class 
creation

Thanks to Harm Geerts for the report and initial patch.



Modified: django/trunk/django/db/models/fields/__init__.py
===
--- django/trunk/django/db/models/fields/__init__.py2010-03-08 12:59:50 UTC 
(rev 12720)
+++ django/trunk/django/db/models/fields/__init__.py2010-03-08 15:03:30 UTC 
(rev 12721)
@@ -445,9 +445,11 @@
 "Returns a django.forms.Field instance for this database Field."
 defaults = {'required': not self.blank, 'label': 
capfirst(self.verbose_name), 'help_text': self.help_text}
 if self.has_default():
-defaults['initial'] = self.get_default()
 if callable(self.default):
+defaults['initial'] = self.default
 defaults['show_hidden_initial'] = True
+else:
+defaults['initial'] = self.get_default()
 if self.choices:
 # Fields with choices get special treatment.
 include_blank = self.blank or not (self.has_default() or 'initial' 
in kwargs)

Modified: django/trunk/tests/modeltests/model_formsets/models.py
===
--- django/trunk/tests/modeltests/model_formsets/models.py  2010-03-08 
12:59:50 UTC (rev 12720)
+++ django/trunk/tests/modeltests/model_formsets/models.py  2010-03-08 
15:03:30 UTC (rev 12721)
@@ -959,7 +959,7 @@
 # when determine what extra forms have changed to save.
 
 >>> form = formset.forms[0] # this formset only has one form
->>> now = form.fields['date_joined'].initial
+>>> now = form.fields['date_joined'].initial()
 >>> print form.as_p()
 Date joined: 
 Karma: 

Modified: django/trunk/tests/regressiontests/forms/models.py
===
--- django/trunk/tests/regressiontests/forms/models.py  2010-03-08 12:59:50 UTC 
(rev 12720)
+++ django/trunk/tests/regressiontests/forms/models.py  2010-03-08 15:03:30 UTC 
(rev 12721)
@@ -17,10 +17,17 @@
 class BoundaryModel(models.Model):
 positive_integer = models.PositiveIntegerField(null=True, blank=True)
 
+callable_default_value = 0
+def callable_default():
+global callable_default_value
+callable_default_value = callable_default_value + 1
+return callable_default_value
+
 class Defaults(models.Model):
 name = models.CharField(max_length=255, default='class default value')
 def_date = models.DateField(default = datetime.date(1980, 1, 1))
 value = models.IntegerField(default=42)
+callable_default = models.IntegerField(default=callable_default)
 
 class ChoiceModel(models.Model):
 """For ModelChoiceField and ModelMultipleChoiceField tests."""
@@ -112,6 +119,10 @@
 datetime.date(1980, 1, 1)
 >>> DefaultsForm().fields['value'].initial
 42
+>>> r1 = DefaultsForm()['callable_default'].as_widget()
+>>> r2 = DefaultsForm()['callable_default'].as_widget()
+>>> r1 == r2
+False
 
 In a ModelForm that is passed an instance, the initial values come from the
 instance's values, not the model's defaults.
@@ -129,7 +140,7 @@
 ... name = CharField(max_length=255)
 ... class Meta:
 ... model = Defaults
-... exclude = ['name']
+... exclude = ['name', 'callable_default']
 >>> f = ExcludingForm({'name': u'Hello', 'value': 99, 'def_date': 
 >>> datetime.date(1999, 3, 2)})
 >>> f.is_valid()
 True

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



Re: [Django] #11940: ModelForm evaluates callable default values on form class creation

2010-03-08 Thread Django
#11940: ModelForm evaluates callable default values on form class creation
+---
  Reporter:  Harm Geerts   | Owner:  lukeplant
Status:  assigned   | Milestone:  1.2  
 Component:  Forms  |   Version:  SVN  
Resolution: |  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by lukeplant):

  * owner:  nobody => lukeplant
  * status:  new => assigned

Comment:

 I don't think the 'initial' property is a good idea - I really don't like
 this behaviour:

 {{{
 a_field.initial != a_field.initial
 }}}

 It really violates expectations, and is likely to promote the same problem
 into other code paths i.e. eager evaluation of the initial value, instead
 of the ability to propagate the callable.  Changing the test seems like a
 much better approach.  This approach may lead to a potential backwards
 incompatibility, but I'm convinced it is '''very''' low impact (not worth
 noting anywhere).  The one test which needs fixing is very unlike normal
 code or test code, and had similar code been written in a more normal
 context the developer would (or should) have realised that they had come
 across this very problem.

 So I'll commit shortly with a slightly different patch.

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

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



Re: [Django] #13040: Would like to add import statments for class documentation where needed

2010-03-08 Thread Django
#13040: Would like to add import statments for class documentation where needed
+---
  Reporter:  stherrien  | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by stherrien):

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

Comment:

 Russel,


 I think I understand what your looking for I think the second diff will
 give you what you need for this fix and I would like to go through all of
 the docs and add these fully qualified class paths.
 example instead of this".. class:: File(file_object)" you want this "..
 class:: django.core.files.File(file_object)" is that correct?

 -shawn

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

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



Re: [Django] #11559: urlresolvers.reverse do not work with namespaced urls and captured parameters in parent urlconf

2010-03-08 Thread Django
#11559: urlresolvers.reverse do not work with namespaced urls and captured
parameters in parent urlconf
+---
  Reporter:  kmik...@gmail.com  | Owner:  nobody
Status:  new| Milestone:
 Component:  Core framework |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Someday/Maybe  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by anonymous):

 * cc: t...@ktrl.com (added)

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

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



Re: [Django] #11158: get_image_dimensions very slow after 1 call

2010-03-08 Thread Django
#11158: get_image_dimensions very slow after 1 call
-+--
  Reporter:  kua | Owner:  SAn  
  
Status:  new | Milestone:  1.2  
  
 Component:  Core framework  |   Version:  SVN  
  
Resolution:  |  Keywords:  get_image_dimensions, 
field, save, slow
 Stage:  Accepted| Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  1   |  
-+--
Comment (by SAn):

 I think that the patch is ok and marker patch_need_improvement = 1 is
 outdated.

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

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



Re: [Django] #13006: Add order_by with sql LOWER() support

2010-03-08 Thread Django
#13006: Add order_by with sql LOWER() support
---+
  Reporter:  Raydiation| Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  1.1

Resolution:|  Keywords:  
sql,order,lower
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

 * cc: gav (added)

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

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



[Changeset] r12720 - in django/branches/releases/1.1.X: . django/db/models/sql tests/regressiontests/null_fk

2010-03-08 Thread noreply
Author: lukeplant
Date: 2010-03-08 06:59:50 -0600 (Mon, 08 Mar 2010)
New Revision: 12720

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/db/models/sql/query.py
   django/branches/releases/1.1.X/tests/regressiontests/null_fk/models.py
Log:
[1.1.X] Fixed #12240 - select_related doesn't work correctly when mixing 
nullable and non-nullable keys
  
Thanks to embe for report and Alex for fix.

Backport of 12719 from trunk.



Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12276,12282,12284,12293,12313,12317-12324,12333,12341,12343,12346,12353,12362,12379,12384,12398,12405,12408-12411,12419-12420,12423,12425-12426,12429,12434,12436,12439-12442,12447-12448,12457,12461-12464,12467,12471,12473,12475,12484,12489-12490,12492,12497-12498,12502,12505,12513,12515-12516,12518,12523,12526,12528,12533,12535,12537,12539,12541,12548,12553,12556,12558-12560,12562,12567,12569-12570,12573,12576,12579,12581,12584,12598-12599,12602,12605,12614,12616,12621-12622,12627,12630-12631,12635,12637,12639,12641,12644,12646,12648,12650,12652,12654,12657,12659,12661,12663,12665,12667,12669,12671,12673,12676,12679,12681,12683,12686,12688,12694,12696,12698,12700,12704-12705,12719

Modified: django/branches/releases/1.1.X/django/db/models/sql/query.py
===
--- django/branches/releases/1.1.X/django/db/models/sql/query.py
2010-03-08 12:47:16 UTC (rev 12719)
+++ django/branches/releases/1.1.X/django/db/models/sql/query.py
2010-03-08 12:59:50 UTC (rev 12720)
@@ -1361,10 +1361,7 @@
 avoid = avoid_set.copy()
 dupe_set = orig_dupe_set.copy()
 table = f.rel.to._meta.db_table
-if nullable or f.null:
-promote = True
-else:
-promote = False
+promote = nullable or f.null
 if model:
 int_opts = opts
 alias = root_alias
@@ -1415,10 +1412,7 @@
 next = requested.get(f.name, {})
 else:
 next = False
-if f.null is not None:
-new_nullable = f.null
-else:
-new_nullable = None
+new_nullable = f.null or promote
 for dupe_opts, dupe_col in dupe_set:
 self.update_dupe_avoidance(dupe_opts, dupe_col, alias)
 self.fill_related_selections(f.rel.to._meta, alias, cur_depth + 1,

Modified: django/branches/releases/1.1.X/tests/regressiontests/null_fk/models.py
=

[Changeset] r12719 - in django/trunk: django/db/models/sql tests/regressiontests/null_fk

2010-03-08 Thread noreply
Author: lukeplant
Date: 2010-03-08 06:47:16 -0600 (Mon, 08 Mar 2010)
New Revision: 12719

Modified:
   django/trunk/django/db/models/sql/compiler.py
   django/trunk/tests/regressiontests/null_fk/models.py
Log:
Fixed #12240 - select_related doesn't work correctly when mixing nullable and 
non-nullable keys

Thanks to embe for report and Alex for fix.



Modified: django/trunk/django/db/models/sql/compiler.py
===
--- django/trunk/django/db/models/sql/compiler.py   2010-03-08 06:06:57 UTC 
(rev 12718)
+++ django/trunk/django/db/models/sql/compiler.py   2010-03-08 12:47:16 UTC 
(rev 12719)
@@ -530,10 +530,7 @@
 avoid = avoid_set.copy()
 dupe_set = orig_dupe_set.copy()
 table = f.rel.to._meta.db_table
-if nullable or f.null:
-promote = True
-else:
-promote = False
+promote = nullable or f.null
 if model:
 int_opts = opts
 alias = root_alias
@@ -584,10 +581,7 @@
 next = requested.get(f.name, {})
 else:
 next = False
-if f.null is not None:
-new_nullable = f.null
-else:
-new_nullable = None
+new_nullable = f.null or promote
 for dupe_opts, dupe_col in dupe_set:
 self.query.update_dupe_avoidance(dupe_opts, dupe_col, alias)
 self.fill_related_selections(f.rel.to._meta, alias, cur_depth + 1,

Modified: django/trunk/tests/regressiontests/null_fk/models.py
===
--- django/trunk/tests/regressiontests/null_fk/models.py2010-03-08 
06:06:57 UTC (rev 12718)
+++ django/trunk/tests/regressiontests/null_fk/models.py2010-03-08 
12:47:16 UTC (rev 12719)
@@ -4,7 +4,11 @@
 
 from django.db import models
 
+class SystemDetails(models.Model):
+details = models.TextField()
+
 class SystemInfo(models.Model):
+system_details = models.ForeignKey(SystemDetails)
 system_name = models.CharField(max_length=32)
 
 class Forum(models.Model):
@@ -30,7 +34,8 @@
 
 __test__ = {'API_TESTS':"""
 
->>> s = SystemInfo.objects.create(system_name='First forum')
+>>> d = SystemDetails.objects.create(details='First details')
+>>> s = SystemInfo.objects.create(system_name='First forum', system_details=d)
 >>> f = Forum.objects.create(system_info=s, forum_name='First forum')
 >>> p = Post.objects.create(forum=f, title='First Post')
 >>> c1 = Comment.objects.create(post=p, comment_text='My first comment')
@@ -55,4 +60,8 @@
 >>> Comment.objects.select_related('post').filter(post__isnull=True)[0].post 
 >>> is None
 True
 
+>>> comments = 
Comment.objects.select_related('post__forum__system_info__system_details')
+>>> [(c.id, c.comment_text, c.post) for c in comments]
+[(1, u'My first comment', ), (2, u'My second comment', None)]
+
 """}

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



Re: [Django] #11559: urlresolvers.reverse do not work with namespaced urls and captured parameters in parent urlconf

2010-03-08 Thread Django
#11559: urlresolvers.reverse do not work with namespaced urls and captured
parameters in parent urlconf
+---
  Reporter:  kmik...@gmail.com  | Owner:  nobody
Status:  new| Milestone:
 Component:  Core framework |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Someday/Maybe  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by apollo13):

 * cc: apollo13 (added)

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

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



[Django] #13057: Missing validation of child models

2010-03-08 Thread Django
#13057: Missing validation of child models
--+-
 Reporter:  vzima |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 In Django1.1 validation of models does not report when child model has
 declared field with same name as one to one field that links parent model
 and child model.

 For example:
 {{{
 #!python
 class Parent(models.Model)
   pass

 class Child(Parent)
   child = models.CharField()
 }}}
 raises !ValueError when I want to set string value for field 'child',
 because
 {{{
 #!python
 Parent.child == Child.parent.child == Child.child #OneToOneField(Child)
 instead CharField which is replaced
 }}}

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

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



Re: [Django] #13056: erorr in code snippet in documentation

2010-03-08 Thread Django
#13056: erorr in code snippet in documentation
+---
  Reporter:  daniel | Owner:  nobody
   
Status:  closed | Milestone:
   
 Component:  Documentation  |   Version:
   
Resolution:  invalid|  Keywords:  internationalization 
localization
 Stage:  Unreviewed | Has_patch:  0 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

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

Comment:

 What do you mean with ''does not work''?. I can use that without problems:

 {{{
 $ cat locale/es_AR/LC_MESSAGES/django.po

 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR , YEAR.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-03-08 08:40-0300\n"
 "PO-Revision-Date: 2010-03-08 08:42-0300\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms:  nplurals=2; plural=(n != 1);\n"

 #: templates/a.html:1
 #, python-format
 msgid "This is %(book_t)s by %(author_t)s"
 msgstr "Este es %(book_t)s por %(author_t)s"
 }}}

 {{{
 $ PYTHONPATH=~/django/trunk/ ./manage.py compilemessages -l es_AR
 }}}

 {{{
 $ PYTHONPATH=~/django/trunk/ ./manage.py shell

 In [1]: from django.template import Template, Context

 In [2]: from django.utils.translation import activate

 In [3]: from django.conf import settings

 In [4]: settings.USE_I18N
 Out[4]: True

 In [5]: Template('{% load i18n %}{% blocktrans with book|title as book_t
 and author|title as author_t %}This is {{ book_t }} by {{ author_t }}{%
 endblocktrans %}').render(Context({'book': 'contact', 'author': 'carl
 sagan'}))
 Out[5]: u'This is Contact by Carl Sagan'

 In [6]: activate('es-ar')

 In [7]: Template('{% load i18n %}{% blocktrans with book|title as book_t
 and author|title as author_t %}This is {{ book_t }} by {{ author_t }}{%
 endblocktrans %}').render(Context({'book': 'contact', 'author': 'carl
 sagan'}))
 Out[7]: u'Este es Contact por Carl Sagan'

 }}}

 It is using the `title` filter on purpose. You need to read that example
 in the context of the two examples before it, together they progress from
 the need to use `blocktrans` (to intermix fixed text with variable text)
 to the possibility to assign the result of expression (including filter
 chaining to local variables inside the `blocktrans` block and finally to
 the fact that you can use more than one of these expression -> vars
 bindings.

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

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



Re: [Django] #5908: Cycle tag should reset after it steps out of scope(?)

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

 Component:  Template system  |   Version:  SVN 

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

Needs_docs:  0|   Needs_tests:  0   

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

 * cc: hr.bjarni+dja...@gmail.com (added)

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

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



Re: [Django] #13053: Support for non-static DB connection info

2010-03-08 Thread Django
#13053: Support for non-static DB connection info
---+
  Reporter:  Lynge | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Someday/Maybe | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by Lynge):

 I will look into your suggestion on the settings dictionary object
 replacement.

 On the subject of useful context information:
 I have found something called [http://github.com/svetlyak40wt/django-
 globals/ django_globals]
 It is very simple. It just uses threading.local() to store values, but if
 it will work everywhere I have no idea.

 I have been testing it on uWSGI with Cherokee in front and it seems to be
 behaving as one would want, but I have no idea if it is a viable method
 for any kind of setup. E.g. if it will share the values between requests
 in certain kinds of setups.

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

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



[Django] #13056: erorr in code snippet in documentation

2010-03-08 Thread Django
#13056: erorr in code snippet in documentation
---+
 Reporter:  daniel |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:
 Keywords:  internationalization localization  |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 In the "Internationalization and localization" documentation page (all
 versions) it says:

 {{{
 {% blocktrans with book|title as book_t and author|title as author_t %}
 This is {{ book_t }} by {{ author_t }}
 {% endblocktrans %}
 }}}

 This does not work as "title" is interpreted as filter. I guess this
 should be "book.title".

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

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



Re: [Django] #12024: error with limit_choices_to with complex queries (Q object) and raw_id_fields

2010-03-08 Thread Django
#12024: error with limit_choices_to with complex queries (Q object) and
raw_id_fields
---+
  Reporter:  anonymous | Owner:  nobody
Status:  reopened  | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ubernostrum):

 Replying to [comment:4 kmtracey]:
 > Not sure a Q object can be encoded into a URL query string for an admin
 filter lookup...but I'm also exhausted at the moment so I could be missing
 something obvious.

 Indeed. A `Q` object which only uses "and" connectors could be dumped into
 a querystring fairly easily, but one which uses "or" can't because there's
 no way to represent that short of the `Q` object itself.

 My vote would be for documenting that `Q` in `limit_choices_to` isn't
 compatible with raw-id lookups, and leaving it at 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12071: Numeric literals like "2." are incorrectly treated as Variables

2010-03-08 Thread Django
#12071: Numeric literals like "2." are incorrectly treated as Variables
-+--
  Reporter:  emulbreh| Owner:  nobody
Status:  closed  | Milestone:  1.2   
 Component:  Template system |   Version:  1.1   
Resolution:  wontfix |  Keywords:  pycamp2010
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by ubernostrum):

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

Comment:

 This is, as the comment above points out, by design; yes, Python accepts
 it as a float, but the Django template language isn't Python and doesn't
 support the same range of things.

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

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



Re: [Django] #12583: Postgresql backend uses implicit text casts for case insensitive operators

2010-03-08 Thread Django
#12583: Postgresql backend uses implicit text casts for case insensitive 
operators
---+
  Reporter:  Ubercore  | Owner:  Ubercore   
 
Status:  assigned  | Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  postgresql 
cast case-insensitive
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 Since `iexact` doesn't make sense for non-text lookups, I don't think this
 is critical enough to be on the 1.2 milestone right now.

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

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



Re: [Django] #12919: Ticket submission page should direct security issues to django-security.

2010-03-08 Thread Django
#12919: Ticket submission page should direct security issues to django-security.
--+-
  Reporter:  russellm | Owner:  nobody
Status:  new  | Milestone:
 Component:  Django Web site  |   Version:
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 This is something we should do, but isn't critical to getting 1.2 out the
 door.

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

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



Re: [Django] #12930: Merge contrib.gis docs into Django docs tree

2010-03-08 Thread Django
#12930: Merge contrib.gis docs into Django docs tree
---+
  Reporter:  adamfast  | Owner:  adamfast
Status:  assigned  | Milestone:  
 Component:  GIS   |   Version:  SVN 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  1 |  
---+
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 This isn't critical to 1.2; we can always go back and improve
 documentation as needed, but attention right now should focus on actual
 bugs.

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

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



Re: [Django] #12193: Add details to the i18n documentation for translation of model classes (relations and methods)

2010-03-08 Thread Django
#12193: Add details to the i18n documentation for translation of model classes
(relations and methods)
-+--
  Reporter:  maxime.petazz...@bulix.org  | Owner:  nobody
Status:  new | Milestone:
 Component:  Documentation   |   Version:  1.1   
Resolution:  |  Keywords:  i18n  
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 This isn't critical to 1.2; we can always go back and improve
 documentation as needed, but attention right now should focus on actual
 bugs.

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

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



Re: [Django] #11864: Relationship backreference documentation is hard to find

2010-03-08 Thread Django
#11864: Relationship backreference documentation is hard to find
+---
  Reporter:  anonymous  | Owner:  nobody 
Status:  new| Milestone: 
 Component:  Documentation  |   Version:  1.1
Resolution: |  Keywords:  relationships foreigkey
 Stage:  Accepted   | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 This isn't critical to 1.2; we can always go back and improve
 documentation as needed, but attention right now should focus on actual
 bugs.

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

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



Re: [Django] #12871: Document creation of a comment form for authenticated users

2010-03-08 Thread Django
#12871: Document creation of a comment form for authenticated users
+---
  Reporter:  shacker| Owner:  nobody  
Status:  new| Milestone:  
 Component:  Documentation  |   Version:  1.2-beta
Resolution: |  Keywords:  comments
 Stage:  Accepted   | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  1  |  
+---
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 This isn't critical to 1.2; we can always go back and expand documentation
 as needed, so attention should focus on actual bugs.

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

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



Re: [Django] #12642: wiki:RowLevelPermissions should part of the official documentation

2010-03-08 Thread Django
#12642: wiki:RowLevelPermissions should part of the official documentation
+---
  Reporter:  MadeR  | Owner:  nobody
  
Status:  new| Milestone:
  
 Component:  Documentation  |   Version:  1.2-alpha 
  
Resolution: |  Keywords:  wiki documentation row 
level permission admin modeladmin
 Stage:  Accepted   | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  1  |  
+---
Changes (by ubernostrum):

  * milestone:  1.2 =>

Comment:

 This isn't something that needs to happen prior to 1.2.

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

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



Re: [Django] #13017: generic relation generates needless join

2010-03-08 Thread Django
#13017: generic relation generates needless join
---+
  Reporter:  MS| Owner:  nobody 

Status:  new   | Milestone:  1.2

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  database 
joins generic relation
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

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

 The new patch has removed the double line, which was not nessecary in the
 patch before.

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

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



[Django] #13055: Transaction decorators / multiple databases : using=

2010-03-08 Thread Django
#13055: Transaction decorators / multiple databases : using=
--+-
 Reporter:  o...@nebkha.net|   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:  transaction decorators|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 [http://docs.djangoproject.com/en/dev/topics/db/transactions/#controlling-
 transaction-management-in-views Documentation] tells transaction
 decorators can be used with multiple databases :

 {{{
 @commit_on_success(using='db_alias')
 def func(request):
 ...
 }}}

 Doing like that raises an error and it seems that django code is actually
 written to work as follow :

 {{{
 @commit_on_success('db_alias')
 def func(request):
 ...
 }}}

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

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