Re: [Django] #9055: Percent sign in SQL statement behaves different with CursorDebugWrapper

2009-04-18 Thread Django
#9055: Percent sign in SQL statement behaves different with CursorDebugWrapper
---+
  Reporter:  guettli   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Changes (by wdoekes):

 * cc: walter+dja...@wjd.nu (added)

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



Re: [Django] #9055: Percent sign in SQL statement behaves different with CursorDebugWrapper

2009-04-18 Thread Django
#9055: Percent sign in SQL statement behaves different with CursorDebugWrapper
---+
  Reporter:  guettli   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Comment (by wdoekes):

 """also made the same change to executemany"""

 No I didn't ;-) I only replaced the parameter name "args" with "params"
 (which should've been "param_list" anyway, sloppy me). There was no actual
 change in the code for executemany.

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



Re: [Django] #9751: project_directory calculated incorrectly when "settings" is a directory (breaks 'startapp')

2009-04-18 Thread Django
#9751: project_directory calculated incorrectly when "settings" is a directory
(breaks 'startapp')
--+-
  Reporter:  lamby| Owner:  nobody  
Status:  new  | Milestone:  1.1 
 Component:  django-admin.py  |   Version:  1.0 
Resolution:   |  Keywords:  startapp,settings,module
 Stage:  Accepted | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Comment (by gsong):

 My patch fixes a few problems:
 1. ``get_commands()`` was importing project settings each time it's
 called. That's not necessary.
 2. ``get_commands()`` was actually passing the project package instead of
 settings module/package to ``setup_environ()``.
 3. In ``setup_environ()``, check to see if settings module is a package or
 module by checking to see if its ``__file__`` contains ``__init__.py`` or
 not. Not sure if this works for Jython as I don't know how Jython
 filenames work.

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



Re: [Django] #10850: Impossible to stop a large file upload mid-stream

2009-04-18 Thread Django
#10850: Impossible to stop a large file upload mid-stream
---+
  Reporter:  legutierr | Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:|  Keywords:  upload, StopUpload
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by grahamd):

 All I can say is it is likely that fastcgi complicates it, as in the case
 of runsever, the browser is connected directly to the process that Django
 is running in. In the case of fastcgi, the browser only connects to the
 Apache server child worker process, which is only acting as a proxy via
 the fastcgi protocol to the process that Django runs in. Thus you are at
 the mercy as to how the fastcgi virtual connection for that request is
 closed down and that action propogated back to Apche server child worker
 process. Also, in the case of runserver it can just close the connection.
 In the case of fastcgi, depending on how it is implemented, it may be
 necessary to still read in and discard the request input. Normally this
 shouldn't be the case for an error response, only a 200 success response
 when keep alive on, but couldn't be working different that for some
 reason. Anyway, if it is a fastcgi issue, possibly not much you can do
 about it.

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



Re: [Django] #5096: Doc: Model ref mentions sql-based initial data, should use fixtures

2009-04-18 Thread Django
#5096: Doc: Model ref mentions sql-based initial data, should use fixtures
-+--
  Reporter:  oggie rob   | Owner:  
jacob 
Status:  closed  | Milestone:  1.1  
 
 Component:  Documentation   |   Version:  SVN  
 
Resolution:  fixed   |  Keywords:  
sprint-pycon08
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Changes (by mtredinnick):

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

Comment:

 The `docs/howto/initial-data.txt` file appears to contain a fairly clear
 discussion of the two options here. Closing this, since it looks fairly
 complete. If somebody wants to do something else, open a new ticket with a
 clear patch against trunk that we can evaluate, but I think the proposed
 changes have all been merged in now.

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



[Changeset] r10600 - django/branches/releases/1.0.X/django/contrib/auth/tests

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 22:44:06 -0500 (Sat, 18 Apr 2009)
New Revision: 10600

Modified:
   django/branches/releases/1.0.X/django/contrib/auth/tests/views.py
Log:
[1.0.X] Fixed #8752 -- Fixed django.contrib.auth tests to be locale-independent.

Patch from Koen Biermans.

Backport of r10599 from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/auth/tests/views.py
===
--- django/branches/releases/1.0.X/django/contrib/auth/tests/views.py   
2009-04-19 03:41:33 UTC (rev 10599)
+++ django/branches/releases/1.0.X/django/contrib/auth/tests/views.py   
2009-04-19 03:44:06 UTC (rev 10600)
@@ -15,6 +15,10 @@
 urls = 'django.contrib.auth.urls'
 
 def setUp(self):
+self.old_LANGUAGES = settings.LANGUAGES
+self.old_LANGUAGE_CODE = settings.LANGUAGE_CODE
+settings.LANGUAGES = (('en', 'English'),)
+settings.LANGUAGE_CODE = 'en'
 self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS
 settings.TEMPLATE_DIRS = (
 os.path.join(
@@ -24,10 +28,22 @@
 ,)
 
 def tearDown(self):
+settings.LANGUAGES = self.old_LANGUAGES
+settings.LANGUAGE_CODE = self.old_LANGUAGE_CODE
 settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
 
 class PasswordResetTest(AuthViewsTestCase):
 
+def setUp(self):
+self.old_LANGUAGES = settings.LANGUAGES
+self.old_LANGUAGE_CODE = settings.LANGUAGE_CODE
+settings.LANGUAGES = (('en', 'English'),)
+settings.LANGUAGE_CODE = 'en'
+
+def tearDown(self):
+settings.LANGUAGES = self.old_LANGUAGES
+settings.LANGUAGE_CODE = self.old_LANGUAGE_CODE
+
 def test_email_not_found(self):
 "Error is raised if the provided email address isn't currently 
registered"
 response = self.client.get('/password_reset/')
@@ -221,4 +237,4 @@
 response = self.client.get('/logout/custom_query/?follow=/somewhere/')
 self.assertEqual(response.status_code, 302)
 self.assert_(response['Location'].endswith('/somewhere/'))
-self.confirm_logged_out()
\ No newline at end of file
+self.confirm_logged_out()


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



[Changeset] r10599 - django/trunk/django/contrib/auth/tests

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 22:41:33 -0500 (Sat, 18 Apr 2009)
New Revision: 10599

Modified:
   django/trunk/django/contrib/auth/tests/views.py
Log:
Fixed #8752 -- Fixed django.contrib.auth tests to be locale-independent.

Patch from Koen Biermans.

Modified: django/trunk/django/contrib/auth/tests/views.py
===
--- django/trunk/django/contrib/auth/tests/views.py 2009-04-19 03:06:29 UTC 
(rev 10598)
+++ django/trunk/django/contrib/auth/tests/views.py 2009-04-19 03:41:33 UTC 
(rev 10599)
@@ -18,6 +18,10 @@
 urls = 'django.contrib.auth.urls'
 
 def setUp(self):
+self.old_LANGUAGES = settings.LANGUAGES
+self.old_LANGUAGE_CODE = settings.LANGUAGE_CODE
+settings.LANGUAGES = (('en', 'English'),)
+settings.LANGUAGE_CODE = 'en'
 self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS
 settings.TEMPLATE_DIRS = (
 os.path.join(
@@ -27,10 +31,22 @@
 ,)
 
 def tearDown(self):
+settings.LANGUAGES = self.old_LANGUAGES
+settings.LANGUAGE_CODE = self.old_LANGUAGE_CODE
 settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
 
 class PasswordResetTest(AuthViewsTestCase):
 
+def setUp(self):
+self.old_LANGUAGES = settings.LANGUAGES
+self.old_LANGUAGE_CODE = settings.LANGUAGE_CODE
+settings.LANGUAGES = (('en', 'English'),)
+settings.LANGUAGE_CODE = 'en'
+
+def tearDown(self):
+settings.LANGUAGES = self.old_LANGUAGES
+settings.LANGUAGE_CODE = self.old_LANGUAGE_CODE
+
 def test_email_not_found(self):
 "Error is raised if the provided email address isn't currently 
registered"
 response = self.client.get('/password_reset/')
@@ -224,4 +240,4 @@
 response = self.client.get('/logout/custom_query/?follow=/somewhere/')
 self.assertEqual(response.status_code, 302)
 self.assert_(response['Location'].endswith('/somewhere/'))
-self.confirm_logged_out()
\ No newline at end of file
+self.confirm_logged_out()


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



Re: [Django] #8752: auth password tests fail on non-english sites

2009-04-18 Thread Django
#8752: auth password tests fail on non-english sites
---+
  Reporter:  Koen Biermans   | 
Owner:  nobody
Status:  new   | 
Milestone:  1.1   
 Component:  Contrib apps  |   
Version:  SVN   
Resolution:|  
Keywords:
 Stage:  Accepted  | 
Has_patch:  1 
Needs_docs:  0 |   
Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 Jacob, you also need to have the !LocaleMiddleware involved for the
 automatic translations to have an effect on the tests, so it's more likely
 to be noticed when testing "auth" as part of an installed set of
 applications than when testing core.

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



Re: [Django] #9492: Invalid XHTML in admin/base.html template

2009-04-18 Thread Django
#9492: Invalid XHTML in admin/base.html template
---+
  Reporter:  dc| Owner:  wilson
Status:  closed| Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  1.0   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

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

Comment:

 Fixed in r10598.

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



[Changeset] r10598 - django/trunk/django/contrib/admin/templates/admin

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 22:06:29 -0500 (Sat, 18 Apr 2009)
New Revision: 10598

Modified:
   django/trunk/django/contrib/admin/templates/admin/base.html
Log:
Fixed #9420 -- Fixed admin templates CSS.

Removed some unconditional, invalid, IE-specific notations that were
protecting IE 5 users. IE 5 is sufficiently old, we don't really need to
do that and helping that small userbase at the expense of everybody else
was a slight priority inversion.

Patch from G2P and reviwed by Wilson Miner (who made the original
changes).

Modified: django/trunk/django/contrib/admin/templates/admin/base.html
===
--- django/trunk/django/contrib/admin/templates/admin/base.html 2009-04-19 
02:37:44 UTC (rev 10597)
+++ django/trunk/django/contrib/admin/templates/admin/base.html 2009-04-19 
03:06:29 UTC (rev 10598)
@@ -2,12 +2,10 @@
 http://www.w3.org/1999/xhtml"; lang="{{ LANGUAGE_CODE }}" 
xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
 
 {% block title %}{% endblock %}
-
 
 {% block extrastyle %}{% endblock %}
 
 {% if LANGUAGE_BIDI %}{% endif 
%}
-
 {% block extrahead %}{% endblock %}
 {% block blockbots %}{% 
endblock %}
 


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



Re: [Django] #10476: Fix(?) model insert handling when autcommit=True for PostgreSQL <= 8.1

2009-04-18 Thread Django
#10476: Fix(?) model insert handling when autcommit=True for PostgreSQL <= 8.1
---+
  Reporter:  mtredinnick   | Owner:  mtredinnick
Status:  new   | Milestone: 
 Component:  Database layer (models, ORM)  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * milestone:  1.1 =>

Comment:

 Can wait until later. Right now, an error is correctly reported. I want to
 fix it properly so that everybody doesn't have to pay all the version
 checking penalties we currently do for this sort of thing (some kind of
 `DATABASE_OPTIONS` specification of version number, probably). Anyway,
 something to add 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10506: Automatically use correct auto-manager class for inherited models

2009-04-18 Thread Django
#10506: Automatically use correct auto-manager class for inherited models
---+
  Reporter:  mtredinnick   | Owner:  mtredinnick
Status:  new   | Milestone: 
 Component:  Database layer (models, ORM)  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * milestone:  1.1 =>

Comment:

 Given the work to do before 1.1, pushing this one to 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10869: ./manage.py makemessages should let users specify input directories

2009-04-18 Thread Django
#10869: ./manage.py makemessages should let users specify input directories
-+--
  Reporter:  filipnoetzel| Owner:  jezdez   
Status:  new | Milestone:   
 Component:  Internationalization|   Version:  1.0  
Resolution:  |  Keywords:  makemessages i18n
 Stage:  Design decision needed  | Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by mtredinnick):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This is potentially a fairly dangerous idea, since it will pull in no end
 of potentially duplicated strings. Translating on a per-application basis
 is to be encouraged (and then contributed back to the application), rather
 than on a "project" level, since it avoid precisely this problem.

 I believe this is a semi-duplicate of another ticket in the
 internationalization component, because I know Marc Garcia and I have
 discussed this 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #7158: Translating links

2009-04-18 Thread Django
#7158: Translating links
-+--
  Reporter:  alainD  | Owner:  nobody
Status:  new | Milestone:
 Component:  Internationalization|   Version:  SVN   
Resolution:  |  Keywords:  i18n  
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by mtredinnick):

  * summary:  i18n improvement proposal => Translating links

Comment:

 Changed title to something more descriptive.

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



Re: [Django] #10805: Updated Norwegian translation

2009-04-18 Thread Django
#10805: Updated Norwegian translation
---+
  Reporter:  jonklo| Owner:  nobody   
Status:  closed| Milestone:  1.1  
 Component:  Translations  |   Version:  SVN  
Resolution:  fixed |  Keywords:  norwegian
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 If there are changes to be made to the 1.0.X branch, please supply a
 separate patch. There are enough differences between the branches now that
 I can't auto-backport with any great confidence.

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



[Changeset] r10597 - django/trunk/django/conf/locale/no/LC_MESSAGES

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 21:37:44 -0500 (Sat, 18 Apr 2009)
New Revision: 10597

Modified:
   django/trunk/django/conf/locale/no/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/no/LC_MESSAGES/django.po
Log:
Fixed #10805 -- Updated Norwegian translation from jonklo.

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

Modified: django/trunk/django/conf/locale/no/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/no/LC_MESSAGES/django.po2009-04-19 
02:33:20 UTC (rev 10596)
+++ django/trunk/django/conf/locale/no/LC_MESSAGES/django.po2009-04-19 
02:37:44 UTC (rev 10597)
@@ -7,7 +7,7 @@
 "Project-Id-Version: Django\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2006-05-16 10:12+0200\n"
-"PO-Revision-Date: 2008-09-03 13:19+0200\n"
+"PO-Revision-Date: 2009-04-12 15:27+0200\n"
 "Last-Translator: Christian Mikalsen and Jon Lønne\n"
 "Language-Team: Norsk \n"
 "MIME-Version: 1.0\n"
@@ -99,117 +99,139 @@
 msgstr "Hebraisk"
 
 #: conf/global_settings.py:65
+msgid "Hindi"
+msgstr "Hindi"
+
+#: conf/global_settings.py:66
 msgid "Croatian"
 msgstr "Kroatisk"
 
-#: conf/global_settings.py:66
+#: conf/global_settings.py:67
 msgid "Icelandic"
 msgstr "Islandsk"
 
-#: conf/global_settings.py:67
+#: conf/global_settings.py:68
 msgid "Italian"
 msgstr "Italiensk"
 
-#: conf/global_settings.py:68
+#: conf/global_settings.py:69
 msgid "Japanese"
 msgstr "Japansk"
 
-#: conf/global_settings.py:69
+#: conf/global_settings.py:70
 msgid "Georgian"
 msgstr "Georgisk"
 
-#: conf/global_settings.py:70
+#: conf/global_settings.py:71
 msgid "Korean"
 msgstr "Koreansk"
 
-#: conf/global_settings.py:71
+#: conf/global_settings.py:72
 msgid "Khmer"
 msgstr "Khmer"
 
-#: conf/global_settings.py:72
+#: conf/global_settings.py:73
 msgid "Kannada"
 msgstr "Kannada"
 
-#: conf/global_settings.py:73
+#: conf/global_settings.py:74
 msgid "Latvian"
 msgstr "Latvisk"
 
-#: conf/global_settings.py:74
+#: conf/global_settings.py:75
 msgid "Lithuanian"
 msgstr "Litauisk"
 
-#: conf/global_settings.py:75
+#: conf/global_settings.py:76
 msgid "Macedonian"
 msgstr "Makedonsk"
 
-#: conf/global_settings.py:76
+#: conf/global_settings.py:77
 msgid "Dutch"
 msgstr "Nederlandsk"
 
-#: conf/global_settings.py:77
+#: conf/global_settings.py:78
 msgid "Norwegian"
 msgstr "Norsk"
 
-#: conf/global_settings.py:78
+#: conf/global_settings.py:79
 msgid "Polish"
 msgstr "Polsk"
 
-#: conf/global_settings.py:79
-msgid "Portugese"
+#: conf/global_settings.py:80
+msgid "Portuguese"
 msgstr "Portugisisk"
 
-#: conf/global_settings.py:80
+#: conf/global_settings.py:81
 msgid "Brazilian Portuguese"
 msgstr "Brasiliansk portugisisk"
 
-#: conf/global_settings.py:81
+#: conf/global_settings.py:82
 msgid "Romanian"
 msgstr "Rumensk"
 
-#: conf/global_settings.py:82
+#: conf/global_settings.py:83
 msgid "Russian"
 msgstr "Russisk"
 
-#: conf/global_settings.py:83
+#: conf/global_settings.py:84
 msgid "Slovak"
 msgstr "Slovakisk"
 
-#: conf/global_settings.py:84
+#: conf/global_settings.py:85
 msgid "Slovenian"
 msgstr "Slovensk"
 
-#: conf/global_settings.py:85
+#: conf/global_settings.py:86
 msgid "Serbian"
 msgstr "Serbisk"
 
-#: conf/global_settings.py:86
+#: conf/global_settings.py:87
 msgid "Swedish"
 msgstr "Svensk"
 
-#: conf/global_settings.py:87
+#: conf/global_settings.py:88
 msgid "Tamil"
 msgstr "Tamil"
 
-#: conf/global_settings.py:88
+#: conf/global_settings.py:89
 msgid "Telugu"
 msgstr "Telugu"
 
-#: conf/global_settings.py:89
+#: conf/global_settings.py:90
+msgid "Thai"
+msgstr "Thai"
+
+#: conf/global_settings.py:91
 msgid "Turkish"
 msgstr "Tyrkisk"
 
-#: conf/global_settings.py:90
+#: conf/global_settings.py:92
 msgid "Ukrainian"
 msgstr "Ukrainsk"
 
-#: conf/global_settings.py:91
+#: conf/global_settings.py:93
 msgid "Simplified Chinese"
 msgstr "Simplifisert kinesisk"
 
-#: conf/global_settings.py:92
+#: conf/global_settings.py:94
 msgid "Traditional Chinese"
 msgstr "Tradisjonell kinesisk"
 
+#: contrib/admin/actions.py:56
+#, python-format
+msgid "Successfully deleted %(count)d %(items)s."
+msgstr "Slettet %(count)d %(items)s."
+
+#: contrib/admin/actions.py:63 contrib/admin/options.py:1023
+msgid "Are you sure?"
+msgstr "Er du sikker?"
+
+#: contrib/admin/actions.py:81
+#, python-format
+msgid "Delete selected %(verbose_name_plural)s"
+msgstr "Slett valgte %(verbose_name_plural)s"
+
 #: contrib/admin/filterspecs.py:44
 #, python-format
 msgid ""
@@ -219,7 +241,7 @@
 "Etter %s:\n"
 "\n"
 
-#: contrib/admin/filterspecs.py:74 contrib/admin/filterspecs.py:92
+#: contrib/admin/filterspecs.py:75 contrib/admin/filterspecs.py:92
 #: contrib/admin/filterspecs.py:147 contrib/admin/filterspecs.py:173
 msgid "All"
 msgstr "Alle"
@@ -244,18 +266,22 @@
 msgid "This year"
 msgstr "I år"
 
-#: contrib/admin/filterspecs.py:147 forms/widgets.py:391
+#: contri

[Changeset] r10596 - django/branches/releases/1.0.X/django/conf/locale/fr/LC_MESSAGES

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 21:33:20 -0500 (Sat, 18 Apr 2009)
New Revision: 10596

Modified:
   django/branches/releases/1.0.X/django/conf/locale/fr/LC_MESSAGES/django.mo
   django/branches/releases/1.0.X/django/conf/locale/fr/LC_MESSAGES/django.po
Log:
[1.0.X] Fixed #10773 -- Fixed some damage I did to the French in r10509.

Patch from Karen Tracey.

Backport of r10595 from trunk.

Modified: 
django/branches/releases/1.0.X/django/conf/locale/fr/LC_MESSAGES/django.mo
===
(Binary files differ)

Modified: 
django/branches/releases/1.0.X/django/conf/locale/fr/LC_MESSAGES/django.po
===
--- django/branches/releases/1.0.X/django/conf/locale/fr/LC_MESSAGES/django.po  
2009-04-19 02:30:42 UTC (rev 10595)
+++ django/branches/releases/1.0.X/django/conf/locale/fr/LC_MESSAGES/django.po  
2009-04-19 02:33:20 UTC (rev 10596)
@@ -4072,7 +4072,7 @@
 
 #: utils/dates.py:19
 msgid "August"
-msgstr "aoû"
+msgstr "août"
 
 #: utils/dates.py:19
 msgid "September"
@@ -4120,7 +4120,7 @@
 
 #: utils/dates.py:24
 msgid "aug"
-msgstr "août"
+msgstr "aoû"
 
 #: utils/dates.py:24
 msgid "sep"


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



Re: [Django] #6845: Model validation and its propagation to ModelForms

2009-04-18 Thread Django
#6845: Model validation and its propagation to ModelForms
-+--
  Reporter:  Honza_Kral  | Owner:  Honza_Kral   
 
Status:  new | Milestone:  1.2  
 
 Component:  Forms   |   Version:  SVN  
 
Resolution:  |  Keywords:  newforms validation model 
modelform ep2008
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  1   |   Needs_tests:  1
 
Needs_better_patch:  1   |  
-+--
Changes (by garrison):

 * cc: j...@garrison.cc (added)

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



[Changeset] r10595 - django/trunk/django/conf/locale/fr/LC_MESSAGES

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 21:30:42 -0500 (Sat, 18 Apr 2009)
New Revision: 10595

Modified:
   django/trunk/django/conf/locale/fr/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/fr/LC_MESSAGES/django.po
Log:
Fixed #10773 -- Fixed some damage I did to the French in r10508.

Patch from Karen Tracey.

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

Modified: django/trunk/django/conf/locale/fr/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/fr/LC_MESSAGES/django.po2009-04-19 
02:27:17 UTC (rev 10594)
+++ django/trunk/django/conf/locale/fr/LC_MESSAGES/django.po2009-04-19 
02:30:42 UTC (rev 10595)
@@ -4147,7 +4147,7 @@
 
 #: utils/dates.py:19
 msgid "August"
-msgstr "aoû"
+msgstr "août"
 
 #: utils/dates.py:19
 msgid "September"
@@ -4195,7 +4195,7 @@
 
 #: utils/dates.py:24
 msgid "aug"
-msgstr "août"
+msgstr "aoû"
 
 #: utils/dates.py:24
 msgid "sep"


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



Re: [Django] #10674: Arabic translation update

2009-04-18 Thread Django
#10674: Arabic translation update
---+
  Reporter:  okhayat   | Owner:  nobody
Status:  closed| Milestone:  1.1   
 Component:  Translations  |   Version:  SVN   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 If anything needs to be backported to 1.0.X, please provide a separate
 patch in a new ticket.

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



[Changeset] r10594 - django/trunk/django/conf/locale/ar/LC_MESSAGES

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 21:27:17 -0500 (Sat, 18 Apr 2009)
New Revision: 10594

Modified:
   django/trunk/django/conf/locale/ar/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/ar/LC_MESSAGES/django.po
Log:
Fixed #10674 -- Updated Arabic translation from Ossama M. Khayat.

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

Modified: django/trunk/django/conf/locale/ar/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/ar/LC_MESSAGES/django.po2009-04-19 
02:19:21 UTC (rev 10593)
+++ django/trunk/django/conf/locale/ar/LC_MESSAGES/django.po2009-04-19 
02:27:17 UTC (rev 10594)
@@ -5,8 +5,8 @@
 msgstr ""
 "Project-Id-Version: django\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-03-31 11:13+0300\n"
-"PO-Revision-Date: 2009-03-31 11:19+0300\n"
+"POT-Creation-Date: 2009-04-12 07:33+0300\n"
+"PO-Revision-Date: 2009-04-12 08:01+0300\n"
 "Last-Translator: Ossama M. Khayat \n"
 "Language-Team: Arabic \n"
 "MIME-Version: 1.0\n"
@@ -14,9 +14,6 @@
 "Content-Transfer-Encoding: 8bit\n"
 "X-Generator: KBabel 1.11.4\n"
 "Plural-Forms: nplurals=4; plural=(n == 1? 0 : (n == 2? 1 : (n <= 10? 2 : 
3)))\n\n"
-"\n"
-"\n"
-"\n"
 
 #: conf/global_settings.py:44
 msgid "Arabic"
@@ -222,6 +219,20 @@
 msgid "Traditional Chinese"
 msgstr "الصينيّة التقليدية"
 
+#: contrib/admin/actions.py:56
+#, python-format
+msgid "Successfully deleted %(count)d %(items)s."
+msgstr "تم حذف %(count)d %(items)s بنجاح."
+
+#: contrib/admin/actions.py:63 contrib/admin/options.py:1023
+msgid "Are you sure?"
+msgstr "هل أنت متأكد؟"
+
+#: contrib/admin/actions.py:81
+#, python-format
+msgid "Delete selected %(verbose_name_plural)s"
+msgstr "حذف %(verbose_name_plural)s المحددون"
+
 #: contrib/admin/filterspecs.py:44
 #, python-format
 msgid ""
@@ -300,98 +311,84 @@
 msgid "log entries"
 msgstr "مُدخلات السجل"
 
-#: contrib/admin/options.py:131 contrib/admin/options.py:145
+#: contrib/admin/options.py:133 contrib/admin/options.py:147
 msgid "None"
 msgstr "لاشيء"
 
-#: contrib/admin/options.py:498
+#: contrib/admin/options.py:517
 #, python-format
-msgid "Successfully deleted %(count)d %(items)s."
-msgstr "تم حذف %(count)d %(items)s بنجاح."
-
-#: contrib/admin/options.py:505 contrib/admin/options.py:1012
-msgid "Are you sure?"
-msgstr "هل أنت متأكد؟"
-
-#: contrib/admin/options.py:523
-#, python-format
-msgid "Delete selected %(verbose_name_plural)s"
-msgstr "حذف %(verbose_name_plural)s المحددون"
-
-#: contrib/admin/options.py:531
-#, python-format
 msgid "Changed %s."
 msgstr "عدّل %s."
 
-#: contrib/admin/options.py:531 contrib/admin/options.py:541
-#: contrib/comments/templates/comments/preview.html:15 forms/models.py:306
+#: contrib/admin/options.py:517 contrib/admin/options.py:527
+#: contrib/comments/templates/comments/preview.html:16 forms/models.py:306
 msgid "and"
 msgstr "و"
 
-#: contrib/admin/options.py:536
+#: contrib/admin/options.py:522
 #, python-format
 msgid "Added %(name)s \"%(object)s\"."
 msgstr "أضاف %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:540
+#: contrib/admin/options.py:526
 #, python-format
 msgid "Changed %(list)s for %(name)s \"%(object)s\"."
 msgstr "غيّر %(list)s في %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:545
+#: contrib/admin/options.py:531
 #, python-format
 msgid "Deleted %(name)s \"%(object)s\"."
 msgstr "حذف %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:549
+#: contrib/admin/options.py:535
 msgid "No fields changed."
 msgstr "لم يتم تغيير أية حقول."
 
-#: contrib/admin/options.py:610 contrib/auth/admin.py:67
+#: contrib/admin/options.py:596 contrib/auth/admin.py:67
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was added successfully."
 msgstr "تم اضافة %(name)s \"%(obj)s\" بنجاح."
 
-#: contrib/admin/options.py:614 contrib/admin/options.py:647
+#: contrib/admin/options.py:600 contrib/admin/options.py:633
 #: contrib/auth/admin.py:75
 msgid "You may edit it again below."
 msgstr "يمكنك تعديله مجددا في الأسفل."
 
-#: contrib/admin/options.py:624 contrib/admin/options.py:657
+#: contrib/admin/options.py:610 contrib/admin/options.py:643
 #, python-format
 msgid "You may add another %s below."
 msgstr "يمكنك إضافة %s آخر بالأسفل."
 
-#: contrib/admin/options.py:645
+#: contrib/admin/options.py:631
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was changed successfully."
 msgstr "تم تغيير %(name)s \"%(obj)s\" بنجاح."
 
-#: contrib/admin/options.py:653
+#: contrib/admin/options.py:639
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was added successfully. You may edit it again 
below."
 msgstr "تمت إضافة %(name)s \"%(obj)s\" بنجاح، يمكنك تعديله مرة أخرى بالأسفل."
 
-#: contrib/admin/options.py:774
+#: contrib/admin/options.py:770
 #, python-format
 msgid "Add %s"
 msgstr "أضف %s"
 
-#: contrib/admin/options.py:805 contrib/admin/options.py:990
+#: contrib/admin/

Re: [Django] #10674: Arabic translation update

2009-04-18 Thread Django
#10674: Arabic translation update
---+
  Reporter:  okhayat   | Owner:  nobody
Status:  reopened  | Milestone:  1.1   
 Component:  Translations  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 We do not put author names in any files, including PO files (except in the
 last-translator) header. Please don't add it as a comment at the top. Your
 name is already in the AUTHORS file.

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



Re: [Django] #10663: Serbian translations

2009-04-18 Thread Django
#10663: Serbian translations
---+
  Reporter:  Branko Vukelic   | Owner:  
nobody 
Status:  new   | Milestone:  
1.1
 Component:  Translations  |   Version:  
SVN
Resolution:|  Keywords:  
Serbian
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  1 |  
---+
Changes (by mtredinnick):

  * needs_better_patch:  0 => 1

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



Re: [Django] #10593: Brazilian portuguese translation of POT files for 1.1

2009-04-18 Thread Django
#10593: Brazilian portuguese translation of POT files for 1.1
--+-
  Reporter:  Guilherme Gondim   | Owner:  
nobody
Status:  closed   | Milestone:  
1.1   
 Component:  Translations |   Version:  
SVN   
Resolution:  fixed|  Keywords:  
pt_BR 
 Stage:  Accepted | Has_patch:  
1 
Needs_docs:  0|   Needs_tests:  
0 
Needs_better_patch:  0|  
--+-
Changes (by mtredinnick):

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

Comment:

 Fixed in r10593 (snap!). I'm not going to backport this to 1.0.X; too many
 chances of mistakes. At some later date, if there are changes to make
 there, you can open a (new) ticket with a patch for that branch.

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



[Changeset] r10593 - django/trunk/django/conf/locale/pt_BR/LC_MESSAGES

2009-04-18 Thread noreply

Author: mtredinnick
Date: 2009-04-18 21:19:21 -0500 (Sat, 18 Apr 2009)
New Revision: 10593

Modified:
   django/trunk/django/conf/locale/pt_BR/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/pt_BR/LC_MESSAGES/django.po
Log:
Fixed #10593 -- Updated Brazilian translation from Guilherme Gondim.

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

Modified: django/trunk/django/conf/locale/pt_BR/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/pt_BR/LC_MESSAGES/django.po 2009-04-18 
21:06:19 UTC (rev 10592)
+++ django/trunk/django/conf/locale/pt_BR/LC_MESSAGES/django.po 2009-04-19 
02:19:21 UTC (rev 10593)
@@ -4,9 +4,9 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Django\n"
-"Report-Msgid-Bugs-To: django-l10n-portugu...@googlegroups.com\n"
-"POT-Creation-Date: 2009-03-31 22:43-0300\n"
-"PO-Revision-Date: 2009-03-31 23:17-0300\n"
+"Report-Msgid-Bugs-To: Grupo de Localização para o Português 
\n"
+"POT-Creation-Date: 2009-04-13 22:52-0300\n"
+"PO-Revision-Date: 2009-04-13 23:07-0300\n"
 "Last-Translator: Guilherme Gondim \n"
 "Language-Team: Grupo de Localização para o Português 
\n"
 "MIME-Version: 1.0\n"
@@ -218,6 +218,20 @@
 msgid "Traditional Chinese"
 msgstr "Chinês Tradicional"
 
+#: contrib/admin/actions.py:56
+#, python-format
+msgid "Successfully deleted %(count)d %(items)s."
+msgstr "Removido %(count)d %(items)s com sucesso."
+
+#: contrib/admin/actions.py:63 contrib/admin/options.py:1023
+msgid "Are you sure?"
+msgstr "Tem certeza?"
+
+#: contrib/admin/actions.py:81
+#, python-format
+msgid "Delete selected %(verbose_name_plural)s"
+msgstr "Remover %(verbose_name_plural)s selecionado"
+
 #: contrib/admin/filterspecs.py:44
 #, python-format
 msgid ""
@@ -296,74 +310,60 @@
 msgid "log entries"
 msgstr "entradas de log"
 
-#: contrib/admin/options.py:131 contrib/admin/options.py:145
+#: contrib/admin/options.py:133 contrib/admin/options.py:147
 msgid "None"
 msgstr "Nenhum"
 
-#: contrib/admin/options.py:498
+#: contrib/admin/options.py:517
 #, python-format
-msgid "Successfully deleted %(count)d %(items)s."
-msgstr "Removido %(count)d %(items)s com sucesso."
-
-#: contrib/admin/options.py:505 contrib/admin/options.py:1012
-msgid "Are you sure?"
-msgstr "Tem certeza?"
-
-#: contrib/admin/options.py:523
-#, python-format
-msgid "Delete selected %(verbose_name_plural)s"
-msgstr "Remover %(verbose_name_plural)s selecionado"
-
-#: contrib/admin/options.py:531
-#, python-format
 msgid "Changed %s."
 msgstr "Modificado %s."
 
-#: contrib/admin/options.py:531 contrib/admin/options.py:541
-#: contrib/comments/templates/comments/preview.html:15 forms/models.py:306
+#: contrib/admin/options.py:517 contrib/admin/options.py:527
+#: contrib/comments/templates/comments/preview.html:16 forms/models.py:306
 msgid "and"
 msgstr "e"
 
-#: contrib/admin/options.py:536
+#: contrib/admin/options.py:522
 #, python-format
 msgid "Added %(name)s \"%(object)s\"."
 msgstr "Adicionado %(name)s \"%(object)s\""
 
-#: contrib/admin/options.py:540
+#: contrib/admin/options.py:526
 #, python-format
 msgid "Changed %(list)s for %(name)s \"%(object)s\"."
 msgstr "Modificado %(list)s para %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:545
+#: contrib/admin/options.py:531
 #, python-format
 msgid "Deleted %(name)s \"%(object)s\"."
 msgstr "Deletado %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:549
+#: contrib/admin/options.py:535
 msgid "No fields changed."
 msgstr "Nenhum campo modificado."
 
-#: contrib/admin/options.py:610 contrib/auth/admin.py:67
+#: contrib/admin/options.py:596 contrib/auth/admin.py:67
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was added successfully."
 msgstr "%(name)s \"%(obj)s\": adicionado com sucesso."
 
-#: contrib/admin/options.py:614 contrib/admin/options.py:647
+#: contrib/admin/options.py:600 contrib/admin/options.py:633
 #: contrib/auth/admin.py:75
 msgid "You may edit it again below."
 msgstr "Você pode editar novamente abaixo."
 
-#: contrib/admin/options.py:624 contrib/admin/options.py:657
+#: contrib/admin/options.py:610 contrib/admin/options.py:643
 #, python-format
 msgid "You may add another %s below."
 msgstr "Você pode adicionar outro %s abaixo."
 
-#: contrib/admin/options.py:645
+#: contrib/admin/options.py:631
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was changed successfully."
 msgstr "%(name)s \"%(obj)s\": modificado com sucesso."
 
-#: contrib/admin/options.py:653
+#: contrib/admin/options.py:639
 #, python-format
 msgid ""
 "The %(name)s \"%(obj)s\" was added successfully. You may edit it again below."
@@ -371,43 +371,43 @@
 "%(name)s \"%(obj)s\": adicionado com sucesso. Você pode editar novamente "
 "abaixo."
 
-#: contrib/admin/options.py:774
+#: contrib/admin/options.py:770
 #, python-format
 msgid "Add %s"
 msgstr "Adicionar %s"
 
-#: contrib/admin/options.py

Re: [Django] #9850: Outdated documentation - (date format strings)

2009-04-18 Thread Django
#9850: Outdated documentation - (date format strings)
-+--
  Reporter:  cezz| Owner:  timo 
 
Status:  assigned| Milestone:   
 
 Component:  Documentation   |   Version:  SVN  
 
Resolution:  |  Keywords:  now format 
strings
 Stage:  Design decision needed  | Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Changes (by mtredinnick):

  * milestone:  1.1 =>

Comment:

 This isn't 1.1 material. Karen's comment indicates why: it's not a public
 feature at the moment and needs a bunch of work to fix 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10824: GET infos is lost

2009-04-18 Thread Django
#10824: GET infos is lost
-+--
  Reporter:  roboter   | Owner:  nobody  
Status:  new | Milestone:  
 Component:  django.contrib.admin|   Version:  SVN 
Resolution:  |  Keywords:  GET info
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by mtredinnick):

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

Comment:

 This is a feature addition, not a bug fix to documented behaviour. We're
 not currently guaranteeing that query parameters are passed to the "add"
 option. Worth thinking about for a future release, though (scoping out the
 full problem for all admin resources is going to be necessary).

 Removing from the 1.1 milestone.

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



Re: [Django] #10847: `QuerySet.values` doesn't remove extra selections.

2009-04-18 Thread Django
#10847: `QuerySet.values` doesn't remove extra selections.
---+
  Reporter:  mrmachine | Owner:  nobody 
 
Status:  new   | Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  queryset 
extra select values sql
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  1 |  
---+
Comment (by Alex):

 Arg, this is correct, I think the right solution is to implement a mask
 similar to the way that aggregates are handled(stupid extra...).

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



Re: [Django] #10842: Django 1.0.2 generates AttributeError with PostgreSql 8.4beta1

2009-04-18 Thread Django
#10842: Django 1.0.2 generates AttributeError with PostgreSql 8.4beta1
---+
  Reporter:  hgdeoro   | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:  postgresql
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by mtredinnick):

  * needs_better_patch:  0 => 1

Comment:

 This patch needs improvement for a couple of reasons:

  1. It's identifying that a big part of the problem is two regular
 expressions doing the same thing. So we should use the same code paths
 both times.
  2. The comment before the regular expression in `version.py` shows that
 EnterpriseDB (sic) doesn't return a micro version number and that could be
 problematic where the code in `operations.py` is comparing to the third
 component in the `_postgres_version` attribute (that won't work for
 "Enterprise" even now, but since we're fixing this, let's fix it
 properly).

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



Re: [Django] #10847: `QuerySet.values` doesn't remove extra selections.

2009-04-18 Thread Django
#10847: `QuerySet.values` doesn't remove extra selections.
---+
  Reporter:  mrmachine | Owner:  nobody 
 
Status:  new   | Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  queryset 
extra select values sql
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  1 |  
---+
Comment (by mtredinnick):

 This second patch can't be correct, since calling `trim_extra_select()`
 isn't something to do when creating the queryset. A subsequent `values()`
 call could reuse those extra values, except they've now been trimmed away,
 which would break the queryset. As a general rule, don't throw away data
 from inside `Query` (in fact, `trim_extra_select()` is badly implemented
 for that reason; I haven't gotten around to doing it a different way and
 this has reminded me to get back to that in the 1.2 timeframe).

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



Re: [Django] #10870: Aggregates with joins ignore extra filters provided by setup_joins

2009-04-18 Thread Django
#10870: Aggregates with joins ignore extra filters provided by setup_joins
--+-
  Reporter:  fas  | Owner:  fas 

Status:  new  | Milestone:  

 Component:  ORM aggregation  |   Version:  SVN 

Resolution:   |  Keywords:  orm, aggregation, join, 
contenttypes, filter
 Stage:  Accepted | Has_patch:  0   

Needs_docs:  0|   Needs_tests:  0   

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

 1 and 2 are dealt with, still the strangle filtering issue, which I can't
 quite figure out, since a LEFT OUTER JOIN is being preformed(I've left the
 debugging statement in there).

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



Re: [Django] #10864: Helpful addition for use of @login_required.

2009-04-18 Thread Django
#10864: Helpful addition for use of @login_required.
+---
  Reporter:  trigeek38  | Owner:  nobody   
Status:  new| Milestone:   
 Component:  Documentation  |   Version:  1.0  
Resolution: |  Keywords:  next, login_decorator
 Stage:  Unreviewed | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by mtredinnick):

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

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



Re: [Django] #10870: Aggregates with joins ignore extra filters provided by setup_joins

2009-04-18 Thread Django
#10870: Aggregates with joins ignore extra filters provided by setup_joins
--+-
  Reporter:  fas  | Owner:  fas 

Status:  new  | Milestone:  

 Component:  ORM aggregation  |   Version:  SVN 

Resolution:   |  Keywords:  orm, aggregation, join, 
contenttypes, filter
 Stage:  Accepted | Has_patch:  0   

Needs_docs:  0|   Needs_tests:  0   

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

 This patch has a couple of problems, from looking at it quickly.

  1. There's a random comment on line 1436 that doesn't refer to any code.
 No code immediately follows it. It's also of the "set i to i+1" variety if
 it was intended to go before line 1448, so can be removed.
  2. The if-test on line 1448 can be removed. The `extra` parameter is
 always a list, possibly empty. So just iterate over it and if it's empty,
 nothing will be done.

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



Re: [Django] #10844: r10547 broke testing with Oracle

2009-04-18 Thread Django
#10844: r10547 broke testing with Oracle
---+
  Reporter:  jbronn| Owner:  ikelly 
Status:  closed| Milestone:  1.1
 Component:  Database layer (models, ORM)  |   Version:  SVN
Resolution:  duplicate |  Keywords:  oracle test
 Stage:  Unreviewed| Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 If it needs to be reverted, then revert it. I checked that patch in
 because it was fixing one very obvious bug and the other changes looked
 reasonable and probably necessary. By checking it in, it got tested and a
 problem was found, which was the whole point! So now can somebody who can
 test on Oracle please bring this to a close.

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



Re: [Django] #10773: 3 letters french translation of August use 4 chars

2009-04-18 Thread Django
#10773: 3 letters french translation of August use 4 chars
---+
  Reporter:  djoume| Owner:  nobody
Status:  reopened  | Milestone:  1.1   
 Component:  Translations  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 OK, thanks, I fixed the patch to not mess with the "Aug." translation.
 Based on where the string comes from, actually, I see it isn't a 3-letter
 abbreviation, really, it's just the Associated Press style name.
 Apparently AP abbreviates only months with more than 5 chars in their
 name, so March, April, May, June, and July don't get abbreviated, plus
 September gets a 4-letter abbr. instead of 3 like the rest that get
 abbreviated.

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



Re: [Django] #10773: 3 letters french translation of August use 4 chars

2009-04-18 Thread Django
#10773: 3 letters french translation of August use 4 chars
---+
  Reporter:  djoume| Owner:  nobody
Status:  reopened  | Milestone:  1.1   
 Component:  Translations  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by julien):

 Replying to [comment:7 kmtracey]:
 > Added a patch that restores the full "August" translation and uses
 3-char abbr. for both "aug" and "Aug.".  Not sure whether that last one is
 correct though since it wasn't part of the original request -- can anyone
 with better knowledge of French than me either confirm or explain why you
 wouldn't want to consistently abbreviate it?

 Karen, your patch is correct except for msgid "Aug." which shouldn't be
 changed (it should remain "août"). This is because August in French only
 has 4 letters and so it doesn't need to be abbreviated (since "Aug." also
 has 4 characters).

 However, I've noticed something strange. Why is April not abbreviated?
 There is no msgid "Apr."...

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



Re: [Django] #10870: Aggregates with joins ignore extra filters provided by setup_joins

2009-04-18 Thread Django
#10870: Aggregates with joins ignore extra filters provided by setup_joins
--+-
  Reporter:  fas  | Owner:  fas 

Status:  new  | Milestone:  

 Component:  ORM aggregation  |   Version:  SVN 

Resolution:   |  Keywords:  orm, aggregation, join, 
contenttypes, filter
 Stage:  Accepted | Has_patch:  0   

Needs_docs:  0|   Needs_tests:  0   

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

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * version:  1.0 => SVN
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I really doubt this is with 1.0 ;)

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



Re: [Django] #10461: Annotation and generic relations do not work well together

2009-04-18 Thread Django
#10461: Annotation and generic relations do not work well together
--+-
  Reporter:  mk   | Owner:   
Status:  new  | Milestone:   
 Component:  ORM aggregation  |   Version:  SVN  
Resolution:   |  Keywords:  generic relations
 Stage:  Accepted | Has_patch:  0
Needs_docs:  0|   Needs_tests:  0
Needs_better_patch:  0|  
--+-
Changes (by fas):

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

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



Re: [Django] #10461: Annotation and generic relations do not work well together

2009-04-18 Thread Django
#10461: Annotation and generic relations do not work well together
--+-
  Reporter:  mk   | Owner:   
Status:  new  | Milestone:   
 Component:  ORM aggregation  |   Version:  SVN  
Resolution:   |  Keywords:  generic relations
 Stage:  Accepted | Has_patch:  0
Needs_docs:  0|   Needs_tests:  0
Needs_better_patch:  0|  
--+-
Comment (by fas):

 I opened a new ticket (before seeing this one) that generalizes this
 ticket. [http://code.djangoproject.com/ticket/10870].

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



Re: [Django] #10672: Proxy Model does not send save signal

2009-04-18 Thread Django
#10672: Proxy Model does not send save signal
---+
  Reporter:  zbyte64   | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 That's not a bug, your signal never gets connected unless you instantiate
 the ChangeLitener.

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



[Django] #10870: Aggregates with joins ignore extra filters provided by setup_joins

2009-04-18 Thread Django
#10870: Aggregates with joins ignore extra filters provided by setup_joins
--+-
 Reporter:  fas   |   Owner:  fas   

   Status:  new   |   Milestone:

Component:  ORM aggregation   | Version:  1.0   

 Keywords:  orm, aggregation, join, contenttypes, filter  |   Stage:  
Unreviewed
Has_patch:  0 |  
--+-
 (In case the description that follows is not understandable, please ask me
 for a better explanation).

 An example where extra filters in joins are used are reverse generic
 relations ([http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes
 /#reverse-generic-relations]).

 {{{
 class TaggedItem(models.Model):

 content_type = models.ForeignKey(ContentType)
 object_id = models.PositiveIntegerField()
 content_object = generic.GenericForeignKey('content_type',
 'object_id')


 class Bookmark(models.Model):
 url = models.URLField()
 tags = generic.GenericRelation(TaggedItem)
 }}}

 By querying {{{ Bookmark.objects.filter(tags=some_tag) }}} the generic
 relation adds extra filters to ensure the correct content type. Those
 extra filters however are ignored when using aggregates, which leads to
 wrong results.

 For example, the following query is not correct because it does not check
 the content_type.
 {{{
 Bookmark.objects.aggregate(Count('tags'))
 }}}
 What this aggregate actually calculates per bookmark is not the amount of
 tags for this bookmark but the amount of tags for any model referenced by
 TaggedItem with the same object id.

 The error is isolated in db/models/sql/query.py in the add_aggregate
 method:

 {{{
 field, source, opts, join_list, last, _ = self.setup_joins(
 field_list, opts, self.get_initial_alias(), False)

 # Process the join chain to see if it can be trimmed
 col, _, join_list = self.trim_joins(source, join_list, last,
 False)
 }}}

 The last dummy element _ is normally named 'extra' in other uses of
 setup_joins and contains the extra filters needed to make it work. Adding
 {{{ self.add_filter(*extra) }}} after setup_joins fixes this problem.

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



Re: [Django] #10672: Proxy Model does not send save signal

2009-04-18 Thread Django
#10672: Proxy Model does not send save signal
---+
  Reporter:  zbyte64   | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by Valera_Grishin):

 I have a similar problem though with simpler code (w/o proxy):

 {{{
 #!python
 from django.db import models
 from django.db.models.signals import post_save

 class MyModel(models.Model):
 pass

 class ChangeLinstener:
 def __init__(self):
 def listener(sender, **kwargs):
 print "MyModel changed"
 post_save.connect(listener, sender=MyModel)
 }}}

 The listener never called. And patch doesn't help.
 Is it the same problem OR should I open another ticket?

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



[Django] #10869: ./manage.py makemessages should let users specify input directories

2009-04-18 Thread Django
#10869: ./manage.py makemessages should let users specify input directories
--+-
 Reporter:  filipnoetzel  |   Owner:  jezdez
   Status:  new   |   Milestone:
Component:  Internationalization  | Version:  1.0   
 Keywords:  makemessages i18n |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 When building an multilingual webapp using django reusable apps, one needs
 to translate them as well (and include the translation strings in the .po
 file) ..

 Unfortunately ./manage.py makemessages only searches the current directory
 for translatable strings. Suppose, your directory setup is like

 {{{
 bin/
 bin/activate
 lib/
 lib/python2.6/
 lib/python2.6/site-packages/
 lib/python2.6/site-packages/contact_form/
 lib/python2.6/site-packages/registration/
 source/
 source/manage.py
 source/settings.py
 source/locale/
 }}}

 There is no way including the needed translations for django-contact-form
 and django-registration in your .po-files using ./manage.py makemessages

 The attached patch takes care of that by adding a "-D" flag (modeled after
 xgettext's -D flag - http://linux.die.net/man/1/xgettext ) that takes the
 input directories as parameters. If none is specified the default
 behaviour (searching in the current directory) is unchanged.

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



Re: [Django] #10865: Unable to pickle Queryset

2009-04-18 Thread Django
#10865: Unable to pickle Queryset
-+--
  Reporter:  wfa...@digipen.edu  | Owner:  nobody
Status:  closed  | Milestone:  1.1   
 Component:  Uncategorized   |   Version:  SVN   
Resolution:  worksforme  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

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

Comment:

 Using the models.py you provided these tests pass fine for me:
 {{{
 __test__ = {"doctest": """
 >>> from pickle import dumps, loads
 >>> from django_test.test_apps.pickle.models import Place
 >>> from django.contrib.auth.models import User
 >>> from django.core.cache import cache

 >>> list(loads(dumps(Place.objects.all( == list(Place.objects.all())
 True
 >>> user = User.objects.create(username="test_user")
 >>> place = Place.objects.create(name="Test Place", address="Test
 Address",
 ... city="Wichita", state="KS", creator=user)
 >>> list(loads(dumps(Place.objects.all( == list(Place.objects.all())
 True
 >>> places = Place.objects.all()
 >>> cache.set("places", dumps(places))
 >>> c = cache.get("places")
 >>> list(loads(c)) == list(places)
 True
 """}
 }}}

 Since pickling is tested quite heavily in the Django regression tests, and
 I'm unable to reproduce I'm going to close this as worksforme.  I suggest
 you consult either #django or the django-users mailing list for support
 debugging your issue.

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



Re: [Django] #10865: Unable to pickle Queryset

2009-04-18 Thread Django
#10865: Unable to pickle Queryset
-+--
  Reporter:  wfa...@digipen.edu  | Owner:  nobody
Status:  new | Milestone:  1.1   
 Component:  Uncategorized   |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by wfa...@digipen.edu):

 I have attached a test project that has the problem. Here is the code that
 causes the problem.

 {{{
 from pickle_test.main.models import Place
 from django.contrib.auth.models import User
 from django.core.cache import cache
 import pickler

 user = User.objects.create(username="test_user")
 place = Place.objects.create(name="Test Place", address="Test Address",
 city="Wichita", state="KS", creator=user)

 places = Place.objects.all()
 cache.set("places", pickle.dumps(places))
 c = cache.get("places")
 q = pickle.loads(c)
 Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/lib/python2.6/pickle.py", line 1374, in loads
 return Unpickler(file).load()
   File "/usr/lib/python2.6/pickle.py", line 858, in load
 dispatch[key](self)
   File "/usr/lib/python2.6/pickle.py", line 1090, in load_global
 klass = self.find_class(module, name)
   File "/usr/lib/python2.6/pickle.py", line 1124, in find_class
 __import__(module)
 TypeError: __import__() argument 1 must be string without null bytes, not
 str
 }}}

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



Re: [Django] #10367: Improve docs for `GenericRelation` in `contenttypes`.

2009-04-18 Thread Django
#10367: Improve docs for `GenericRelation` in `contenttypes`.
+---
  Reporter:  mrmachine  | Owner:  kkubasik  

Status:  reopened   | Milestone:  1.1   

 Component:  Documentation  |   Version:  SVN   

Resolution: |  Keywords:  GenericRelation 
GenericForeignKey comments kkmegapatch
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

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

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

Comment:

 I think the fix in [10273] actually contained incorrect info about how to
 use ``!GenericRelation`` in case of non-default field names.

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



[Django] #10868: _destroy_test_db exposes the production database to possibly destructive actions from the unit tests

2009-04-18 Thread Django
#10868: _destroy_test_db exposes the production database to possibly destructive
actions from the unit tests
---+
 Reporter:  ovidiu |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Testing framework  | Version:  1.1-beta-1
 Keywords:  django.test|   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Latest SVN trunk, file django.db.backends.creation.py

 {{{
 414cursor = self.connection.cursor()
 415self.set_autocommit()
 416time.sleep(1) # To avoid "database is being accessed by other
 users" errors.
 417cursor.execute("DROP DATABASE %s" %
 self.connection.ops.quote_name(test_database_name))
 418self.connection.close()
 }}}

 At line 414 django is connected to the production database (the rationale
 for this is explained in the comment above this code fragment). The
 connection is closed one second later. If the unit tests involve threads
 which for some reason become active before the connection is closed then
 those threads can potentially mess up the production database.

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



Re: [Django] #9751: project_directory calculated incorrectly when "settings" is a directory (breaks 'startapp')

2009-04-18 Thread Django
#9751: project_directory calculated incorrectly when "settings" is a directory
(breaks 'startapp')
--+-
  Reporter:  lamby| Owner:  nobody  
Status:  new  | Milestone:  1.1 
 Component:  django-admin.py  |   Version:  1.0 
Resolution:   |  Keywords:  startapp,settings,module
 Stage:  Accepted | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Comment (by alexr):

 Looks like the conditional the patch added (if settings_name ==
 "__init__") is being excecuted during the tests, even though I don't think
 they are using a settings directory. Not exactly sure why that is.

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-18 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  cbess  
   
Status:  new   | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by cbess):

  * owner:  nobody => cbess

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



Re: [Django] #9751: project_directory calculated incorrectly when "settings" is a directory (breaks 'startapp')

2009-04-18 Thread Django
#9751: project_directory calculated incorrectly when "settings" is a directory
(breaks 'startapp')
--+-
  Reporter:  lamby| Owner:  nobody  
Status:  new  | Milestone:  1.1 
 Component:  django-admin.py  |   Version:  1.0 
Resolution:   |  Keywords:  startapp,settings,module
 Stage:  Accepted | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Comment (by alexr):

 06-fix-project_name-location-when-settings-is-a-module.patch does fix the
 bug. It also breaks 37 of the admin_scripts regression tests. Somehow it
 causes the spawned admin commands to die with a "TypeError: relative
 imports require the 'package' argument" traceback.

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



[Changeset] r10592 - django/branches/releases/1.0.X/django/contrib/auth

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 16:06:19 -0500 (Sat, 18 Apr 2009)
New Revision: 10592

Modified:
   django/branches/releases/1.0.X/django/contrib/auth/admin.py
Log:
[1.0.X] Fixed #10694: correctly check permissions in the change password admin. 
Thanks, jturnbull. Backport of r10591 from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/auth/admin.py
===
--- django/branches/releases/1.0.X/django/contrib/auth/admin.py 2009-04-18 
21:04:40 UTC (rev 10591)
+++ django/branches/releases/1.0.X/django/contrib/auth/admin.py 2009-04-18 
21:06:19 UTC (rev 10592)
@@ -90,7 +90,7 @@
 }, context_instance=template.RequestContext(request))
 
 def user_change_password(self, request, id):
-if not request.user.has_perm('auth.change_user'):
+if not self.has_change_permission(request):
 raise PermissionDenied
 user = get_object_or_404(self.model, pk=id)
 if request.method == 'POST':


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



[Changeset] r10591 - django/trunk/django/contrib/auth

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 16:04:40 -0500 (Sat, 18 Apr 2009)
New Revision: 10591

Modified:
   django/trunk/django/contrib/auth/admin.py
Log:
Fixed #10694: correctly check permissions in the change password admin. Thanks, 
jturnbull.

Modified: django/trunk/django/contrib/auth/admin.py
===
--- django/trunk/django/contrib/auth/admin.py   2009-04-18 21:03:29 UTC (rev 
10590)
+++ django/trunk/django/contrib/auth/admin.py   2009-04-18 21:04:40 UTC (rev 
10591)
@@ -96,7 +96,7 @@
 }, context_instance=template.RequestContext(request))
 
 def user_change_password(self, request, id):
-if not request.user.has_perm('auth.change_user'):
+if not self.has_change_permission(request):
 raise PermissionDenied
 user = get_object_or_404(self.model, pk=id)
 if request.method == 'POST':


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



[Changeset] r10590 - in django/trunk: django/forms tests/modeltests/model_formsets tests/regressiontests/admin_views

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 16:03:29 -0500 (Sat, 18 Apr 2009)
New Revision: 10590

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/modeltests/model_formsets/models.py
   django/trunk/tests/regressiontests/admin_views/models.py
   django/trunk/tests/regressiontests/admin_views/tests.py
Log:
Fixed #10799: fixed the use of list_editable with model inheritance and custom 
one-to-one parent links. Thanks, Alex Gaynor.

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2009-04-18 20:34:42 UTC (rev 10589)
+++ django/trunk/django/forms/models.py 2009-04-18 21:03:29 UTC (rev 10590)
@@ -470,7 +470,10 @@
 # data back. Generally, pk.editable should be false, but for some
 # reason, auto_created pk fields and AutoField's editable attribute is
 # True, so check for that as well.
-if (not pk.editable) or (pk.auto_created or isinstance(pk, AutoField)):
+def pk_is_editable(pk):
+return ((not pk.editable) or (pk.auto_created or isinstance(pk, 
AutoField))
+or (pk.rel and pk.rel.parent_link and 
pk_is_editable(pk.rel.to._meta.pk)))
+if pk_is_editable(pk):
 try:
 pk_value = self.get_queryset()[index].pk
 except IndexError:

Modified: django/trunk/tests/modeltests/model_formsets/models.py
===
--- django/trunk/tests/modeltests/model_formsets/models.py  2009-04-18 
20:34:42 UTC (rev 10589)
+++ django/trunk/tests/modeltests/model_formsets/models.py  2009-04-18 
21:03:29 UTC (rev 10590)
@@ -108,6 +108,10 @@
 class MexicanRestaurant(Restaurant):
 serves_tacos = models.BooleanField()
 
+class ClassyMexicanRestaurant(MexicanRestaurant):
+restaurant = models.OneToOneField(MexicanRestaurant, parent_link=True, 
primary_key=True)
+tacos_are_yummy = models.BooleanField()
+
 # models for testing unique_together validation when a fk is involved and
 # using inlineformset_factory.
 class Repository(models.Model):
@@ -934,4 +938,9 @@
 >>> formset.get_queryset()
 []
 
+# a formset for a Model that has a custom primary key that still needs to be
+# added to the formset automatically
+>>> FormSet = modelformset_factory(ClassyMexicanRestaurant, 
fields=["tacos_are_yummy"])
+>>> sorted(FormSet().forms[0].fields.keys())
+['restaurant', 'tacos_are_yummy']
 """}

Modified: django/trunk/tests/regressiontests/admin_views/models.py
===
--- django/trunk/tests/regressiontests/admin_views/models.py2009-04-18 
20:34:42 UTC (rev 10589)
+++ django/trunk/tests/regressiontests/admin_views/models.py2009-04-18 
21:03:29 UTC (rev 10590)
@@ -269,6 +269,16 @@
 
 ordering = ('name',)
 
+class Vodcast(Media):
+media = models.OneToOneField(Media, primary_key=True, parent_link=True)
+released = models.BooleanField(default=False)
+
+class VodcastAdmin(admin.ModelAdmin):
+list_display = ('name', 'released')
+list_editable = ('released',)
+
+ordering = ('name',)
+
 class Parent(models.Model):
 name = models.CharField(max_length=128)
 
@@ -327,6 +337,7 @@
 admin.site.register(ExternalSubscriber, ExternalSubscriberAdmin)
 admin.site.register(OldSubscriber, OldSubscriberAdmin)
 admin.site.register(Podcast, PodcastAdmin)
+admin.site.register(Vodcast, VodcastAdmin)
 admin.site.register(Parent, ParentAdmin)
 admin.site.register(EmptyModel, EmptyModelAdmin)
 admin.site.register(Fabric, FabricAdmin)

Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===
--- django/trunk/tests/regressiontests/admin_views/tests.py 2009-04-18 
20:34:42 UTC (rev 10589)
+++ django/trunk/tests/regressiontests/admin_views/tests.py 2009-04-18 
21:03:29 UTC (rev 10590)
@@ -2,8 +2,6 @@
 
 import re
 import datetime
-import os
-
 from django.core.files import temp as tempfile
 from django.test import TestCase
 from django.contrib.auth.models import User, Permission
@@ -18,7 +16,7 @@
 from models import (Article, BarAccount, CustomArticle, EmptyModel,
 ExternalSubscriber, FooAccount, Gallery,
 ModelWithStringPrimaryKey, Person, Persona, Picture,
-Podcast, Section, Subscriber)
+Podcast, Section, Subscriber, Vodcast)
 
 try:
 set
@@ -801,6 +799,11 @@
 response = self.client.get('/test_admin/admin/admin_views/podcast/')
 self.failUnlessEqual(response.status_code, 200)
 
+def test_inheritance_2(self):
+Vodcast.objects.create(name="This Week in Django", released=True)
+response = self.client.get('/test_admin/admin/admin_views/vodcast/')
+self.failUnlessEqual(response.status_code, 200)
+
 def test_changelist_input_html(self):
 response = self.client.get('/test_admin/ad

Re: [Django] #10223: Admin has a bug for primary keys that contain slashes

2009-04-18 Thread Django
#10223: Admin has a bug for primary keys that contain slashes
---+
  Reporter:  HuCy  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mmarshall):

 * cc: matt...@matthewmarshall.org (added)

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



Re: [Django] #10223: Admin has a bug for primary keys that contain slashes

2009-04-18 Thread Django
#10223: Admin has a bug for primary keys that contain slashes
---+
  Reporter:  HuCy  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mmarshall):

  * needs_tests:  1 => 0

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



Re: [Django] #10223: Admin has a bug for primary keys that contain slashes

2009-04-18 Thread Django
#10223: Admin has a bug for primary keys that contain slashes
---+
  Reporter:  HuCy  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Comment (by mmarshall):

 The problem only applies to the AdminSite.root, which is deprecated.  The
 new method using include(admin.site.urls) uses an re with .+

 I've submitted a test, but it tests against the new method.

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



Re: [Django] #5705: Admin login window CSS bug when using application/xhtml+xml

2009-04-18 Thread Django
#5705: Admin login window CSS bug when using application/xhtml+xml
---+
  Reporter:  Rob van der Linde   | Owner:  
nobody
Status:  closed| Milestone: 
   
 Component:  django.contrib.admin  |   Version:  
SVN   
Resolution:  wontfix   |  Keywords: 
   
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by jacob):

 (And yes I'm aware that the admin uses an XHTML doctype. Pay no mind. That
 could be changed at some point, but there's precious little point
 pragmatically.)

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



Re: [Django] #5705: Admin login window CSS bug when using application/xhtml+xml

2009-04-18 Thread Django
#5705: Admin login window CSS bug when using application/xhtml+xml
---+
  Reporter:  Rob van der Linde   | Owner:  
nobody
Status:  closed| Milestone: 
   
 Component:  django.contrib.admin  |   Version:  
SVN   
Resolution:  wontfix   |  Keywords: 
   
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

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

Comment:

 The admin is HTML, not XHTML; that's just the color we chose to paint this
 particular bikeshed. Either don't serve the admin as XHTML, or else deal
 with the consequences.

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



[Changeset] r10589 - in django/branches/releases/1.0.X: django/forms tests/regressiontests/admin_views

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 15:34:42 -0500 (Sat, 18 Apr 2009)
New Revision: 10589

Modified:
   django/branches/releases/1.0.X/django/forms/forms.py
   django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py
   django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py
Log:
[1.0.X] Fixed #10002: inline file uploads now correctly display prior data. 
Thanks, dgouldin. Backport of r10588 from trunk.

Modified: django/branches/releases/1.0.X/django/forms/forms.py
===
--- django/branches/releases/1.0.X/django/forms/forms.py2009-04-18 
20:29:55 UTC (rev 10588)
+++ django/branches/releases/1.0.X/django/forms/forms.py2009-04-18 
20:34:42 UTC (rev 10589)
@@ -366,7 +366,10 @@
 if callable(data):
 data = data()
 else:
-data = self.data
+if isinstance(self.field, FileField) and self.data is None:
+data = self.form.initial.get(self.name, self.field.initial)
+else:
+data = self.data
 if not only_initial:
 name = self.html_name
 else:

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py  
2009-04-18 20:29:55 UTC (rev 10588)
+++ django/branches/releases/1.0.X/tests/regressiontests/admin_views/models.py  
2009-04-18 20:34:42 UTC (rev 10589)
@@ -1,4 +1,7 @@
 # -*- coding: utf-8 -*-
+import tempfile
+import os
+from django.core.files.storage import FileSystemStorage
 from django.db import models
 from django.contrib import admin
 
@@ -214,6 +217,27 @@
 def queryset(self, request):
 return super(EmptyModelAdmin, self).queryset(request).filter(pk__gt=1)
 
+temp_storage = FileSystemStorage(tempfile.mkdtemp())
+UPLOAD_TO = os.path.join(temp_storage.location, 'test_upload')
+
+class Gallery(models.Model):
+name = models.CharField(max_length=100)
+
+class Picture(models.Model):
+name = models.CharField(max_length=100)
+image = models.FileField(storage=temp_storage, upload_to='test_upload')
+gallery = models.ForeignKey(Gallery, related_name="pictures")
+
+class PictureInline(admin.TabularInline):
+model = Picture
+extra = 1
+
+class GalleryAdmin(admin.ModelAdmin):
+inlines = [PictureInline]
+
+class PictureAdmin(admin.ModelAdmin):
+pass
+
 admin.site.register(Article, ArticleAdmin)
 admin.site.register(CustomArticle, CustomArticleAdmin)
 admin.site.register(Section, inlines=[ArticleInline])
@@ -224,6 +248,8 @@
 admin.site.register(Parent, ParentAdmin)
 admin.site.register(EmptyModel, EmptyModelAdmin)
 admin.site.register(Fabric, FabricAdmin)
+admin.site.register(Gallery, GalleryAdmin)
+admin.site.register(Picture, PictureAdmin)
 
 # We intentionally register Promo and ChapterXtra1 but not Chapter nor 
ChapterXtra2.
 # That way we cover all four cases:

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py   
2009-04-18 20:29:55 UTC (rev 10588)
+++ django/branches/releases/1.0.X/tests/regressiontests/admin_views/tests.py   
2009-04-18 20:34:42 UTC (rev 10589)
@@ -2,6 +2,7 @@
 
 import re
 
+from django.core.files import temp as tempfile
 from django.test import TestCase
 from django.contrib.auth.models import User, Permission
 from django.contrib.contenttypes.models import ContentType
@@ -11,7 +12,9 @@
 from django.utils.html import escape
 
 # local test models
-from models import Article, CustomArticle, Section, ModelWithStringPrimaryKey, 
Persona, FooAccount, BarAccount, EmptyModel
+from models import (Article, BarAccount, CustomArticle, EmptyModel,
+FooAccount, Gallery, ModelWithStringPrimaryKey,
+Persona, Picture, Section)
 
 try:
 set
@@ -868,7 +871,6 @@
 response = self.client.get('/test_admin/admin/admin_views/parent/add/')
 self.failUnlessEqual(response.status_code, 200)
 
-
 class AdminCustomQuerysetTest(TestCase):
 fixtures = ['admin-views-users.xml']
 
@@ -891,3 +893,47 @@
 self.assertEqual(response.status_code, 200)
 else:
 self.assertEqual(response.status_code, 404)
+
+class AdminInlineFileUploadTest(TestCase):
+fixtures = ['admin-views-users.xml', 'admin-views-actions.xml']
+urlbit = 'admin'
+
+def setUp(self):
+self.client.login(username='super', password='secret')
+
+# Set up test Picture and Gallery.
+# These must be set up here instead of in fixtures in order to allow 
Picture
+# to use a NamedTemporaryFile.
+tdir = tempfile.gettempdir()
+file1 = tempfile.NamedTemporaryFile(suffix=".file1", dir=tdir)

[Changeset] r10588 - in django/trunk: django/forms tests/regressiontests/admin_views

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 15:29:55 -0500 (Sat, 18 Apr 2009)
New Revision: 10588

Modified:
   django/trunk/django/forms/forms.py
   django/trunk/tests/regressiontests/admin_views/models.py
   django/trunk/tests/regressiontests/admin_views/tests.py
Log:
Fixed #10002: inline file uploads now correctly display prior data. Thanks, 
dgouldin.

Modified: django/trunk/django/forms/forms.py
===
--- django/trunk/django/forms/forms.py  2009-04-18 20:17:17 UTC (rev 10587)
+++ django/trunk/django/forms/forms.py  2009-04-18 20:29:55 UTC (rev 10588)
@@ -380,7 +380,10 @@
 if callable(data):
 data = data()
 else:
-data = self.data
+if isinstance(self.field, FileField) and self.data is None:
+data = self.form.initial.get(self.name, self.field.initial)
+else:
+data = self.data
 if not only_initial:
 name = self.html_name
 else:

Modified: django/trunk/tests/regressiontests/admin_views/models.py
===
--- django/trunk/tests/regressiontests/admin_views/models.py2009-04-18 
20:17:17 UTC (rev 10587)
+++ django/trunk/tests/regressiontests/admin_views/models.py2009-04-18 
20:29:55 UTC (rev 10588)
@@ -1,4 +1,7 @@
 # -*- coding: utf-8 -*-
+import tempfile
+import os
+from django.core.files.storage import FileSystemStorage
 from django.db import models
 from django.contrib import admin
 from django.core.mail import EmailMessage
@@ -291,6 +294,27 @@
 class OldSubscriberAdmin(admin.ModelAdmin):
 actions = None
 
+temp_storage = FileSystemStorage(tempfile.mkdtemp())
+UPLOAD_TO = os.path.join(temp_storage.location, 'test_upload')
+
+class Gallery(models.Model):
+name = models.CharField(max_length=100)
+
+class Picture(models.Model):
+name = models.CharField(max_length=100)
+image = models.FileField(storage=temp_storage, upload_to='test_upload')
+gallery = models.ForeignKey(Gallery, related_name="pictures")
+
+class PictureInline(admin.TabularInline):
+model = Picture
+extra = 1
+
+class GalleryAdmin(admin.ModelAdmin):
+inlines = [PictureInline]
+
+class PictureAdmin(admin.ModelAdmin):
+pass
+
 admin.site.register(Article, ArticleAdmin)
 admin.site.register(CustomArticle, CustomArticleAdmin)
 admin.site.register(Section, save_as=True, inlines=[ArticleInline])
@@ -306,6 +330,8 @@
 admin.site.register(Parent, ParentAdmin)
 admin.site.register(EmptyModel, EmptyModelAdmin)
 admin.site.register(Fabric, FabricAdmin)
+admin.site.register(Gallery, GalleryAdmin)
+admin.site.register(Picture, PictureAdmin)
 
 # We intentionally register Promo and ChapterXtra1 but not Chapter nor 
ChapterXtra2.
 # That way we cover all four cases:

Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===
--- django/trunk/tests/regressiontests/admin_views/tests.py 2009-04-18 
20:17:17 UTC (rev 10587)
+++ django/trunk/tests/regressiontests/admin_views/tests.py 2009-04-18 
20:29:55 UTC (rev 10588)
@@ -2,7 +2,9 @@
 
 import re
 import datetime
+import os
 
+from django.core.files import temp as tempfile
 from django.test import TestCase
 from django.contrib.auth.models import User, Permission
 from django.contrib.contenttypes.models import ContentType
@@ -13,7 +15,10 @@
 from django.utils.html import escape
 
 # local test models
-from models import Article, CustomArticle, Section, ModelWithStringPrimaryKey, 
Person, Persona, FooAccount, BarAccount, Subscriber, ExternalSubscriber, 
Podcast, EmptyModel
+from models import (Article, BarAccount, CustomArticle, EmptyModel,
+ExternalSubscriber, FooAccount, Gallery,
+ModelWithStringPrimaryKey, Person, Persona, Picture,
+Podcast, Section, Subscriber)
 
 try:
 set
@@ -1039,7 +1044,6 @@
 response = self.client.get('/test_admin/admin/admin_views/parent/add/')
 self.failUnlessEqual(response.status_code, 200)
 
-
 class AdminCustomQuerysetTest(TestCase):
 fixtures = ['admin-views-users.xml']
 
@@ -1062,3 +1066,47 @@
 self.assertEqual(response.status_code, 200)
 else:
 self.assertEqual(response.status_code, 404)
+
+class AdminInlineFileUploadTest(TestCase):
+fixtures = ['admin-views-users.xml', 'admin-views-actions.xml']
+urlbit = 'admin'
+
+def setUp(self):
+self.client.login(username='super', password='secret')
+
+# Set up test Picture and Gallery.
+# These must be set up here instead of in fixtures in order to allow 
Picture
+# to use a NamedTemporaryFile.
+tdir = tempfile.gettempdir()
+file1 = tempfile.NamedTemporaryFile(suffix=".file1", dir=tdir)
+file1.write('a' * (2 ** 21))
+filename = file1.name
+file1.close()
+g =

[Changeset] r10587 - in django/branches/releases/1.0.X: . django/contrib/contenttypes tests/regressiontests/generic_inline_admin

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 15:17:17 -0500 (Sat, 18 Apr 2009)
New Revision: 10587

Modified:
   django/branches/releases/1.0.X/AUTHORS
   django/branches/releases/1.0.X/django/contrib/contenttypes/generic.py
   
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/models.py
   
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/tests.py
Log:
[1.0.X] Fixed #9122: generic inline formsets now respect exclude and max_num. 
Thanks, Alex Robbins. Backport of [10586] from trunk.

Modified: django/branches/releases/1.0.X/AUTHORS
===
--- django/branches/releases/1.0.X/AUTHORS  2009-04-18 20:12:53 UTC (rev 
10586)
+++ django/branches/releases/1.0.X/AUTHORS  2009-04-18 20:17:17 UTC (rev 
10587)
@@ -344,6 +344,7 @@
 ricardojbarr...@gmail.com
 Mike Richardson
 Matt Riggott
+Alex Robbins 
 Henrique Romano 
 Armin Ronacher
 Daniel Roseman 

Modified: django/branches/releases/1.0.X/django/contrib/contenttypes/generic.py
===
--- django/branches/releases/1.0.X/django/contrib/contenttypes/generic.py   
2009-04-18 20:12:53 UTC (rev 10586)
+++ django/branches/releases/1.0.X/django/contrib/contenttypes/generic.py   
2009-04-18 20:17:17 UTC (rev 10587)
@@ -389,6 +389,8 @@
 "can_delete": True,
 "can_order": False,
 "fields": fields,
+"max_num": self.max_num,
+"exclude": self.exclude
 }
 return generic_inlineformset_factory(self.model, **defaults)
 

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/models.py
===
--- 
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/models.py
 2009-04-18 20:12:53 UTC (rev 10586)
+++ 
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/models.py
 2009-04-18 20:17:17 UTC (rev 10587)
@@ -20,11 +20,55 @@
 
 class MediaInline(generic.GenericTabularInline):
 model = Media
-extra = 1
 
 class EpisodeAdmin(admin.ModelAdmin):
 inlines = [
 MediaInline,
 ]
+admin.site.register(Episode, EpisodeAdmin)
 
-admin.site.register(Episode, EpisodeAdmin)
+#
+# These models let us test the different GenericInline settings at
+# different urls in the admin site.
+#
+
+#
+# Generic inline with extra = 0
+#
+
+class EpisodeExtra(Episode):
+pass
+
+class MediaExtraInline(generic.GenericTabularInline):
+model = Media
+extra = 0
+
+admin.site.register(EpisodeExtra, inlines=[MediaExtraInline])
+
+#
+# Generic inline with extra and max_num
+#
+
+class EpisodeMaxNum(Episode):
+pass
+
+class MediaMaxNumInline(generic.GenericTabularInline):
+model = Media
+extra = 5
+max_num = 2
+
+admin.site.register(EpisodeMaxNum, inlines=[MediaMaxNumInline])
+
+#
+# Generic inline with exclude
+#
+
+class EpisodeExclude(Episode):
+pass
+
+class MediaExcludeInline(generic.GenericTabularInline):
+model = Media
+exclude = ['url']
+
+admin.site.register(EpisodeExclude, inlines=[MediaExcludeInline])
+

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/tests.py
===
--- 
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/tests.py
  2009-04-18 20:12:53 UTC (rev 10586)
+++ 
django/branches/releases/1.0.X/tests/regressiontests/generic_inline_admin/tests.py
  2009-04-18 20:17:17 UTC (rev 10587)
@@ -5,7 +5,7 @@
 from django.contrib.contenttypes.generic import generic_inlineformset_factory
 
 # local test models
-from models import Episode, Media
+from models import Episode, EpisodeExtra, EpisodeMaxNum, EpisodeExclude, Media
 
 class GenericAdminViewTest(TestCase):
 fixtures = ['users.xml']
@@ -77,3 +77,62 @@
 # Regression test for #10522.
 inline_formset = generic_inlineformset_factory(Media,
 exclude=('url',))
+
+class GenericInlineAdminParametersTest(TestCase):
+fixtures = ['users.xml']
+
+def setUp(self):
+self.client.login(username='super', password='secret')
+
+# Can't load content via a fixture (since the GenericForeignKey
+# relies on content type IDs, which will vary depending on what
+# other tests have been run), thus we do it here.
+test_classes = [
+Episode,
+EpisodeExtra,
+EpisodeMaxNum,
+EpisodeExclude,
+]
+for klass in test_classes:
+e = klass.objects.create(name='This Week in Django')
+m = Media(content_object=e, url='http://example.com/podcast.mp3')
+m.save()
+
+def tearDown(self):
+self.client.logout()
+
+def testNoParam(self):
+"""
+With one initial form, extra (defaul

Re: [Django] #9122: Inline admin on generic relations ignores exclude and max_num

2009-04-18 Thread Django
#9122: Inline admin on generic relations ignores exclude and max_num
+---
  Reporter:  danielr| Owner:  nobody
  
Status:  closed | Milestone:  1.1   
  
 Component:  Contrib apps   |   Version:  1.0   
  
Resolution:  fixed  |  Keywords:  admin, generic 
relations
 Stage:  Ready for checkin  | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  0  |  
+---
Changes (by jacob):

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

Comment:

 Fixed in [10586].

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



[Changeset] r10586 - in django/trunk: . django/contrib/contenttypes tests/regressiontests/generic_inline_admin

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 15:12:53 -0500 (Sat, 18 Apr 2009)
New Revision: 10586

Modified:
   django/trunk/AUTHORS
   django/trunk/django/contrib/contenttypes/generic.py
   django/trunk/tests/regressiontests/generic_inline_admin/models.py
   django/trunk/tests/regressiontests/generic_inline_admin/tests.py
Log:
Fixed #9122: generic inline formsets now respect exclude and max_num. Thanks, 
Alex Robbins.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2009-04-18 17:36:45 UTC (rev 10585)
+++ django/trunk/AUTHORS2009-04-18 20:12:53 UTC (rev 10586)
@@ -357,6 +357,7 @@
 ricardojbarr...@gmail.com
 Mike Richardson
 Matt Riggott
+Alex Robbins 
 Henrique Romano 
 Armin Ronacher
 Daniel Roseman 

Modified: django/trunk/django/contrib/contenttypes/generic.py
===
--- django/trunk/django/contrib/contenttypes/generic.py 2009-04-18 17:36:45 UTC 
(rev 10585)
+++ django/trunk/django/contrib/contenttypes/generic.py 2009-04-18 20:12:53 UTC 
(rev 10586)
@@ -389,6 +389,8 @@
 "can_delete": True,
 "can_order": False,
 "fields": fields,
+"max_num": self.max_num,
+"exclude": self.exclude
 }
 return generic_inlineformset_factory(self.model, **defaults)
 

Modified: django/trunk/tests/regressiontests/generic_inline_admin/models.py
===
--- django/trunk/tests/regressiontests/generic_inline_admin/models.py   
2009-04-18 17:36:45 UTC (rev 10585)
+++ django/trunk/tests/regressiontests/generic_inline_admin/models.py   
2009-04-18 20:12:53 UTC (rev 10586)
@@ -20,11 +20,55 @@
 
 class MediaInline(generic.GenericTabularInline):
 model = Media
-extra = 1
 
 class EpisodeAdmin(admin.ModelAdmin):
 inlines = [
 MediaInline,
 ]
+admin.site.register(Episode, EpisodeAdmin)
 
-admin.site.register(Episode, EpisodeAdmin)
+#
+# These models let us test the different GenericInline settings at
+# different urls in the admin site.
+#
+
+#
+# Generic inline with extra = 0
+#
+
+class EpisodeExtra(Episode):
+pass
+
+class MediaExtraInline(generic.GenericTabularInline):
+model = Media
+extra = 0
+
+admin.site.register(EpisodeExtra, inlines=[MediaExtraInline])
+
+#
+# Generic inline with extra and max_num
+#
+
+class EpisodeMaxNum(Episode):
+pass
+
+class MediaMaxNumInline(generic.GenericTabularInline):
+model = Media
+extra = 5
+max_num = 2
+
+admin.site.register(EpisodeMaxNum, inlines=[MediaMaxNumInline])
+
+#
+# Generic inline with exclude
+#
+
+class EpisodeExclude(Episode):
+pass
+
+class MediaExcludeInline(generic.GenericTabularInline):
+model = Media
+exclude = ['url']
+
+admin.site.register(EpisodeExclude, inlines=[MediaExcludeInline])
+

Modified: django/trunk/tests/regressiontests/generic_inline_admin/tests.py
===
--- django/trunk/tests/regressiontests/generic_inline_admin/tests.py
2009-04-18 17:36:45 UTC (rev 10585)
+++ django/trunk/tests/regressiontests/generic_inline_admin/tests.py
2009-04-18 20:12:53 UTC (rev 10586)
@@ -5,7 +5,7 @@
 from django.contrib.contenttypes.generic import generic_inlineformset_factory
 
 # local test models
-from models import Episode, Media
+from models import Episode, EpisodeExtra, EpisodeMaxNum, EpisodeExclude, Media
 
 class GenericAdminViewTest(TestCase):
 fixtures = ['users.xml']
@@ -80,3 +80,62 @@
 # Regression test for #10522.
 inline_formset = generic_inlineformset_factory(Media,
 exclude=('url',))
+
+class GenericInlineAdminParametersTest(TestCase):
+fixtures = ['users.xml']
+
+def setUp(self):
+self.client.login(username='super', password='secret')
+
+# Can't load content via a fixture (since the GenericForeignKey
+# relies on content type IDs, which will vary depending on what
+# other tests have been run), thus we do it here.
+test_classes = [
+Episode,
+EpisodeExtra,
+EpisodeMaxNum,
+EpisodeExclude,
+]
+for klass in test_classes:
+e = klass.objects.create(name='This Week in Django')
+m = Media(content_object=e, url='http://example.com/podcast.mp3')
+m.save()
+
+def tearDown(self):
+self.client.logout()
+
+def testNoParam(self):
+"""
+With one initial form, extra (default) at 3, there should be 4 forms.
+"""
+response = 
self.client.get('/generic_inline_admin/admin/generic_inline_admin/episode/1/')
+formset = response.context['inline_admin_formsets'][0].formset
+self.assertEqual(formset.total_form_count(), 4)
+self.assertEqual(formset.initial_form_count(), 1)
+
+

Re: [Django] #9850: Outdated documentation - (date format strings)

2009-04-18 Thread Django
#9850: Outdated documentation - (date format strings)
-+--
  Reporter:  cezz| Owner:  timo 
 
Status:  assigned| Milestone:  1.1  
 
 Component:  Documentation   |   Version:  SVN  
 
Resolution:  |  Keywords:  now format 
strings
 Stage:  Design decision needed  | Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Changes (by ericholscher):

  * milestone:  => 1.1

Comment:

 Seems like this should be in 1.1 like #10825. Feel free to revert if not.

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



Re: [Django] #10153: 'gte' missing in get_db_prep_lookup lookup

2009-04-18 Thread Django
#10153: 'gte'  missing in  get_db_prep_lookup lookup
---+
  Reporter:  gatwanagu | Owner:  joelhooks  
  
Status:  new   | Milestone:  1.1
  
 Component:  Database layer (models, ORM)  |   Version:  1.0
  
Resolution:|  Keywords:  queryset 
field lookup
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by joelhooks):

  * has_patch:  0 => 1

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



Re: [Django] #10694: user_change_password in UserAdmin should lookup change permission

2009-04-18 Thread Django
#10694: user_change_password in UserAdmin should lookup change permission
---+
  Reporter:  jturnbull | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #2983: ImageField not deleing previously attached file when updated

2009-04-18 Thread Django
#2983: ImageField not deleing previously attached file when updated
---+
  Reporter:  Shimon| Owner:  tbecker   
Status:  closed| Milestone:  1.1   
 Component:  File uploads/storage  |   Version:  SVN   
Resolution:  wontfix   |  Keywords:  fs-rf-docs
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by kmtracey):

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

Comment:

 Restoring previous status.  Alexey, what lawrence.com chooses to do is up
 to it.  There may be some Django maintainers that have work for or have
 close ties to lawrence.com, but Django's tracker is not the right place
 for issues with an independent web site.  We couldn't check in some
 changes to Django code and have it automagically affect lawrence.com even
 if we wanted to.

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



Re: [Django] #10851: mysql CursorWrapper.execute has different prototype than CursorDebugWrapper

2009-04-18 Thread Django
#10851: mysql CursorWrapper.execute has different prototype than 
CursorDebugWrapper
---+
  Reporter:  wdoekes   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:  duplicate |  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by kmtracey):

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

Comment:

 #9055 is already open for this and covers all backends, not just MySQL.

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



Re: [Django] #9055: Percent sign in SQL statement behaves different with CursorDebugWrapper

2009-04-18 Thread Django
#9055: Percent sign in SQL statement behaves different with CursorDebugWrapper
---+
  Reporter:  guettli   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 Note: the patch provided for MySQL backend on #10851 also made the same
 change to executemany, so when this is looked at for check in it should be
 investigated whether executemany needs fixing as well.

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



Re: [Django] #10773: 3 letters french translation of August use 4 chars

2009-04-18 Thread Django
#10773: 3 letters french translation of August use 4 chars
---+
  Reporter:  djoume| Owner:  nobody
Status:  reopened  | Milestone:  1.1   
 Component:  Translations  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 Added a patch that restores the full "August" translation and uses 3-char
 abbr. for both "aug" and "Aug.".  Not sure whether that last one is
 correct though since it wasn't part of the original request -- can anyone
 with better knowledge of French than me either confirm or explain why you
 wouldn't want to consistently abbreviate it?

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



Re: [Django] #10844: r10547 broke testing with Oracle

2009-04-18 Thread Django
#10844: r10547 broke testing with Oracle
---+
  Reporter:  jbronn| Owner:  ikelly 
Status:  closed| Milestone:  1.1
 Component:  Database layer (models, ORM)  |   Version:  SVN
Resolution:  duplicate |  Keywords:  oracle test
 Stage:  Unreviewed| Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by kmtracey):

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

Comment:

 We've also got #10716 re-opened for this problem, which is where I put a
 patch as I hadn't seen this one yet.  Can anyone with more Oracle
 knowledge than me comment on the patch I added to #10716?  It does revert
 the database name change, but instead of reverting the
 `ettings`->`settings` typo fix it tries to fix the problem that that typo
 fix revealed.

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



Re: [Django] #10153: 'gte' missing in get_db_prep_lookup lookup

2009-04-18 Thread Django
#10153: 'gte'  missing in  get_db_prep_lookup lookup
---+
  Reporter:  gatwanagu | Owner:  joelhooks  
  
Status:  new   | Milestone:  1.1
  
 Component:  Database layer (models, ORM)  |   Version:  1.0
  
Resolution:|  Keywords:  queryset 
field lookup
 Stage:  Accepted  | Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by joelhooks):

  * owner:  => joelhooks

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



Re: [Django] #9743: Problem in admin when displaying foreignkey of a model that reference himself

2009-04-18 Thread Django
#9743: Problem in admin when displaying foreignkey of a model that reference
himself
---+
  Reporter:  daniels   | Owner:  jdunck
Status:  assigned  | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Changes (by jdunck):

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

Comment:

 daniels,
   It'd really help if you provided a full example of your models-- for
 example, related_name would be required.   As long as you're there, maybe
 supply tests-- regressiontests/model_inheritance_regress would be the
 right place for it.

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



Re: [Django] #10773: 3 letters french translation of August use 4 chars

2009-04-18 Thread Django
#10773: 3 letters french translation of August use 4 chars
---+
  Reporter:  djoume| Owner:  nobody
Status:  reopened  | Milestone:  1.1   
 Component:  Translations  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 This has not been fixed.

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



Re: [Django] #9122: Inline admin on generic relations ignores exclude and max_num

2009-04-18 Thread Django
#9122: Inline admin on generic relations ignores exclude and max_num
+---
  Reporter:  danielr| Owner:  nobody
  
Status:  new| Milestone:  1.1   
  
 Component:  Contrib apps   |   Version:  1.0   
  
Resolution: |  Keywords:  admin, generic 
relations
 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10773: 3 letters french translation of August use 4 chars

2009-04-18 Thread Django
#10773: 3 letters french translation of August use 4 chars
---+
  Reporter:  djoume| Owner:  nobody
Status:  closed| Milestone:  1.1   
 Component:  Translations  |   Version:  1.0   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Ahmed Zouari):

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

Comment:

 Please reverse change 10509
 and
 apply patch

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



Re: [Django] #10716: Syntax error and bug in db/backends/oracle/creation.py

2009-04-18 Thread Django
#10716: Syntax error and bug in db/backends/oracle/creation.py
---+
  Reporter:  canarix   | Owner:  nobody
Status:  reopened  | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:  oracle
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 Added a patch that makes it possible to run tests on Oracle again.

 First, the patch reverts the parts of the original fix that recorded
 TEST_DATABASE_NAME in settings.DATABASE_NAME.  I really don't have much a
 clue when it comes to Oracle, but it appears that this change caused a
 problem because Oracle test database creation doesn't actually create a
 database, it creates a tablespace within the DATABASE_NAME.  If you then
 overwrite DATABASE_NAME with the test database (tablespace for Oracle)
 name in settings, when running the tests an attempt is made to connect to
 the test tablespace as a database, but it's not a database, so the connect
 attempt for running the tests fails.

 It's all a bit unclear to me but it appears things are set up so that by
 use of the test tablespace and a test user that uses that tablespace by
 default, all of the test table creation, etc. is isolated from the
 production DB.  canarix, do you experience the test data actually
 interfering with the production DB?  Or did the code just look wrong?

 The fix to the `ettings` instead of `settings` typo also causes a problem
 as given the way the code is written `test_` is being prepended to the
 database user name both when it is created and when it is destroyed.  So
 given a database user of `system`, the code will create user `test_system`
 then attempt to destroy `test_test_system` at the end.  Recording the test
 user name as settings.TEST_USER_NAME avoids that problem so I opted for
 that instead of reverting what seems to be a clear typo in the original
 code.  But someone with more of a clue on Oracle should probably take a
 look at this.

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



Re: [Django] #9122: Inline admin on generic relations ignores exclude and max_num

2009-04-18 Thread Django
#9122: Inline admin on generic relations ignores exclude and max_num
---+
  Reporter:  danielr   | Owner:  nobody  
Status:  new   | Milestone:  1.1 
 Component:  Contrib apps  |   Version:  1.0 
Resolution:|  Keywords:  admin, generic relations
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * milestone:  => 1.1

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



Re: [Django] #9784: Django admin: prepopulated_fields does not update on javascript (calendar) change

2009-04-18 Thread Django
#9784: Django admin: prepopulated_fields does not update on javascript 
(calendar)
change
---+
  Reporter:  x00...@gmail.com  | Owner:  dgouldin
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  1 |  
---+
Changes (by dgouldin):

  * needs_better_patch:  0 => 1

Comment:

 Revising my approach ...

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



Re: [Django] #10716: Syntax error and bug in db/backends/oracle/creation.py

2009-04-18 Thread Django
#10716: Syntax error and bug in db/backends/oracle/creation.py
---+
  Reporter:  canarix   | Owner:  nobody
Status:  reopened  | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:  oracle
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 Why are we assigning to settings.DATABASE_* here, that *should* not be
 occuring.  I understand that settings.TEST_* is still handled globally,
 but that shouldn't be the case for DATABASE_*.

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



Re: [Django] #9784: Django admin: prepopulated_fields does not update on javascript (calendar) change

2009-04-18 Thread Django
#9784: Django admin: prepopulated_fields does not update on javascript 
(calendar)
change
---+
  Reporter:  x00...@gmail.com  | Owner:  dgouldin
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by dgouldin):

  * needs_better_patch:  1 => 0

Comment:

 Added prepopulate support for MultiWidgets and hooked events for date and
 time shortcuts.

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



[Changeset] r10585 - in django/branches/releases/1.0.X: django/forms/extras tests/regressiontests/forms

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 12:36:45 -0500 (Sat, 18 Apr 2009)
New Revision: 10585

Modified:
   django/branches/releases/1.0.X/django/forms/extras/widgets.py
   django/branches/releases/1.0.X/tests/regressiontests/forms/extra.py
Log:
[1.0.X] Fixed #9124: fixed `SelectDateWidget` with `required=False`. Thanks, 
Bernd Schlapsi. Backport of [10584] from trunk.

Modified: django/branches/releases/1.0.X/django/forms/extras/widgets.py
===
--- django/branches/releases/1.0.X/django/forms/extras/widgets.py   
2009-04-18 17:35:53 UTC (rev 10584)
+++ django/branches/releases/1.0.X/django/forms/extras/widgets.py   
2009-04-18 17:36:45 UTC (rev 10585)
@@ -20,13 +20,15 @@
 This also serves as an example of a Widget that has more than one HTML
 element and hence implements value_from_datadict.
 """
+none_value = (0, '---')
 month_field = '%s_month'
 day_field = '%s_day'
 year_field = '%s_year'
 
-def __init__(self, attrs=None, years=None):
+def __init__(self, attrs=None, years=None, required=True):
 # years is an optional list/tuple of years to use in the "year" select 
box.
 self.attrs = attrs or {}
+self.required = required
 if years:
 self.years = years
 else:
@@ -51,19 +53,28 @@
 id_ = 'id_%s' % name
 
 month_choices = MONTHS.items()
+if not (self.required and value):
+month_choices.append(self.none_value)
 month_choices.sort()
 local_attrs = self.build_attrs(id=self.month_field % id_)
-select_html = Select(choices=month_choices).render(self.month_field % 
name, month_val, local_attrs)
+s = Select(choices=month_choices)
+select_html = s.render(self.month_field % name, month_val, local_attrs)
 output.append(select_html)
 
 day_choices = [(i, i) for i in range(1, 32)]
+if not (self.required and value):
+day_choices.insert(0, self.none_value)
 local_attrs['id'] = self.day_field % id_
-select_html = Select(choices=day_choices).render(self.day_field % 
name, day_val, local_attrs)
+s = Select(choices=day_choices)
+select_html = s.render(self.day_field % name, day_val, local_attrs)
 output.append(select_html)
 
 year_choices = [(i, i) for i in self.years]
+if not (self.required and value):
+year_choices.insert(0, self.none_value)
 local_attrs['id'] = self.year_field % id_
-select_html = Select(choices=year_choices).render(self.year_field % 
name, year_val, local_attrs)
+s = Select(choices=year_choices)
+select_html = s.render(self.year_field % name, year_val, local_attrs)
 output.append(select_html)
 
 return mark_safe(u'\n'.join(output))
@@ -73,7 +84,11 @@
 id_for_label = classmethod(id_for_label)
 
 def value_from_datadict(self, data, files, name):
-y, m, d = data.get(self.year_field % name), data.get(self.month_field 
% name), data.get(self.day_field % name)
+y = data.get(self.year_field % name)
+m = data.get(self.month_field % name)
+d = data.get(self.day_field % name)
+if y == m == d == "0":
+return None
 if y and m and d:
 return '%s-%s-%s' % (y, m, d)
 return data.get(name, None)

Modified: django/branches/releases/1.0.X/tests/regressiontests/forms/extra.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/forms/extra.py 
2009-04-18 17:35:53 UTC (rev 10584)
+++ django/branches/releases/1.0.X/tests/regressiontests/forms/extra.py 
2009-04-18 17:36:45 UTC (rev 10585)
@@ -23,6 +23,7 @@
 >>> w = 
 >>> SelectDateWidget(years=('2007','2008','2009','2010','2011','2012','2013','2014','2015','2016'))
 >>> print w.render('mydate', '')
 
+---
 January
 February
 March
@@ -37,6 +38,7 @@
 December
 
 
+---
 1
 2
 3
@@ -70,6 +72,7 @@
 31
 
 
+---
 2007
 2008
 2009
@@ -213,6 +216,133 @@
 
 Using a SelectDateWidget in a form:
 
+>>> w = 
SelectDateWidget(years=('2007','2008','2009','2010','2011','2012','2013','2014','2015','2016'),
 required=False)
+>>> print w.render('mydate', '')
+
+---
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+
+
+---
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+
+---
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+
+>>> print w.render('mydate', '2010-04-15')
+
+---
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+
+
+---
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+
+---
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+
 >>> class GetDate(Form):
 ... mydate = DateField(widget=SelectDateWi

[Changeset] r10584 - in django/trunk: django/forms/extras tests/regressiontests/forms

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 12:35:53 -0500 (Sat, 18 Apr 2009)
New Revision: 10584

Modified:
   django/trunk/django/forms/extras/widgets.py
   django/trunk/tests/regressiontests/forms/extra.py
Log:
Fixed #9124: fixed `SelectDateWidget` with `required=False`. Thanks, Bernd 
Schlapsi.

Modified: django/trunk/django/forms/extras/widgets.py
===
--- django/trunk/django/forms/extras/widgets.py 2009-04-18 15:52:58 UTC (rev 
10583)
+++ django/trunk/django/forms/extras/widgets.py 2009-04-18 17:35:53 UTC (rev 
10584)
@@ -20,13 +20,15 @@
 This also serves as an example of a Widget that has more than one HTML
 element and hence implements value_from_datadict.
 """
+none_value = (0, '---')
 month_field = '%s_month'
 day_field = '%s_day'
 year_field = '%s_year'
 
-def __init__(self, attrs=None, years=None):
+def __init__(self, attrs=None, years=None, required=True):
 # years is an optional list/tuple of years to use in the "year" select 
box.
 self.attrs = attrs or {}
+self.required = required
 if years:
 self.years = years
 else:
@@ -51,19 +53,28 @@
 id_ = 'id_%s' % name
 
 month_choices = MONTHS.items()
+if not (self.required and value):
+month_choices.append(self.none_value)
 month_choices.sort()
 local_attrs = self.build_attrs(id=self.month_field % id_)
-select_html = Select(choices=month_choices).render(self.month_field % 
name, month_val, local_attrs)
+s = Select(choices=month_choices)
+select_html = s.render(self.month_field % name, month_val, local_attrs)
 output.append(select_html)
 
 day_choices = [(i, i) for i in range(1, 32)]
+if not (self.required and value):
+day_choices.insert(0, self.none_value)
 local_attrs['id'] = self.day_field % id_
-select_html = Select(choices=day_choices).render(self.day_field % 
name, day_val, local_attrs)
+s = Select(choices=day_choices)
+select_html = s.render(self.day_field % name, day_val, local_attrs)
 output.append(select_html)
 
 year_choices = [(i, i) for i in self.years]
+if not (self.required and value):
+year_choices.insert(0, self.none_value)
 local_attrs['id'] = self.year_field % id_
-select_html = Select(choices=year_choices).render(self.year_field % 
name, year_val, local_attrs)
+s = Select(choices=year_choices)
+select_html = s.render(self.year_field % name, year_val, local_attrs)
 output.append(select_html)
 
 return mark_safe(u'\n'.join(output))
@@ -73,7 +84,11 @@
 id_for_label = classmethod(id_for_label)
 
 def value_from_datadict(self, data, files, name):
-y, m, d = data.get(self.year_field % name), data.get(self.month_field 
% name), data.get(self.day_field % name)
+y = data.get(self.year_field % name)
+m = data.get(self.month_field % name)
+d = data.get(self.day_field % name)
+if y == m == d == "0":
+return None
 if y and m and d:
 return '%s-%s-%s' % (y, m, d)
 return data.get(name, None)

Modified: django/trunk/tests/regressiontests/forms/extra.py
===
--- django/trunk/tests/regressiontests/forms/extra.py   2009-04-18 15:52:58 UTC 
(rev 10583)
+++ django/trunk/tests/regressiontests/forms/extra.py   2009-04-18 17:35:53 UTC 
(rev 10584)
@@ -23,6 +23,7 @@
 >>> w = 
 >>> SelectDateWidget(years=('2007','2008','2009','2010','2011','2012','2013','2014','2015','2016'))
 >>> print w.render('mydate', '')
 
+---
 January
 February
 March
@@ -37,6 +38,7 @@
 December
 
 
+---
 1
 2
 3
@@ -70,6 +72,7 @@
 31
 
 
+---
 2007
 2008
 2009
@@ -213,6 +216,133 @@
 
 Using a SelectDateWidget in a form:
 
+>>> w = 
SelectDateWidget(years=('2007','2008','2009','2010','2011','2012','2013','2014','2015','2016'),
 required=False)
+>>> print w.render('mydate', '')
+
+---
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+
+
+---
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+
+---
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+
+>>> print w.render('mydate', '2010-04-15')
+
+---
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+
+
+---
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+
+---
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+
 >>> class GetDate(Form):
 ... mydate = DateField(widget=SelectDateWidget)
 >>> a = GetDate({'mydate_month':'4', 'mydate_day':'1', 'mydate_year':'2008'})


--~--~-~--~~~---~--~~
You received this message because you are subscribe

Re: [Django] #10348: contrib.admin: select_related overwritten by django.contrib.admin.views.ChangeList.get_query_set

2009-04-18 Thread Django
#10348: contrib.admin: select_related overwritten by
django.contrib.admin.views.ChangeList.get_query_set
---+
  Reporter:  erny  | Owner:  nobody 
Status:  new   | Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords:  efficient-admin
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  1 |   Needs_tests:  1  
Needs_better_patch:  1 |  
---+
Changes (by mmarshall):

 * cc: matt...@matthewmarshall.org (added)

Comment:

 Distinguishing between False and None feels hacky to me.

 Would it work to have ChangeList.get_query_set only call select_related if
 qs.query.select_related is False?

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



Re: [Django] #6231: SelectDateWidget: field order as a result of DATE_FORMAT

2009-04-18 Thread Django
#6231: SelectDateWidget: field order as a result of DATE_FORMAT
---+
  Reporter:  Bernd Schlapsi| Owner:  nobody 
Status:  new   | Milestone: 
 Component:  Internationalization  |   Version:  SVN
Resolution:|  Keywords:  i18n-rf
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by jacob):

 Please don't integrate patches like this; it makes things *really* hard to
 figure out. One patch per ticket.

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



Re: [Django] #10002: Data does not display in TabularInline when validation fails for an ImageField

2009-04-18 Thread Django
#10002: Data does not display in TabularInline when validation fails for an
ImageField
---+
  Reporter:  anonymous | Owner:  dgouldin   
  
Status:  new   | Milestone:  1.1
  
 Component:  django.contrib.admin  |   Version:  1.0
  
Resolution:|  Keywords:  TabularInline, 
ImageField
 Stage:  Ready for checkin | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10061: incorrect logout link in admin

2009-04-18 Thread Django
#10061: incorrect logout link in admin
---+
  Reporter:  lashni| Owner:  Alex
Status:  reopened  | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  SVN 
Resolution:|  Keywords:  
 Stage:  Ready for checkin | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10208: ModelAdmin ignores 'exclude' and 'fields' attributes of ModelForm.Meta

2009-04-18 Thread Django
#10208: ModelAdmin ignores 'exclude' and 'fields' attributes of ModelForm.Meta
---+
  Reporter:  Alexander Vasiljev   | 
Owner:  Alex
Status:  new   | 
Milestone:  1.1 
 Component:  Forms |   
Version:  1.0 
Resolution:|  
Keywords:  
 Stage:  Ready for checkin | 
Has_patch:  1   
Needs_docs:  0 |   
Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10799: List editable breaks with model inheritance and parent_link=True

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

  * 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9124: SelectDateWidget not usable with required=False

2009-04-18 Thread Django
#9124: SelectDateWidget not usable with required=False
+---
  Reporter:  Bernd Schlapsi | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  Forms  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by jacob):

  * 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10867: The command makemessages should avoid files inside the locale dir when --all option is specified

2009-04-18 Thread Django
#10867: The command makemessages should avoid files inside the locale dir when
--all option is specified
-+--
  Reporter:  diegobz | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Internationalization|   Version:  1.0 
Resolution:  |  Keywords:  makemessages
 Stage:  Design decision needed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Comment (by diegobz):

 Some more info about LINGUAS:
 http://www.gnu.org/software/hello/manual/gettext/po_002fLINGUAS.html

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



Re: [Django] #10867: The command makemessages should avoid files inside the locale dir when --all option is specified

2009-04-18 Thread Django
#10867: The command makemessages should avoid files inside the locale dir when
--all option is specified
-+--
  Reporter:  diegobz | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Internationalization|   Version:  1.0 
Resolution:  |  Keywords:  makemessages
 Stage:  Design decision needed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by jezdez):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 The LINGUAS file seems like a worthwhile convention used by many open
 source projects, (http://www.google.com/codesearch?q=po%2FLINGUAS&hl=en).

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



Re: [Django] #9591: MemoryFileUploadHandler doesn't rewind InMemoryUploadedFile to the beginning

2009-04-18 Thread Django
#9591: MemoryFileUploadHandler doesn't rewind InMemoryUploadedFile to the
beginning
---+
  Reporter:  isagalaev | Owner:  nobody
Status:  closed| Milestone:  1.1   
 Component:  File uploads/storage  |   Version:  1.0   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mmarshall):

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

Comment:

 This appears to be fixed.  InMemoryUploadFile.__init__ calls seek(0) on
 the file.

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



Re: [Django] #8752: auth password tests fail on non-english sites

2009-04-18 Thread Django
#8752: auth password tests fail on non-english sites
---+
  Reporter:  Koen Biermans   | 
Owner:  nobody
Status:  new   | 
Milestone:  1.1   
 Component:  Contrib apps  |   
Version:  SVN   
Resolution:|  
Keywords:
 Stage:  Accepted  | 
Has_patch:  1 
Needs_docs:  0 |   
Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by jacob):

 I can't reproduce this failure; I have:

 {{{
 LANGUAGES = (('fr', 'French'),)
 LANGUAGE_CODE = 'fr'
 }}}

 in my settings file, and I don't get any failures.

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



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

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 10:52:58 -0500 (Sat, 18 Apr 2009)
New Revision: 10583

Added:
   
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/tests.py
Modified:
   django/branches/releases/1.0.X/django/forms/models.py
   
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/models.py
Log:
[1.0.X\ Fixed #10156: `ModelMultipleChoiceField.clean` now does a single query 
instead of O(N). Thanks, Alex Gaynor. Also, I ported a few more doctests to 
unittests. Backport of r10582 from trunk.

Modified: django/branches/releases/1.0.X/django/forms/models.py
===
--- django/branches/releases/1.0.X/django/forms/models.py   2009-04-18 
15:51:11 UTC (rev 10582)
+++ django/branches/releases/1.0.X/django/forms/models.py   2009-04-18 
15:52:58 UTC (rev 10583)
@@ -757,14 +757,14 @@
 return []
 if not isinstance(value, (list, tuple)):
 raise ValidationError(self.error_messages['list'])
-final_values = []
+for pk in value:
+try:
+self.queryset.filter(pk=pk)
+except ValueError:
+raise ValidationError(self.error_messages['invalid_pk_value'] 
% pk)
+qs = self.queryset.filter(pk__in=value)
+pks = set([force_unicode(o.pk) for o in qs])
 for val in value:
-try:
-obj = self.queryset.get(pk=val)
-except self.queryset.model.DoesNotExist:
+if force_unicode(val) not in pks:
 raise ValidationError(self.error_messages['invalid_choice'] % 
val)
-except ValueError:
-raise ValidationError(self.error_messages['invalid_pk_value'] 
% val)
-else:
-final_values.append(obj)
-return final_values
+return qs

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/models.py
===
--- 
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/models.py
  2009-04-18 15:51:11 UTC (rev 10582)
+++ 
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/models.py
  2009-04-18 15:52:58 UTC (rev 10583)
@@ -1,47 +1,16 @@
 import os
 from django.db import models
-from django import forms
 
+class Person(models.Model):
+name = models.CharField(max_length=100)
+
 class Triple(models.Model):
 left = models.IntegerField()
 middle = models.IntegerField()
 right = models.IntegerField()
 
-def __unicode__(self):
-return u"%d, %d, %d" % (self.left, self.middle, self.right)
-
 class Meta:
 unique_together = (('left', 'middle'), ('middle', 'right'))
 
 class FilePathModel(models.Model):
 path = models.FilePathField(path=os.path.dirname(__file__), 
match=".*\.py$", blank=True)
-
-__test__ = {'API_TESTS': """
-When the same field is involved in multiple unique_together constraints, we
-need to make sure we don't remove the data for it before doing all the
-validation checking (not just failing after the first one).
-
->>> _ = Triple.objects.create(left=1, middle=2, right=3)
->>> class TripleForm(forms.ModelForm):
-... class Meta:
-... model = Triple
-
->>> form = TripleForm({'left': '1', 'middle': '2', 'right': '3'})
->>> form.is_valid()
-False
->>> form = TripleForm({'left': '1', 'middle': '3', 'right': '1'})
->>> form.is_valid()
-True
-
-# Regression test for #8842: FilePathField(blank=True)
->>> class FPForm(forms.ModelForm):
-... class Meta:
-... model = FilePathModel
-
->>> form = FPForm()
->>> names = [c[1] for c in form['path'].field.choices]
->>> names.sort()
->>> names
-['-', '__init__.py', 'models.py']
-"""}
-

Added: 
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/tests.py
===
--- 
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/tests.py
   (rev 0)
+++ 
django/branches/releases/1.0.X/tests/regressiontests/model_forms_regress/tests.py
   2009-04-18 15:52:58 UTC (rev 10583)
@@ -0,0 +1,61 @@
+from django import db
+from django import forms
+from django.conf import settings
+from django.test import TestCase
+from models import Person, Triple, FilePathModel
+
+class ModelMultipleChoiceFieldTests(TestCase):
+
+def setUp(self):
+self.old_debug = settings.DEBUG
+settings.DEBUG = True
+
+def tearDown(self):
+settings.DEBUG = self.old_debug
+
+def test_model_multiple_choice_number_of_queries(self):
+"""
+Test that ModelMultipleChoiceField does O(1) queries instead of
+O(n) (#10156).
+"""
+for i in range(30):
+Person.objects.create(name="Person %s" % i)
+
+db.reset_queries()
+f = forms.ModelMultipleChoiceField(queryset=Person.objects.

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

2009-04-18 Thread noreply

Author: jacob
Date: 2009-04-18 10:51:11 -0500 (Sat, 18 Apr 2009)
New Revision: 10582

Added:
   django/trunk/tests/regressiontests/model_forms_regress/tests.py
Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/regressiontests/model_forms_regress/models.py
Log:
Fixed #10156: `ModelMultipleChoiceField.clean` now does a single query instead 
of O(N). Thanks, Alex Gaynor. Also, I ported a few more doctests to unittests.

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2009-04-17 16:28:13 UTC (rev 10581)
+++ django/trunk/django/forms/models.py 2009-04-18 15:51:11 UTC (rev 10582)
@@ -794,14 +794,14 @@
 return []
 if not isinstance(value, (list, tuple)):
 raise ValidationError(self.error_messages['list'])
-final_values = []
+for pk in value:
+try:
+self.queryset.filter(pk=pk)
+except ValueError:
+raise ValidationError(self.error_messages['invalid_pk_value'] 
% pk)
+qs = self.queryset.filter(pk__in=value)
+pks = set([force_unicode(o.pk) for o in qs])
 for val in value:
-try:
-obj = self.queryset.get(pk=val)
-except self.queryset.model.DoesNotExist:
+if force_unicode(val) not in pks:
 raise ValidationError(self.error_messages['invalid_choice'] % 
val)
-except ValueError:
-raise ValidationError(self.error_messages['invalid_pk_value'] 
% val)
-else:
-final_values.append(obj)
-return final_values
+return qs

Modified: django/trunk/tests/regressiontests/model_forms_regress/models.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/models.py
2009-04-17 16:28:13 UTC (rev 10581)
+++ django/trunk/tests/regressiontests/model_forms_regress/models.py
2009-04-18 15:51:11 UTC (rev 10582)
@@ -1,47 +1,16 @@
 import os
 from django.db import models
-from django import forms
 
+class Person(models.Model):
+name = models.CharField(max_length=100)
+
 class Triple(models.Model):
 left = models.IntegerField()
 middle = models.IntegerField()
 right = models.IntegerField()
 
-def __unicode__(self):
-return u"%d, %d, %d" % (self.left, self.middle, self.right)
-
 class Meta:
 unique_together = (('left', 'middle'), (u'middle', u'right'))
 
 class FilePathModel(models.Model):
 path = models.FilePathField(path=os.path.dirname(__file__), 
match=".*\.py$", blank=True)
-
-__test__ = {'API_TESTS': """
-When the same field is involved in multiple unique_together constraints, we
-need to make sure we don't remove the data for it before doing all the
-validation checking (not just failing after the first one).
-
->>> _ = Triple.objects.create(left=1, middle=2, right=3)
->>> class TripleForm(forms.ModelForm):
-... class Meta:
-... model = Triple
-
->>> form = TripleForm({'left': '1', 'middle': '2', 'right': '3'})
->>> form.is_valid()
-False
->>> form = TripleForm({'left': '1', 'middle': '3', 'right': '1'})
->>> form.is_valid()
-True
-
-# Regression test for #8842: FilePathField(blank=True)
->>> class FPForm(forms.ModelForm):
-... class Meta:
-... model = FilePathModel
-
->>> form = FPForm()
->>> names = [c[1] for c in form['path'].field.choices]
->>> names.sort()
->>> names
-['-', '__init__.py', 'models.py']
-"""}
-

Added: django/trunk/tests/regressiontests/model_forms_regress/tests.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/tests.py 
(rev 0)
+++ django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2009-04-18 15:51:11 UTC (rev 10582)
@@ -0,0 +1,61 @@
+from django import db
+from django import forms
+from django.conf import settings
+from django.test import TestCase
+from models import Person, Triple, FilePathModel
+
+class ModelMultipleChoiceFieldTests(TestCase):
+
+def setUp(self):
+self.old_debug = settings.DEBUG
+settings.DEBUG = True
+
+def tearDown(self):
+settings.DEBUG = self.old_debug
+
+def test_model_multiple_choice_number_of_queries(self):
+"""
+Test that ModelMultipleChoiceField does O(1) queries instead of
+O(n) (#10156).
+"""
+for i in range(30):
+Person.objects.create(name="Person %s" % i)
+
+db.reset_queries()
+f = forms.ModelMultipleChoiceField(queryset=Person.objects.all())
+selected = f.clean([1, 3, 5, 7, 9])
+self.assertEquals(len(db.connection.queries), 1)
+
+class TripleForm(forms.ModelForm):
+class Meta:
+model = Triple
+
+class UniqueTogetherTests(TestCase):
+def test_multiple_field_un

[Django] #10867: The command makemessages should avoid files inside the locale dir when --all option is specified

2009-04-18 Thread Django
#10867: The command makemessages should avoid files inside the locale dir when
--all option is specified
--+-
 Reporter:  diegobz   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Internationalization  | Version:  1.0   
 Keywords:  makemessages  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 This patch makes the makemessages management command *see only
 directories* under the locale path when --all is specified.

 Right now Django does not allow to have anything else than directories for
 languages at that directory. Otherwise it is very important
 to have an option to put files there, because some projects might want to
 have a LINGUAS file.

 The LINGUAS file is very useful because that's a way how translators tell
 the maintainers that a specific language is ready to be used.
 Usually the LINGUAS file is updated by the translators themselves and it
 means that file should be at the same directory where they have
 access to commit their translations. Usually 'locale/*'.

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



Re: [Django] #10847: `QuerySet.values` doesn't remove extra selections.

2009-04-18 Thread Django
#10847: `QuerySet.values` doesn't remove extra selections.
---+
  Reporter:  mrmachine | Owner:  nobody 
 
Status:  new   | Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  queryset 
extra select values sql
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  1 |  
---+
Comment (by mrmachine):

 Although it just occurred to me that you are probably talking about 1-3
 passing with the patch applied (which I did not test). Sorry :)

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



Re: [Django] #10847: `QuerySet.values` doesn't remove extra selections.

2009-04-18 Thread Django
#10847: `QuerySet.values` doesn't remove extra selections.
---+
  Reporter:  mrmachine | Owner:  nobody 
 
Status:  new   | Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  queryset 
extra select values sql
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  1 |  
---+
Comment (by mrmachine):

 Are you sure about tests 1-3 working if `extra()` comes before `values()`?
 When I run test 2-3 (with User as the model) I get failures, with r10581.

 {{{
 >>> from django.contrib.auth.models import User
 >>> User.objects.extra(select={'extra': 1}).values('pk').query.as_sql()
 (u'SELECT (1) AS "extra", "auth_user"."id" FROM "auth_user"', ())
 >>> User.objects.filter(pk__in=User.objects.extra(select={'extra_col':
 1}).values('pk'))
 Traceback (most recent call last):
 ...
 OperationalError: only a single result allowed for a SELECT that is part
 of an expression
 }}}

 The above is with SQLite, but I get the same result with PostgreSQL, just
 with a different exception (`ProgrammingError: subquery has too many
 columns`). I think that test 1 is also executing the extra selection, but
 just not passing it through to the output.

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



Re: [Django] #10842: Django 1.0.2 generates AttributeError with PostgreSql 8.4beta1

2009-04-18 Thread Django
#10842: Django 1.0.2 generates AttributeError with PostgreSql 8.4beta1
---+
  Reporter:  hgdeoro   | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:  postgresql
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by kmtracey):

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

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



  1   2   >