[Django] #13525: URL Reverser chokes on nested groups

2010-05-11 Thread Django
#13525: URL Reverser chokes on nested groups
+---
 Reporter:  nickretallack   |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  1.1   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 {{{
 ## urls.py
 from django.conf.urls.defaults import *
 from django.http import HttpResponse

 urlpatterns = patterns('',
 url(r'^export1\.(?P\w+)$', lambda request:
 HttpResponse("THIS"), name='this'),
 url(r'^export2(\.(?P\w+))?$', lambda request:
 HttpResponse("THAT"), name='that'),
 )

 ## paste into python manage.py shell

 from django.core.urlresolvers import reverse, resolve

 # Both urls resolve
 resolve('/export1.json')[0](None).content
 resolve('/export2.json')[0](None).content

 # These reverse
 reverse('this', args=['json'])
 reverse('this', kwargs={'format':'json'})

 # These don't
 reverse('that', args=['json'])
 reverse('that', kwargs={'format':'json'})

 ## Shell session output

 >>> from django.core.urlresolvers import reverse, resolve
 >>>
 >>> # Both urls resolve
 >>> resolve('/export1.json')[0](None).content
 'THIS'
 >>> resolve('/export2.json')[0](None).content
 'THAT'
 >>>
 >>> # These reverse
 >>> reverse('this', args=['json'])
 '/export1.json'
 >>> reverse('this', kwargs={'format':'json'})
 '/export1.json'
 >>>
 >>> # These don't
 >>> reverse('that', args=['json'])
 Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/local/Cellar/python/2.6.4/lib/python2.6/site-
 packages/django/core/urlresolvers.py", line 350, in reverse
 *args, **kwargs)))
   File "/usr/local/Cellar/python/2.6.4/lib/python2.6/site-
 packages/django/core/urlresolvers.py", line 300, in reverse
 "arguments '%s' not found." % (lookup_view_s, args, kwargs))
 NoReverseMatch: Reverse for 'that' with arguments '('json',)' and keyword
 arguments '{}' not found.
 }}}

-- 
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] #13524: Changes to (model) formsets' max_num sematics not listed in the 1.2 release notes

2010-05-11 Thread Django
#13524: Changes to (model) formsets' max_num sematics not listed in the 1.2 
release
notes
+---
  Reporter:  ramiro | Owner:  nobody  
Status:  new| Milestone:  1.2 
 Component:  Documentation  |   Version:  1.2-beta
Resolution: |  Keywords:  max_num 
 Stage:  Ready for checkin  | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * version:  1.1 => 1.2-beta
  * 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] #13486: TIME_INPUT_FORMATS %P doesn't work

2010-05-11 Thread Django
#13486: TIME_INPUT_FORMATS %P doesn't work
+---
  Reporter:  Bufke   | Owner:  nobody  
Status:  reopened   | Milestone:  
 Component:  Uncategorized  |   Version:  1.2-beta
Resolution: |  Keywords:  
 Stage:  Unreviewed | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by jmil):

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

Comment:

 The "Now" problem is caused by Date.prototype.getTwelveHours in core.js.
 The formula for converting a 24-hour time to a 12-hour time, provided it's
 1 pm or later, is the 24-hour time minus 12 hours, i.e.
 {{{
 Date.prototype.getTwelveHours = function() {
 return (this.getHours() <= 12) ? this.getHours() : this.getHours() -
 12;
 }
 }}}

 Currently, we have:
 {{{
 Date.prototype.getTwelveHours = function() {
 return (this.getHours() <= 12) ? this.getHours() : 24 -
 this.getHours();
 }
 }}}

 Also, getHours() returns a value from 0-23, so we should consider checking
 for zero and replacing it with twelve.  I couldn't think of a clever way
 to do this, though; nested inline conditionals seem ugly to me.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #8960: "View on site" does not work if contrib.sites is not installed

2010-05-11 Thread Django
#8960: "View on site" does not work if contrib.sites is not installed
---+
  Reporter:  bmihelac  | Owner:  adrian
Status:  assigned  | Milestone:  1.3   
 Component:  Contrib apps  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by lasko):

 The current uploaded patch I think it more bloated than is needed and feel
 that floledermanns patch
 (http://code.djangoproject.com/ticket/8960#comment:11) would be better
 suited for check in. I can also confirm that floledermann's patch works on
 django trunk rev 13237.

-- 
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] r13238 - django/trunk/django/conf/locale/es_AR/LC_MESSAGES

2010-05-11 Thread noreply
Author: ramiro
Date: 2010-05-11 16:46:39 -0500 (Tue, 11 May 2010)
New Revision: 13238

Modified:
   django/trunk/django/conf/locale/es_AR/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/es_AR/LC_MESSAGES/django.po
Log:
Updated es_AR translation. Complete as of r13237.

Modified: django/trunk/django/conf/locale/es_AR/LC_MESSAGES/django.mo
===
(Binary files differ)

Modified: django/trunk/django/conf/locale/es_AR/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/es_AR/LC_MESSAGES/django.po 2010-05-11 
14:43:24 UTC (rev 13237)
+++ django/trunk/django/conf/locale/es_AR/LC_MESSAGES/django.po 2010-05-11 
21:46:39 UTC (rev 13238)
@@ -6,9 +6,9 @@
 msgstr ""
 "Project-Id-Version: Django\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-04 12:05-0300\n"
-"PO-Revision-Date: 2010-05-04 22:18-0300\n"
-"Last-Translator: Ramiro Morales \n"
+"POT-Creation-Date: 2010-05-11 08:35-0300\n"
+"PO-Revision-Date: 2010-05-11 17:53-0300\n"
+"Last-Translator: Ramiro \n"
 "Language-Team: Django-I18N \n"
 "Language: es_AR\n"
 "MIME-Version: 1.0\n"
@@ -122,138 +122,142 @@
 msgstr "húngaro"
 
 #: conf/global_settings.py:70
+msgid "Indonesian"
+msgstr "indonesio"
+
+#: conf/global_settings.py:71
 msgid "Icelandic"
 msgstr "islandés"
 
-#: conf/global_settings.py:71
+#: conf/global_settings.py:72
 msgid "Italian"
 msgstr "italiano"
 
-#: conf/global_settings.py:72
+#: conf/global_settings.py:73
 msgid "Japanese"
 msgstr "japonés"
 
-#: conf/global_settings.py:73
+#: conf/global_settings.py:74
 msgid "Georgian"
 msgstr "georgiano"
 
-#: conf/global_settings.py:74
+#: conf/global_settings.py:75
 msgid "Khmer"
 msgstr "jémer"
 
-#: conf/global_settings.py:75
+#: conf/global_settings.py:76
 msgid "Kannada"
 msgstr "canarés"
 
-#: conf/global_settings.py:76
+#: conf/global_settings.py:77
 msgid "Korean"
 msgstr "coreano"
 
-#: conf/global_settings.py:77
+#: conf/global_settings.py:78
 msgid "Lithuanian"
 msgstr "lituano"
 
-#: conf/global_settings.py:78
+#: conf/global_settings.py:79
 msgid "Latvian"
 msgstr "letón"
 
-#: conf/global_settings.py:79
+#: conf/global_settings.py:80
 msgid "Macedonian"
 msgstr "macedonio"
 
-#: conf/global_settings.py:80
+#: conf/global_settings.py:81
 msgid "Mongolian"
 msgstr "mongol"
 
-#: conf/global_settings.py:81
+#: conf/global_settings.py:82
 msgid "Dutch"
 msgstr "holandés"
 
-#: conf/global_settings.py:82
+#: conf/global_settings.py:83
 msgid "Norwegian"
 msgstr "noruego"
 
-#: conf/global_settings.py:83
+#: conf/global_settings.py:84
 msgid "Norwegian Bokmal"
 msgstr "bokmål"
 
-#: conf/global_settings.py:84
+#: conf/global_settings.py:85
 msgid "Norwegian Nynorsk"
 msgstr "nynorsk"
 
-#: conf/global_settings.py:85
+#: conf/global_settings.py:86
 msgid "Polish"
 msgstr "polaco"
 
-#: conf/global_settings.py:86
+#: conf/global_settings.py:87
 msgid "Portuguese"
 msgstr "portugués"
 
-#: conf/global_settings.py:87
+#: conf/global_settings.py:88
 msgid "Brazilian Portuguese"
 msgstr "portugués de Brasil"
 
-#: conf/global_settings.py:88
+#: conf/global_settings.py:89
 msgid "Romanian"
 msgstr "rumano"
 
-#: conf/global_settings.py:89
+#: conf/global_settings.py:90
 msgid "Russian"
 msgstr "ruso"
 
-#: conf/global_settings.py:90
+#: conf/global_settings.py:91
 msgid "Slovak"
 msgstr "eslovaco"
 
-#: conf/global_settings.py:91
+#: conf/global_settings.py:92
 msgid "Slovenian"
 msgstr "esloveno"
 
-#: conf/global_settings.py:92
+#: conf/global_settings.py:93
 msgid "Albanian"
 msgstr "albanés"
 
-#: conf/global_settings.py:93
+#: conf/global_settings.py:94
 msgid "Serbian"
 msgstr "serbio"
 
-#: conf/global_settings.py:94
+#: conf/global_settings.py:95
 msgid "Serbian Latin"
 msgstr "Latín de Serbia"
 
-#: conf/global_settings.py:95
+#: conf/global_settings.py:96
 msgid "Swedish"
 msgstr "sueco"
 
-#: conf/global_settings.py:96
+#: conf/global_settings.py:97
 msgid "Tamil"
 msgstr "tamil"
 
-#: conf/global_settings.py:97
+#: conf/global_settings.py:98
 msgid "Telugu"
 msgstr "telugu"
 
-#: conf/global_settings.py:98
+#: conf/global_settings.py:99
 msgid "Thai"
 msgstr "tailandés"
 
-#: conf/global_settings.py:99
+#: conf/global_settings.py:100
 msgid "Turkish"
 msgstr "turco"
 
-#: conf/global_settings.py:100
+#: conf/global_settings.py:101
 msgid "Ukrainian"
 msgstr "ucraniano"
 
-#: conf/global_settings.py:101
+#: conf/global_settings.py:102
 msgid "Vietnamese"
 msgstr "vietnamita"
 
-#: conf/global_settings.py:102
+#: conf/global_settings.py:103
 msgid "Simplified Chinese"
 msgstr "chino simplificado"
 
-#: conf/global_settings.py:103
+#: conf/global_settings.py:104
 msgid "Traditional Chinese"
 msgstr "chino tradicional"
 
@@ -1060,7 +1064,7 @@
 msgid "Reset my password"
 msgstr "Recuperar mi contraseña"
 
-#: contrib/admin/templatetags/admin_list.py:239
+#: contrib/admin/templatetags/admin_list.py:257
 msgid "All dates"
 msgstr "Todas las fechas"
 

Re: [Django] #13023: Don't show "+ Add another" in admin inlines when extra = 0

2010-05-11 Thread Django
#13023: Don't show "+ Add another" in admin inlines when extra = 0
---+
  Reporter:  rasca | Owner:  gabrielhurley
Status:  closed| Milestone:  1.2  
 Component:  django.contrib.admin  |   Version:  SVN  
Resolution:  fixed |  Keywords:   
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 Replying to [comment:13 carsongee]:
 > Can we get this listed in the release notes for 1.2 as a backwards
 incompatible change?  I have an application that lets the user choose how
 many forms to have in a formset by storing a value in the database, and I
 had to go through source code for a quite a while when testing 1.2 rc1 for
 why all of the sudden I didn't have any forms in my formsets.  I may be an
 anomaly, but it could save some people time if it was in the release
 notes.

 Please review the patch attached to #13524 and suggest any changes you
 deem appropiate.

-- 
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] #13023: Don't show "+ Add another" in admin inlines when extra = 0

2010-05-11 Thread Django
#13023: Don't show "+ Add another" in admin inlines when extra = 0
---+
  Reporter:  rasca | Owner:  gabrielhurley
Status:  closed| Milestone:  1.2  
 Component:  django.contrib.admin  |   Version:  SVN  
Resolution:  fixed |  Keywords:   
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by carsongee):

 Can we get this listed in the release notes for 1.2 as a backwards
 incompatible change?  I have an application that lets the user choose how
 many forms to have in a formset by storing a value in the database, and I
 had to go through source code for a quite a while when testing 1.2 rc1 for
 why all of the sudden I didn't have any forms in my formsets.  I may be an
 anomaly, but it could save some people time if it was in the release
 notes.

-- 
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] #13517: Latvian translation update for django 1.2

2010-05-11 Thread Django
#13517: Latvian translation update for django 1.2
---+
  Reporter:  fest  | Owner:  jezdez
Status:  new   | Milestone:  1.2   
 Component:  Translations  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by jezdez):

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

-- 
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] #13517: Latvian translation update for django 1.2

2010-05-11 Thread Django
#13517: Latvian translation update for django 1.2
---+
  Reporter:  fest  | Owner:  nobody
Status:  reopened  | Milestone:  1.2   
 Component:  Translations  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by jezdez):

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

Comment:

 Indeed, the patch's encoding seemed broken and I assumed the other two
 files were the actual content. I'll add the formats.py later :)

-- 
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] #13517: Latvian translation update for django 1.2

2010-05-11 Thread Django
#13517: Latvian translation update for django 1.2
---+
  Reporter:  fest  | Owner:  nobody
Status:  closed| Milestone:  1.2   
 Component:  Translations  |   Version:  SVN   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by fest):

  * needs_better_patch:  0 => 1

Comment:

 Replying to [comment:2 jezdez]:
 > (In [13229]) Fixed #13517 -- Updated Latvian translation. Thanks, Reinis
 Veips.

 Thanks for accepting this ticket. However, I see that you have left out
 formats.py file, which was in my original patch. I have attached whole
 formats.py file seperately.

-- 
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] #13486: TIME_INPUT_FORMATS %P doesn't work

2010-05-11 Thread Django
#13486: TIME_INPUT_FORMATS %P doesn't work
+---
  Reporter:  Bufke   | Owner:  nobody  
Status:  closed | Milestone:  
 Component:  Uncategorized  |   Version:  1.2-beta
Resolution:  invalid|  Keywords:  
 Stage:  Unreviewed | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Comment (by Bufke ):

 Hmm I was looking at the times I get when clicking "now".
 At 2:21 PM when I click "now" I get 10:21 PM.  Strange.

 Here is from my settings

 TIME_ZONE = 'America/New York'
 TIME_INPUT_FORMATS = ('%I:%M %p',)

 My computer is in the same time zone. Now when I delete TIME_INPUT_FORMATS
 It displays correctly, although in 24 hour time.  Could this be a bug?

 Here are the other settings I get from clicking on the admin widget
 Midnight:  00:00 AM  Shouldn't it be 12:00 AM  Python Doc says for %I
 "Hour (12-hour clock) as a decimal number [01,12]." so 00 should never
 come up right?
 6. a.m. is correct
 noon is correct as 12:00 PM

-- 
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] #13524: Changes to (model) formsets' max_num sematics not listed in the 1.2 release notes

2010-05-11 Thread Django
#13524: Changes to (model) formsets' max_num sematics not listed in the 1.2 
release
notes
---+
 Reporter:  ramiro |   Owner:  nobody
   Status:  new|   Milestone:  1.2   
Component:  Documentation  | Version:  1.1   
 Keywords:  max_num|   Stage:  Unreviewed
Has_patch:  1  |  
---+
 After a couple of threads in the [http://groups.google.com/group/django-
 es/browse_thread/thread/790b5887d77496ca/912a1bd79f7c292f django-es] and
 [http://groups.google.com/group/django-
 users/browse_thread/thread/e03e65afffd48826?hl=en# django-users] mailing
 lists (that also gave bith to #13521/r13234) it seemed clear we aren't
 documenting in the release notes the backward incompatible changes
 implemented in r12872 that affect usage of formsets, model formsets and
 admin inlines.

 The patch attached tries to fix that. Any help reviewing the language used
 and fleshing it out with more content especially by people more familiar
 with the changes implemented in such commits will be greatly appreciated.

 The patch also:

  * Moves a note about the admin inlines JS-powered 'Add another' link from
 the formsets docs to the admin docs because that seem the place where it
 belongs. It doesn't even belog in the model formsets docs.
  * Add a few tests and fixes typos to the formsets and model formsets I
 created when trying to understand and confirm the new behavior.

 Setting milestone = 1.2.

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

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



Re: [Django] #13523: Updated Russian Translation

2010-05-11 Thread Django
#13523: Updated Russian Translation
---+
  Reporter:  Alexey Boriskin   | Owner:  
nobody
Status:  closed| Milestone:  
1.2   
 Component:  Translations  |   Version:  
SVN   
Resolution:  fixed |  Keywords: 
   
 Stage:  Accepted  | Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by Alexey Boriskin ):

 Ok, didn't thought about that. Thank you.
 I also want to thank all guys who helped me bring this translation update:
 Ivan Sagalaev, Andrew Grigorev, Michael Korobov and especially dc.

-- 
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] #13523: Updated Russian Translation

2010-05-11 Thread Django
#13523: Updated Russian Translation
---+
  Reporter:  Alexey Boriskin   | Owner:  
nobody
Status:  closed| Milestone:  
1.2   
 Component:  Translations  |   Version:  
SVN   
Resolution:  fixed |  Keywords: 
   
 Stage:  Accepted  | Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by russellm):

 Thanks for the patch - for future reference, it's easier if you submit a
 single patch, generated from the root of the SVN tree, that contains all
 three files.

-- 
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] #13523: Updated Russian Translation

2010-05-11 Thread Django
#13523: Updated Russian Translation
---+
  Reporter:  Alexey Boriskin   | Owner:  
nobody
Status:  new   | Milestone:  
1.2   
 Component:  Translations  |   Version:  
SVN   
Resolution:|  Keywords: 
   
 Stage:  Accepted  | Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

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

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



[Django] #13523: Updated Russian Translation

2010-05-11 Thread Django
#13523: Updated Russian Translation
--+-
 Reporter:  Alexey Boriskin   |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Translations  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 I'll attach patches against django.po, djangojs.po and formats.py files.

-- 
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] r13236 - django/branches/releases/1.1.X/docs/ref/models

2010-05-11 Thread noreply
Author: russellm
Date: 2010-05-11 09:18:01 -0500 (Tue, 11 May 2010)
New Revision: 13236

Modified:
   django/branches/releases/1.1.X/docs/ref/models/querysets.txt
   django/branches/releases/1.1.X/docs/ref/models/relations.txt
Log:
[1.1.X] Fixed #12997 -- Corrected the module markup for QuerySet methods. 
Thanks to timo for the report.

Backport of r13235 from trunk.

Modified: django/branches/releases/1.1.X/docs/ref/models/querysets.txt
===
--- django/branches/releases/1.1.X/docs/ref/models/querysets.txt
2010-05-11 14:12:08 UTC (rev 13235)
+++ django/branches/releases/1.1.X/docs/ref/models/querysets.txt
2010-05-11 14:18:01 UTC (rev 13236)
@@ -4,7 +4,7 @@
 QuerySet API reference
 ==
 
-.. currentmodule:: django.db.models
+.. currentmodule:: django.db.models.QuerySet
 
 This document describes the details of the ``QuerySet`` API. It builds on the
 material presented in the :ref:`model ` and :ref:`database

Modified: django/branches/releases/1.1.X/docs/ref/models/relations.txt
===
--- django/branches/releases/1.1.X/docs/ref/models/relations.txt
2010-05-11 14:12:08 UTC (rev 13235)
+++ django/branches/releases/1.1.X/docs/ref/models/relations.txt
2010-05-11 14:18:01 UTC (rev 13236)
@@ -4,33 +4,33 @@
 Related objects reference
 =
 
-.. currentmodule:: django.db.models
+.. currentmodule:: django.db.models.fields.related
 
 This document describes extra methods available on managers when used in a 
one-to-many or many-to-many related context. This happens in two cases:
 
 * The "other side" of a ``ForeignKey`` relation. That is::
-
+
 class Reporter(models.Model):
 ...
-
+
 class Article(models.Model):
 reporter = models.ForeignKey(Reporter)
-
+
   In the above example, the methods below will be available on
   the manager ``reporter.article_set``.
-  
+
 * Both sides of a ``ManyToManyField`` relation::
-
+
 class Topping(models.Model):
 ...
-
+
 class Pizza(models.Model):
 toppings = models.ManyToManyField(Topping)
-
+
   In this example, the methods below will be available both on
   ``topping.pizza_set`` and on ``pizza.toppings``.
 
-.. method:: QuerySet.add(obj1, [obj2, ...])
+.. method:: add(obj1, [obj2, ...])
 
 Adds the specified model objects to the related object set.
 
@@ -40,27 +40,27 @@
 >>> e = Entry.objects.get(id=234)
 >>> b.entry_set.add(e) # Associates Entry e with Blog b.
 
-.. method:: QuerySet.create(**kwargs)
+.. method:: create(**kwargs)
 
 Creates a new object, saves it and puts it in the related object set.
 Returns the newly created object::
 
 >>> b = Blog.objects.get(id=1)
 >>> e = b.entry_set.create(
-... headline='Hello', 
-... body_text='Hi', 
+... headline='Hello',
+... body_text='Hi',
 ... pub_date=datetime.date(2005, 1, 1)
 ... )
-
+
 # No need to call e.save() at this point -- it's already been saved.
 
 This is equivalent to (but much simpler than)::
 
 >>> b = Blog.objects.get(id=1)
 >>> e = Entry(
- blog=b, 
- headline='Hello', 
- body_text='Hi', 
+ blog=b,
+ headline='Hello',
+ body_text='Hi',
  pub_date=datetime.date(2005, 1, 1)
  )
 >>> e.save(force_insert=True)
@@ -70,10 +70,10 @@
 ``blog`` to ``create()``. Django figures out that the new ``Entry`` 
object's
 ``blog`` field should be set to ``b``.
 
-.. method:: QuerySet.remove(obj1, [obj2, ...])
+.. method:: remove(obj1, [obj2, ...])
 
 Removes the specified model objects from the related object set::
-
+
 >>> b = Blog.objects.get(id=1)
 >>> e = Entry.objects.get(id=234)
 >>> b.entry_set.remove(e) # Disassociates Entry e from Blog b.
@@ -85,7 +85,7 @@
 ``b.entry_set()`` is equivalent to doing ``e.blog = None``, and because the
 ``blog`` ``ForeignKey`` doesn't have ``null=True``, this is invalid.
 
-.. method:: QuerySet.clear()
+.. method:: clear()
 
 Removes all objects from the related object set::
 

-- 
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] #12997: Add Metadata Targets to QuerySet API Reference

2010-05-11 Thread Django
#12997: Add Metadata Targets to QuerySet API Reference
+---
  Reporter:  dwillis| Owner:  dwillis
Status:  closed | Milestone:  1.2
 Component:  Documentation  |   Version:  SVN
Resolution:  fixed  |  Keywords: 
 Stage:  Accepted   | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  1  |  
+---
Changes (by russellm):

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

Comment:

 (In [13235]) Fixed #12997 -- Corrected the module markup for QuerySet?
 methods. Thanks to timo for the report.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r13235 - django/trunk/docs/ref/models

2010-05-11 Thread noreply
Author: russellm
Date: 2010-05-11 09:12:08 -0500 (Tue, 11 May 2010)
New Revision: 13235

Modified:
   django/trunk/docs/ref/models/querysets.txt
   django/trunk/docs/ref/models/relations.txt
Log:
Fixed #12997 -- Corrected the module markup for QuerySet methods. Thanks to 
timo for the report.

Modified: django/trunk/docs/ref/models/querysets.txt
===
--- django/trunk/docs/ref/models/querysets.txt  2010-05-11 13:40:17 UTC (rev 
13234)
+++ django/trunk/docs/ref/models/querysets.txt  2010-05-11 14:12:08 UTC (rev 
13235)
@@ -4,7 +4,7 @@
 QuerySet API reference
 ==
 
-.. currentmodule:: django.db.models
+.. currentmodule:: django.db.models.QuerySet
 
 This document describes the details of the ``QuerySet`` API. It builds on the
 material presented in the :ref:`model ` and :ref:`database

Modified: django/trunk/docs/ref/models/relations.txt
===
--- django/trunk/docs/ref/models/relations.txt  2010-05-11 13:40:17 UTC (rev 
13234)
+++ django/trunk/docs/ref/models/relations.txt  2010-05-11 14:12:08 UTC (rev 
13235)
@@ -4,33 +4,33 @@
 Related objects reference
 =
 
-.. currentmodule:: django.db.models
+.. currentmodule:: django.db.models.fields.related
 
 This document describes extra methods available on managers when used in a 
one-to-many or many-to-many related context. This happens in two cases:
 
 * The "other side" of a ``ForeignKey`` relation. That is::
-
+
 class Reporter(models.Model):
 ...
-
+
 class Article(models.Model):
 reporter = models.ForeignKey(Reporter)
-
+
   In the above example, the methods below will be available on
   the manager ``reporter.article_set``.
-  
+
 * Both sides of a ``ManyToManyField`` relation::
-
+
 class Topping(models.Model):
 ...
-
+
 class Pizza(models.Model):
 toppings = models.ManyToManyField(Topping)
-
+
   In this example, the methods below will be available both on
   ``topping.pizza_set`` and on ``pizza.toppings``.
 
-.. method:: QuerySet.add(obj1, [obj2, ...])
+.. method:: add(obj1, [obj2, ...])
 
 Adds the specified model objects to the related object set.
 
@@ -40,27 +40,27 @@
 >>> e = Entry.objects.get(id=234)
 >>> b.entry_set.add(e) # Associates Entry e with Blog b.
 
-.. method:: QuerySet.create(**kwargs)
+.. method:: create(**kwargs)
 
 Creates a new object, saves it and puts it in the related object set.
 Returns the newly created object::
 
 >>> b = Blog.objects.get(id=1)
 >>> e = b.entry_set.create(
-... headline='Hello', 
-... body_text='Hi', 
+... headline='Hello',
+... body_text='Hi',
 ... pub_date=datetime.date(2005, 1, 1)
 ... )
-
+
 # No need to call e.save() at this point -- it's already been saved.
 
 This is equivalent to (but much simpler than)::
 
 >>> b = Blog.objects.get(id=1)
 >>> e = Entry(
- blog=b, 
- headline='Hello', 
- body_text='Hi', 
+ blog=b,
+ headline='Hello',
+ body_text='Hi',
  pub_date=datetime.date(2005, 1, 1)
  )
 >>> e.save(force_insert=True)
@@ -70,10 +70,10 @@
 ``blog`` to ``create()``. Django figures out that the new ``Entry`` 
object's
 ``blog`` field should be set to ``b``.
 
-.. method:: QuerySet.remove(obj1, [obj2, ...])
+.. method:: remove(obj1, [obj2, ...])
 
 Removes the specified model objects from the related object set::
-
+
 >>> b = Blog.objects.get(id=1)
 >>> e = Entry.objects.get(id=234)
 >>> b.entry_set.remove(e) # Disassociates Entry e from Blog b.
@@ -85,7 +85,7 @@
 ``b.entry_set()`` is equivalent to doing ``e.blog = None``, and because the
 ``blog`` ``ForeignKey`` doesn't have ``null=True``, this is invalid.
 
-.. method:: QuerySet.clear()
+.. method:: clear()
 
 Removes all objects from the related object set::
 

-- 
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] #13481: Allow db_column on ForeignKey

2010-05-11 Thread Django
#13481: Allow db_column on ForeignKey
---+
  Reporter:  malthe| Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:  worksforme|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 But please do not open a new ticket for function that already exists.
 Controlling the name of the database table is done via the db_table Meta
 option: http://docs.djangoproject.com/en/dev/ref/models/options/#db-table.
 Just as the columns in my previously-mentioned project do not conform to
 Django's naming convention, neither do the table names, and to accommodate
 that this project has db_table specified for every model. If there is
 something you are having difficulty with perhaps if you posted details to
 someplace like django-users someone might be able to help. Both things you
 have asked for here seem to already be possible with existing function.

-- 
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] r13234 - django/trunk/django/contrib/admin/media/js

2010-05-11 Thread noreply
Author: russellm
Date: 2010-05-11 08:40:17 -0500 (Tue, 11 May 2010)
New Revision: 13234

Modified:
   django/trunk/django/contrib/admin/media/js/inlines.js
   django/trunk/django/contrib/admin/media/js/inlines.min.js
Log:
Fixed #13521 -- Corrected javascript comparisons determining when to show and 
hide the 'add another' inline button. Thanks to darkrho for the report and 
patch.

Modified: django/trunk/django/contrib/admin/media/js/inlines.js
===
--- django/trunk/django/contrib/admin/media/js/inlines.js   2010-05-11 
13:07:09 UTC (rev 13233)
+++ django/trunk/django/contrib/admin/media/js/inlines.js   2010-05-11 
13:40:17 UTC (rev 13234)
@@ -95,7 +95,7 @@
// Update number of total forms
$(totalForms).val(nextIndex + 1);
// Hide add button in case we've hit the max, 
except we want to add infinitely
-   if ((maxForms.val() != '') && (maxForms.val() 
<= totalForms.val())) {
+   if ((maxForms.val() != '') && 
(maxForms.val()-totalForms.val()) <= 0) {
addButton.parent().hide();
}
// The delete button of each row triggers a 
bunch of other things
@@ -111,7 +111,7 @@
var forms = $("." + 
options.formCssClass);
$("#id_" + options.prefix + 
"-TOTAL_FORMS").val(forms.length);
// Show add button again once we drop 
below max
-   if ((maxForms.val() == '') || 
(maxForms.val() >= forms.length)) {
+   if ((maxForms.val() == '') || 
(maxForms.val()-forms.length) > 0) {
addButton.parent().show();
}
// Also, update names and ids for all 
remaining form controls

Modified: django/trunk/django/contrib/admin/media/js/inlines.min.js
===
--- django/trunk/django/contrib/admin/media/js/inlines.min.js   2010-05-11 
13:07:09 UTC (rev 13233)
+++ django/trunk/django/contrib/admin/media/js/inlines.min.js   2010-05-11 
13:40:17 UTC (rev 13234)
@@ -2,5 +2,5 @@
 if(a(this).length&&g){var 
i;if(a(this).attr("tagName")=="TR"){g=this.eq(0).children().length;a(this).parent().append(''+b.addText+"");i=a(this).parent().find("tr:last
 a")}else{a(this).filter(":last").after(''+b.addText+"");i=a(this).filter(":last").next().find("a")}i.click(function(){var
 e=a("#id_"+b.prefix+"-TOTAL_FORMS"),f=parseInt(e.val()),
 
j=a("#"+b.prefix+"-empty"),d=j.clone(true);d.removeClass(b.emptyCssClass).addClass(b.formCssClass).attr("id",b.prefix+"-"+f).insertBefore(a(j));d.find("*").filter(function(){var
 c=a(this);return 
c.attr("id")&&c.attr("id").search(/__prefix__/)>=0}).each(function(){var 
c=a(this);c.attr("id",c.attr("id").replace(/__prefix__/g,f))}).end().filter(function(){var
 c=a(this);return 
c.attr("name")&&c.attr("name").search(/__prefix__/)>=0}).each(function(){var 
c=a(this);c.attr("name",c.attr("name").replace(/__prefix__/g,
 f))});if(d.is("tr"))d.children(":last").append(''+b.deleteText+"");else 
d.is("ul")||d.is("ol")?d.append(''+b.deleteText+""):d.children(":first").append(''+b.deleteText+"");d.find("input,select,textarea,label,a").each(function(){l(this,b.prefix,e.val())});a(e).val(f+1);h.val()!=""&&
-h.val()<=e.val()&&i.parent().hide();d.find("a."+b.deleteCssClass).click(function(){var
 
c=a(this).parents("."+b.formCssClass);c.remove();b.removed&&b.removed(c);c=a("."+b.formCssClass);a("#id_"+b.prefix+"-TOTAL_FORMS").val(c.length);if(h.val()==""||h.val()>=c.length)i.parent().show();for(var
 
k=0,m=c.length;k0)i.parent().show();for(var
 
k=0,m=c.length;khttp://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13513: _collect_sub_objects() does not take the database into the account

2010-05-11 Thread Django
#13513: _collect_sub_objects() does not take the database into the account
---+
  Reporter:  gavoja| Owner:  nobody
Status:  closed| Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * stage:  Unreviewed => Accepted
  * milestone:  => 1.2

Comment:

 To explain the discrepancy between the proposed patch and the committed
 patch; it isn't necessary to pass the database down as an argument - it
 can (and should) be derived from the relation with related objects. This
 was being correctly handled for all relation types *except* m2m relations,
 which have an m2m table; because the m2m table wasn't being queried using
 one of the descriptors on the related objects that would force database
 assignment, the query was being allocated to the default database. The
 solution is to do a write database lookup using the source object as a
 hint, and force the query on the through object onto that database. This
 is analogous to what is done in the m2m descriptors.

-- 
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] r13233 - django/trunk/django/conf/locale/id/LC_MESSAGES

2010-05-11 Thread noreply
Author: russellm
Date: 2010-05-11 08:07:09 -0500 (Tue, 11 May 2010)
New Revision: 13233

Modified:
   django/trunk/django/conf/locale/id/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/id/LC_MESSAGES/django.po
Log:
Fixed #13522 -- Updated Indonesian translation. Thanks to gchandrasa.

Modified: django/trunk/django/conf/locale/id/LC_MESSAGES/django.mo
===
(Binary files differ)


Property changes on: django/trunk/django/conf/locale/id/LC_MESSAGES/django.mo
___
Name: svn:mime-type
   + application/octet-stream

Modified: django/trunk/django/conf/locale/id/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/id/LC_MESSAGES/django.po2010-05-11 
13:06:03 UTC (rev 13232)
+++ django/trunk/django/conf/locale/id/LC_MESSAGES/django.po2010-05-11 
13:07:09 UTC (rev 13233)
@@ -475,7 +475,7 @@
 "Please enter a correct username and password. Note that both fields are case-"
 "sensitive."
 msgstr ""
-"Mohon masukkan nama dan sandi yang benar. Kedua field inicase-sensitive."
+"Mohon masukkan nama dan sandi yang benar. Kedua field ini case-sensitive."
 
 #: contrib/admin/sites.py:307 contrib/admin/views/decorators.py:40
 msgid "Please log in again, because your session has expired."
@@ -638,7 +638,7 @@
 #: contrib/admin/templates/registration/password_change_done.html:3
 #: contrib/admin/templates/registration/password_change_form.html:4
 msgid "Log out"
-msgstr "Keluar"
+msgstr "Log out"
 
 #: contrib/admin/templates/admin/base_site.html:4
 msgid "Django site admin"
@@ -894,7 +894,7 @@
 
 #: contrib/admin/templates/registration/logged_out.html:10
 msgid "Log in again"
-msgstr "Masuk kembali"
+msgstr "Log in kembali"
 
 #: contrib/admin/templates/registration/password_change_done.html:4
 #: contrib/admin/templates/registration/password_change_form.html:5
@@ -1146,11 +1146,11 @@
 "your computer is \"internal\").\n"
 msgstr ""
 "\n"
-"Untuk menginstal bookmarklet, drag pautan ini ke toolbar\n"
+"Untuk menginstal bookmarklet, drag tautan ini ke toolbar\n"
 "bookmark Anda atau klik kanan di pautan tersebut dan tambahkan ke bookmark "
 "Anda. Kini Anda dapat\n"
 "memilih bookmarklet dari halaman apapun di situs. Jangan lupa beberapa\n"
-"bookmarklet ini hanya bisa digunakan dari komputer yang tercatat \n"
+"bookmarklet ini hanya bisa digunakan dari komputer yang terdaftar \n"
 "sebagai \"internal\" (hubungi administrator sistem Anda apabila tidak yakin "
 "apakah\n"
 "komputer Anda termasuk \"internal\").\n"
@@ -1327,7 +1327,7 @@
 
 #: contrib/auth/models.py:198
 msgid "last name"
-msgstr "nama keluarga"
+msgstr "nama belakang"
 
 #: contrib/auth/models.py:199
 msgid "e-mail address"
@@ -1568,7 +1568,7 @@
 "only."
 msgstr ""
 "Komentar ini dikirim oleh seorang pengguna yang ter-otentikasi sehingga nama "
-"penggunatidak dapat diubah."
+"pengguna tidak dapat diubah."
 
 #: contrib/comments/models.py:128
 msgid ""
@@ -1576,7 +1576,7 @@
 "only."
 msgstr ""
 "Komentar ini dikirim oleh seorang pengguna yang ter-otentikasi sehingga "
-"alamat emailtidak dapat diubah."
+"alamat email tidak dapat diubah."
 
 #: contrib/comments/models.py:153
 #, python-format
@@ -1824,8 +1824,8 @@
 "An error occurred when transforming the geometry to the SRID of the geometry "
 "form field."
 msgstr ""
-"An error occurred when transforming the geometry to the SRID of the geometry "
-"form field."
+"Telah terjadi kesalahan ketika merubah geometri ke SRID dari field formulir"
+"geometri."
 
 #: contrib/humanize/templatetags/humanize.py:19
 msgid "th"
@@ -4660,7 +4660,7 @@
 
 #: db/models/fields/related.py:801
 msgid "Foreign Key (type determined by related field)"
-msgstr "Kunci asing (tipe tergantung dari field yang berhubungan)"
+msgstr "Foreign Key (tipe tergantung dari field yang berhubungan)"
 
 #: db/models/fields/related.py:918
 msgid "One-to-one relationship"
@@ -4789,7 +4789,7 @@
 
 #: forms/models.py:855
 msgid "The inline foreign key did not match the parent instance primary key."
-msgstr "Kunci asing inline tidak cocok dengan primary key milik parent."
+msgstr "Foreign key inline tidak cocok dengan primary key milik parent."
 
 #: forms/models.py:921
 msgid "Select a valid choice. That choice is not one of the available choices."

-- 
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] r13232 - in django/trunk: django/db/models tests/regressiontests/multiple_database

2010-05-11 Thread noreply
Author: russellm
Date: 2010-05-11 08:06:03 -0500 (Tue, 11 May 2010)
New Revision: 13232

Modified:
   django/trunk/django/db/models/base.py
   django/trunk/tests/regressiontests/multiple_database/models.py
   django/trunk/tests/regressiontests/multiple_database/tests.py
Log:
Fixed #13513 -- Ensured that queries collecting deleted objects are issued on 
the right database, especially when dealing with m2m intermediate tables. 
Thanks to gavoja for the report.

Modified: django/trunk/django/db/models/base.py
===
--- django/trunk/django/db/models/base.py   2010-05-11 06:10:58 UTC (rev 
13231)
+++ django/trunk/django/db/models/base.py   2010-05-11 13:06:03 UTC (rev 
13232)
@@ -588,20 +588,22 @@
 
 for related in self._meta.get_all_related_many_to_many_objects():
 if related.field.rel.through:
+db = router.db_for_write(related.field.rel.through.__class__, 
instance=self)
 opts = related.field.rel.through._meta
 reverse_field_name = related.field.m2m_reverse_field_name()
 nullable = opts.get_field(reverse_field_name).null
 filters = {reverse_field_name: self}
-for sub_obj in 
related.field.rel.through._base_manager.filter(**filters):
+for sub_obj in 
related.field.rel.through._base_manager.using(db).filter(**filters):
 sub_obj._collect_sub_objects(seen_objs, self, nullable)
 
 for f in self._meta.many_to_many:
 if f.rel.through:
+db = router.db_for_write(f.rel.through.__class__, 
instance=self)
 opts = f.rel.through._meta
 field_name = f.m2m_field_name()
 nullable = opts.get_field(field_name).null
 filters = {field_name: self}
-for sub_obj in f.rel.through._base_manager.filter(**filters):
+for sub_obj in 
f.rel.through._base_manager.using(db).filter(**filters):
 sub_obj._collect_sub_objects(seen_objs, self, nullable)
 else:
 # m2m-ish but with no through table? GenericRelation: cascade 
delete
@@ -627,7 +629,6 @@
 
 def delete(self, using=None):
 using = using or router.db_for_write(self.__class__, instance=self)
-connection = connections[using]
 assert self._get_pk_val() is not None, "%s object can't be deleted 
because its %s attribute is set to None." % (self._meta.object_name, 
self._meta.pk.attname)
 
 # Find all the objects than need to be deleted.

Modified: django/trunk/tests/regressiontests/multiple_database/models.py
===
--- django/trunk/tests/regressiontests/multiple_database/models.py  
2010-05-11 06:10:58 UTC (rev 13231)
+++ django/trunk/tests/regressiontests/multiple_database/models.py  
2010-05-11 13:06:03 UTC (rev 13232)
@@ -44,6 +44,16 @@
 class Meta:
 ordering = ('title',)
 
+class Pet(models.Model):
+name = models.CharField(max_length=100)
+owner = models.ForeignKey(Person)
+
+def __unicode__(self):
+return self.name
+
+class Meta:
+ordering = ('name',)
+
 class UserProfile(models.Model):
 user = models.OneToOneField(User, null=True)
 flavor = models.CharField(max_length=100)

Modified: django/trunk/tests/regressiontests/multiple_database/tests.py
===
--- django/trunk/tests/regressiontests/multiple_database/tests.py   
2010-05-11 06:10:58 UTC (rev 13231)
+++ django/trunk/tests/regressiontests/multiple_database/tests.py   
2010-05-11 13:06:03 UTC (rev 13232)
@@ -10,7 +10,7 @@
 from django.db.utils import ConnectionRouter
 from django.test import TestCase
 
-from models import Book, Person, Review, UserProfile
+from models import Book, Person, Pet, Review, UserProfile
 
 try:
 # we only have these models if the user is using multi-db, it's safe the
@@ -321,6 +321,66 @@
 except ValueError:
 pass
 
+def test_m2m_deletion(self):
+"Cascaded deletions of m2m relations issue queries on the right 
database"
+# Create a book and author on the other database
+dive = Book.objects.using('other').create(title="Dive into Python",
+  
published=datetime.date(2009, 5, 4))
+
+mark = Person.objects.using('other').create(name="Mark Pilgrim")
+dive.authors = [mark]
+
+# Check the initial state
+self.assertEquals(Person.objects.using('default').count(), 0)
+self.assertEquals(Book.objects.using('default').count(), 0)
+
self.assertEquals(Book.authors.through.objects.using('default').count(), 0)
+
+self.assertEquals(Person.objects.using('other').count(), 1)
+self.assertEquals(Book.objects.using('other').count(), 1)
+self.asse

Re: [Django] #13481: Allow db_column on ForeignKey

2010-05-11 Thread Django
#13481: Allow db_column on ForeignKey
---+
  Reporter:  malthe| Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:  worksforme|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 This bug was, correctly, marked as working fine.  If you have another bug
 please file a new 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] #13481: Allow db_column on ForeignKey

2010-05-11 Thread Django
#13481: Allow db_column on ForeignKey
---+
  Reporter:  malthe| Owner:  nobody
Status:  reopened  | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by malthe):

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

Comment:

 I wanted to change the ORM table name along with the database column name.
 Perhaps it's better to support a `column` parameter, since the focus is
 really on the table name.

-- 
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] #13514: Only last package javascript catalog is loaded in case of missing default translation.

2010-05-11 Thread Django
#13514: Only last package javascript catalog is loaded in case of missing 
default
translation.
---+
  Reporter:  jtiai | Owner:  nobody 
Status:  new   | Milestone: 
 Component:  Internationalization  |   Version:  SVN
Resolution:|  Keywords:  i18n javascript
 Stage:  Unreviewed| Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by jtiai):

  * summary:  Only last package catalog is loaded in case of missing
  default translation. => Only last package
  javascript catalog is loaded in case of missing
  default translation.

Comment:

 Replying to [comment:1 arkx]:
 > Hello, I'm the one who provided the patch to fix #3594. What I'd like to
 see is a failing test case where you demonstrate the problem you are
 facing. You can use the tests introduced in #3594 as an example:
 
http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/views/tests/i18n.py.
 If this seems daunting you could also upload a test project that
 demonstrates the issue so that we could take a look.
 >
 > Did I undestand correctly that you wanted a Finnish translation to
 appear and it did not, displaying the default (as specified by
 LANGUAGE_CODE setting) English instead? Which language(s) are you
 translating to and which from? Are you having trouble with normal
 translations or !JavaScript translations? Please note that both of the
 tickets you refer to are related to !JavaScript translations only.

 I'm using javascript translation (should have been more precise there).

 I was having incorrect default (en-us) translation and I tried to have
 Finnish translations appear. I've multiple catalogs (around 20 apps with
 their own catalogs, djangojs - to be precise).

 When browser requested Finnish translations only last application package
 listed in packages list was loaded for some reason.

 Excerpt of urls.py:
 {{{
 js_info_dict = {
 'packages': ('app1', 'app2', 'app3', 'app4',),
 }

 urlpatterns = patterns('',
 (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
 )

 }}}

 Now in my case I don't have english translations, I had default language
 defined as "en-us", and browser requested "fi" translation.

 I got only translations from last application package in example case
 app4.

 > For reference, some background: because English is often the language
 people translate from (for example in Django's official translations),
 there is often no reason to create English translation files (just as you
 note, you don't have them at all). In this case, when English is the
 selected language the system will try to look for English translation and
 when it doesn't find one, it will return the untranslated string, which
 happens to be in English.
 >
 > The problem was that !JavaScript translation catalog would include the
 LANGUAGE_CODE translation if it's something other than English. This would
 cause trouble in the scenario where you are translating from English to
 Finnish for example, and your LANGUAGE_CODE is set to Finnish. The
 translation catalog is set to Finnish because of LANGUAGE_CODE, but then
 when the system subsequently tries to find translation for the currently
 selected language (English), it will not find anything, because English is
 the language being translated from. And hence Finnish translation is
 served to a user who requested English translation despite the fact that
 English version exists.
 >
 > I fixed this by setting a flag if English translation files could not be
 found during the catalog's construction and checking for that flag when at
 the last step the system is looking for active language's translation
 files and the language happens to be English. Then and only then is the
 catalog that had been set to LANGUAGE_CODE in previous step discarded.
 Note that '''nothing is discarded unless the English translation files are
 missing and English is the currently activated language choice''', which
 should not happen if a browser requests the Finnish translation.

 In my case it exactly happened like that. I had Finnish as a active
 language (verified from a debugger) and all else but last catalog defined
 in my packages list was discarded. Last loaded catalog was in correct
 language though (Finnish).

 > Take a look at the function javascript_catalog at
 http://code.djangoproject.com/browser/django/trunk/django/views/i18n.py if
 you want to see exactly how the !JavaScript translation catalog is
 constructed.

 I did and it seems that last change made in that file seems to override
 everything with las

Re: [Django] #13522: Indonesia Translation Update

2010-05-11 Thread Django
#13522: Indonesia Translation Update
---+
  Reporter:  gchandrasa| Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Translations  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

-- 
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] #5833: Custom FilterSpecs

2010-05-11 Thread Django
#5833: Custom FilterSpecs
---+
  Reporter:  Honza_Kral| Owner:  jkocherhans
 
Status:  assigned  | Milestone: 
 
 Component:  django.contrib.admin  |   Version:  SVN
 
Resolution:|  Keywords:  nfa-someday 
list_filter filterspec nfa-changelist ep2008
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  1 |   Needs_tests:  1  
 
Needs_better_patch:  0 |  
---+
Changes (by dominicrodger):

 * cc: inter...@dominicrodger.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] #13513: _collect_sub_objects() does not take the database into the account

2010-05-11 Thread Django
#13513: _collect_sub_objects() does not take the database into the account
---+
  Reporter:  gavoja| Owner:  nobody
Status:  reopened  | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by gavoja):

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

Comment:

 Sorry for not being too specific. We use sort of sharding, where we store
 records in different databases depending on some external conditions. I
 have prepared a sample application with a test that causes DatabaseError,
 which I believe should not be an expected behavior for this case.

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

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



[Django] #13522: Indonesia Translation Update

2010-05-11 Thread Django
#13522: Indonesia Translation Update
--+-
 Reporter:  gchandrasa|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Translations  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 http://code.djangoproject.com/ticket/13496, there is already patch for
 Indonesia translation by Selwin Ong. There are some typos in Indonesia
 translation, so I attach patch for fixing those typos, add more
 translation and pick a better word for some of the translation.

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