Re: [Django] #13965: psycopg2 throws an "can't adapt" error on ugettext_lazy translated strings

2010-08-14 Thread Django
#13965: psycopg2 throws an "can't adapt" error on ugettext_lazy translated 
strings
---+
  Reporter:  mitar | Owner:  nobody
Status:  new   | Milestone:
 Component:  Internationalization  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ch0wn):

 * cc: phar...@rdrei.net (added)

Comment:

 Same for lxml.etree._ElementStringResult even though it's coercable to
 bytestrings or unicode. Wrapping the element in unicode() fixes it.
 Important to note is, that this works without manual casting with the
 mysql driver.

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

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



[Django] #14113: Access to extra fields in M2M relations

2010-08-14 Thread Django
#14113: Access to extra fields in M2M relations
+---
 Reporter:  jprafael|   Owner:  nobody
   Status:  new |   Milestone:
Component:  Database layer (models, ORM)| Version:  1.2   
 Keywords:  Many2ManyField intermediary fields  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 I'm using a model similar to
 {{{
 #!python
 class Recipe(models.Model):
 name = models.CharField(max_length = 32, unique=True)
 products = models.ManyToManyField(Product,
 through="RecipeProduct")

 class Product(models.Model):
 name = models.CharField(max_length = 32, unique=True)

 amound = models.IntegerField() # in stock

 class RecipeProduct(models.Model):
 recipe = models.ForeignKey(Recipe)
 product = models.ForeignKey(Product)

 amount  = models.IntegerField()
 }}}
 And need to list all my recipes, along with their products' amounts.
 {{{
 #!python
 Recipe.objects.select_related().all()
 }}}
 Gives access to the list of products in each recipe, but not access to the
 amount field in the intermediary table.

 Perhaps recipe.products.all() should merge the extra fields into the
 Product objects by means of another parameter in the ManyToManyField
 definition where the user can choose the fields to select (and the names
 they would be accessible by) like:
 {{{
 #!python
 products = models.ManyToManyField(Product, through="RecipeProduct",
 extra_fields={'amount': 'recipe_amount'})
 }}}

 This would allow direct usage like:
 {{{
 #!python
 {% for recipe in recipes %}
 {% for product in recipe.products.all() %}
 product: {{ product.name }} ({{ product.amount }} in
 stock)
 amount: {{ product.recipe_amound }}
 {% endfor}
 {% endfor %}
 }}}
 while avoiding name colision problems

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

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



Re: [Django] #14002: filesizeformat filter only supports up to GB

2010-08-14 Thread Django
#14002: filesizeformat filter only supports up to GB
+---
  Reporter:  atm| Owner:  atm
Status:  closed | Milestone:  1.3
 Component:  Template system|   Version: 
Resolution:  fixed  |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  1  
Needs_better_patch:  0  |  
+---
Comment (by claudep):

 There is a problem with the fix, in that units are no more translated.
 There are missing ugettext calls in BYTE_UNITS tuple. Reopen or open new
 report?

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

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



[Django] #14112: Some documentation reST fixes

2010-08-14 Thread Django
#14112: Some documentation reST fixes
---+
 Reporter:  ramiro |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 Assorted small problems found while looking at #14085.

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

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



Re: [Django] #14085: DATE_FORMAT, TIME_FORMAT etc. docs should have a link to allowed formatting strings

2010-08-14 Thread Django
#14085: DATE_FORMAT, TIME_FORMAT etc. docs should have a link to allowed 
formatting
strings
+---
  Reporter:  Miikka | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 The Sphinx bug is fixed in the just released version 1.0.2. #14111 deals
 with documenting the new version requirement.

 See also #14033.

 After that, we'd need to update the Sphinx 1.0 installation on
 docs.djangoproject.com to 1.0.2 ASAP to take advantage of these fixes and
 restore the internal links.

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

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



[Changeset] r13591 - django/trunk/tests/regressiontests/urlpatterns_reverse

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 10:50:46 -0500 (Sat, 14 Aug 2010)
New Revision: 13591

Added:
   
django/trunk/tests/regressiontests/urlpatterns_reverse/urls_without_full_import.py
Log:
Added file missing from r13590.

Added: 
django/trunk/tests/regressiontests/urlpatterns_reverse/urls_without_full_import.py
===
--- 
django/trunk/tests/regressiontests/urlpatterns_reverse/urls_without_full_import.py
  (rev 0)
+++ 
django/trunk/tests/regressiontests/urlpatterns_reverse/urls_without_full_import.py
  2010-08-14 15:50:46 UTC (rev 13591)
@@ -0,0 +1,10 @@
+# A URLs file that doesn't use the default
+# from django.conf.urls.defaults import *
+# import pattern.
+from django.conf.urls.defaults import patterns, url
+from views import empty_view, bad_view
+
+urlpatterns = patterns('',
+url(r'^test_view/$', empty_view, name="test_view"),
+url(r'^bad_view/$', bad_view, name="bad_view"),
+)

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



[Django] #14111: Misleading note re: unreleased Sphinx version recomendation

2010-08-14 Thread Django
#14111: Misleading note re: unreleased Sphinx version recomendation
---+
 Reporter:  ramiro |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 It's in `docs/intro/whatsnew.txt`.

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

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



Re: [Django] #14110: iexact lookup doesn't work with subquery values

2010-08-14 Thread Django
#14110: iexact lookup doesn't work with subquery values
---+
  Reporter:  Suor  | Owner:  Suor
Status:  new   | Milestone:  
 Component:  Database layer (models, ORM)  |   Version:  1.2 
Resolution:|  Keywords:  
 Stage:  Unreviewed| Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by Suor):

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

Comment:

 P.S. supplied patch doesn't make it right for icontains but it will do for
 iexact for postgre and many lookups for oracle.[[BR]]

 Also, current code assume that connection.operators[lookup] will end with
 %s which is wrong.

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

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



[Django] #14110: iexact lookup doesn't work with subquery values

2010-08-14 Thread Django
#14110: iexact lookup doesn't work with subquery values
--+-
 Reporter:  Suor  |   Owner:  Suor  
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 With PostgreSQL and model
 {{{
 class Category(models.Model):
 title = models.CharField(max_length=127)

 }}}
 we have:
 {{{
 >>>
 
Category.objects.filter(title__icontains=Category.objects.filter(pk=1).values('title'))
 DatabaseError: syntax error at or near "("
 LINE 1: ...PPER("board_category"."title"::text) LIKE UPPER() (SELECT U0...

 >>> print connection.queries[-1]['sql']
 SELECT "app_category"."id", "app_category"."title" FROM "app_category"
 WHERE UPPER("app_category"."title"::text)
 LIKE UPPER() (SELECT U0."title" FROM "app_category" U0 WHERE U0."id" = 1 )
 }}}

 problem with every lookup for which %s is in the middle of
 connection.operators[lookup]

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

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



[Changeset] r13590 - in django/trunk: django/core tests/regressiontests/urlpatterns_reverse

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 09:27:35 -0500 (Sat, 14 Aug 2010)
New Revision: 13590

Modified:
   django/trunk/django/core/urlresolvers.py
   django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py
   django/trunk/tests/regressiontests/urlpatterns_reverse/views.py
Log:
Fixed #5350 -- Added fallback to default 404/500 handlers when they're not 
explicitly specified (or imported) in a urls.py file. Thanks to Thomas 
G?\195?\188ttler for the report and initial patch.

Modified: django/trunk/django/core/urlresolvers.py
===
--- django/trunk/django/core/urlresolvers.py2010-08-14 13:43:13 UTC (rev 
13589)
+++ django/trunk/django/core/urlresolvers.py2010-08-14 14:27:35 UTC (rev 
13590)
@@ -284,7 +284,12 @@
 url_patterns = property(_get_url_patterns)
 
 def _resolve_special(self, view_type):
-callback = getattr(self.urlconf_module, 'handler%s' % view_type)
+callback = getattr(self.urlconf_module, 'handler%s' % view_type, None)
+if not callback:
+# No handler specified in file; use default
+# Lazy import, since urls.defaults imports this file
+from django.conf.urls import defaults
+callback = getattr(defaults, 'handler%s' % view_type)
 try:
 return get_callable(callback), {}
 except (ImportError, AttributeError), e:

Modified: django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py
===
--- django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py 
2010-08-14 13:43:13 UTC (rev 13589)
+++ django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py 
2010-08-14 14:27:35 UTC (rev 13590)
@@ -356,6 +356,22 @@
 self.assertEqual(self.callable_resolver.resolve404(), handler)
 self.assertEqual(self.callable_resolver.resolve500(), handler)
 
+class DefaultErrorHandlerTests(TestCase):
+urls = 'regressiontests.urlpatterns_reverse.urls_without_full_import'
+
+def test_default_handler(self):
+"If the urls.py doesn't specify handlers, the defaults are used"
+try:
+response = self.client.get('/test/')
+self.assertEquals(response.status_code, 404)
+except AttributeError:
+self.fail("Shouldn't get an AttributeError due to undefined 404 
handler")
+
+try:
+self.assertRaises(ValueError, self.client.get, '/bad_view/')
+except AttributeError:
+self.fail("Shouldn't get an AttributeError due to undefined 500 
handler")
+
 class NoRootUrlConfTests(TestCase):
 """Tests for handler404 and handler500 if urlconf is None"""
 urls = None

Modified: django/trunk/tests/regressiontests/urlpatterns_reverse/views.py
===
--- django/trunk/tests/regressiontests/urlpatterns_reverse/views.py 
2010-08-14 13:43:13 UTC (rev 13589)
+++ django/trunk/tests/regressiontests/urlpatterns_reverse/views.py 
2010-08-14 14:27:35 UTC (rev 13590)
@@ -1,14 +1,19 @@
+from django.http import HttpResponse
+
 def empty_view(request, *args, **kwargs):
-pass
+return HttpResponse('')
 
 def kwargs_view(request, arg1=1, arg2=2):
-pass
+return HttpResponse('')
 
 def absolute_kwargs_view(request, arg1=1, arg2=2):
-pass
+return HttpResponse('')
 
 class ViewClass(object):
 def __call__(self, request, *args, **kwargs):
-pass
+return HttpResponse('')
 
 view_class_instance = ViewClass()
+
+def bad_view(request, *args, **kwargs):
+raise ValueError("I don't think I'm getting good value for this view")

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



Re: [Django] #7722: EMail Message with CC - Carbon Copy

2010-08-14 Thread Django
#7722: EMail Message with CC - Carbon Copy
-+--
  Reporter:  roberto.digirolamo   | Owner:  
nobody
Status:  new | Milestone:   
 
 Component:  django.core.mail|   Version:  
SVN   
Resolution:  |  Keywords:   
 
 Stage:  Accepted| Has_patch:  
1 
Needs_docs:  1   |   Needs_tests:  
1 
Needs_better_patch:  1   |  
-+--
Changes (by russellm):

  * needs_better_patch:  0 => 1
  * stage:  Design decision needed => Accepted

Comment:

 Ok - I'll accept this one. It really is a bit silly that we don't support
 CC, given that we support all the other email fields.

 The patch needs to be updated to trunk, and we need docs and tests before
 it will get into trunk.

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

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



Re: [Django] #13796: Admin docs aren't showing core template tags and filters

2010-08-14 Thread Django
#13796: Admin docs aren't showing core template tags and filters
--+-
  Reporter:  nathan   | Owner:  nobody
Status:  closed   | Milestone:
 Component:  Template system  |   Version:  1.2   
Resolution:  fixed|  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by russellm):

 Apologies to Ramiro for forgetting the credit in the SVN checkin message.
 I'm having a good night... :-)

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

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



[Changeset] r13589 - in django/branches/releases/1.2.X: django/contrib/admindocs tests tests/regressiontests/admin_views

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 08:43:13 -0500 (Sat, 14 Aug 2010)
New Revision: 13589

Modified:
   django/branches/releases/1.2.X/django/contrib/admindocs/views.py
   django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py
   django/branches/releases/1.2.X/tests/runtests.py
Log:
[1.2.X] Fixed #13796 -- Ensure that builtin tags and filters are included in 
admin documentation views.

Backport of r13588 from trunk.

Modified: django/branches/releases/1.2.X/django/contrib/admindocs/views.py
===
--- django/branches/releases/1.2.X/django/contrib/admindocs/views.py
2010-08-14 13:41:56 UTC (rev 13588)
+++ django/branches/releases/1.2.X/django/contrib/admindocs/views.py
2010-08-14 13:43:13 UTC (rev 13589)
@@ -54,7 +54,9 @@
 load_all_installed_template_libraries()
 
 tags = []
-for module_name, library in template.libraries.items():
+app_libs = template.libraries.items()
+builtin_libs = [(None, lib) for lib in template.builtins]
+for module_name, library in builtin_libs + app_libs:
 for tag_name, tag_func in library.tags.items():
 title, body, metadata = utils.parse_docstring(tag_func.__doc__)
 if title:
@@ -87,7 +89,9 @@
 load_all_installed_template_libraries()
 
 filters = []
-for module_name, library in template.libraries.items():
+app_libs = template.libraries.items()
+builtin_libs = [(None, lib) for lib in template.builtins]
+for module_name, library in builtin_libs + app_libs:
 for filter_name, filter_func in library.filters.items():
 title, body, metadata = utils.parse_docstring(filter_func.__doc__)
 if title:

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py
===
--- django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py   
2010-08-14 13:41:56 UTC (rev 13588)
+++ django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py   
2010-08-14 13:43:13 UTC (rev 13589)
@@ -2170,3 +2170,40 @@
 self.assertRedirects(response, '/test_admin/admin/auth/user/add/')
 self.assertEquals(User.objects.count(), user_count + 1)
 self.assertNotEquals(new_user.password, UNUSABLE_PASSWORD)
+
+class AdminDocsTest(TestCase):
+fixtures = ['admin-views-users.xml']
+
+def setUp(self):
+self.client.login(username='super', password='secret')
+
+def tearDown(self):
+self.client.logout()
+
+def test_tags(self):
+response = self.client.get('/test_admin/admin/doc/tags/')
+
+# The builtin tag group exists
+self.assertContains(response, "Built-in tags", count=2)
+
+# A builtin tag exists in both the index and detail
+self.assertContains(response, 'autoescape')
+self.assertContains(response, 'autoescape')
+
+# An app tag exists in both the index and detail
+# The builtin tag group exists
+self.assertContains(response, "admin_list", count=2)
+
+# A builtin tag exists in both the index and detail
+self.assertContains(response, 'autoescape')
+self.assertContains(response, 'admin_actions')
+
+def test_filters(self):
+response = self.client.get('/test_admin/admin/doc/filters/')
+
+# The builtin filter group exists
+self.assertContains(response, "Built-in filters", count=2)
+
+# A builtin filter exists in both the index and detail
+self.assertContains(response, 'add')
+self.assertContains(response, 'add')

Modified: django/branches/releases/1.2.X/tests/runtests.py
===
--- django/branches/releases/1.2.X/tests/runtests.py2010-08-14 13:41:56 UTC 
(rev 13588)
+++ django/branches/releases/1.2.X/tests/runtests.py2010-08-14 13:43:13 UTC 
(rev 13589)
@@ -27,6 +27,7 @@
 'django.contrib.messages',
 'django.contrib.comments',
 'django.contrib.admin',
+'django.contrib.admindocs',
 ]
 
 def get_test_models():

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



[Changeset] r13588 - in django/trunk: django/contrib/admindocs tests tests/regressiontests/admin_views

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 08:41:56 -0500 (Sat, 14 Aug 2010)
New Revision: 13588

Modified:
   django/trunk/django/contrib/admindocs/views.py
   django/trunk/tests/regressiontests/admin_views/tests.py
   django/trunk/tests/runtests.py
Log:
Fixed #13796 -- Ensure that builtin tags and filters are included in admin 
documentation views.

Modified: django/trunk/django/contrib/admindocs/views.py
===
--- django/trunk/django/contrib/admindocs/views.py  2010-08-14 13:02:03 UTC 
(rev 13587)
+++ django/trunk/django/contrib/admindocs/views.py  2010-08-14 13:41:56 UTC 
(rev 13588)
@@ -54,7 +54,9 @@
 load_all_installed_template_libraries()
 
 tags = []
-for module_name, library in template.libraries.items():
+app_libs = template.libraries.items()
+builtin_libs = [(None, lib) for lib in template.builtins]
+for module_name, library in builtin_libs + app_libs:
 for tag_name, tag_func in library.tags.items():
 title, body, metadata = utils.parse_docstring(tag_func.__doc__)
 if title:
@@ -87,7 +89,9 @@
 load_all_installed_template_libraries()
 
 filters = []
-for module_name, library in template.libraries.items():
+app_libs = template.libraries.items()
+builtin_libs = [(None, lib) for lib in template.builtins]
+for module_name, library in builtin_libs + app_libs:
 for filter_name, filter_func in library.filters.items():
 title, body, metadata = utils.parse_docstring(filter_func.__doc__)
 if title:

Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===
--- django/trunk/tests/regressiontests/admin_views/tests.py 2010-08-14 
13:02:03 UTC (rev 13587)
+++ django/trunk/tests/regressiontests/admin_views/tests.py 2010-08-14 
13:41:56 UTC (rev 13588)
@@ -2170,3 +2170,40 @@
 self.assertRedirects(response, '/test_admin/admin/auth/user/add/')
 self.assertEquals(User.objects.count(), user_count + 1)
 self.assertNotEquals(new_user.password, UNUSABLE_PASSWORD)
+
+class AdminDocsTest(TestCase):
+fixtures = ['admin-views-users.xml']
+
+def setUp(self):
+self.client.login(username='super', password='secret')
+
+def tearDown(self):
+self.client.logout()
+
+def test_tags(self):
+response = self.client.get('/test_admin/admin/doc/tags/')
+
+# The builtin tag group exists
+self.assertContains(response, "Built-in tags", count=2)
+
+# A builtin tag exists in both the index and detail
+self.assertContains(response, 'autoescape')
+self.assertContains(response, 'autoescape')
+
+# An app tag exists in both the index and detail
+# The builtin tag group exists
+self.assertContains(response, "admin_list", count=2)
+
+# A builtin tag exists in both the index and detail
+self.assertContains(response, 'autoescape')
+self.assertContains(response, 'admin_actions')
+
+def test_filters(self):
+response = self.client.get('/test_admin/admin/doc/filters/')
+
+# The builtin filter group exists
+self.assertContains(response, "Built-in filters", count=2)
+
+# A builtin filter exists in both the index and detail
+self.assertContains(response, 'add')
+self.assertContains(response, 'add')

Modified: django/trunk/tests/runtests.py
===
--- django/trunk/tests/runtests.py  2010-08-14 13:02:03 UTC (rev 13587)
+++ django/trunk/tests/runtests.py  2010-08-14 13:41:56 UTC (rev 13588)
@@ -27,6 +27,7 @@
 'django.contrib.messages',
 'django.contrib.comments',
 'django.contrib.admin',
+'django.contrib.admindocs',
 ]
 
 def get_test_models():

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



Re: [Django] #14002: filesizeformat filter only supports up to GB

2010-08-14 Thread Django
#14002: filesizeformat filter only supports up to GB
+---
  Reporter:  atm| Owner:  atm
Status:  closed | Milestone:  1.3
 Component:  Template system|   Version: 
Resolution:  fixed  |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  1  
Needs_better_patch:  0  |  
+---
Comment (by russellm):

 Strictly, the fix is actually in [13584]... but trac seems to be having
 some trouble with that revision.

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

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



[Changeset] r13587 - django/branches/releases/1.2.X

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 08:02:03 -0500 (Sat, 14 Aug 2010)
New Revision: 13587

Modified:
   django/branches/releases/1.2.X/AUTHORS
Log:
[1.2.X] Corrected some alphabetization and dupe issues in the AUTHORS file.

Backport of r13586 from trunk.

Modified: django/branches/releases/1.2.X/AUTHORS
===
--- django/branches/releases/1.2.X/AUTHORS  2010-08-14 12:57:37 UTC (rev 
13586)
+++ django/branches/releases/1.2.X/AUTHORS  2010-08-14 13:02:03 UTC (rev 
13587)
@@ -29,7 +29,6 @@
 Gisle Aas 
 ajs 
 al...@bright-green.com
-Alcides Fonseca
 Andi Albrecht 
 Marty Alchin 
 Ahmad Alhashemi 
@@ -39,7 +38,6 @@
 AgarFu 
 Dagur Páll Ammendrup 
 Collin Anderson 
-Nicolas Lara 
 Jeff Anderson 
 Marian Andre 
 Andreas
@@ -85,19 +83,19 @@
 Sean Brant
 Andrew Brehaut 
 brut.a...@gmail.com
+bthomas
 bt...@bestweb.net
 Jonathan Buchanan 
 Keith Bussell 
+C8E
 Chris Cahoon 
 Juan Manuel Caicedo 
 Trevor Caira 
 Brett Cannon 
 Ricardo Javier Cárdenes Medina 
 Jeremy Carbaugh 
-Carl Meyer 
 Graham Carlyle 
 Antonio Cavedoni 
-C8E
 ced...@terramater.net
 Chris Chamberlin 
 Amit Chakradeo 
@@ -137,6 +135,7 @@
 Rajesh Dhawan 
 Sander Dijkhuis 
 Jordan Dimov 
+Nebojša Dorđević
 d...@mayonnaise.net
 dready 
 Maximillian Dornseif 
@@ -167,7 +166,6 @@
 Liang Feng 
 Bill Fenner 
 Stefane Fermgier 
-Afonso Fernández Nogueira 
 J. Pablo Fernandez 
 Maciej Fijalkowski
 Ben Firshman 
@@ -175,6 +173,7 @@
 Eric Floehr 
 Eric Florenzano 
 Vincent Foley 
+Alcides Fonseca
 Rudolph Froger 
 Jorge Gajon 
 gand...@owca.info
@@ -275,11 +274,11 @@
 kurt...@meetro.com
 Denis Kuzmichyov 
 Panos Laganakos 
-Lakin Wecker 
 Nick Lane 
 Stuart Langridge 
 Paul Lanier 
 David Larlet 
+Nicolas Lara 
 Nicola Larosa 
 Finn Gruwier Larsen 
 Lau Bech Lauritzen
@@ -300,7 +299,6 @@
 Simon Litchfield 
 Daniel Lindsley 
 Trey Long 
-msaelices 
 Martin Mahner 
 Matt McClanahan 
 Stanislaus Madueke
@@ -313,20 +311,21 @@
 Petr Marhoun 
 Petar Marić 
 Nuno Mariz 
-Marijn Vriens 
 m...@junklight.com
 Orestis Markou 
 Takashi Matsuo 
 Yasushi Masuda 
 mattyca...@gmail.com
+Glenn Maynard 
 Jason McBrayer 
 Kevin McConnell 
 mccutc...@gmail.com
+michael.mce...@gmail.com
 Paul McLanahan 
 Tobias McNulty 
 Zain Memon
 Christian Metts
-michael.mce...@gmail.com
+Carl Meyer 
 mic...@plovarna.cz
 Slawek Mikula 
 mitakum...@gmail.com
@@ -336,13 +335,13 @@
 Aljosa Mohorovic 
 Ramiro Morales 
 Eric Moritz 
+msaelices 
 Gregor Müllegger 
 Robin Munn 
 James Murty
 msundstr
 Robert Myers 
 Alexander Myodov 
-Nebojša Dorđević
 Doug Napoleone 
 Gopal Narayanan 
 Fraser Nevett 
@@ -370,7 +369,6 @@
 phil.h.sm...@gmail.com
 Gustavo Picon
 Michael Placentra II 
-

[Changeset] r13586 - django/trunk

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:57:37 -0500 (Sat, 14 Aug 2010)
New Revision: 13586

Modified:
   django/trunk/AUTHORS
Log:
Corrected some alphabetization and dupe issues in the AUTHORS file

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-08-14 12:57:16 UTC (rev 13585)
+++ django/trunk/AUTHORS2010-08-14 12:57:37 UTC (rev 13586)
@@ -29,7 +29,6 @@
 Gisle Aas 
 ajs 
 al...@bright-green.com
-Alcides Fonseca
 Andi Albrecht 
 Marty Alchin 
 Ahmad Alhashemi 
@@ -39,7 +38,6 @@
 AgarFu 
 Dagur Páll Ammendrup 
 Collin Anderson 
-Nicolas Lara 
 Jeff Anderson 
 Marian Andre 
 Andreas
@@ -85,19 +83,19 @@
 Sean Brant
 Andrew Brehaut 
 brut.a...@gmail.com
+bthomas
 bt...@bestweb.net
 Jonathan Buchanan 
 Keith Bussell 
+C8E
 Chris Cahoon 
 Juan Manuel Caicedo 
 Trevor Caira 
 Brett Cannon 
 Ricardo Javier Cárdenes Medina 
 Jeremy Carbaugh 
-Carl Meyer 
 Graham Carlyle 
 Antonio Cavedoni 
-C8E
 ced...@terramater.net
 Chris Chamberlin 
 Amit Chakradeo 
@@ -137,6 +135,7 @@
 Rajesh Dhawan 
 Sander Dijkhuis 
 Jordan Dimov 
+Nebojša Dorđević
 d...@mayonnaise.net
 dready 
 Maximillian Dornseif 
@@ -167,7 +166,6 @@
 Liang Feng 
 Bill Fenner 
 Stefane Fermgier 
-Afonso Fernández Nogueira 
 J. Pablo Fernandez 
 Maciej Fijalkowski
 Ben Firshman 
@@ -175,6 +173,7 @@
 Eric Floehr 
 Eric Florenzano 
 Vincent Foley 
+Alcides Fonseca
 Rudolph Froger 
 Jorge Gajon 
 gand...@owca.info
@@ -278,11 +277,11 @@
 kurt...@meetro.com
 Denis Kuzmichyov 
 Panos Laganakos 
-Lakin Wecker 
 Nick Lane 
 Stuart Langridge 
 Paul Lanier 
 David Larlet 
+Nicolas Lara 
 Nicola Larosa 
 Finn Gruwier Larsen 
 Lau Bech Lauritzen
@@ -303,7 +302,6 @@
 Simon Litchfield 
 Daniel Lindsley 
 Trey Long 
-msaelices 
 Martin Mahner 
 Matt McClanahan 
 Stanislaus Madueke
@@ -321,14 +319,16 @@
 Takashi Matsuo 
 Yasushi Masuda 
 mattyca...@gmail.com
+Glenn Maynard 
 Jason McBrayer 
 Kevin McConnell 
 mccutc...@gmail.com
+michael.mce...@gmail.com
 Paul McLanahan 
 Tobias McNulty 
 Zain Memon
 Christian Metts
-michael.mce...@gmail.com
+Carl Meyer 
 mic...@plovarna.cz
 Slawek Mikula 
 mitakum...@gmail.com
@@ -338,6 +338,7 @@
 Aljosa Mohorovic 
 Ramiro Morales 
 Eric Moritz 
+msaelices 
 Gregor Müllegger 
 Robin Munn 
 James Murty
@@ -345,7 +346,6 @@
 Robert Myers 
 Aaron T. Myers 
 Alexander Myodov 
-Nebojša Dorđević
 Doug Napoleone 
 Gopal Narayanan 
 Fraser Nevett 
@@ -373,7 +373,6 @@
 phil.h.sm...@gmail.com
 Gustavo Picon
 Michael Placentra II 
-Luke Plant 
 plisk
 Daniel Poelzleithner 
 pol...@yahoo.com
@@ -404,7 +403,6 @@
 Henrique Romano 
 Armin Ronacher
 Daniel Roseman 
-Brian Rosner 
 Rozza 

[Changeset] r13585 - django/trunk

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:57:16 -0500 (Sat, 14 Aug 2010)
New Revision: 13585

Modified:
   django/trunk/AUTHORS
Log:
Fixed #14002 -- Updated filesize filter to support terabyte and petabyte file 
sizes. Thanks to Aaron T. Myers for the patch.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-08-14 12:45:15 UTC (rev 13584)
+++ django/trunk/AUTHORS2010-08-14 12:57:16 UTC (rev 13585)
@@ -316,7 +316,6 @@
 Petr Marhoun 
 Petar Marić 
 Nuno Mariz 
-Marijn Vriens 
 m...@junklight.com
 Orestis Markou 
 Takashi Matsuo 
@@ -484,6 +483,7 @@
 George Vilches 
 Vlado 
 Zachary Voase 
+Marijn Vriens 
 Milton Waddams
 Chris Wagner 
 Rick Wagner 

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



[Changeset] r13584 - in django/trunk: . django/template tests/regressiontests/defaultfilters

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:45:15 -0500 (Sat, 14 Aug 2010)
New Revision: 13584

Modified:
   django/trunk/AUTHORS
   django/trunk/django/template/defaultfilters.py
   django/trunk/tests/regressiontests/defaultfilters/tests.py
Log:
Fixed #14002 -- Updated filesize filter to support terabyte and petabyte file 
sizes. Thanks to Aaron T. Myers for the patch.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-08-14 12:33:31 UTC (rev 13583)
+++ django/trunk/AUTHORS2010-08-14 12:45:15 UTC (rev 13584)
@@ -344,6 +344,7 @@
 James Murty
 msundstr
 Robert Myers 
+Aaron T. Myers 
 Alexander Myodov 
 Nebojša Dorđević
 Doug Napoleone 

Modified: django/trunk/django/template/defaultfilters.py
===
--- django/trunk/django/template/defaultfilters.py  2010-08-14 12:33:31 UTC 
(rev 13583)
+++ django/trunk/django/template/defaultfilters.py  2010-08-14 12:45:15 UTC 
(rev 13584)
@@ -807,13 +807,19 @@
 except (TypeError,ValueError,UnicodeDecodeError):
 return u"0 bytes"
 
-if bytes < 1024:
+BYTE_UNITS = (
+('KB', 1024),
+('MB', 1024 * 1024),
+('GB', 1024 * 1024 * 1024),
+('TB', 1024 * 1024 * 1024 * 1024),
+('PB', 1024 * 1024 * 1024 * 1024 * 1024)
+)
+
+if bytes < BYTE_UNITS[0][1]:
 return ungettext("%(size)d byte", "%(size)d bytes", bytes) % {'size': 
bytes}
-if bytes < 1024 * 1024:
-return ugettext("%.1f KB") % (bytes / 1024)
-if bytes < 1024 * 1024 * 1024:
-return ugettext("%.1f MB") % (bytes / (1024 * 1024))
-return ugettext("%.1f GB") % (bytes / (1024 * 1024 * 1024))
+for index, (unit, unit_size) in enumerate(BYTE_UNITS):
+if bytes < unit_size * 1024 or index == len(BYTE_UNITS) - 1:
+return ugettext("%.1f %s") % (bytes / unit_size, unit)
 filesizeformat.is_safe = True
 
 def pluralize(value, arg=u's'):

Modified: django/trunk/tests/regressiontests/defaultfilters/tests.py
===
--- django/trunk/tests/regressiontests/defaultfilters/tests.py  2010-08-14 
12:33:31 UTC (rev 13583)
+++ django/trunk/tests/regressiontests/defaultfilters/tests.py  2010-08-14 
12:45:15 UTC (rev 13584)
@@ -476,6 +476,15 @@
 >>> filesizeformat(1024*1024*1024)
 u'1.0 GB'
 
+>>> filesizeformat(1024*1024*1024*1024)
+u'1.0 TB'
+
+>>> filesizeformat(1024*1024*1024*1024*1024)
+u'1.0 PB'
+
+>>> filesizeformat(1024*1024*1024*1024*1024*2000)
+u'2000.0 PB'
+
 >>> filesizeformat(complex(1,-1))
 u'0 bytes'
 

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



[Changeset] r13582 - django/trunk/django/conf/locale/eu/LC_MESSAGES

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:32:22 -0500 (Sat, 14 Aug 2010)
New Revision: 13582

Modified:
   django/trunk/django/conf/locale/eu/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/eu/LC_MESSAGES/django.po
Log:
Fixed #13905 -- Updated Basque translation. Thanks to Aitzol Naberan.

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


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

Modified: django/trunk/django/conf/locale/eu/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/eu/LC_MESSAGES/django.po2010-08-14 
12:19:44 UTC (rev 13581)
+++ django/trunk/django/conf/locale/eu/LC_MESSAGES/django.po2010-08-14 
12:32:22 UTC (rev 13582)
@@ -7,13 +7,13 @@
 "Project-Id-Version: Django\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2008-02-08 19:37+0100\n"
-"PO-Revision-Date: 2008-02-14 22:12+0100\n"
-"Last-Translator: Ibon\n"
+"PO-Revision-Date: 2010-07-08 12:55+0200\n"
+"Last-Translator: Aitzol Naberan \n"
 "Language-Team:  \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.4\n"
+"X-Generator: emacs\n"
 
 #: conf/global_settings.py:39
 msgid "Arabic"
@@ -53,7 +53,7 @@
 
 #: conf/global_settings.py:48
 msgid "English"
-msgstr "Ingeles"
+msgstr "Ingelesa"
 
 #: conf/global_settings.py:49
 msgid "Spanish"
@@ -69,7 +69,7 @@
 
 #: conf/global_settings.py:52
 msgid "Finnish"
-msgstr "Finlandesa"
+msgstr "Finlandiera"
 
 #: conf/global_settings.py:53
 msgid "French"
@@ -81,11 +81,11 @@
 
 #: conf/global_settings.py:55
 msgid "Galician"
-msgstr "Galiziarra"
+msgstr "Galiziera"
 
 #: conf/global_settings.py:56
 msgid "Hungarian"
-msgstr "Hungarierra"
+msgstr "Hungariera"
 
 #: conf/global_settings.py:57
 msgid "Hebrew"
@@ -129,7 +129,7 @@
 
 #: conf/global_settings.py:67
 msgid "Dutch"
-msgstr "Holandesa"
+msgstr "Holandera"
 
 #: conf/global_settings.py:68
 msgid "Norwegian"
@@ -246,15 +246,15 @@
 
 #: contrib/admin/models.py:18
 msgid "action time"
-msgstr "Ekintz hordua"
+msgstr "Ekintza hordua"
 
 #: contrib/admin/models.py:21
 msgid "object id"
-msgstr "Objetuaren id"
+msgstr "Objetuaren id-a"
 
 #: contrib/admin/models.py:22
 msgid "object repr"
-msgstr "Objeturaren repr"
+msgstr "Objeturaren aurkezpena"
 
 #: contrib/admin/models.py:23
 msgid "action flag"
@@ -275,11 +275,11 @@
 #: contrib/admin/templates/admin/404.html:4
 #: contrib/admin/templates/admin/404.html:8
 msgid "Page not found"
-msgstr "Ez da lekua aurkitu"
+msgstr "Ez da orririk aurkitu"
 
 #: contrib/admin/templates/admin/404.html:10
 msgid "We're sorry, but the requested page could not be found."
-msgstr "Barkatu, eskatutako lekua ezin daiteke aurkitu"
+msgstr "Barkatu, eskatutako orria ezin daiteke aurkitu"
 
 #: contrib/admin/templates/admin/500.html:4
 #: contrib/admin/templates/admin/base.html:37
@@ -300,21 +300,21 @@
 
 #: contrib/admin/templates/admin/500.html:4
 msgid "Server error"
-msgstr "Serbidore errorea"
+msgstr "Zerbitzari errorea"
 
 #: contrib/admin/templates/admin/500.html:6
 msgid "Server error (500)"
-msgstr "Serbidor errorea (500)"
+msgstr "Zerbitzari errorea (500)"
 
 #: contrib/admin/templates/admin/500.html:9
 msgid "Server Error (500)"
-msgstr "Serbidore Errorea (500)"
+msgstr "Zerbitzari Errorea (500)"
 
 #: contrib/admin/templates/admin/500.html:10
 msgid ""
 "There's been an error. It's been reported to the site administrators via e-"
 "mail and should be fixed shortly. Thanks for your patience."
-msgstr "Arazo bat izan da. Web guneraren administradorea e-mail bidez ohartuko 
da eta laister konpondua egon beharko luke. Barkatu arazoak."
+msgstr "Arazo bat izan da. Web guneraren administradoreri abisu email bat 
bidali zaio eta laister konpondua egon beharko luke. Barkatu eragozpenak."
 
 #: contrib/admin/templates/admin/base.html:26
 msgid "Welcome,"
@@ -329,7 +329,7 @@
 #: contrib/admin/templates/admin/auth/user/change_password.html:14
 #: contrib/admin/templates/admin/auth/user/change_password.html:45
 msgid "Change password"
-msgstr "Hitz ezkutua aldatu"
+msgstr "Pasahitza aldatu"
 
 #: contrib/admin/templates/admin/base.html:30
 #: contrib/comments/templates/comments/form.html:6
@@ -338,11 +338,11 @@
 
 #: contrib/admin/templates/admin/base_site.html:4
 msgid "Django site admin"
-msgstr "Django admin. gunea"
+msgstr "Django kudeaketa gunea"
 
 #: contrib/admin/templates/admin/base_site.html:7
 msgid "Django administration"
-msgstr "Django administradorea"
+msgstr "Django kudeaketa"
 
 #: contrib/admin/templates/admin/change_form.html:14
 #: contrib/admin/templates/admin/index.html:28
@@ -356,18 +356,18 @@
 
 #: 

Re: [Django] #13833: Fix for Indonesian localization

2010-08-14 Thread Django
#13833: Fix for Indonesian localization
---+
  Reporter:  rodin | Owner:  nobody
Status:  new   | Milestone:
 Component:  Translations  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 Thanks for the contribution; however, the patch doesn't apply cleanly.

 Firstly, you don't have to include .mo files as part of your patch.
 They're compiled binary artefacts; you only need to submit a patch to the
 .po files.

 Secondly, I get the following error compiling your po files:
 {{{
 /Users/rkm/projects/django/hg/django/conf/locale/id/LC_MESSAGES/django.po:1126:
 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: The
 string ends in the middle of a directive.
 }}}

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

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



Re: [Django] #14080: Flatpages pt-br translation

2010-08-14 Thread Django
#14080: Flatpages pt-br translation
---+
  Reporter:  canassa   | Owner:  anonymous
Status:  assigned  | Milestone:   
 Component:  Translations  |   Version:  1.2  
Resolution:|  Keywords:   
 Stage:  Unreviewed| Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by russellm):

 Thanks for the report; this needs to be submitted in the form of a patch
 against trunk so we can apply it. There have been some recent translatable
 string changes, so there is a need to update the pt-br translation.

 See the [http://docs.djangoproject.com/en/1.2/internals/contributing
 /#submitting-and-maintaining-translations contribution docs] for more
 details on how to contribute a translation update.

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

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



[Django] #14109: can't create django docs - ImportError

2010-08-14 Thread Django
#14109: can't create django docs - ImportError
---+
 Reporter:  dvdx   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 {{{
 # Sphinx version: 1.0.1
 # Docutils version: 0.7 release
 # Jinja2 version: 2.5
 Traceback (most recent call last):
   File "C:\Python26\lib\site-
 packages\sphinx-1.0.1-py2.6.egg\sphinx\cmdline.py", line 173, in main
 app.build(force_all, filenames)
   File "C:\Python26\lib\site-
 packages\sphinx-1.0.1-py2.6.egg\sphinx\application.py", line 207, in build
 self.builder.build_update()
   File "C:\Python26\lib\site-
 packages\sphinx-1.0.1-py2.6.egg\sphinx\builders\__init__.py", line 198, in
 build_update
 'out of date' % len(to_build))
   File "C:\Python26\lib\site-
 packages\sphinx-1.0.1-py2.6.egg\sphinx\builders\__init__.py", line 218, in
 build
 purple, length):
   File "C:\Python26\lib\site-
 packages\sphinx-1.0.1-py2.6.egg\sphinx\builders\__init__.py", line 120, in
 status_iterator
 for item in iterable:
   File "C:\Python26\lib\site-
 packages\sphinx-1.0.1-py2.6.egg\sphinx\environment.py", line 515, in
 update_generator
 self.read_doc(docname, app=app)
   File "C:\Python26\lib\site-
 packages\sphinx-1.0.1-py2.6.egg\sphinx\environment.py", line 655, in
 read_doc
 pub.publish()
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\core.py", line 203, in publish
 self.settings)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\readers\__init__.py", line 69, in
 read
 self.parse()
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\readers\__init__.py", line 75, in
 parse
 self.parser.parse(self.input, document)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\__init__.py", line
 157, in parse
 self.statemachine.run(inputlines, document, inliner=self.inliner)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 170,
 in run
 input_source=document['source'])
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\statemachine.py", line 233, in
 run
 context, state, transitions)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\statemachine.py", line 454, in
 check_line
 return method(match, context, next_state)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line
 2940, in text
 self.section(title.lstrip(), source, style, lineno + 1, messages)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 329,
 in section
 self.new_subsection(title, lineno, messages)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 398,
 in new_subsection
 node=section_node, match_titles=1)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 284,
 in nested_parse
 node=node, match_titles=match_titles)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 195,
 in run
 results = StateMachineWS.run(self, input_lines, input_offset)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\statemachine.py", line 233, in
 run
 context, state, transitions)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\statemachine.py", line 454, in
 check_line
 return method(match, context, next_state)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line
 2706, in underline
 self.section(title, source, style, lineno - 1, messages)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 329,
 in section
 self.new_subsection(title, lineno, messages)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 398,
 in new_subsection
 node=section_node, match_titles=1)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 284,
 in nested_parse
 node=node, match_titles=match_titles)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\parsers\rst\states.py", line 195,
 in run
 results = StateMachineWS.run(self, input_lines, input_offset)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\statemachine.py", line 233, in
 run
 context, state, transitions)
   File "C:\Python26\lib\site-
 packages\docutils-0.7-py2.6.egg\docutils\statemachine.py", line 454, in
 check_line
 return method(match, context, next_state)
   

[Changeset] r13581 - django/trunk/django/conf/locale/nn/LC_MESSAGES

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:19:44 -0500 (Sat, 14 Aug 2010)
New Revision: 13581

Modified:
   django/trunk/django/conf/locale/nn/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/nn/LC_MESSAGES/django.po
Log:
Fixed #14079 -- Updated Norwegian Nynorsk translation. Thanks to 
H?\195?\165vard Grimelid.

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


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

Modified: django/trunk/django/conf/locale/nn/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/nn/LC_MESSAGES/django.po2010-08-14 
12:19:19 UTC (rev 13580)
+++ django/trunk/django/conf/locale/nn/LC_MESSAGES/django.po2010-08-14 
12:19:44 UTC (rev 13581)
@@ -6,7 +6,7 @@
 msgstr ""
 "Project-Id-Version: Django\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-16 22:39+0200\n"
+"POT-Creation-Date: 2010-08-07 21:14+0200\n"
 "PO-Revision-Date: 2010-03-04 12:13+0200\n"
 "Last-Translator: Håvard Grimelid\n"
 "Language-Team: Norsk nynorsk \n"
@@ -67,7 +67,7 @@
 msgstr "Spansk"
 
 #: conf/global_settings.py:57
-msgid "Argentinean Spanish"
+msgid "Argentinian Spanish"
 msgstr "Argentinsk spansk"
 
 #: conf/global_settings.py:58
@@ -163,98 +163,102 @@
 msgstr "Makedonsk"
 
 #: conf/global_settings.py:81
+msgid "Malayalam"
+msgstr "Malayalam"
+
+#: conf/global_settings.py:82
 msgid "Mongolian"
 msgstr "Mongolsk"
 
-#: conf/global_settings.py:82
+#: conf/global_settings.py:83
 msgid "Dutch"
 msgstr "Nederlandsk"
 
-#: conf/global_settings.py:83
+#: conf/global_settings.py:84
 msgid "Norwegian"
 msgstr "Norsk"
 
-#: conf/global_settings.py:84
+#: conf/global_settings.py:85
 msgid "Norwegian Bokmal"
 msgstr "Norsk (bokmål)"
 
-#: conf/global_settings.py:85
+#: conf/global_settings.py:86
 msgid "Norwegian Nynorsk"
 msgstr "Norsk (nynorsk)"
 
-#: conf/global_settings.py:86
+#: conf/global_settings.py:87
 msgid "Polish"
 msgstr "Polsk"
 
-#: conf/global_settings.py:87
+#: conf/global_settings.py:88
 msgid "Portuguese"
 msgstr "Portugisisk"
 
-#: conf/global_settings.py:88
+#: conf/global_settings.py:89
 msgid "Brazilian Portuguese"
 msgstr "Brasiliansk portugisisk"
 
-#: conf/global_settings.py:89
+#: conf/global_settings.py:90
 msgid "Romanian"
 msgstr "Rumensk"
 
-#: conf/global_settings.py:90
+#: conf/global_settings.py:91
 msgid "Russian"
 msgstr "Russisk"
 
-#: conf/global_settings.py:91
+#: conf/global_settings.py:92
 msgid "Slovak"
 msgstr "Slovakisk"
 
-#: conf/global_settings.py:92
+#: conf/global_settings.py:93
 msgid "Slovenian"
 msgstr "Slovensk"
 
-#: conf/global_settings.py:93
+#: conf/global_settings.py:94
 msgid "Albanian"
 msgstr "Albansk"
 
-#: conf/global_settings.py:94
+#: conf/global_settings.py:95
 msgid "Serbian"
 msgstr "Serbisk"
 
-#: conf/global_settings.py:95
+#: conf/global_settings.py:96
 msgid "Serbian Latin"
 msgstr "Serbisk latin"
 
-#: conf/global_settings.py:96
+#: conf/global_settings.py:97
 msgid "Swedish"
 msgstr "Svensk"
 
-#: conf/global_settings.py:97
+#: conf/global_settings.py:98
 msgid "Tamil"
 msgstr "Tamil"
 
-#: conf/global_settings.py:98
+#: conf/global_settings.py:99
 msgid "Telugu"
 msgstr "Telugu"
 
-#: conf/global_settings.py:99
+#: conf/global_settings.py:100
 msgid "Thai"
 msgstr "Thai"
 
-#: conf/global_settings.py:100
+#: conf/global_settings.py:101
 msgid "Turkish"
 msgstr "Tyrkisk"
 
-#: conf/global_settings.py:101
+#: conf/global_settings.py:102
 msgid "Ukrainian"
 msgstr "Ukrainsk"
 
-#: conf/global_settings.py:102
+#: conf/global_settings.py:103
 msgid "Vietnamese"
 msgstr "Vietnamesisk"
 
-#: conf/global_settings.py:103
+#: conf/global_settings.py:104
 msgid "Simplified Chinese"
 msgstr "Simplifisert kinesisk"
 
-#: conf/global_settings.py:104
+#: conf/global_settings.py:105
 msgid "Traditional Chinese"
 msgstr "Tradisjonell kinesisk"
 
@@ -306,15 +310,15 @@
 msgid "This year"
 msgstr "I år"
 
-#: contrib/admin/filterspecs.py:147 forms/widgets.py:469
+#: contrib/admin/filterspecs.py:147 forms/widgets.py:478
 msgid "Yes"
 msgstr "Ja"
 
-#: contrib/admin/filterspecs.py:147 forms/widgets.py:469
+#: contrib/admin/filterspecs.py:147 forms/widgets.py:478
 msgid "No"
 msgstr "Nei"
 
-#: contrib/admin/filterspecs.py:154 forms/widgets.py:469
+#: contrib/admin/filterspecs.py:154 forms/widgets.py:478
 msgid "Unknown"
 msgstr "Ukjend"
 
@@ -451,8 +455,8 @@
 #, python-format
 msgid "%(total_count)s selected"
 msgid_plural "All %(total_count)s selected"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "%(total_count)s valde"
+msgstr[1] "Alle %(total_count)s valde"
 
 #: contrib/admin/options.py:1071
 #, python-format
@@ -684,7 +688,7 @@
 msgstr "Filtrering"
 
 #: contrib/admin/templates/admin/delete_confirmation.html:10

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

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:19:19 -0500 (Sat, 14 Aug 2010)
New Revision: 13580

Modified:
   django/trunk/django/conf/locale/fr/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/fr/LC_MESSAGES/django.po
Log:
Fixed #14084 -- Updated French translation. Thanks to stephaner.

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.po2010-08-14 
12:11:02 UTC (rev 13579)
+++ django/trunk/django/conf/locale/fr/LC_MESSAGES/django.po2010-08-14 
12:19:19 UTC (rev 13580)
@@ -10,9 +10,9 @@
 msgstr ""
 "Project-Id-Version: Django\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-14 11:01+0200\n"
-"PO-Revision-Date: 2010-04-17 00:18+0200\n"
-"Last-Translator: David Larlet \n"
+"POT-Creation-Date: 2010-08-09 12:11+0200\n"
+"PO-Revision-Date: 2010-08-09 14:38+0200\n"
+"Last-Translator: Stéphane Raimbault \n"
 "Language-Team: French \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -72,7 +72,7 @@
 msgstr "Espagnol"
 
 #: conf/global_settings.py:57
-msgid "Argentinean Spanish"
+msgid "Argentinian Spanish"
 msgstr "Espagnol argentin"
 
 #: conf/global_settings.py:58
@@ -168,98 +168,102 @@
 msgstr "Macédonien"
 
 #: conf/global_settings.py:81
+msgid "Malayalam"
+msgstr "Malayâlam"
+
+#: conf/global_settings.py:82
 msgid "Mongolian"
 msgstr "Mongole"
 
-#: conf/global_settings.py:82
+#: conf/global_settings.py:83
 msgid "Dutch"
 msgstr "Hollandais"
 
-#: conf/global_settings.py:83
+#: conf/global_settings.py:84
 msgid "Norwegian"
 msgstr "Norvégien"
 
-#: conf/global_settings.py:84
+#: conf/global_settings.py:85
 msgid "Norwegian Bokmal"
 msgstr "Norvégien Bokmal"
 
-#: conf/global_settings.py:85
+#: conf/global_settings.py:86
 msgid "Norwegian Nynorsk"
 msgstr "Norvégien Nynorsk"
 
-#: conf/global_settings.py:86
+#: conf/global_settings.py:87
 msgid "Polish"
 msgstr "Polonais"
 
-#: conf/global_settings.py:87
+#: conf/global_settings.py:88
 msgid "Portuguese"
 msgstr "Portugais"
 
-#: conf/global_settings.py:88
+#: conf/global_settings.py:89
 msgid "Brazilian Portuguese"
 msgstr "Portugais brésilien"
 
-#: conf/global_settings.py:89
+#: conf/global_settings.py:90
 msgid "Romanian"
 msgstr "Roumain"
 
-#: conf/global_settings.py:90
+#: conf/global_settings.py:91
 msgid "Russian"
 msgstr "Russe"
 
-#: conf/global_settings.py:91
+#: conf/global_settings.py:92
 msgid "Slovak"
 msgstr "Slovaque"
 
-#: conf/global_settings.py:92
+#: conf/global_settings.py:93
 msgid "Slovenian"
 msgstr "Slovène"
 
-#: conf/global_settings.py:93
+#: conf/global_settings.py:94
 msgid "Albanian"
 msgstr "Albanais"
 
-#: conf/global_settings.py:94
+#: conf/global_settings.py:95
 msgid "Serbian"
 msgstr "Serbe"
 
-#: conf/global_settings.py:95
+#: conf/global_settings.py:96
 msgid "Serbian Latin"
 msgstr "Serbe latin"
 
-#: conf/global_settings.py:96
+#: conf/global_settings.py:97
 msgid "Swedish"
 msgstr "Suédois"
 
-#: conf/global_settings.py:97
+#: conf/global_settings.py:98
 msgid "Tamil"
 msgstr "Tamoul"
 
-#: conf/global_settings.py:98
+#: conf/global_settings.py:99
 msgid "Telugu"
 msgstr "Télougou"
 
-#: conf/global_settings.py:99
+#: conf/global_settings.py:100
 msgid "Thai"
 msgstr "Thaï"
 
-#: conf/global_settings.py:100
+#: conf/global_settings.py:101
 msgid "Turkish"
 msgstr "Turc"
 
-#: conf/global_settings.py:101
+#: conf/global_settings.py:102
 msgid "Ukrainian"
 msgstr "Ukrainien"
 
-#: conf/global_settings.py:102
+#: conf/global_settings.py:103
 msgid "Vietnamese"
 msgstr "Vietnamien"
 
-#: conf/global_settings.py:103
+#: conf/global_settings.py:104
 msgid "Simplified Chinese"
 msgstr "Chinois simplifié"
 
-#: conf/global_settings.py:104
+#: conf/global_settings.py:105
 msgid "Traditional Chinese"
 msgstr "Chinois traditionnel"
 
@@ -311,15 +315,15 @@
 msgid "This year"
 msgstr "Cette année"
 
-#: contrib/admin/filterspecs.py:147 forms/widgets.py:469
+#: contrib/admin/filterspecs.py:147 forms/widgets.py:478
 msgid "Yes"
 msgstr "Oui"
 
-#: contrib/admin/filterspecs.py:147 forms/widgets.py:469
+#: contrib/admin/filterspecs.py:147 forms/widgets.py:478
 msgid "No"
 msgstr "Non"
 
-#: contrib/admin/filterspecs.py:154 forms/widgets.py:469
+#: contrib/admin/filterspecs.py:154 forms/widgets.py:478
 msgid "Unknown"
 msgstr "Inconnu"
 
@@ -697,7 +701,7 @@
 msgstr "Filtre"
 
 #: contrib/admin/templates/admin/delete_confirmation.html:10
-#: contrib/admin/templates/admin/submit_line.html:4 forms/formsets.py:302
+#: contrib/admin/templates/admin/submit_line.html:4 forms/formsets.py:300
 msgid "Delete"
 msgstr "Supprimer"
 
@@ -796,7 +800,7 @@
 
 #: contrib/admin/templates/admin/login.html:19
 msgid "Username:"
-msgstr "Nom 

Re: [Django] #14086: Tests don't pass on Python 2.4 because of a try/except/finally

2010-08-14 Thread Django
#14086: Tests don't pass on Python 2.4 because of a try/except/finally
--+-
  Reporter:  PaulM| Owner:  nobody
Status:  closed   | Milestone:
 Component:  django.contrib.sessions  |   Version:  SVN   
Resolution:  fixed|  Keywords:
 Stage:  Design decision needed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by russellm):

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

Comment:

 (In [13579]) Fixed #14086 -- Corrected Python 2.4 syntax issue. Thanks to
 PaulM for the report.

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

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



Re: [Django] #14096: Insert code generated by models using multiple inheritance is incorrect and fails in postgresql

2010-08-14 Thread Django
#14096: Insert code generated by models using multiple inheritance is incorrect 
and
fails in postgresql
---+
  Reporter:  pembo13   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:  orm   
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 Fat fingers; [13579] closed #14086.

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

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



[Changeset] r13579 - django/trunk/django/contrib/sessions

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:11:02 -0500 (Sat, 14 Aug 2010)
New Revision: 13579

Modified:
   django/trunk/django/contrib/sessions/tests.py
Log:
Fixed #14096 -- Corrected Python 2.4 syntax issue. Thanks to PaulM for the 
report.

Modified: django/trunk/django/contrib/sessions/tests.py
===
--- django/trunk/django/contrib/sessions/tests.py   2010-08-14 12:07:25 UTC 
(rev 13578)
+++ django/trunk/django/contrib/sessions/tests.py   2010-08-14 12:11:02 UTC 
(rev 13579)
@@ -207,32 +207,32 @@
 # Tests get_expire_at_browser_close with different settings and 
different
 # set_expiry calls
 try:
-original_expire_at_browser_close = 
settings.SESSION_EXPIRE_AT_BROWSER_CLOSE
-settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = False
+try:
+original_expire_at_browser_close = 
settings.SESSION_EXPIRE_AT_BROWSER_CLOSE
+settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = False
 
-self.session.set_expiry(10)
-self.assertFalse(self.session.get_expire_at_browser_close())
+self.session.set_expiry(10)
+self.assertFalse(self.session.get_expire_at_browser_close())
 
-self.session.set_expiry(0)
-self.assertTrue(self.session.get_expire_at_browser_close())
+self.session.set_expiry(0)
+self.assertTrue(self.session.get_expire_at_browser_close())
 
-self.session.set_expiry(None)
-self.assertFalse(self.session.get_expire_at_browser_close())
+self.session.set_expiry(None)
+self.assertFalse(self.session.get_expire_at_browser_close())
 
-settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = True
+settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = True
 
-self.session.set_expiry(10)
-self.assertFalse(self.session.get_expire_at_browser_close())
+self.session.set_expiry(10)
+self.assertFalse(self.session.get_expire_at_browser_close())
 
-self.session.set_expiry(0)
-self.assertTrue(self.session.get_expire_at_browser_close())
+self.session.set_expiry(0)
+self.assertTrue(self.session.get_expire_at_browser_close())
 
-self.session.set_expiry(None)
-self.assertTrue(self.session.get_expire_at_browser_close())
+self.session.set_expiry(None)
+self.assertTrue(self.session.get_expire_at_browser_close())
 
-except:
-raise
-
+except:
+raise
 finally:
 settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = 
original_expire_at_browser_close
 

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



[Changeset] r13578 - in django/branches/releases/1.2.X: django/forms tests/regressiontests/forms

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:07:25 -0500 (Sat, 14 Aug 2010)
New Revision: 13578

Modified:
   django/branches/releases/1.2.X/django/forms/fields.py
   django/branches/releases/1.2.X/django/forms/forms.py
   django/branches/releases/1.2.X/django/forms/models.py
   django/branches/releases/1.2.X/django/forms/widgets.py
   django/branches/releases/1.2.X/tests/regressiontests/forms/models.py
Log:
[1.2.X] Fixed #13679, #13231, #7287 -- Ensured that models that have 
ForeignKeys/ManyToManyField can use a a callable default that returns a model 
instance/queryset. #13679 was a regression in behavior; the other two tickets 
are pleasant side effects. Thanks to 3point2 for the report.

Backport of r13577 from trunk.

Modified: django/branches/releases/1.2.X/django/forms/fields.py
===
--- django/branches/releases/1.2.X/django/forms/fields.py   2010-08-14 
12:05:41 UTC (rev 13577)
+++ django/branches/releases/1.2.X/django/forms/fields.py   2010-08-14 
12:07:25 UTC (rev 13578)
@@ -127,6 +127,9 @@
 
 self.validators = self.default_validators + validators
 
+def prepare_value(self, value):
+return value
+
 def to_python(self, value):
 return value
 

Modified: django/branches/releases/1.2.X/django/forms/forms.py
===
--- django/branches/releases/1.2.X/django/forms/forms.py2010-08-14 
12:05:41 UTC (rev 13577)
+++ django/branches/releases/1.2.X/django/forms/forms.py2010-08-14 
12:07:25 UTC (rev 13578)
@@ -18,10 +18,10 @@
 NON_FIELD_ERRORS = '__all__'
 
 def pretty_name(name):
-"""Converts 'first_name' to 'First name'""" 
-if not name: 
-return u'' 
-return name.replace('_', ' ').capitalize() 
+"""Converts 'first_name' to 'First name'"""
+if not name:
+return u''
+return name.replace('_', ' ').capitalize()
 
 def get_declared_fields(bases, attrs, with_base_fields=True):
 """
@@ -423,6 +423,7 @@
 """
 if not widget:
 widget = self.field.widget
+
 attrs = attrs or {}
 auto_id = self.auto_id
 if auto_id and 'id' not in attrs and 'id' not in widget.attrs:
@@ -430,6 +431,7 @@
 attrs['id'] = auto_id
 else:
 attrs['id'] = self.html_initial_id
+
 if not self.form.is_bound:
 data = self.form.initial.get(self.name, self.field.initial)
 if callable(data):
@@ -439,6 +441,8 @@
 data = self.form.initial.get(self.name, self.field.initial)
 else:
 data = self.data
+data = self.field.prepare_value(data)
+
 if not only_initial:
 name = self.html_name
 else:

Modified: django/branches/releases/1.2.X/django/forms/models.py
===
--- django/branches/releases/1.2.X/django/forms/models.py   2010-08-14 
12:05:41 UTC (rev 13577)
+++ django/branches/releases/1.2.X/django/forms/models.py   2010-08-14 
12:07:25 UTC (rev 13578)
@@ -906,13 +906,8 @@
 return len(self.queryset)
 
 def choice(self, obj):
-if self.field.to_field_name:
-key = obj.serializable_value(self.field.to_field_name)
-else:
-key = obj.pk
-return (key, self.field.label_from_instance(obj))
+return (self.field.prepare_value(obj), 
self.field.label_from_instance(obj))
 
-
 class ModelChoiceField(ChoiceField):
 """A ChoiceField whose choices are a model QuerySet."""
 # This class is a subclass of ChoiceField for purity, but it doesn't
@@ -971,8 +966,8 @@
 return self._choices
 
 # Otherwise, execute the QuerySet in self.queryset to determine the
-# choices dynamically. Return a fresh QuerySetIterator that has not 
been
-# consumed. Note that we're instantiating a new QuerySetIterator *each*
+# choices dynamically. Return a fresh ModelChoiceIterator that has not 
been
+# consumed. Note that we're instantiating a new ModelChoiceIterator 
*each*
 # time _get_choices() is called (and, thus, each time self.choices is
 # accessed) so that we can ensure the QuerySet has not been consumed. 
This
 # construct might look complicated but it allows for lazy evaluation of
@@ -981,6 +976,14 @@
 
 choices = property(_get_choices, ChoiceField._set_choices)
 
+def prepare_value(self, value):
+if hasattr(value, '_meta'):
+if self.to_field_name:
+return value.serializable_value(self.to_field_name)
+else:
+return value.pk
+return super(ModelChoiceField, self).prepare_value(value)
+
 def to_python(self, value):
 if value in EMPTY_VALUES:
 return None
@@ -1030,3 +1033,8 @@
 if force_unicode(val) not in pks:
 raise 

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

2010-08-14 Thread noreply
Author: russellm
Date: 2010-08-14 07:05:41 -0500 (Sat, 14 Aug 2010)
New Revision: 13577

Modified:
   django/trunk/django/forms/fields.py
   django/trunk/django/forms/forms.py
   django/trunk/django/forms/models.py
   django/trunk/django/forms/widgets.py
   django/trunk/tests/regressiontests/forms/models.py
Log:
Fixed #13679, #13231, #7287 -- Ensured that models that have 
ForeignKeys/ManyToManyField can use a a callable default that returns a model 
instance/queryset. #13679 was a regression in behavior; the other two tickets 
are pleasant side effects. Thanks to 3point2 for the report.

Modified: django/trunk/django/forms/fields.py
===
--- django/trunk/django/forms/fields.py 2010-08-14 00:52:33 UTC (rev 13576)
+++ django/trunk/django/forms/fields.py 2010-08-14 12:05:41 UTC (rev 13577)
@@ -127,6 +127,9 @@
 
 self.validators = self.default_validators + validators
 
+def prepare_value(self, value):
+return value
+
 def to_python(self, value):
 return value
 

Modified: django/trunk/django/forms/forms.py
===
--- django/trunk/django/forms/forms.py  2010-08-14 00:52:33 UTC (rev 13576)
+++ django/trunk/django/forms/forms.py  2010-08-14 12:05:41 UTC (rev 13577)
@@ -18,10 +18,10 @@
 NON_FIELD_ERRORS = '__all__'
 
 def pretty_name(name):
-"""Converts 'first_name' to 'First name'""" 
-if not name: 
-return u'' 
-return name.replace('_', ' ').capitalize() 
+"""Converts 'first_name' to 'First name'"""
+if not name:
+return u''
+return name.replace('_', ' ').capitalize()
 
 def get_declared_fields(bases, attrs, with_base_fields=True):
 """
@@ -423,6 +423,7 @@
 """
 if not widget:
 widget = self.field.widget
+
 attrs = attrs or {}
 auto_id = self.auto_id
 if auto_id and 'id' not in attrs and 'id' not in widget.attrs:
@@ -430,6 +431,7 @@
 attrs['id'] = auto_id
 else:
 attrs['id'] = self.html_initial_id
+
 if not self.form.is_bound:
 data = self.form.initial.get(self.name, self.field.initial)
 if callable(data):
@@ -439,6 +441,8 @@
 data = self.form.initial.get(self.name, self.field.initial)
 else:
 data = self.data
+data = self.field.prepare_value(data)
+
 if not only_initial:
 name = self.html_name
 else:

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2010-08-14 00:52:33 UTC (rev 13576)
+++ django/trunk/django/forms/models.py 2010-08-14 12:05:41 UTC (rev 13577)
@@ -906,13 +906,8 @@
 return len(self.queryset)
 
 def choice(self, obj):
-if self.field.to_field_name:
-key = obj.serializable_value(self.field.to_field_name)
-else:
-key = obj.pk
-return (key, self.field.label_from_instance(obj))
+return (self.field.prepare_value(obj), 
self.field.label_from_instance(obj))
 
-
 class ModelChoiceField(ChoiceField):
 """A ChoiceField whose choices are a model QuerySet."""
 # This class is a subclass of ChoiceField for purity, but it doesn't
@@ -971,8 +966,8 @@
 return self._choices
 
 # Otherwise, execute the QuerySet in self.queryset to determine the
-# choices dynamically. Return a fresh QuerySetIterator that has not 
been
-# consumed. Note that we're instantiating a new QuerySetIterator *each*
+# choices dynamically. Return a fresh ModelChoiceIterator that has not 
been
+# consumed. Note that we're instantiating a new ModelChoiceIterator 
*each*
 # time _get_choices() is called (and, thus, each time self.choices is
 # accessed) so that we can ensure the QuerySet has not been consumed. 
This
 # construct might look complicated but it allows for lazy evaluation of
@@ -981,6 +976,14 @@
 
 choices = property(_get_choices, ChoiceField._set_choices)
 
+def prepare_value(self, value):
+if hasattr(value, '_meta'):
+if self.to_field_name:
+return value.serializable_value(self.to_field_name)
+else:
+return value.pk
+return super(ModelChoiceField, self).prepare_value(value)
+
 def to_python(self, value):
 if value in EMPTY_VALUES:
 return None
@@ -1030,3 +1033,8 @@
 if force_unicode(val) not in pks:
 raise ValidationError(self.error_messages['invalid_choice'] % 
val)
 return qs
+
+def prepare_value(self, value):
+if hasattr(value, '__iter__'):
+return [super(ModelMultipleChoiceField, self).prepare_value(v) for 
v in value]
+return super(ModelMultipleChoiceField, self).prepare_value(value)

Modified: 

Re: [Django] #10736: Add Uruguayan (uy) localflavor

2010-08-14 Thread Django
#10736: Add Uruguayan (uy) localflavor
-+--
  Reporter:  gonz| Owner:  nobody   
 
Status:  closed  | Milestone:  1.2  
 
 Component:  django.contrib.localflavor  |   Version:  SVN  
 
Resolution:  fixed   |  Keywords:  localflavor, 
l10n, uy, uruguay
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Comment (by mikeqw):

 Replying to [comment:6 john3050]:
 > Replying to [comment:5 jezdez]:
 > > (In [12041]) [http://www.online-phentermine.com buy phentermine
 online]Fixed #10736 - Added Uruguayan (uy) localflavor. Thanks
 [http://www.usquotesonline.com cheapest auto insurance] to Gonzalo
 Saavedra for providing the [http://www.direct-quotes.com direct insurance]
 patch.
 > Thank you too.
 Marking this 1.2 following Russell advice.

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

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