Re: [Django] #14893: TypeError when accessing deferred (defer(..)) geometry field when using proxy geographic model

2010-12-12 Thread Django
#14893: TypeError when accessing deferred (defer(..)) geometry field when using
proxy geographic model
-+--
  Reporter:  mal | Owner:  nobody  
Status:  new | Milestone:  
 Component:  GIS |   Version:  SVN 
Resolution:  |  Keywords:  proxy, gis, defer, TypeError
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by anonymous):

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

Comment:

 See the test case and more details [attachment:proxy-test.tar proxy-
 test.tar]

-- 
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] #14893: TypeError when accessing deferred (defer(..)) geometry field when using proxy geographic model

2010-12-12 Thread Django
#14893: TypeError when accessing deferred (defer(..)) geometry field when using
proxy geographic model
--+-
 Reporter:  mal   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  GIS   | Version:  SVN   
 Keywords:  proxy, gis, defer, TypeError  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 We are getting
 "TypeError: cannot set ... GeometryProxy with value of type: "
 when accessing deferred (defer(..)) geometry field when using proxy
 geographic model

 Consider the models like this -
 {{{
 #!python
 from django.contrib.gis.db import models
 class BaseModel (models.Model):
 id = models.AutoField(primary_key=True)
 name = models.CharField(max_length=50)
 text = models.CharField(max_length=50)
 location = models.PointField()

 objects = models.GeoManager()

 class ProxyModel (BaseModel):
 class Meta:
 proxy = True
 }}}

 Then reading the deferred location via the proxy class will fail:

 {{{
 #!python
 #create test object
 BaseModel(name='test object', text='some text', location='POINT (340
 6700010)').save()

 #load same object via the proxy class, deferring location
 #and try to access that location attribute
 o = ProxyModel.objects.defer("location")[0]
 print o.location
 }}}

 The last line fails with the following error:

 {{{
   File "c:\test\django-trunk\django\db\models\query_utils.py", line 102,
 in __get__
 instance._state.db).get(),
   File "c:\test\django-trunk\django\db\models\query.py", line 344, in get
 num = len(clone)
   File "c:\test\django-trunk\django\db\models\query.py", line 82, in
 __len__
 self._result_cache = list(self.iterator())
   File "c:\test\django-trunk\django\db\models\query.py", line 283, in
 iterator
 obj = model_cls(**dict(zip(init_list, row_data)))
   File "c:\test\django-trunk\django\db\models\base.py", line 353, in
 __init__
 setattr(self, field.attname, val)
   File "c:\test\django-trunk\django\contrib\gis\db\models\proxy.py", line
 60, in __set__
 raise TypeError('cannot set %s GeometryProxy with value of type: %s' %
 (obj.__class__.__name__, type(value)))
 TypeError: cannot set ProxyModel_Deferred_id_name_text GeometryProxy with
 value of type: 
 }}}


 Using the only(...) method results in the same error.
 No problems using non-Geographic models, or/and when deferring non-
 geometrical fields.

-- 
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] #9316: databrowse does not filter URL fields properly

2010-12-12 Thread Django
#9316: databrowse does not filter URL fields properly
+---
  Reporter:  ishirav| Owner:  nobody
Status:  new| Milestone:
 Component:  django.contrib.databrowse  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  1 
Needs_better_patch:  1  |  
+---
Changes (by adamv):

  * needs_better_patch:  0 => 1
  * has_patch:  0 => 1
  * version:  1.0 => SVN
  * needs_tests:  0 => 1

Comment:

 Added a preliminary patch. The Admin site uses a custom quote function to
 ensure that URL parts don't get unencoded at the wrong time on various
 hosting solutions or browsers. I borrowed the quote/unquote functions from
 admin and are slotting them into databrowse in places where text fields
 are slotted into URL segments.

-- 
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] #7857: manage.py shell, dbshell funtionality

2010-12-12 Thread Django
#7857: manage.py shell, dbshell funtionality
--+-
  Reporter:  Sanha| Owner:  nobody  
 
Status:  new  | Milestone:  
 
 Component:  django-admin.py  |   Version:  SVN 
 
Resolution:   |  Keywords:  manage.py, testserver, 
shell, dbshell
 Stage:  Accepted | Has_patch:  0   
 
Needs_docs:  0|   Needs_tests:  0   
 
Needs_better_patch:  0|  
--+-
Comment (by adamv):

 Separate commands, or "--test" parameter to existing commands? Perhaps the
 separate "test*" commands are less error-prone.

-- 
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] #14731: [Patch] Change 14413 breaks old fixtures with permissions

2010-12-12 Thread Django
#14731: [Patch] Change 14413 breaks old fixtures with permissions
+---
  Reporter:  chipx86| Owner:  nobody   
Status:  closed | Milestone:  1.3  
 Component:  Authentication |   Version:  1.3-alpha
Resolution:  fixed  |  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by chipx86):

 Thanks! :)

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

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



Re: [Django] #7857: manage.py shell, dbshell funtionality

2010-12-12 Thread Django
#7857: manage.py shell, dbshell funtionality
--+-
  Reporter:  Sanha| Owner:  nobody  
 
Status:  new  | Milestone:  
 
 Component:  django-admin.py  |   Version:  SVN 
 
Resolution:   |  Keywords:  manage.py, testserver, 
shell, dbshell
 Stage:  Accepted | Has_patch:  0   
 
Needs_docs:  0|   Needs_tests:  0   
 
Needs_better_patch:  0|  
--+-
Changes (by jezdez):

  * stage:  Design decision needed => Accepted

Comment:

 Seems like a reasonable idea.

-- 
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] r14896 - in django/trunk: django/core/management/commands docs/ref

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 17:03:24 -0600 (Sun, 12 Dec 2010)
New Revision: 14896

Modified:
   django/trunk/django/core/management/commands/shell.py
   django/trunk/docs/ref/django-admin.txt
Log:
Fixed #14187 -- Added support for bpython to shell management command. Thanks, 
Jeremy Dunck.

Modified: django/trunk/django/core/management/commands/shell.py
===
--- django/trunk/django/core/management/commands/shell.py   2010-12-12 
23:03:03 UTC (rev 14895)
+++ django/trunk/django/core/management/commands/shell.py   2010-12-12 
23:03:24 UTC (rev 14896)
@@ -8,7 +8,7 @@
 help='Tells Django to use plain Python, not IPython.'),
 )
 help = "Runs a Python interactive interpreter. Tries to use IPython, if 
it's available."
-shells = ['ipython']
+shells = ['ipython', 'bpython']
 requires_model_validation = False
 
 def ipython(self):
@@ -28,6 +28,10 @@
 # IPython not found at all, raise ImportError
 raise
 
+def bpython(self):
+import bpython
+bpython.embed()
+
 def run_shell(self):
 for shell in self.shells:
 try:

Modified: django/trunk/docs/ref/django-admin.txt
===
--- django/trunk/docs/ref/django-admin.txt  2010-12-12 23:03:03 UTC (rev 
14895)
+++ django/trunk/docs/ref/django-admin.txt  2010-12-12 23:03:24 UTC (rev 
14896)
@@ -747,13 +747,14 @@
 
 Starts the Python interactive interpreter.
 
-Django will use IPython_, if it's installed. If you have IPython installed and
-want to force use of the "plain" Python interpreter, use the ``--plain``
-option, like so::
+Django will use IPython_ or bpython_ if either is installed. If you have a
+rich shell installed but want to force use of the "plain" Python interpreter,
+use the ``--plain`` option, like so::
 
 django-admin.py shell --plain
 
 .. _IPython: http://ipython.scipy.org/
+.. _bpython: http://bpython-interpreter.org/
 
 sql 
 -

-- 
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] r14895 - django/trunk/django/core/management/commands

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 17:03:03 -0600 (Sun, 12 Dec 2010)
New Revision: 14895

Modified:
   django/trunk/django/core/management/commands/shell.py
Log:
Fixed #12735, #14892 and #11542 -- Fixed support for the latest IPython 
(development) version in the shell management command and added a hook to 
implement additional shell runners (by subclassing 
django.core.management.commands.shell.Command, extending the ``shells`` 
attribute and implement a method with the same name).

Modified: django/trunk/django/core/management/commands/shell.py
===
--- django/trunk/django/core/management/commands/shell.py   2010-12-12 
23:02:45 UTC (rev 14894)
+++ django/trunk/django/core/management/commands/shell.py   2010-12-12 
23:03:03 UTC (rev 14895)
@@ -8,9 +8,34 @@
 help='Tells Django to use plain Python, not IPython.'),
 )
 help = "Runs a Python interactive interpreter. Tries to use IPython, if 
it's available."
-
+shells = ['ipython']
 requires_model_validation = False
 
+def ipython(self):
+try:
+from IPython.frontend.terminal.embed import 
TerminalInteractiveShell
+shell = TerminalInteractiveShell()
+shell.mainloop()
+except ImportError:
+# IPython < 0.11
+# Explicitly pass an empty list as arguments, because otherwise
+# IPython would use sys.argv from this script.
+try:
+from IPython.Shell import IPShell
+shell = IPShell(argv=[])
+shell.mainloop()
+except ImportError:
+# IPython not found at all, raise ImportError
+raise
+
+def run_shell(self):
+for shell in self.shells:
+try:
+return getattr(self, shell)()
+except ImportError:
+pass
+raise ImportError
+
 def handle_noargs(self, **options):
 # XXX: (Temporary) workaround for ticket #1796: force early loading of 
all
 # models from installed apps.
@@ -23,11 +48,7 @@
 if use_plain:
 # Don't bother loading IPython, because the user wants plain 
Python.
 raise ImportError
-import IPython
-# Explicitly pass an empty list as arguments, because otherwise 
IPython
-# would use sys.argv from this script.
-shell = IPython.Shell.IPShell(argv=[])
-shell.mainloop()
+self.run_shell()
 except ImportError:
 import code
 # Set up a dictionary to serve as the environment for the shell, so

-- 
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] #5672: i18n minor problem (comma list items separator can't be translated) in django.utils.text.get_text_list()

2010-12-12 Thread Django
#5672: i18n minor problem (comma list items separator can't be translated) in
django.utils.text.get_text_list()
---+
  Reporter:  remohammadi   | Owner:  nobody
Status:  closed| Milestone:  1.3   
 Component:  Internationalization  |   Version:  SVN   
Resolution:  fixed |  Keywords:
 Stage:  Ready for checkin | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #5672: i18n minor problem (comma list items separator can't be translated) in django.utils.text.get_text_list()

2010-12-12 Thread Django
#5672: i18n minor problem (comma list items separator can't be translated) in
django.utils.text.get_text_list()
---+
  Reporter:  remohammadi   | Owner:  nobody
Status:  new   | Milestone:  1.3   
 Component:  Internationalization  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Ready for checkin | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 Fixed in [14876].

-- 
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] r14894 - in django/trunk: django/conf/locale django/templatetags django/utils/translation docs/topics/i18n tests/regressiontests/i18n tests/regressiontests/templates

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 17:02:45 -0600 (Sun, 12 Dec 2010)
New Revision: 14894

Modified:
   django/trunk/django/conf/locale/__init__.py
   django/trunk/django/templatetags/i18n.py
   django/trunk/django/utils/translation/__init__.py
   django/trunk/docs/topics/i18n/internationalization.txt
   django/trunk/tests/regressiontests/i18n/tests.py
   django/trunk/tests/regressiontests/templates/tests.py
Log:
Fixed #4030 -- Added ability to translate language names. Thanks to Antti 
Kaihola and Ramiro Morales for the initial patch.

Modified: django/trunk/django/conf/locale/__init__.py
===
--- django/trunk/django/conf/locale/__init__.py 2010-12-12 23:02:10 UTC (rev 
14893)
+++ django/trunk/django/conf/locale/__init__.py 2010-12-12 23:02:45 UTC (rev 
14894)
@@ -0,0 +1,380 @@
+LANG_INFO = {
+'ar': {
+'bidi': True,
+'code': 'ar',
+'name': 'Arabic',
+'name_local': u'\u0627\u0644\u0639\u0631\u0628\u064a\u0651\u0629',
+},
+'bg': {
+'bidi': False,
+'code': 'bg',
+'name': 'Bulgarian',
+'name_local': 
u'\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438',
+},
+'bn': {
+'bidi': False,
+'code': 'bn',
+'name': 'Bengali',
+'name_local': u'\u09ac\u09be\u0982\u09b2\u09be',
+},
+'bs': {
+'bidi': False,
+'code': 'bs',
+'name': 'Bosnian',
+'name_local': u'bosanski',
+},
+'ca': {
+'bidi': False,
+'code': 'ca',
+'name': 'Catalan',
+'name_local': u'catal\xe0',
+},
+'cs': {
+'bidi': False,
+'code': 'cs',
+'name': 'Czech',
+'name_local': u'\u010desky',
+},
+'cy': {
+'bidi': False,
+'code': 'cy',
+'name': 'Welsh',
+'name_local': u'Cymraeg',
+},
+'da': {
+'bidi': False,
+'code': 'da',
+'name': 'Danish',
+'name_local': u'Dansk',
+},
+'de': {
+'bidi': False,
+'code': 'de',
+'name': 'German',
+'name_local': u'Deutsch',
+},
+'el': {
+'bidi': False,
+'code': 'el',
+'name': 'Greek',
+'name_local': u'\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac',
+},
+'en': {
+'bidi': False,
+'code': 'en',
+'name': 'English',
+'name_local': u'English',
+},
+'en-gb': {
+'bidi': False,
+'code': 'en-gb',
+'name': 'British English',
+'name_local': u'British English',
+},
+'es': {
+'bidi': False,
+'code': 'es',
+'name': 'Spanish',
+'name_local': u'espa\xf1ol',
+},
+'es-ar': {
+'bidi': False,
+'code': 'es-ar',
+'name': 'Argentinian Spanish',
+'name_local': u'espa\xf1ol de Argentina',
+},
+'et': {
+'bidi': False,
+'code': 'et',
+'name': 'Estonian',
+'name_local': u'eesti',
+},
+'eu': {
+'bidi': False,
+'code': 'eu',
+'name': 'Basque',
+'name_local': u'Basque',
+},
+'fa': {
+'bidi': True,
+'code': 'fa',
+'name': 'Persian',
+'name_local': u'\u0641\u0627\u0631\u0633\u06cc',
+},
+'fi': {
+'bidi': False,
+'code': 'fi',
+'name': 'Finnish',
+'name_local': u'suomi',
+},
+'fr': {
+'bidi': False,
+'code': 'fr',
+'name': 'French',
+'name_local': u'Fran\xe7ais',
+},
+'fy-nl': {
+'bidi': False,
+'code': 'fy-nl',
+'name': 'Frisian',
+'name_local': u'Frisian',
+},
+'ga': {
+'bidi': False,
+'code': 'ga',
+'name': 'Irish',
+'name_local': u'Gaeilge',
+},
+'gl': {
+'bidi': False,
+'code': 'gl',
+'name': 'Galician',
+'name_local': u'galego',
+},
+'he': {
+'bidi': True,
+'code': 'he',
+'name': 'Hebrew',
+'name_local': u'\u05e2\u05d1\u05e8\u05d9\u05ea',
+},
+'hi': {
+'bidi': False,
+'code': 'hi',
+'name': 'Hindi',
+'name_local': u'Hindi',
+},
+'hr': {
+'bidi': False,
+'code': 'hr',
+'name': 'Croatian',
+'name_local': u'Hrvatski',
+},
+'hu': {
+'bidi': False,
+'code': 'hu',
+'name': 'Hungarian',
+'name_local': u'Magyar',
+},
+'id': {
+'bidi': False,
+'code': 'id',
+'name': 'Indonesian',
+'name_local': u'Bahasa Indonesia',
+},
+'is': {
+'bidi': False,
+'code': 'is',
+'name': 'Icelandic',
+'name_local': u'\xcdslenska',
+},
+'it': {
+'bidi': False,
+'code': 'it',
+'name': 'Italian',
+'name_local': u'italiano',
+},
+'ja': {
+'bidi': False,
+'code': 'ja',
+

[Changeset] r14892 - django/trunk/django/contrib/admin/media/css

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:59:47 -0600 (Sun, 12 Dec 2010)
New Revision: 14892

Modified:
   django/trunk/django/contrib/admin/media/css/dashboard.css
Log:
Fixed #14868 -- Added CSS rule to prevent long text from overflowing the 
"recent actions" box on the admin index page. Thanks, Chris Adams.

Modified: django/trunk/django/contrib/admin/media/css/dashboard.css
===
--- django/trunk/django/contrib/admin/media/css/dashboard.css   2010-12-12 
22:59:28 UTC (rev 14891)
+++ django/trunk/django/contrib/admin/media/css/dashboard.css   2010-12-12 
22:59:47 UTC (rev 14892)
@@ -22,3 +22,9 @@
 ul.actionlist li {
 list-style-type: none;
 }
+
+ul.actionlist li.changelink {
+overflow: hidden;
+text-overflow: ellipsis;
+-o-text-overflow: ellipsis;
+}
\ No newline at end of file

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r14891 - in django/trunk/django/contrib/auth: fixtures management tests

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:59:28 -0600 (Sun, 12 Dec 2010)
New Revision: 14891

Added:
   django/trunk/django/contrib/auth/fixtures/permissionstestdata.json
   django/trunk/django/contrib/auth/tests/permissions.py
Modified:
   django/trunk/django/contrib/auth/management/__init__.py
   django/trunk/django/contrib/auth/tests/__init__.py
Log:
Fixed #14731 -- Respect ordering when creating the default permissions. Thanks, 
chipx86.

Added: django/trunk/django/contrib/auth/fixtures/permissionstestdata.json
===
--- django/trunk/django/contrib/auth/fixtures/permissionstestdata.json  
(rev 0)
+++ django/trunk/django/contrib/auth/fixtures/permissionstestdata.json  
2010-12-12 22:59:28 UTC (rev 14891)
@@ -0,0 +1,316 @@
+[
+{
+"pk": 5, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "contenttype", 
+"name": "content type", 
+"app_label": "contenttypes"
+}
+}, 
+{
+"pk": 2, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "group", 
+"name": "group", 
+"app_label": "auth"
+}
+}, 
+{
+"pk": 8, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "logentry", 
+"name": "log entry", 
+"app_label": "admin"
+}
+}, 
+{
+"pk": 4, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "message", 
+"name": "message", 
+"app_label": "auth"
+}
+}, 
+{
+"pk": 1, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "permission", 
+"name": "permission", 
+"app_label": "auth"
+}
+}, 
+{
+"pk": 6, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "session", 
+"name": "session", 
+"app_label": "sessions"
+}
+}, 
+{
+"pk": 7, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "site", 
+"name": "site", 
+"app_label": "sites"
+}
+}, 
+{
+"pk": 3, 
+"model": "contenttypes.contenttype", 
+"fields": {
+"model": "user", 
+"name": "user", 
+"app_label": "auth"
+}
+}, 
+{
+"pk": 1, 
+"model": "sites.site", 
+"fields": {
+"domain": "example.com", 
+"name": "example.com"
+}
+}, 
+{
+"pk": 22, 
+"model": "auth.permission", 
+"fields": {
+"codename": "add_logentry", 
+"name": "Can add log entry", 
+"content_type": 8
+}
+}, 
+{
+"pk": 23, 
+"model": "auth.permission", 
+"fields": {
+"codename": "change_logentry", 
+"name": "Can change log entry", 
+"content_type": 8
+}
+}, 
+{
+"pk": 24, 
+"model": "auth.permission", 
+"fields": {
+"codename": "delete_logentry", 
+"name": "Can delete log entry", 
+"content_type": 8
+}
+}, 
+{
+"pk": 4, 
+"model": "auth.permission", 
+"fields": {
+"codename": "add_group", 
+"name": "Can add group", 
+"content_type": 2
+}
+}, 
+{
+"pk": 5, 
+"model": "auth.permission", 
+"fields": {
+"codename": "change_group", 
+"name": "Can change group", 
+"content_type": 2
+}
+}, 
+{
+"pk": 6, 
+"model": "auth.permission", 
+"fields": {
+"codename": "delete_group", 
+"name": "Can delete group", 
+"content_type": 2
+}
+}, 
+{
+"pk": 10, 
+"model": "auth.permission", 
+"fields": {
+"codename": "add_message", 
+"name": "Can add message", 
+"content_type": 4
+}
+}, 
+{
+"pk": 11, 
+"model": "auth.permission", 
+"fields": {
+"codename": "change_message", 
+"name": "Can change message", 
+"content_type": 4
+}
+}, 
+{
+"pk": 12, 
+"model": "auth.permission", 
+"fields": {
+"codename": "delete_message", 
+"name": "Can delete message", 
+"content_type": 4
+}
+}, 
+{
+"pk": 1, 
+"model": "auth.permission", 
+"fields": {
+"codename": "add_permission", 
+"name": "Can add permission", 
+"content_type": 1
+}
+}, 
+{
+"pk": 2, 
+"model": 

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

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:59:03 -0600 (Sun, 12 Dec 2010)
New Revision: 14890

Modified:
   django/trunk/django/contrib/auth/views.py
Log:
Fixed #14446 -- Prevented the password reset confirmation view to be cached. 
Thanks, Paul and Gabriel.

Modified: django/trunk/django/contrib/auth/views.py
===
--- django/trunk/django/contrib/auth/views.py   2010-12-12 22:58:47 UTC (rev 
14889)
+++ django/trunk/django/contrib/auth/views.py   2010-12-12 22:59:03 UTC (rev 
14890)
@@ -163,6 +163,7 @@
   context_instance=RequestContext(request, 
current_app=current_app))
 
 # Doesn't need csrf_protect since no-one can guess the URL
+...@never_cache
 def password_reset_confirm(request, uidb36=None, token=None,

template_name='registration/password_reset_confirm.html',
token_generator=default_token_generator,

-- 
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] r14889 - in django/trunk: django/contrib/admin/views tests/regressiontests/admin_changelist

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:58:47 -0600 (Sun, 12 Dec 2010)
New Revision: 14889

Modified:
   django/trunk/django/contrib/admin/views/main.py
   django/trunk/tests/regressiontests/admin_changelist/tests.py
Log:
Fixed #14312 -- Raising an ``IncorrectLookupParameters`` if the page number 
given to an admin change list exceeds the number of the last page. Thanks, mk.

Modified: django/trunk/django/contrib/admin/views/main.py
===
--- django/trunk/django/contrib/admin/views/main.py 2010-12-12 22:58:25 UTC 
(rev 14888)
+++ django/trunk/django/contrib/admin/views/main.py 2010-12-12 22:58:47 UTC 
(rev 14889)
@@ -117,7 +117,7 @@
 try:
 result_list = paginator.page(self.page_num+1).object_list
 except InvalidPage:
-result_list = ()
+raise IncorrectLookupParameters
 
 self.result_count = result_count
 self.full_result_count = full_result_count

Modified: django/trunk/tests/regressiontests/admin_changelist/tests.py
===
--- django/trunk/tests/regressiontests/admin_changelist/tests.py
2010-12-12 22:58:25 UTC (rev 14888)
+++ django/trunk/tests/regressiontests/admin_changelist/tests.py
2010-12-12 22:58:47 UTC (rev 14889)
@@ -1,4 +1,5 @@
 from django.contrib import admin
+from django.contrib.admin.options import IncorrectLookupParameters
 from django.contrib.admin.views.main import ChangeList
 from django.template import Context, Template
 from django.test import TransactionTestCase
@@ -71,6 +72,28 @@
 self.assertFalse('%s' % editable_name_field == -1,
 'Failed to find "name" list_editable field in: %s' % table_output)
 
+def test_result_list_editable(self):
+"""
+Regression test for #14312: list_editable with pagination
+"""
+
+new_parent = Parent.objects.create(name='parent')
+for i in range(200):
+new_child = Child.objects.create(name='name %s' % i, 
parent=new_parent)
+request = MockRequest()
+request.GET['p'] = -1 # Anything outside range
+m = ChildAdmin(Child, admin.site)
+
+# Test with list_editable fields
+m.list_display = ['id', 'name', 'parent']
+m.list_display_links = ['id']
+m.list_editable = ['name']
+self.assertRaises(IncorrectLookupParameters, lambda: \
+ChangeList(request, Child, m.list_display, m.list_display_links,
+m.list_filter, m.date_hierarchy, m.search_fields,
+m.list_select_related, m.list_per_page, m.list_editable, 
m))
+
+
 class ChildAdmin(admin.ModelAdmin):
 list_display = ['name', 'parent']
 def queryset(self, request):

-- 
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] r14888 - in django/trunk: django/core/management django/core/management/commands docs/internals docs/ref docs/releases

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:58:25 -0600 (Sun, 12 Dec 2010)
New Revision: 14888

Modified:
   django/trunk/django/core/management/commands/reset.py
   django/trunk/django/core/management/sql.py
   django/trunk/docs/internals/deprecation.txt
   django/trunk/docs/ref/django-admin.txt
   django/trunk/docs/releases/1.3.txt
Log:
Fixed #14268 -- Start the deprecation of the reset and sqlreset management 
command. Thanks, Carl.

Modified: django/trunk/django/core/management/commands/reset.py
===
--- django/trunk/django/core/management/commands/reset.py   2010-12-12 
22:57:58 UTC (rev 14887)
+++ django/trunk/django/core/management/commands/reset.py   2010-12-12 
22:58:25 UTC (rev 14888)
@@ -20,6 +20,12 @@
 output_transaction = True
 
 def handle_app(self, app, **options):
+# This command breaks a lot and should be deprecated
+import warnings
+warnings.warn(
+'This command has been deprecated. The command ``flush`` can be 
used to delete everything. You can also use ALTER TABLE or DROP TABLE 
statements manually.',
+PendingDeprecationWarning
+)
 using = options.get('database', DEFAULT_DB_ALIAS)
 connection = connections[using]
 

Modified: django/trunk/django/core/management/sql.py
===
--- django/trunk/django/core/management/sql.py  2010-12-12 22:57:58 UTC (rev 
14887)
+++ django/trunk/django/core/management/sql.py  2010-12-12 22:58:25 UTC (rev 
14888)
@@ -98,6 +98,12 @@
 
 def sql_reset(app, style, connection):
 "Returns a list of the DROP TABLE SQL, then the CREATE TABLE SQL, for the 
given module."
+# This command breaks a lot and should be deprecated
+import warnings
+warnings.warn(
+'This command has been deprecated. The command ``sqlflush`` can be 
used to delete everything. You can also use ALTER TABLE or DROP TABLE 
statements manually.',
+PendingDeprecationWarning
+)
 return sql_delete(app, style, connection) + sql_all(app, style, connection)
 
 def sql_flush(style, connection, only_django=False):

Modified: django/trunk/docs/internals/deprecation.txt
===
--- django/trunk/docs/internals/deprecation.txt 2010-12-12 22:57:58 UTC (rev 
14887)
+++ django/trunk/docs/internals/deprecation.txt 2010-12-12 22:58:25 UTC (rev 
14888)
@@ -136,6 +136,9 @@
   template variable, not an implied string. The new-style
   behavior is provided in the ``future`` template tag library.
 
+* The :djadmin:`reset` and :djadmin:`sqlreset` management commands
+  are deprecated.
+
 * 2.0
 * ``django.views.defaults.shortcut()``. This function has been moved
   to ``django.contrib.contenttypes.views.shortcut()`` as part of the

Modified: django/trunk/docs/ref/django-admin.txt
===
--- django/trunk/docs/ref/django-admin.txt  2010-12-12 22:57:58 UTC (rev 
14887)
+++ django/trunk/docs/ref/django-admin.txt  2010-12-12 22:58:25 UTC (rev 
14888)
@@ -491,6 +491,10 @@
 reset 
 ---
 
+.. deprecated:: 1.3
+This command has been deprecated. The ``flush`` can be used to delete
+everything. You can also use ALTER TABLE or DROP TABLE statements manually.
+
 .. django-admin:: reset
 
 Executes the equivalent of ``sqlreset`` for the given app name(s).
@@ -844,6 +848,10 @@
 sqlreset 
 --
 
+.. deprecated:: 1.3
+This command has been deprecated. The ``sqlflush`` can be used to delete
+everything. You can also use ALTER TABLE or DROP TABLE statements manually.
+
 .. django-admin:: sqlreset
 
 Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app 
name(s).

Modified: django/trunk/docs/releases/1.3.txt
===
--- django/trunk/docs/releases/1.3.txt  2010-12-12 22:57:58 UTC (rev 14887)
+++ django/trunk/docs/releases/1.3.txt  2010-12-12 22:58:25 UTC (rev 14888)
@@ -468,3 +468,10 @@
 attribute.
 
 .. _r12634: http://code.djangoproject.com/changeset/12634
+
+``reset`` and ``sqlreset`` management commands
+~~
+
+Those commands have been deprecated. The ``flush`` and ``sqlflush`` commands
+can be used to delete everything. You can also use ALTER TABLE or DROP TABLE
+statements manually.

-- 
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] r14887 - in django/trunk: django/forms tests/regressiontests/forms/tests

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:57:58 -0600 (Sun, 12 Dec 2010)
New Revision: 14887

Modified:
   django/trunk/django/forms/widgets.py
   django/trunk/tests/regressiontests/forms/tests/widgets.py
Log:
Fixed #14158 -- Fixed SelectMultiple._has_changed to not assume same order of 
data anymore. Thanks, akaariai and dmoisset.

Modified: django/trunk/django/forms/widgets.py
===
--- django/trunk/django/forms/widgets.py2010-12-12 22:57:37 UTC (rev 
14886)
+++ django/trunk/django/forms/widgets.py2010-12-12 22:57:58 UTC (rev 
14887)
@@ -595,10 +595,9 @@
 data = []
 if len(initial) != len(data):
 return True
-for value1, value2 in zip(initial, data):
-if force_unicode(value1) != force_unicode(value2):
-return True
-return False
+initial_set = set([force_unicode(value) for value in initial])
+data_set = set([force_unicode(value) for value in data])
+return data_set != initial_set
 
 class RadioInput(StrAndUnicode):
 """

Modified: django/trunk/tests/regressiontests/forms/tests/widgets.py
===
--- django/trunk/tests/regressiontests/forms/tests/widgets.py   2010-12-12 
22:57:37 UTC (rev 14886)
+++ django/trunk/tests/regressiontests/forms/tests/widgets.py   2010-12-12 
22:57:58 UTC (rev 14887)
@@ -824,6 +824,7 @@
 self.assertFalse(w._has_changed([1, 2], [u'1', u'2']))
 self.assertTrue(w._has_changed([1, 2], [u'1']))
 self.assertTrue(w._has_changed([1, 2], [u'1', u'3']))
+self.assertFalse(w._has_changed([2, 1], [u'1', u'2']))
 
 # Unicode choices are correctly rendered as HTML
 self.assertEqual(w.render('nums', ['ŠĐĆŽćžšđ'], choices=[('ŠĐĆŽćžšđ', 
'ŠĐabcĆŽćžšđ'), ('ćžšđ', 'abcćžšđ')]), u'\n 1\n 2\n 3\n 
\u0160\u0110abc\u0106\u017d\u0107\u017e\u0161\u0111\n 
abc\u0107\u017e\u0161\u0111\n')

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



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

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:57:37 -0600 (Sun, 12 Dec 2010)
New Revision: 14886

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/regressiontests/model_forms_regress/tests.py
Log:
Fixed #14144 -- Made sure custom validators are called in 
ModelMultipleChoiceFields. Thanks, matiasb.

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2010-12-12 22:57:17 UTC (rev 14885)
+++ django/trunk/django/forms/models.py 2010-12-12 22:57:37 UTC (rev 14886)
@@ -1045,6 +1045,9 @@
 for val in value:
 if force_unicode(val) not in pks:
 raise ValidationError(self.error_messages['invalid_choice'] % 
val)
+# Since this overrides the inherited ModelChoiceField.clean
+# we run custom validators here
+self.run_validators(value)
 return qs
 
 def prepare_value(self, value):

Modified: django/trunk/tests/regressiontests/model_forms_regress/tests.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-12-12 22:57:17 UTC (rev 14885)
+++ django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-12-12 22:57:37 UTC (rev 14886)
@@ -24,6 +24,22 @@
 f = forms.ModelMultipleChoiceField(queryset=Person.objects.all())
 self.assertNumQueries(1, f.clean, [1, 3, 5, 7, 9])
 
+def test_model_multiple_choice_run_validators(self):
+"""
+Test that ModelMultipleChoiceField run given validators (#14144).
+"""
+for i in range(30):
+Person.objects.create(name="Person %s" % i)
+
+self._validator_run = False
+def my_validator(value):
+self._validator_run = True
+
+f = forms.ModelMultipleChoiceField(queryset=Person.objects.all(),
+   validators=[my_validator])
+f.clean([1,2])
+self.assertTrue(self._validator_run)
+
 class TripleForm(forms.ModelForm):
 class Meta:
 model = Triple

-- 
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] r14885 - in django/trunk: django/utils docs/ref tests/regressiontests/cache

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:57:17 -0600 (Sun, 12 Dec 2010)
New Revision: 14885

Modified:
   django/trunk/django/utils/cache.py
   django/trunk/docs/ref/settings.txt
   django/trunk/tests/regressiontests/cache/tests.py
Log:
Fixed #14103 -- Take USE_ETAGS setting into account when patching the response 
headers. Thanks, trbs and Eric Holscher.

Modified: django/trunk/django/utils/cache.py
===
--- django/trunk/django/utils/cache.py  2010-12-12 22:56:52 UTC (rev 14884)
+++ django/trunk/django/utils/cache.py  2010-12-12 22:57:17 UTC (rev 14885)
@@ -101,7 +101,7 @@
 cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS
 if cache_timeout < 0:
 cache_timeout = 0 # Can't have max-age negative
-if not response.has_header('ETag'):
+if settings.USE_ETAGS and not response.has_header('ETag'):
 response['ETag'] = '"%s"' % 
md5_constructor(response.content).hexdigest()
 if not response.has_header('Last-Modified'):
 response['Last-Modified'] = http_date()

Modified: django/trunk/docs/ref/settings.txt
===
--- django/trunk/docs/ref/settings.txt  2010-12-12 22:56:52 UTC (rev 14884)
+++ django/trunk/docs/ref/settings.txt  2010-12-12 22:57:17 UTC (rev 14885)
@@ -1825,8 +1825,9 @@
 Default: ``False``
 
 A boolean that specifies whether to output the "Etag" header. This saves
-bandwidth but slows down performance. This is only used if ``CommonMiddleware``
-is installed (see :doc:`/topics/http/middleware`).
+bandwidth but slows down performance. This is used by the ``CommonMiddleware``
+(see :doc:`/topics/http/middleware`) and in the``Cache Framework``
+(see :doc:`/topics/cache`).
 
 .. setting:: USE_I18N
 

Modified: django/trunk/tests/regressiontests/cache/tests.py
===
--- django/trunk/tests/regressiontests/cache/tests.py   2010-12-12 22:56:52 UTC 
(rev 14884)
+++ django/trunk/tests/regressiontests/cache/tests.py   2010-12-12 22:57:17 UTC 
(rev 14885)
@@ -1048,6 +1048,7 @@
 settings.CACHE_MIDDLEWARE_SECONDS = 60
 settings.CACHE_MIDDLEWARE_KEY_PREFIX="test"
 settings.CACHE_BACKEND='locmem:///'
+settings.USE_ETAGS = True
 settings.USE_I18N = True
 en_message ="Hello world!"
 es_message ="Hola mundo!"
@@ -1058,6 +1059,14 @@
 # Check that we can recover the cache
 self.assertNotEqual(get_cache_data.content, None)
 self.assertEqual(en_message, get_cache_data.content)
+# Check that we use etags
+self.assertTrue(get_cache_data.has_header('ETag'))
+# Check that we can disable etags
+settings.USE_ETAGS = False
+request._cache_update_cache = True
+set_cache(request, 'en', en_message)
+get_cache_data = FetchFromCacheMiddleware().process_request(request)
+self.assertFalse(get_cache_data.has_header('ETag'))
 # change the session language and set content
 request = self._get_request_cache()
 set_cache(request, 'es', es_message)

-- 
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] r14884 - in django/trunk: django/contrib/sitemaps/management/commands docs/ref/contrib

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:56:52 -0600 (Sun, 12 Dec 2010)
New Revision: 14884

Modified:
   django/trunk/django/contrib/sitemaps/management/commands/ping_google.py
   django/trunk/docs/ref/contrib/sitemaps.txt
Log:
Fixed #14805 -- Capitalize "Google" in sitemaps docs. Thanks, Adam.

Modified: 
django/trunk/django/contrib/sitemaps/management/commands/ping_google.py
===
--- django/trunk/django/contrib/sitemaps/management/commands/ping_google.py 
2010-12-12 22:56:29 UTC (rev 14883)
+++ django/trunk/django/contrib/sitemaps/management/commands/ping_google.py 
2010-12-12 22:56:52 UTC (rev 14884)
@@ -3,7 +3,7 @@
 
 
 class Command(BaseCommand):
-help = "Ping google with an updated sitemap, pass optional url of sitemap"
+help = "Ping Google with an updated sitemap, pass optional url of sitemap"
 
 def execute(self, *args, **options):
 if len(args) == 1:

Modified: django/trunk/docs/ref/contrib/sitemaps.txt
===
--- django/trunk/docs/ref/contrib/sitemaps.txt  2010-12-12 22:56:29 UTC (rev 
14883)
+++ django/trunk/docs/ref/contrib/sitemaps.txt  2010-12-12 22:56:52 UTC (rev 
14884)
@@ -368,6 +368,6 @@
 .. versionadded:: 1.0
 
 Once the sitemaps application is added to your project, you may also
-ping the Google server's through the command line manage.py interface::
+ping Google using the ``ping_google`` management command::
 
 python manage.py ping_google [/sitemap.xml]

-- 
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] r14883 - in django/trunk: django/contrib/sitemaps django/contrib/sitemaps/tests django/contrib/sitemaps/tests/templates docs/ref/contrib

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:56:29 -0600 (Sun, 12 Dec 2010)
New Revision: 14883

Added:
   django/trunk/django/contrib/sitemaps/tests/templates/
   django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap.xml
   django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap_index.xml
Modified:
   django/trunk/django/contrib/sitemaps/tests/basic.py
   django/trunk/django/contrib/sitemaps/tests/urls.py
   django/trunk/django/contrib/sitemaps/views.py
   django/trunk/docs/ref/contrib/sitemaps.txt
Log:
Fixed #14041 -- Added ability to override the template of the sitemaps views. 
Thanks, julien.

Modified: django/trunk/django/contrib/sitemaps/tests/basic.py
===
--- django/trunk/django/contrib/sitemaps/tests/basic.py 2010-12-12 22:56:01 UTC 
(rev 14882)
+++ django/trunk/django/contrib/sitemaps/tests/basic.py 2010-12-12 22:56:29 UTC 
(rev 14883)
@@ -1,3 +1,4 @@
+import os
 from datetime import date
 from django.conf import settings
 from django.contrib.auth.models import User
@@ -16,13 +17,41 @@
 def setUp(self):
 self.old_USE_L10N = settings.USE_L10N
 self.old_Site_meta_installed = Site._meta.installed
+self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS
+settings.TEMPLATE_DIRS = (
+os.path.join(os.path.dirname(__file__), 'templates'),
+)
 # Create a user that will double as sitemap content
 User.objects.create_user('testuser', 't...@example.com', 's3krit')
 
 def tearDown(self):
 settings.USE_L10N = self.old_USE_L10N
 Site._meta.installed = self.old_Site_meta_installed
+settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
 
+def test_simple_sitemap_index(self):
+"A simple sitemap index can be rendered"
+# Retrieve the sitemap.
+response = self.client.get('/simple/index.xml')
+# Check for all the important bits:
+self.assertEquals(response.content, """
+http://www.sitemaps.org/schemas/sitemap/0.9;>
+http://example.com/simple/sitemap-simple.xml
+
+""")
+
+def test_simple_sitemap_custom_index(self):
+"A simple sitemap index can be rendered with a custom template"
+# Retrieve the sitemap.
+response = self.client.get('/simple/custom-index.xml')
+# Check for all the important bits:
+self.assertEquals(response.content, """
+
+http://www.sitemaps.org/schemas/sitemap/0.9;>
+http://example.com/simple/sitemap-simple.xml
+
+""")
+
 def test_simple_sitemap(self):
 "A simple sitemap can be rendered"
 # Retrieve the sitemap.
@@ -34,6 +63,18 @@
 
 """ % date.today().strftime('%Y-%m-%d'))
 
+def test_simple_custom_sitemap(self):
+"A simple sitemap can be rendered with a custom template"
+# Retrieve the sitemap.
+response = self.client.get('/simple/custom-sitemap.xml')
+# Check for all the important bits:
+self.assertEquals(response.content, """
+
+http://www.sitemaps.org/schemas/sitemap/0.9;>
+http://example.com/location/%snever0.5
+
+""" % date.today().strftime('%Y-%m-%d'))
+
 @skipUnless(settings.USE_I18N, "Internationalization is not enabled")
 def test_localized_priority(self):
 "The priority value should not be localized (Refs #14164)"

Added: django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap.xml
===
--- django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap.xml 
(rev 0)
+++ django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap.xml 
2010-12-12 22:56:29 UTC (rev 14883)
@@ -0,0 +1,14 @@
+
+
+http://www.sitemaps.org/schemas/sitemap/0.9;>
+{% spaceless %}
+{% for url in urlset %}
+  
+{{ url.location }}
+{% if url.lastmod %}{{ url.lastmod|date:"Y-m-d" }}{% 
endif %}
+{% if url.changefreq %}{{ url.changefreq }}{% 
endif %}
+{% if url.priority %}{{ url.priority }}{% endif %}
+  
+{% endfor %}
+{% endspaceless %}
+

Added: 
django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap_index.xml
===
--- 
django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap_index.xml   
(rev 0)
+++ 
django/trunk/django/contrib/sitemaps/tests/templates/custom_sitemap_index.xml   
2010-12-12 22:56:29 UTC (rev 14883)
@@ -0,0 +1,5 @@
+
+
+http://www.sitemaps.org/schemas/sitemap/0.9;>
+{% for location in sitemaps %}{{ location }}{% 
endfor %}
+

Modified: django/trunk/django/contrib/sitemaps/tests/urls.py
===
--- django/trunk/django/contrib/sitemaps/tests/urls.py  2010-12-12 22:56:01 UTC 
(rev 14882)
+++ django/trunk/django/contrib/sitemaps/tests/urls.py  2010-12-12 22:56:29 UTC 
(rev 14883)
@@ -27,7 +27,11 @@
 }
 
 urlpatterns = patterns('django.contrib.sitemaps.views',
+

[Changeset] r14882 - in django/trunk: django/contrib/admin docs/ref/contrib/admin tests/regressiontests/admin_ordering

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:56:01 -0600 (Sun, 12 Dec 2010)
New Revision: 14882

Modified:
   django/trunk/django/contrib/admin/options.py
   django/trunk/docs/ref/contrib/admin/index.txt
   django/trunk/tests/regressiontests/admin_ordering/models.py
   django/trunk/tests/regressiontests/admin_ordering/tests.py
Log:
Fixed #13862 -- Added an ordering option to InlineModelAdmin and cleaned up 
documentation for it a bit. Thanks, Simon Meers, rasca and cogat.

Modified: django/trunk/django/contrib/admin/options.py
===
--- django/trunk/django/contrib/admin/options.py2010-12-12 22:55:33 UTC 
(rev 14881)
+++ django/trunk/django/contrib/admin/options.py2010-12-12 22:56:01 UTC 
(rev 14882)
@@ -67,6 +67,7 @@
 prepopulated_fields = {}
 formfield_overrides = {}
 readonly_fields = ()
+ordering = None
 
 def __init__(self):
 overrides = FORMFIELD_FOR_DBFIELD_DEFAULTS.copy()
@@ -189,6 +190,18 @@
 def get_readonly_fields(self, request, obj=None):
 return self.readonly_fields
 
+def queryset(self, request):
+"""
+Returns a QuerySet of all model instances that can be edited by the
+admin site. This is used by changelist_view.
+"""
+qs = self.model._default_manager.get_query_set()
+# TODO: this should be handled by some parameter to the ChangeList.
+ordering = self.ordering or () # otherwise we might try to *None, 
which is bad ;)
+if ordering:
+qs = qs.order_by(*ordering)
+return qs
+
 class ModelAdmin(BaseModelAdmin):
 "Encapsulates all admin options and functionality for a given model."
 
@@ -202,7 +215,6 @@
 date_hierarchy = None
 save_as = False
 save_on_top = False
-ordering = None
 inlines = []
 
 # Custom templates (designed to be over-ridden in subclasses)
@@ -325,18 +337,6 @@
 'delete': self.has_delete_permission(request),
 }
 
-def queryset(self, request):
-"""
-Returns a QuerySet of all model instances that can be edited by the
-admin site. This is used by changelist_view.
-"""
-qs = self.model._default_manager.get_query_set()
-# TODO: this should be handled by some parameter to the ChangeList.
-ordering = self.ordering or () # otherwise we might try to *None, 
which is bad ;)
-if ordering:
-qs = qs.order_by(*ordering)
-return qs
-
 def get_fieldsets(self, request, obj=None):
 "Hook for specifying fieldsets for the add form."
 if self.declared_fieldsets:
@@ -1257,9 +1257,6 @@
 fields = form.base_fields.keys() + 
list(self.get_readonly_fields(request, obj))
 return [(None, {'fields': fields})]
 
-def queryset(self, request):
-return self.model._default_manager.all()
-
 class StackedInline(InlineModelAdmin):
 template = 'admin/edit_inline/stacked.html'
 

Modified: django/trunk/docs/ref/contrib/admin/index.txt
===
--- django/trunk/docs/ref/contrib/admin/index.txt   2010-12-12 22:55:33 UTC 
(rev 14881)
+++ django/trunk/docs/ref/contrib/admin/index.txt   2010-12-12 22:56:01 UTC 
(rev 14882)
@@ -180,7 +180,7 @@
 .. versionadded:: 1.2
 
 ``fields`` can contain values defined in
-:attr:`ModelAdmin.readonly_fields` to be displayed as read-only.
+:attr:`~ModelAdmin.readonly_fields` to be displayed as read-only.
 
 * ``classes``
 A list containing extra CSS classes to apply to the fieldset.
@@ -504,8 +504,8 @@
 
 .. attribute:: ModelAdmin.ordering
 
-Set ``ordering`` to specify how objects on the admin change list page
-should be ordered. This should be a list or tuple in the same format as a
+Set ``ordering`` to specify how lists of objects should be ordered in the
+Django admin views. This should be a list or tuple in the same format as a
 model's ``ordering`` parameter.
 
 If this isn't provided, the Django admin will use the model's default
@@ -1089,9 +1089,37 @@
 ``InlineModelAdmin`` options
 -
 
-The ``InlineModelAdmin`` class is a subclass of ``ModelAdmin`` so it inherits
-all the same functionality as well as some of its own:
+``InlineModelAdmin`` shares many of the same features as ``ModelAdmin``, and
+adds some of its own (the shared features are actually defined in the
+``BaseModelAdmin`` superclass). The shared features are:
 
+- :attr:`~InlineModelAdmin.form`
+- :attr:`~ModelAdmin.fieldsets`
+- :attr:`~ModelAdmin.fields`
+- :attr:`~ModelAdmin.exclude`
+- :attr:`~ModelAdmin.filter_horizontal`
+- :attr:`~ModelAdmin.filter_vertical`
+- :attr:`~ModelAdmin.prepopulated_fields`
+- :attr:`~ModelAdmin.radio_fields`
+- :attr:`~InlineModelAdmin.raw_id_fields`
+
+.. versionadded:: 1.1
+
+- :meth:`~ModelAdmin.formfield_for_foreignkey`
+- 

[Changeset] r14881 - django/trunk/django/contrib/admin/media/css

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:55:33 -0600 (Sun, 12 Dec 2010)
New Revision: 14881

Modified:
   django/trunk/django/contrib/admin/media/css/rtl.css
Log:
Fixed #13856 -- Float admin's top links on the right for RTL languages.

Modified: django/trunk/django/contrib/admin/media/css/rtl.css
===
--- django/trunk/django/contrib/admin/media/css/rtl.css 2010-12-12 22:55:10 UTC 
(rev 14880)
+++ django/trunk/django/contrib/admin/media/css/rtl.css 2010-12-12 22:55:33 UTC 
(rev 14881)
@@ -82,6 +82,10 @@
 
 /* changelists styles */
 
+.change-list ul.toplinks li {
+float: right;
+}
+
 .change-list .filtered {
 background: white url(../img/admin/changelist-bg_rtl.gif) top left 
repeat-y !important;
 }

-- 
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] r14880 - django/trunk/django/contrib/admin/media/css

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:55:10 -0600 (Sun, 12 Dec 2010)
New Revision: 14880

Modified:
   django/trunk/django/contrib/admin/media/css/base.css
Log:
Fixed #13649 -- Extended admin stylesheets to also cover disabled buttons in 
the admin. Thanks, Sebastian Noack.

Modified: django/trunk/django/contrib/admin/media/css/base.css
===
--- django/trunk/django/contrib/admin/media/css/base.css2010-12-12 
22:54:50 UTC (rev 14879)
+++ django/trunk/django/contrib/admin/media/css/base.css2010-12-12 
22:55:10 UTC (rev 14880)
@@ -376,6 +376,12 @@
 background-position: top;
 }
 
+.button[disabled], input[type=submit][disabled], input[type=button][disabled] {
+   background-image: url(../img/admin/nav-bg.gif);
+   background-position: bottom;
+   opacity: 0.4;
+}
+
 .button.default, input[type=submit].default, .submit-row input.default {
 border: 2px solid #5b80b2;
 background: #7CA0C7 url(../img/admin/default-bg.gif) bottom repeat-x;
@@ -389,6 +395,13 @@
 background-position: top;
 }
 
+.button[disabled].default, input[type=submit][disabled].default, 
input[type=button][disabled].default {
+   background-image: url(../img/admin/default-bg.gif);
+   background-position: bottom;
+   opacity: 0.4;
+}
+
+
 /* MODULES */
 
 .module {

-- 
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] r14879 - in django/trunk: django/contrib/admin/templatetags docs/ref/contrib/admin tests/regressiontests/admin_views

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:54:50 -0600 (Sun, 12 Dec 2010)
New Revision: 14879

Modified:
   django/trunk/django/contrib/admin/templatetags/admin_list.py
   django/trunk/docs/ref/contrib/admin/index.txt
   django/trunk/tests/regressiontests/admin_views/models.py
   django/trunk/tests/regressiontests/admin_views/tests.py
Log:
Fixed #13607 -- Auto-initialize admin's date hierarchy links intelligently. 
Thanks, Simon Meers.

Modified: django/trunk/django/contrib/admin/templatetags/admin_list.py
===
--- django/trunk/django/contrib/admin/templatetags/admin_list.py
2010-12-12 22:54:22 UTC (rev 14878)
+++ django/trunk/django/contrib/admin/templatetags/admin_list.py
2010-12-12 22:54:50 UTC (rev 14879)
@@ -231,6 +231,16 @@
 
 link = lambda d: cl.get_query_string(d, [field_generic])
 
+if not (year_lookup or month_lookup or day_lookup):
+# select appropriate start level
+date_range = cl.query_set.aggregate(first=models.Min(field_name),
+last=models.Max(field_name))
+if date_range['first'] and date_range['last']:
+if date_range['first'].year == date_range['last'].year:
+year_lookup = date_range['first'].year
+if date_range['first'].month == date_range['last'].month:
+month_lookup = date_range['first'].month
+
 if year_lookup and month_lookup and day_lookup:
 day = datetime.date(int(year_lookup), int(month_lookup), 
int(day_lookup))
 return {

Modified: django/trunk/docs/ref/contrib/admin/index.txt
===
--- django/trunk/docs/ref/contrib/admin/index.txt   2010-12-12 22:54:22 UTC 
(rev 14878)
+++ django/trunk/docs/ref/contrib/admin/index.txt   2010-12-12 22:54:50 UTC 
(rev 14879)
@@ -107,6 +107,12 @@
 
 date_hierarchy = 'pub_date'
 
+.. versionadded:: 1.3
+
+This will intelligently populate itself based on available data,
+e.g. if all the dates are in one month, it'll show the day-level
+drill-down only.
+
 .. attribute:: ModelAdmin.form
 
 By default a ``ModelForm`` is dynamically created for your model. It is

Modified: django/trunk/tests/regressiontests/admin_views/models.py
===
--- django/trunk/tests/regressiontests/admin_views/models.py2010-12-12 
22:54:22 UTC (rev 14878)
+++ django/trunk/tests/regressiontests/admin_views/models.py2010-12-12 
22:54:50 UTC (rev 14879)
@@ -320,7 +320,7 @@
 class PodcastAdmin(admin.ModelAdmin):
 list_display = ('name', 'release_date')
 list_editable = ('release_date',)
-
+date_hierarchy = 'release_date'
 ordering = ('name',)
 
 class Vodcast(Media):

Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===
--- django/trunk/tests/regressiontests/admin_views/tests.py 2010-12-12 
22:54:22 UTC (rev 14878)
+++ django/trunk/tests/regressiontests/admin_views/tests.py 2010-12-12 
22:54:50 UTC (rev 14879)
@@ -6,6 +6,7 @@
 from django.conf import settings
 from django.core import mail
 from django.core.files import temp as tempfile
+from django.core.urlresolvers import reverse
 # Register auth models with the admin.
 from django.contrib.auth import REDIRECT_FIELD_NAME, admin
 from django.contrib.auth.models import User, Permission, UNUSABLE_PASSWORD
@@ -2395,3 +2396,105 @@
 response = self.client.get('/test_admin/%s/admin_views/' % self.urlbit)
 self.assertFalse(' lang=""' in response.content)
 self.assertFalse(' xml:lang=""' in response.content)
+
+
+class DateHierarchyTests(TestCase):
+fixtures = ['admin-views-users.xml']
+
+def setUp(self):
+self.client.login(username='super', password='secret')
+
+def assert_contains_year_link(self, response, date):
+self.assertContains(response, '?release_date__year=%d"' % (date.year,))
+
+def assert_contains_month_link(self, response, date):
+self.assertContains(
+response, '?release_date__year=%drelease_date__month=%d"' % (
+date.year, date.month))
+
+def assert_contains_day_link(self, response, date):
+self.assertContains(
+response, '?release_date__year=%d'
+'release_date__month=%drelease_date__day=%d"' % (
+date.year, date.month, date.day))
+
+def test_empty(self):
+"""
+Ensure that no date hierarchy links display with empty changelist.
+"""
+response = self.client.get(
+reverse('admin:admin_views_podcast_changelist'))
+self.assertNotContains(response, 'release_date__year=')
+self.assertNotContains(response, 'release_date__month=')
+self.assertNotContains(response, 

[Changeset] r14878 - django/trunk/django/db/models/fields

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:54:22 -0600 (Sun, 12 Dec 2010)
New Revision: 14878

Modified:
   django/trunk/django/db/models/fields/files.py
Log:
Fixed #12955 -- Use the size attribute of the file instead of len() to support 
uploads larger than 2GB. Thanks, swiedenroth and isagalaev.

Modified: django/trunk/django/db/models/fields/files.py
===
--- django/trunk/django/db/models/fields/files.py   2010-12-12 22:54:04 UTC 
(rev 14877)
+++ django/trunk/django/db/models/fields/files.py   2010-12-12 22:54:22 UTC 
(rev 14878)
@@ -73,7 +73,7 @@
 def _get_size(self):
 self._require_file()
 if not self._committed:
-return len(self.file)
+return self.file.size
 return self.storage.size(self.name)
 size = property(_get_size)
 
@@ -93,7 +93,7 @@
 setattr(self.instance, self.field.name, self.name)
 
 # Update the filesize cache
-self._size = len(content)
+self._size = content.size
 self._committed = True
 
 # Save the object because it has changed, unless save is False

-- 
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] r14877 - django/trunk/django/views

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:54:04 -0600 (Sun, 12 Dec 2010)
New Revision: 14877

Modified:
   django/trunk/django/views/debug.py
Log:
Fixed #11990 -- Show the correct URLconf in the technical 404 template even if 
it was overridden, e.g. in a middleware. Thanks, mattbennett.

Modified: django/trunk/django/views/debug.py
===
--- django/trunk/django/views/debug.py  2010-12-12 22:53:49 UTC (rev 14876)
+++ django/trunk/django/views/debug.py  2010-12-12 22:54:04 UTC (rev 14877)
@@ -2,6 +2,7 @@
 import os
 import re
 import sys
+import types
 
 from django.conf import settings
 from django.http import HttpResponse, HttpResponseServerError, 
HttpResponseNotFound
@@ -277,8 +278,13 @@
 # tried exists but is an empty list. The URLconf must've been 
empty.
 return empty_urlconf(request)
 
+urlconf = getattr(request, 'urlconf', settings.ROOT_URLCONF)
+if isinstance(urlconf, types.ModuleType):
+urlconf = urlconf.__name__
+
 t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template')
 c = Context({
+'urlconf': urlconf,
 'root_urlconf': settings.ROOT_URLCONF,
 'request_path': request.path_info[1:], # Trim leading slash
 'urlpatterns': tried,
@@ -787,7 +793,7 @@
   
 {% if urlpatterns %}
   
-  Using the URLconf defined in {{ settings.ROOT_URLCONF }},
+  Using the URLconf defined in {{ urlconf }},
   Django tried these URL patterns, in this order:
   
   

-- 
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] r14876 - in django/trunk: django/conf/locale/ar/LC_MESSAGES django/utils tests/regressiontests/text

2010-12-12 Thread noreply
Author: jezdez
Date: 2010-12-12 16:53:49 -0600 (Sun, 12 Dec 2010)
New Revision: 14876

Modified:
   django/trunk/django/conf/locale/ar/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/ar/LC_MESSAGES/django.po
   django/trunk/django/utils/text.py
   django/trunk/tests/regressiontests/text/tests.py
Log:
Fixed #5672 -- Allow the separator in the get_text_list utility function to be 
translated. Thanks, Claude.

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.po2010-12-12 
04:37:01 UTC (rev 14875)
+++ django/trunk/django/conf/locale/ar/LC_MESSAGES/django.po2010-12-12 
22:53:49 UTC (rev 14876)
@@ -5022,6 +5022,11 @@
 msgid "or"
 msgstr "أو"
 
+#. Translators: This string is used as a separator between list elements
+#: utils/text.py:153
+msgid ", "
+msgstr "، "
+
 #: utils/timesince.py:21
 msgid "year"
 msgid_plural "years"

Modified: django/trunk/django/utils/text.py
===
--- django/trunk/django/utils/text.py   2010-12-12 04:37:01 UTC (rev 14875)
+++ django/trunk/django/utils/text.py   2010-12-12 22:53:49 UTC (rev 14876)
@@ -1,7 +1,7 @@
 import re
 from django.utils.encoding import force_unicode
 from django.utils.functional import allow_lazy
-from django.utils.translation import ugettext_lazy
+from django.utils.translation import ugettext_lazy, ugettext as _
 from htmlentitydefs import name2codepoint
 
 # Capitalizes the first letter of a string.
@@ -148,7 +148,10 @@
 """
 if len(list_) == 0: return u''
 if len(list_) == 1: return force_unicode(list_[0])
-return u'%s %s %s' % (', '.join([force_unicode(i) for i in list_][:-1]), 
force_unicode(last_word), force_unicode(list_[-1]))
+return u'%s %s %s' % (
+# Translators: This string is used as a separator between list elements
+_(', ').join([force_unicode(i) for i in list_][:-1]),
+force_unicode(last_word), force_unicode(list_[-1]))
 get_text_list = allow_lazy(get_text_list, unicode)
 
 def normalize_newlines(text):

Modified: django/trunk/tests/regressiontests/text/tests.py
===
--- django/trunk/tests/regressiontests/text/tests.py2010-12-12 04:37:01 UTC 
(rev 14875)
+++ django/trunk/tests/regressiontests/text/tests.py2010-12-12 22:53:49 UTC 
(rev 14876)
@@ -4,12 +4,23 @@
 from django.utils.text import *
 from django.utils.http import urlquote, urlquote_plus, cookie_date, http_date
 from django.utils.encoding import iri_to_uri
+from django.utils.translation import activate, deactivate
 
 class TextTests(TestCase):
 """
 Tests for stuff in django.utils.text and other text munging util functions.
 """
 
+def test_get_text_list(self):
+self.assertEqual(get_text_list(['a', 'b', 'c', 'd']), u'a, b, c or d')
+self.assertEqual(get_text_list(['a', 'b', 'c'], 'and'), u'a, b and c')
+self.assertEqual(get_text_list(['a', 'b'], 'and'), u'a and b')
+self.assertEqual(get_text_list(['a']), u'a')
+self.assertEqual(get_text_list([]), u'')
+activate('ar')
+self.assertEqual(get_text_list(['a', 'b', 'c']), u"a، b أو c")
+deactivate()
+
 def test_smart_split(self):
 
 self.assertEquals(list(smart_split(r'''This is "a person" test.''')),

-- 
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] #14844: i18n blocktrans tag pluralization feature limited by gettext constraints and unique local tag context

2010-12-12 Thread Django
#14844: i18n blocktrans tag pluralization feature limited by gettext constraints
and unique local tag context
---+
  Reporter:  ramiro| Owner:  nobody
Status:  new   | Milestone:  1.3   
 Component:  Internationalization  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by jezdez):

 So if I understand this issue correctly, we should at least fix what has
 been done in r13998 since we are very close to a beta release. I think the
 patch by Claude from 12/6 would work for trunk, too.

 For any other long term fix of verbose_name_plural we have go back to the
 white board for 1.4. If anyone has other good idea, please chime in this
 week.

-- 
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] #14731: [Patch] Change 14413 breaks old fixtures with permissions

2010-12-12 Thread Django
#14731: [Patch] Change 14413 breaks old fixtures with permissions
+---
  Reporter:  chipx86| Owner:  nobody   
Status:  new| Milestone:  1.3  
 Component:  Authentication |   Version:  1.3-alpha
Resolution: |  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by chipx86):

 Hi. Just wondering if there's any ETA on this. It's kind of blocking me.

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

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



[Django] #14892: python manage.py shell

2010-12-12 Thread Django
#14892: python manage.py shell
+---
 Reporter:  haras   |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  SVN   
 Keywords:  core shell ipython  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 django svn breaks compatibility with svn version of ipython
 my patch fix this
 at least for my mac os x 10.6.5

-- 
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] #4976: The contrib.humanize templatetags fail when given None.

2010-12-12 Thread Django
#4976: The contrib.humanize templatetags fail when given None.
---+
  Reporter:  anonymous | Owner: 
Status:  new   | Milestone: 
 Component:  Contrib apps  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by adamv):

  * needs_better_patch:  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-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] #14891: ManyToManyRelatedField uses different Manager than ForeignKey-field

2010-12-12 Thread Django
#14891: ManyToManyRelatedField uses different Manager than ForeignKey-field
+---
 Reporter:  sdk...@sdk.sas.com  |   Owner:  
nobody
   Status:  new |   Milestone:  
  
Component:  Database layer (models, ORM)| Version:  1.2 
  
 Keywords:  Manager ManyToManyField use_for_related_fields  |   Stage:  
Unreviewed
Has_patch:  0   |  
+---
 I noticed that the ManyToManyField ignored my "use_for_related_fields =
 False" setting, and investigated by looking into the source code. It seems
 that the ManyToManyField always uses _default_manager, and the ForeignKey-
 fields use _base_manager. If this is by design, I have failed to find the
 documentation explaining why the two kinds of lookups should have
 different behaviour (and what to do if you want custom behaviour for the
 objects-manager, but not for ManyToMany lookups), and this should then be
 considered a plea for a documentation 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] #14890: Copy edit error on http://docs.djangoproject.com/en/1.2/intro/tutorial03/

2010-12-12 Thread Django
#14890: Copy edit error on 
http://docs.djangoproject.com/en/1.2/intro/tutorial03/
---+
 Reporter:  dbaggott   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Under the Philosophy section of part 3 of the tutorial:
 http://docs.djangoproject.com/en/1.2/intro/tutorial03/#philosophy

 The current text reads:

 {{{
 In our poll application, we’ll have the following four views:

 * Poll “archive” page – displays the latest few polls.

 }}}

 In comparison to the Weblog application example that immediately precedes
 it, it's clear that '''archive''' is the incorrect word.  It should
 probably read:

 {{{
 In our poll application, we’ll have the following four views:

 * Poll homepage – displays the latest few polls.

 }}}

-- 
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] #14739: Move contrib app translations out of core

2010-12-12 Thread Django
#14739: Move contrib app translations out of core
---+
  Reporter:  ramiro| Owner:  jezdez
Status:  assigned  | Milestone:  1.3   
 Component:  Internationalization  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * owner:  nobody => jezdez
  * status:  new => assigned
  * stage:  Unreviewed => Accepted
  * summary:  Segregate contrib.localflavor translations to their ownPO
  file/gettext domain? => Move contrib app
  translations out of core
  * milestone:  => 1.3

Comment:

 Accepting after having talked to Russ about 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-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] #11585: i18n in urls.py

2010-12-12 Thread Django
#11585: i18n in urls.py
---+
  Reporter:  digi604   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Internationalization  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * stage:  Design decision needed => Accepted
  * milestone:  1.3 =>

Comment:

 Removing the 1.3 milestone for now, since I don't see a chance to get this
 ready in time. But for what it's worth, I think adopting a few of
 transurlvania's tools and/or document the technique is worthwhile for
 future releases.

-- 
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] #14370: Adding support for Autocomplete in contrib.admin

2010-12-12 Thread Django
#14370: Adding support for Autocomplete in contrib.admin
---+
  Reporter:  tyrion| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  django.contrib.admin  |   Version:  1.2 
Resolution:|  Keywords:  autocomplete
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  1 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Comment (by jezdez):

 Ah, ok, that'd make sense indeed, agreed.

-- 
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] #14889: Usability improvement to csrf_migration_helper

2010-12-12 Thread Django
#14889: Usability improvement to csrf_migration_helper
-+--
 Reporter:  frankvillasenor  |   Owner:  nobody 
   
   Status:  new  |   Milestone: 
   
Component:  Uncategorized| Version:  SVN
   
 Keywords:  csrf_migration_helper, csrf, csrf migration  |   Stage:  
Unreviewed
Has_patch:  1|  
-+--
 The csrf_migration_helper.py couldn't find my settings file. I found that
 "." wasn't on my sys.path. I made a small modification to the
 csrf_migration_helper to go ahead and add "." to the path. While I realize
 I may not have been using the program quite as expected, I figure that if
 I ran in to this, others will and this is a quick fix.

 Hopefully this is helpful.

-- 
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] #14844: i18n blocktrans tag pluralization feature limited by gettext constraints and unique local tag context

2010-12-12 Thread Django
#14844: i18n blocktrans tag pluralization feature limited by gettext constraints
and unique local tag context
---+
  Reporter:  ramiro| Owner:  nobody
Status:  new   | Milestone:  1.3   
 Component:  Internationalization  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 Replying to [comment:6 lukeplant]:
 > I think the solution proposed by Claude sounds about right. The problem
 is that it causes a regression - for the case of English,
 `verbose_name_plural` will be ignored. AFAICS, [13998] never fixed the bug
 it was supposed to fix - can someone confirm that?

 Correct, it didn't achieve what was intended, and prevents translators
 from creating a compiled (MO) catalogs after updating the PO files if they
 have updated to r13998 or newer.

-- 
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] #14370: Adding support for Autocomplete in contrib.admin

2010-12-12 Thread Django
#14370: Adding support for Autocomplete in contrib.admin
---+
  Reporter:  tyrion| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  django.contrib.admin  |   Version:  1.2 
Resolution:|  Keywords:  autocomplete
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  1 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Comment (by sehmasch...@gmail.com):

 I personally wouldn´t make that an option because of coherence (the raw-
 id-field also shows the lookup-icon).
 however, if the icon is there by default and I´m having the option to
 disable it ... why not. the main point is that the lookup-icon is needed.

 just to clarify: with showing the lookup-icon, I don´t mean to show the
 input-field for the object-id 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-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] #14370: Adding support for Autocomplete in contrib.admin

2010-12-12 Thread Django
#14370: Adding support for Autocomplete in contrib.admin
---+
  Reporter:  tyrion| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  django.contrib.admin  |   Version:  1.2 
Resolution:|  Keywords:  autocomplete
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  1 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Comment (by jezdez):

 Would making that an option per autocomplete field option make sense?

-- 
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] #14370: Adding support for Autocomplete in contrib.admin

2010-12-12 Thread Django
#14370: Adding support for Autocomplete in contrib.admin
---+
  Reporter:  tyrion| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  django.contrib.admin  |   Version:  1.2 
Resolution:|  Keywords:  autocomplete
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  1 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Comment (by sehmasch...@gmail.com):

 I´ve just tested the patch and I think it´s great.

 there´s just one minor issue: I´d still show the lookup-icon, because in
 some (rare) cases you won´t find an object without.

-- 
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] #14370: Adding support for Autocomplete in contrib.admin

2010-12-12 Thread Django
#14370: Adding support for Autocomplete in contrib.admin
---+
  Reporter:  tyrion| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  django.contrib.admin  |   Version:  1.2 
Resolution:|  Keywords:  autocomplete
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  1 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

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

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

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



Re: [Django] #14370: Adding support for Autocomplete in contrib.admin

2010-12-12 Thread Django
#14370: Adding support for Autocomplete in contrib.admin
---+
  Reporter:  tyrion| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  django.contrib.admin  |   Version:  1.2 
Resolution:|  Keywords:  autocomplete
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  1 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * needs_docs:  0 => 1

Comment:

 It would be great if you could attach a diff of the current state to this
 ticket.

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

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