Re: [Django] #14162: Dumpdata needs an option to use the base manager instead of the default manager

2010-08-23 Thread Django
#14162: Dumpdata needs an option to use the base manager instead of the default
manager
+---
  Reporter:  PaulM  | Owner:  PaulM
Status:  new| Milestone:  1.3  
 Component:  django-admin.py|   Version:  SVN  
Resolution: |  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by gabrielhurley):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This patch looks good to me. It's got docs and tests, applies cleanly,
 respects multi-db, does something useful without cruft... I'll call this
 RFC until a core dev can take a look.

-- 
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] #14162: Dumpdata needs an option to use the base manager instead of the default manager

2010-08-23 Thread Django
#14162: Dumpdata needs an option to use the base manager instead of the default
manager
-+--
 Reporter:  PaulM|   Owner:  PaulM 
   Status:  new  |   Milestone:  1.3   
Component:  django-admin.py  | Version:  SVN   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  1|  
-+--
 Objects with custom managers sometimes filter results when `dumpdata` is
 run. Often we want to dump all the objects in our database, not just the
 subset of objects which are returned by the default manager.

 The attached patch adds a `--all` option to the `dumpdata` command which
 makes it use Django's base manager instead of the default manager. This
 means that even objects which would normally be filtered by the default
 manager are returned.

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

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



[Changeset] r13636 - django/trunk/tests/regressiontests/forms

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 21:26:14 -0500 (Mon, 23 Aug 2010)
New Revision: 13636

Modified:
   django/trunk/tests/regressiontests/forms/fields.py
Log:
Fixed #14159 -- Corrected more potential uses of relative paths in tests. 
Thanks to Alex Gaynor for the patch.

Modified: django/trunk/tests/regressiontests/forms/fields.py
===
--- django/trunk/tests/regressiontests/forms/fields.py  2010-08-24 01:03:51 UTC 
(rev 13635)
+++ django/trunk/tests/regressiontests/forms/fields.py  2010-08-24 02:26:14 UTC 
(rev 13636)
@@ -766,13 +766,13 @@
 # FilePathField 
###
 
 def test_filepathfield_65(self):
-path = forms.__file__
+path = os.path.abspath(forms.__file__)
 path = os.path.dirname(path) + '/'
-assert fix_os_paths(path).endswith('/django/forms/')
+self.assertTrue(fix_os_paths(path).endswith('/django/forms/'))
 
 def test_filepathfield_66(self):
 path = forms.__file__
-path = os.path.dirname(path) + '/'
+path = os.path.dirname(os.path.abspath(path)) + '/'
 f = FilePathField(path=path)
 f.choices = [p for p in f.choices if p[0].endswith('.py')]
 f.choices.sort()
@@ -787,13 +787,13 @@
 ]
 for exp, got in zip(expected, fix_os_paths(f.choices)):
 self.assertEqual(exp[1], got[1])
-assert got[0].endswith(exp[0])
+self.assertTrue(got[0].endswith(exp[0]))
 self.assertRaisesErrorWithMessage(ValidationError, "[u'Select a valid 
choice. fields.py is not one of the available choices.']", f.clean, 'fields.py')
 assert fix_os_paths(f.clean(path + 
'fields.py')).endswith('/django/forms/fields.py')
 
 def test_filepathfield_67(self):
 path = forms.__file__
-path = os.path.dirname(path) + '/'
+path = os.path.dirname(os.path.abspath(path)) + '/'
 f = FilePathField(path=path, match='^.*?\.py$')
 f.choices.sort()
 expected = [
@@ -807,10 +807,10 @@
 ]
 for exp, got in zip(expected, fix_os_paths(f.choices)):
 self.assertEqual(exp[1], got[1])
-assert got[0].endswith(exp[0])
+self.assertTrue(got[0].endswith(exp[0]))
 
 def test_filepathfield_68(self):
-path = forms.__file__
+path = os.path.abspath(forms.__file__)
 path = os.path.dirname(path) + '/'
 f = FilePathField(path=path, recursive=True, match='^.*?\.py$')
 f.choices.sort()
@@ -827,7 +827,7 @@
 ]
 for exp, got in zip(expected, fix_os_paths(f.choices)):
 self.assertEqual(exp[1], got[1])
-assert got[0].endswith(exp[0])
+self.assertTrue(got[0].endswith(exp[0]))
 
 # SplitDateTimeField 
##
 

-- 
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] #14161: GeoDjango autofield makes transaction fail

2010-08-23 Thread Django
#14161: GeoDjango autofield makes transaction fail
---+
 Reporter:  miguel.araujo.pe...@gmail.com  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  GIS| Version:  1.2   
 Keywords:  postGIS, autofield, geodjango  |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Hi there,

 This is my GeoDjango model:


 {{{
 from django.contrib.gis.db import models
 from django.db.models import fields

 class Spot(models.Model):
 idSpot = fields.AutoField(primary_key = True)

 code = models.CharField(max_length = 30)

 poly = models.PointField(spatial_index = True,
 srid = 4326,
 geography = True)

 objects = models.GeoManager()
 }}}

 When I do this:
 {{{
 python manage.py shell

 from location.models import Spot
 from django.contrib.gis.geos import Point
 spot = Spot("park",Point(10,10))
 spot.save()
 }}}

 What I get is:
 {{{
 ---
 ValueErrorTraceback (most recent call
 last)

 /home/map/mercurial/telollevo/src/telollevogis/ in
 ()

 /usr/local/lib/python2.6/dist-packages/django/db/models/base.pyc in
 save(self, force_insert, force_update, using)
 433 if force_insert and force_update:
 434 raise ValueError("Cannot force both insert and
 updating in model saving.")
 --> 435 self.save_base(using=using, force_insert=force_insert,
 force_update=force_update)
 436
 437 save.alters_data = True

 /usr/local/lib/python2.6/dist-packages/django/db/models/base.pyc in
 save_base(self, raw, cls, origin, force_insert, force_update, using)
 495 # Determine whether a record with the primary key
 already exists.

 496 if (force_update or (not force_insert and
 --> 497
 manager.using(using).filter(pk=pk_val).exists())):
 498 # It does already exist, so do an UPDATE.

 499 if force_update or non_pks:

 /usr/local/lib/python2.6/dist-packages/django/db/models/query.pyc in
 filter(self, *args, **kwargs)
 548 set.
 549 """
 --> 550 return self._filter_or_exclude(False, *args, **kwargs)
 551
 552 def exclude(self, *args, **kwargs):

 /usr/local/lib/python2.6/dist-packages/django/db/models/query.pyc in
 _filter_or_exclude(self, negate, *args, **kwargs)
 566 clone.query.add_q(~Q(*args, **kwargs))
 567 else:
 --> 568 clone.query.add_q(Q(*args, **kwargs))
 569 return clone
 570

 /usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.pyc in
 add_q(self, q_object, used_aliases)
1129 else:
1130 self.add_filter(child, connector,
 q_object.negated,
 -> 1131 can_reuse=used_aliases)
1132 self.where.end_subtree()
1133 if connector == OR:

 /usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.pyc in
 add_filter(self, filter_expr, connector, negate, trim, can_reuse,
 process_extras)
1069 else:
1070 self.where.add((Constraint(alias, col, field),
 lookup_type, value),
 -> 1071 connector)
1072
1073 if negate:

 /usr/local/lib/python2.6/dist-
 packages/django/contrib/gis/db/models/sql/where.pyc in add(self, data,
 connector)
  39  isinstance(obj.field, GeometryField) ):
  40 data = (GeoConstraint(obj), lookup_type, value)
 ---> 41 super(GeoWhereNode, self).add(data, connector)
  42
  43 def make_atom(self, child, qn, connection):

 /usr/local/lib/python2.6/dist-packages/django/db/models/sql/where.pyc in
 add(self, data, connector)
  64
  65 if hasattr(obj, "prepare"):
 ---> 66 value = obj.prepare(lookup_type, value)
  67 super(WhereNode, self).add((obj, lookup_type,
 annotation, value),
  68 connector)

 /usr/local/lib/python2.6/dist-packages/django/db/models/sql/where.pyc in
 prepare(self, lookup_type, value)
 297 def prepare(self, lookup_type, value):
 298 if self.field:
 --> 299 return self.field.get_prep_lookup(lookup_type, value)
 300 return value
 301

 /usr/local/lib/python2.6/dist-
 packages/django/db/models/fields/__init__.pyc in get_prep_lookup(self,
 lookup_type, value)
 290 return value
 291 elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte'):
 --> 292 return self.get_prep_value(value)
 293 elif lookup_type in ('range', 'in'):
 294 return 

[Changeset] r13635 - django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress

2010-08-23 Thread noreply
Author: PaulM
Date: 2010-08-23 20:03:51 -0500 (Mon, 23 Aug 2010)
New Revision: 13635

Added:
   
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/tests.py
Modified:
   
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/models.py
Log:
[soc2010/test-refactor] converted custom_managers_regress


Modified: 
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/models.py
===
--- 
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/models.py
   2010-08-23 13:51:49 UTC (rev 13634)
+++ 
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/models.py
   2010-08-24 01:03:51 UTC (rev 13635)
@@ -38,45 +38,3 @@
 
 def __unicode__(self):
 return self.name
-
-__test__ = {"tests": """
-Even though the default manager filters out some records, we must still be able
-to save (particularly, save by updating existing records) those filtered
-instances. This is a regression test for #8990, #9527
->>> related = RelatedModel.objects.create(name="xyzzy")
->>> obj = RestrictedModel.objects.create(name="hidden", related=related)
->>> obj.name = "still hidden"
->>> obj.save()
-
-# If the hidden object wasn't seen during the save process, there would now be
-# two objects in the database.
->>> RestrictedModel.plain_manager.count()
-1
-
-Deleting related objects should also not be distracted by a restricted manager
-on the related object. This is a regression test for #2698.
->>> RestrictedModel.plain_manager.all().delete()
->>> for name, public in (('one', True), ('two', False), ('three', False)):
-... _ = RestrictedModel.objects.create(name=name, is_public=public, 
related=related)
-
-# Reload the RelatedModel instance, just to avoid any instance artifacts.
->>> obj = RelatedModel.objects.get(name="xyzzy")
->>> obj.delete()
-
-# All of the RestrictedModel instances should have been deleted, since they
-# *all* pointed to the RelatedModel. If the default manager is used, only the
-# public one will be deleted.
->>> RestrictedModel.plain_manager.all()
-[]
-
-# The same test case as the last one, but for one-to-one models, which are
-# implemented slightly different internally, so it's a different code path.
->>> obj = RelatedModel.objects.create(name="xyzzy")
->>> _ = OneToOneRestrictedModel.objects.create(name="foo", is_public=False, 
related=obj)
->>> obj = RelatedModel.objects.get(name="xyzzy")
->>> obj.delete()
->>> OneToOneRestrictedModel.plain_manager.all()
-[]
-
-"""
-}

Added: 
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/tests.py
===
--- 
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/tests.py
(rev 0)
+++ 
django/branches/soc2010/test-refactor/tests/regressiontests/custom_managers_regress/tests.py
2010-08-24 01:03:51 UTC (rev 13635)
@@ -0,0 +1,47 @@
+from django.test import TestCase
+
+from models import RelatedModel, RestrictedModel, OneToOneRestrictedModel
+
+class CustomManagersRegressTestCase(TestCase):
+def test_filtered_default_manager(self):
+"""Even though the default manager filters out some records,
+we must still be able to save (particularly, save by updating
+existing records) those filtered instances. This is a
+regression test for #8990, #9527"""
+related = RelatedModel.objects.create(name="xyzzy")
+obj = RestrictedModel.objects.create(name="hidden", related=related)
+obj.name = "still hidden"
+obj.save()
+
+# If the hidden object wasn't seen during the save process,
+# there would now be two objects in the database.
+self.assertEqual(RestrictedModel.plain_manager.count(), 1)
+
+def test_delete_related_on_filtered_manager(self):
+"""Deleting related objects should also not be distracted by a
+restricted manager on the related object. This is a regression
+test for #2698."""
+related = RelatedModel.objects.create(name="xyzzy")
+
+for name, public in (('one', True), ('two', False), ('three', False)):
+RestrictedModel.objects.create(name=name, is_public=public, 
related=related)
+
+obj = RelatedModel.objects.get(name="xyzzy")
+obj.delete()
+
+# All of the RestrictedModel instances should have been
+# deleted, since they *all* pointed to the RelatedModel. If
+# the default manager is used, only the public one will be
+# deleted.
+self.assertEqual(len(RestrictedModel.plain_manager.all()), 0)
+
+def test_delete_one_to_one_manager(self):
+# The same test case as the last one, but for one-to-one
+# models, which are implemented slightly different internally,
+# so it's 

Re: [Django] #12488: Add EmailInput and URLInput widgets

2010-08-23 Thread Django
#12488: Add EmailInput and URLInput widgets
-+--
  Reporter:  obeattie| Owner:  nobody
Status:  closed  | Milestone:
 Component:  Forms   |   Version:  SVN   
Resolution:  wontfix |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by patrys):

 Just to be clear: HTML5 allows XML style tags. There is also no loss when
 changing the doctype to plain "html".

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

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



Re: [Django] #5833: Custom FilterSpecs

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

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

Comment:

 Replying to [ticket:5833 Honza_Kral]:
 > One should be able to create custom `FilterSpecs` for the admin's
 `list_filter` interface.
 >
 > Honza_Kral: I modified the filterspec definition to allow for users to
 register their own filters in admin. The mechanism is simple - I just
 reverted the order of the registry so that newly registered specs will
 come first. That way if you register your own filter via
 {{{FilterSpec.register}}}, it will be used before the default one.
 >
 > Another approach by korpios is described in the comments.

-- 
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] #12488: Add EmailInput and URLInput widgets

2010-08-23 Thread Django
#12488: Add EmailInput and URLInput widgets
-+--
  Reporter:  obeattie| Owner:  nobody
Status:  closed  | Milestone:
 Component:  Forms   |   Version:  SVN   
Resolution:  wontfix |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by russellm):

 patrys: Having  may degrade, but it doesn't validate.
 On top of that, Django's output rendering follows XHTML conventions;
 introducing rendering elements drawn from HTML5 starts to confuse matters.

 That said, adding support for HTML5 is on my radar personally, along with
 a number of other form-rendering related improvements. Check the django-
 dev mailing list for recent discussions. I'm hoping to be able to sprint
 on this a little bit at DjangoCon.

-- 
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] #14160: Internal server error 500

2010-08-23 Thread Django
#14160: Internal server error 500
+---
  Reporter:  FilipeCifali   | Owner:  support   
   
Status:  closed | Milestone:
   
 Component:  Uncategorized  |   Version:  SVN   
   
Resolution:  invalid|  Keywords:  internal server error 500 
django.core
 Stage:  Unreviewed | Has_patch:  0 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by Alex):

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

Comment:

 Hello, Trac is designed for filing bugs about Django itself, not for
 questions on how to use Django.  For those you can use either the
 [http://groups.google.com/group/django-users django-users] mailing list,
 or the #django channel on [http://webchat.freenode.net/ irc.freenode.net].

-- 
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] #14160: Internal server error 500

2010-08-23 Thread Django
#14160: Internal server error 500
---+
 Reporter:  FilipeCifali   |   Owner:  support   
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  SVN   
 Keywords:  internal server error 500 django.core  |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Need some help please,

 Shared hosting enviroment:

 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] mod_wsgi
 (pid=16011): Target WSGI script
 '/home/campominado/apps_wsgi/campominado.wsgi' cannot be loaded as Python
 module.
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] mod_wsgi
 (pid=16011): Exception occurred processing WSGI script
 '/home/campominado/apps_wsgi/campominado.wsgi'.
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] Traceback (most
 recent call last):
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10]   File
 "/home/campominado/apps_wsgi/campominado.wsgi", line 5, in 
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] import
 django.core.handlers.wsgi
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] ImportError: No
 module named django.core.handlers.wsgi
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] mod_wsgi
 (pid=16011): Target WSGI script
 '/home/campominado/apps_wsgi/campominado.wsgi' cannot be loaded as Python
 module.
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] mod_wsgi
 (pid=16011): Exception occurred processing WSGI script
 '/home/campominado/apps_wsgi/campominado.wsgi'.
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] Traceback (most
 recent call last):
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10]   File
 "/home/campominado/apps_wsgi/campominado.wsgi", line 5, in 
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] import
 django.core.handlers.wsgi
 [Mon Aug 23 17:45:01 2010] [error] [client 10.5.5.10] ImportError: No
 module named django.core.handlers.wsgi

 I've tried to config like:

 http://www.codekoala.com/blog/2008/installing-django-shared-hosting-site5/

 But get only internal server error and that log.

 My ISP have python 2.4 and 2.6, so I used a virtual Python to set the 2.6
 as default python, and then, downloaded the trunk, running python setup.py
 on django don't return erros:

 byte-compiling /home/campominado/lib/python2.6/site-
 packages/django/templatetags/cache.py to cache.pyc
 byte-compiling /home/campominado/lib/python2.6/site-
 packages/django/templatetags/__init__.py to __init__.pyc
 running install_scripts
 copying build/scripts-2.6/django-admin.py -> /home/campominado/bin
 changing mode of /home/campominado/bin/django-admin.py to 775
 running install_data
 running install_egg_info
 Writing /home/campominado/lib/python2.6/site-packages/Django-1.2.1-py2.6
 .egg-info

 And when I run from the terminal, don't display any errors with wsgi
 script:

 [campomin...@karpatos ~]$ python
 Python 2.6.5 (r265:79063, Aug 20 2010, 15:52:16)
 [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import os, sys
 >>> sys.path.append('/home/campominado/apps_wsgi')
 >>> os.environ['PYTHON_EGG_CACHE'] = '/home/campominado/apps_wsgi/.python-
 eggs'
 >>> os.environ['DJANGO_SETTINGS_MODULE']='campominado.settings'
 >>> import django.core.handlers.wsgi
 >>> application = django.core.handlers.wsgi.WSGIHandler()
 >>>


 Please, help!

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 I've updated the gist with the reproducible version.  The easiest way to
 replicate this is to use http://modifyheaders.mozdev.org/ and modify:

 If-Modified-Since to Mon, 29 Jul 3121 29:24:25 GMT

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 Oops, thought you just wanted the stack trace in text.  These are from a
 live site so these are from djangodberrorlog.  I'll try to replicate
 myself.

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 Here is the text version:

 {{{
 Traceback (most recent call last):

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/django/core/handlers/base.py", line 100, in get_response
 response = callback(request, *callback_args, **callback_kwargs)

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/staticfiles/views.py", line 32, in serve
 show_indexes=show_indexes)

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/django/views/static.py", line 61, in serve
 statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):

   File "/var/www/yipit-env/lib/python2.6/site-
 packages/django/views/static.py", line 129, in was_modified_since
 header_mtime = mktime_tz(parsedate_tz(matches.group(1)))

   File "/usr/lib/python2.6/email/_parseaddr.py", line 146, in mktime_tz
 t = time.mktime(data[:8] + (0,))

 OverflowError: mktime argument out of range
 }}}

-- 
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] #12991: Django 1.2 should have optional support for unittest2

2010-08-23 Thread Django
#12991: Django 1.2 should have optional support for unittest2
+---
  Reporter:  ericholscher   | Owner:  PaulM
Status:  assigned   | Milestone:  1.3  
 Component:  Testing framework  |   Version:  SVN  
Resolution: |  Keywords:   
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by seanc):

 * cc: s...@chittenden.org (added)

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #638: changelist table is too wide on pages with filter sidebar

2010-08-23 Thread Django
#638: changelist table is too wide on pages with filter sidebar
---+
  Reporter:  wilson| Owner:  wilson
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Kronuz):

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

Comment:

 Now the width of the table when filtered, doesn't expand to fill the width
 of the screen... I believe it should, as in lists with no filters.

-- 
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] #6434: auto_now and auto_now_add documentation

2010-08-23 Thread Django
#6434: auto_now and auto_now_add documentation
+---
  Reporter:  jok...@radgjafahus.is  | Owner:  adamnelson
 
Status:  new| Milestone:
 
 Component:  Documentation  |   Version:  SVN   
 
Resolution: |  Keywords:  datefield 
auto_now auto_now_add
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  1  |  
+---
Comment (by bjunix):

 I just stumbled upon this documentation 'bug'.  tried to explicity include
 a DateField  with auto_now_add=True in a ModelForm. After rethinking the
 problem it is clear that the auto_now_add field is not editable and thus
 excluded from the form automatically. But I think it would have helped if
 this behavior was documented somewhere.

-- 
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] #14159: Forms tests are dependent on module.__file__ returning an absolute path

2010-08-23 Thread Django
#14159: Forms tests are dependent on module.__file__ returning an absolute path
+---
  Reporter:  Alex   | Owner:  nobody
Status:  new| Milestone:
 Component:  Testing framework  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Django] #14159: Forms tests are dependent on module.__file__ returning an absolute path

2010-08-23 Thread Django
#14159: Forms tests are dependent on module.__file__ returning an absolute path
---+
 Reporter:  Alex   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Testing framework  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 Same issue as #14148.

-- 
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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 Replying to [comment:3 adamnelson]:
 > I can reproduce it, and I've just seen it on live.  Here is the relevant
 part of the stack trace.
 >
 > http://gist.github.com/545597

 Can you reproduce the error condition at will?. If so, could you paste the
 text version of the stack trace?. There is a button for that in the
 exception page generated by Django when running with DEBUG=True.

-- 
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] #12488: Add EmailInput and URLInput widgets

2010-08-23 Thread Django
#12488: Add EmailInput and URLInput widgets
-+--
  Reporter:  obeattie| Owner:  nobody
Status:  closed  | Milestone:
 Component:  Forms   |   Version:  SVN   
Resolution:  wontfix |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by patrys):

 lukeplant:

 Could you elaborate more on why you believe it breaks backwards
 compatibility? The fields degrade in all browsers. They produce both valid
 XML and valid HTML. The only thing that might change is the output of the
 W3C validator for non-HTML5 documents. And changing the DOCTYPE to "html"
 is a mere annoyance comparable to changing "maxlength" to "max_length" in
 model definitions.

-- 
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] #14157: Birthday calculation failing silently

2010-08-23 Thread Django
#14157: Birthday calculation failing silently
+---
  Reporter:  nil_von_9wo| Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.2   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

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

Comment:

 You are declaring the `today` var as a `datetime` and are trying to
 compare it with a `date` value (`born`, obtained from the Django
 `DateField`).

 {{{
 #!python
 >>> import datetime
 >>> born =  datetime.date(1971, 11, 26)
 >>> today = datetime.date.today()
 >>> try:
 ... bday = born.replace(year=today.year)
 ... except ValueError:
 ... bday = born.replace(year=today.year, day=born.day-1)
 ...
 >>> bday
 datetime.date(2010, 11, 26)
 >>> bday > today
 True
 >>> wrong_today = datetime.datetime.today()
 >>> bday > wrong_today
 Traceback (most recent call last):
   File "", line 1, in 
 TypeError: can't compare datetime.datetime to datetime.date
 }}}

 Please review your code because I doubt it is working on the command line
 in its current form.

 Closing ticket as invalid because it's a basic Python problem.

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

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



Re: [Django] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by adamnelson):

 BTW, this is on Ubuntu 10.04 with Python 2.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] #13600: OverflowError not caught in django.views.static.serve

2010-08-23 Thread Django
#13600: OverflowError not caught in django.views.static.serve
+---
  Reporter:  KostikVento| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  HTTP handling  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by adamnelson):

  * status:  closed => reopened
  * resolution:  worksforme =>
  * version:  1.1 => 1.2
  * component:  Uncategorized => HTTP handling

Comment:

 I can reproduce it, and I've just seen it on live.  Here is the relevant
 part of the stack trace.

 http://gist.github.com/545597

-- 
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] #14158: SelectMultiple _has_changed assumes data and inital are in same order

2010-08-23 Thread Django
#14158: SelectMultiple _has_changed assumes data and inital are in same order
--+-
 Reporter:  akaariai  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Forms | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 The _has_changed method assumes data and initial are in same order:

 {{{
 for value1, value2 in zip(initial, data):
 if force_unicode(value1) != force_unicode(value2):
 return True
 }}}

 This seems like a dangerous assumption, because initial and data might
 come from different sources. For example if you override the queryset for
 ModelMultipleChoiceField to have custom ordering, initial and data
 returned from the HTML form will probably differ in order. And by default
 m2m initial data in model forms is retrieved without any ordering, so it
 is just assumed that every time the query is run, the data will be
 retrieved in the same order. This is of course 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.



[Changeset] r13634 - django/branches/releases/1.2.X/docs/ref

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 08:51:49 -0500 (Mon, 23 Aug 2010)
New Revision: 13634

Modified:
   django/branches/releases/1.2.X/docs/ref/settings.txt
Log:
[1.2.X] Fixed #14154 -- Corrected grammar error in settings docs. Thanks to 
d00gs for the report.

Backport of r13633 from trunk.

Modified: django/branches/releases/1.2.X/docs/ref/settings.txt
===
--- django/branches/releases/1.2.X/docs/ref/settings.txt2010-08-23 
13:50:28 UTC (rev 13633)
+++ django/branches/releases/1.2.X/docs/ref/settings.txt2010-08-23 
13:51:49 UTC (rev 13634)
@@ -222,7 +222,7 @@
 Default: ``{}`` (Empty dictionary)
 
 A dictionary containing the settings for all databases to be used with
-Django. It is a nested dictionary who's contents maps database aliases
+Django. It is a nested dictionary whose contents maps database aliases
 to a dictionary containing the options for an individual database.
 
 The :setting:`DATABASES` setting must configure a ``default`` database;

-- 
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] r13633 - django/trunk/docs/ref

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 08:50:28 -0500 (Mon, 23 Aug 2010)
New Revision: 13633

Modified:
   django/trunk/docs/ref/settings.txt
Log:
Fixed #14154 -- Corrected grammar error in settings docs. Thanks to d00gs for 
the report.

Modified: django/trunk/docs/ref/settings.txt
===
--- django/trunk/docs/ref/settings.txt  2010-08-23 13:39:58 UTC (rev 13632)
+++ django/trunk/docs/ref/settings.txt  2010-08-23 13:50:28 UTC (rev 13633)
@@ -222,7 +222,7 @@
 Default: ``{}`` (Empty dictionary)
 
 A dictionary containing the settings for all databases to be used with
-Django. It is a nested dictionary who's contents maps database aliases
+Django. It is a nested dictionary whose contents maps database aliases
 to a dictionary containing the options for an individual database.
 
 The :setting:`DATABASES` setting must configure a ``default`` database;

-- 
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] #14154: Typo in settings documentation

2010-08-23 Thread Django
#14154: Typo in settings documentation
+---
  Reporter:  d00gs  | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:  typo  
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by timo):

  * keywords:  => typo
  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Changeset] r13632 - django/branches/releases/1.2.X/django/conf/locale/fr/LC_MESSAGES

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 08:39:58 -0500 (Mon, 23 Aug 2010)
New Revision: 13632

Modified:
   django/branches/releases/1.2.X/django/conf/locale/fr/LC_MESSAGES/django.mo
   django/branches/releases/1.2.X/django/conf/locale/fr/LC_MESSAGES/django.po
Log:
[1.2.X] Fixed #14084 -- Updated French translation. Thanks to stephaner.

Backport of r13580 from trunk.

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

Modified: 
django/branches/releases/1.2.X/django/conf/locale/fr/LC_MESSAGES/django.po
===
--- django/branches/releases/1.2.X/django/conf/locale/fr/LC_MESSAGES/django.po  
2010-08-23 08:12:17 UTC (rev 13631)
+++ django/branches/releases/1.2.X/django/conf/locale/fr/LC_MESSAGES/django.po  
2010-08-23 13:39:58 UTC (rev 13632)
@@ -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
 

Re: [Django] #14157: Birthday calculation failing silently

2010-08-23 Thread Django
#14157: Birthday calculation failing silently
+---
  Reporter:  nil_von_9wo| Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by nil_von_9wo):

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

Comment:

 For whatever its worth, I've verified that the problem is in fact a type
 problem which could be solved by including the line:

 {{{birthday_datetime =
 datetime.datetime.combine(birthday,datetime.time())}}}

 but even so, the silent failure made it very difficult to figure this out.

-- 
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] #14157: Birthday calculation failing silently

2010-08-23 Thread Django
#14157: Birthday calculation failing silently
---+
 Reporter:  nil_von_9wo|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I have a model:

 {{{
 class Fighter (models.Model):
 name = models.CharField(max_length=100)
 birth_date = models.DateField(blank=True, null=True)

 def age(self):
 return calculate_age(self.birth_date)
 }}}

 calculate_age is as follow:



 {{{
 def calculate_age(born):
 today = datetime.datetime.today()
 try: # raised when birth day is February 29 and the current year is
 not a leap year
 birthday = born.replace(year=today.year)
 except ValueError:
 birthday = born.replace(year=today.year, day=born.day-1)

 import pdb; pdb.set_trace();

 if birthday > today:
 return today.year - born.year -1
 else:
 return today.year - born.year
 }}}

 This function works perfectly from the command line.

 However, as it is, from within a running django server, Fighter.age()
 returns no results.

 By experimenting, I learned Fighter.age() will return a result if I return
 something (anything) in calculate_age() ''before'' it hits

 {{{if birthday > today:}}}

 By returning both values before that point, I verified that neither was
 "None", however they may not be the same data type.

 I'm going to try casting them to match the type, but I was advised I
 should report this incident.

-- 
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] #14156: CSRF protection in django.contrib.flatpages.views.flatpage causes unwanted behavior

2010-08-23 Thread Django
#14156: CSRF protection in django.contrib.flatpages.views.flatpage causes 
unwanted
behavior
--+-
 Reporter:  patrys|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Contrib apps  | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 If you only decorate selected views with {{{csrf_protect}}}, any non-
 protected POST that ends up resulting in a 404 response returns 403
 Forbidden instead.

 This is both unwanted and potentially puzzling to developers. Either the
 {{{flatpage}}} view should not be decorated (it seems incapable of
 altering the application's state) or the above should be documented both
 in the CSRF section and in the flatpages section.

-- 
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] #10728: [PATCH] SubfieldBase classes can't be subclassed.

2010-08-23 Thread Django
#10728: [PATCH] SubfieldBase classes can't be subclassed.
---+
  Reporter:  G2P   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by gsakkis):

  * needs_better_patch:  1 => 0
  * summary:  SubfieldBase classes can't be subclassed. => [PATCH]
  SubfieldBase classes can't be subclassed.

Comment:

 > The most recent patch breaks the test suite.

 Just tested
 
http://code.djangoproject.com/attachment/ticket/10728/SubfieldBase-%2310728-r12890.patch
 with the latest commit (r136309), it works for me.

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

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



Re: [Django] #14044: "required=False" dones't work when use DateTimeField with SplitDateTimeWidget

2010-08-23 Thread Django
#14044: "required=False" dones't work when use DateTimeField with
SplitDateTimeWidget
-+--
  Reporter:  codeplayer  | Owner:  yuval_a
Status:  new | Milestone:  1.3
 Component:  Forms   |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Unreviewed  | Has_patch:  0  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by yuval_a):

  * owner:  nobody => yuval_a
  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * needs_tests:  => 0
  * milestone:  => 1.3

-- 
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] #14084: Updated French translation

2010-08-23 Thread Django
#14084: Updated French translation
---+
  Reporter:  stephaner | Owner:  nobody
Status:  reopened  | 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 stephaner):

  * status:  closed => reopened
  * needs_better_patch:  => 0
  * resolution:  fixed =>
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Russel, you've applied my updated translation on master branch and not on
 1.2.X!

-- 
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] r13629 - in django/branches/releases/1.2.X/docs: faq ref ref/contrib ref/contrib/admin ref/contrib/gis ref/models ref/templates topics

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 03:08:46 -0500 (Mon, 23 Aug 2010)
New Revision: 13629

Modified:
   django/branches/releases/1.2.X/docs/faq/admin.txt
   django/branches/releases/1.2.X/docs/ref/contrib/admin/index.txt
   django/branches/releases/1.2.X/docs/ref/contrib/contenttypes.txt
   django/branches/releases/1.2.X/docs/ref/contrib/gis/testing.txt
   django/branches/releases/1.2.X/docs/ref/contrib/index.txt
   django/branches/releases/1.2.X/docs/ref/django-admin.txt
   django/branches/releases/1.2.X/docs/ref/models/fields.txt
   django/branches/releases/1.2.X/docs/ref/models/querysets.txt
   django/branches/releases/1.2.X/docs/ref/settings.txt
   django/branches/releases/1.2.X/docs/ref/templates/api.txt
   django/branches/releases/1.2.X/docs/topics/testing.txt
Log:
[1.2.X] Fixed #14112 -- Various Markup fixes for the docs. Thanks to ramiro for 
the patch.

Backport of r13628 from trunk.

Modified: django/branches/releases/1.2.X/docs/faq/admin.txt
===
--- django/branches/releases/1.2.X/docs/faq/admin.txt   2010-08-23 08:07:35 UTC 
(rev 13628)
+++ django/branches/releases/1.2.X/docs/faq/admin.txt   2010-08-23 08:08:46 UTC 
(rev 13629)
@@ -35,19 +35,22 @@
 How do I automatically set a field's value to the user who last edited the 
object in the admin?
 
---
 
-The :class:`ModelAdmin` class provides customization hooks that allow you to 
transform
-an object as it saved, using details from the request. By extracting the 
current user
-from the request, and customizing the :meth:`ModelAdmin.save_model` hook, you 
can update
-an object to reflect the user that edited it. See :ref:`the documentation on 
ModelAdmin
-methods ` for an example.
+The :class:`~django.contrib.admin.ModelAdmin` class provides customization 
hooks
+that allow you to transform an object as it saved, using details from the
+request. By extracting the current user from the request, and customizing the
+:meth:`~django.contrib.admin.ModelAdmin.save_model` hook, you can update an
+object to reflect the user that edited it. See :ref:`the documentation on
+ModelAdmin methods ` for an example.
 
 How do I limit admin access so that objects can only be edited by the users 
who created them?
 
-
 
-The :class:`ModelAdmin` class also provides customization hooks that allow you 
to control the
-visibility and editability of objects in the admin. Using the same trick of 
extracting the
-user from the request, the :meth:`ModelAdmin.queryset` and 
:meth:`ModelAdmin.has_change_permission`
-can be used to control the visibility and editability of objects in the admin.
+The :class:`~django.contrib.admin.ModelAdmin` class also provides customization
+hooks that allow you to control the visibility and editability of objects in 
the
+admin. Using the same trick of extracting the user from the request, the
+:meth:`~django.contrib.admin.ModelAdmin.queryset` and
+:meth:`~django.contrib.admin.ModelAdmin.has_change_permission` can be used to
+control the visibility and editability of objects in the admin.
 
 My admin-site CSS and images showed up fine using the development server, but 
they're not displaying when using mod_python.
 
---

Modified: django/branches/releases/1.2.X/docs/ref/contrib/admin/index.txt
===
--- django/branches/releases/1.2.X/docs/ref/contrib/admin/index.txt 
2010-08-23 08:07:35 UTC (rev 13628)
+++ django/branches/releases/1.2.X/docs/ref/contrib/admin/index.txt 
2010-08-23 08:08:46 UTC (rev 13629)
@@ -5,8 +5,6 @@
 .. module:: django.contrib.admin
:synopsis: Django's admin site.
 
-.. currentmodule:: django.contrib.admin
-
 One of the most powerful parts of Django is the automatic admin interface. It
 reads metadata in your model to provide a powerful and production-ready
 interface that content producers can immediately use to start adding content to
@@ -831,7 +829,7 @@
 
 Since this is usually not what you want, Django provides a convenience wrapper
 to check permissions and mark the view as non-cacheable. This wrapper is
-:meth:`AdminSite.admin_view` (i.e.  ``self.admin_site.admin_view`` inside a
+:meth:`AdminSite.admin_view` (i.e. ``self.admin_site.admin_view`` inside a
 ``ModelAdmin`` instance); use it like so::
 
 class MyModelAdmin(admin.ModelAdmin):
@@ -1010,6 +1008,8 @@
 ``InlineModelAdmin`` objects
 
 
+.. class:: InlineModelAdmin
+
 The admin interface has the ability to edit models on the same page as a
 parent model. These are called inlines. Suppose you have these two models::
 

Modified: django/branches/releases/1.2.X/docs/ref/contrib/contenttypes.txt

[Changeset] r13631 - django/branches/releases/1.2.X/django/contrib/formtools

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 03:12:17 -0500 (Mon, 23 Aug 2010)
New Revision: 13631

Modified:
   django/branches/releases/1.2.X/django/contrib/formtools/wizard.py
Log:
[1.2.X] Fixed #13951 -- Corrected docstring in formtools wizard. Thanks to 
suzaku for the report, and lrekucki for the patch.

Backport of r13630 from trunk.

Modified: django/branches/releases/1.2.X/django/contrib/formtools/wizard.py
===
--- django/branches/releases/1.2.X/django/contrib/formtools/wizard.py   
2010-08-23 08:11:24 UTC (rev 13630)
+++ django/branches/releases/1.2.X/django/contrib/formtools/wizard.py   
2010-08-23 08:12:17 UTC (rev 13631)
@@ -27,7 +27,7 @@
 def __init__(self, form_list, initial=None):
 """
 Start a new wizard with a list of forms.
-
+
 form_list should be a list of Form classes (not instances).
 """
 self.form_list = form_list[:]
@@ -37,7 +37,7 @@
 self.extra_context = {}
 
 # A zero-based counter keeping track of which step we're in.
-self.step = 0 
+self.step = 0
 
 def __repr__(self):
 return "step: %d\nform_list: %s\ninitial_data: %s" % (self.step, 
self.form_list, self.initial)
@@ -48,7 +48,7 @@
 
 def num_steps(self):
 "Helper method that returns the number of steps."
-# You might think we should just set "self.form_list = len(form_list)"
+# You might think we should just set "self.num_steps = len(form_list)"
 # in __init__(), but this calculation needs to be dynamic, because some
 # hook methods might alter self.form_list.
 return len(self.form_list)

-- 
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] r13630 - django/trunk/django/contrib/formtools

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 03:11:24 -0500 (Mon, 23 Aug 2010)
New Revision: 13630

Modified:
   django/trunk/django/contrib/formtools/wizard.py
Log:
Fixed #13951 -- Corrected docstring in formtools wizard. Thanks to suzaku for 
the report, and lrekucki for the patch.

Modified: django/trunk/django/contrib/formtools/wizard.py
===
--- django/trunk/django/contrib/formtools/wizard.py 2010-08-23 08:08:46 UTC 
(rev 13629)
+++ django/trunk/django/contrib/formtools/wizard.py 2010-08-23 08:11:24 UTC 
(rev 13630)
@@ -27,7 +27,7 @@
 def __init__(self, form_list, initial=None):
 """
 Start a new wizard with a list of forms.
-
+
 form_list should be a list of Form classes (not instances).
 """
 self.form_list = form_list[:]
@@ -37,7 +37,7 @@
 self.extra_context = {}
 
 # A zero-based counter keeping track of which step we're in.
-self.step = 0 
+self.step = 0
 
 def __repr__(self):
 return "step: %d\nform_list: %s\ninitial_data: %s" % (self.step, 
self.form_list, self.initial)
@@ -48,7 +48,7 @@
 
 def num_steps(self):
 "Helper method that returns the number of steps."
-# You might think we should just set "self.form_list = len(form_list)"
+# You might think we should just set "self.num_steps = len(form_list)"
 # in __init__(), but this calculation needs to be dynamic, because some
 # hook methods might alter self.form_list.
 return len(self.form_list)

-- 
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] r13628 - in django/trunk/docs: faq ref ref/contrib ref/contrib/admin ref/contrib/gis ref/models ref/templates topics

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 03:07:35 -0500 (Mon, 23 Aug 2010)
New Revision: 13628

Modified:
   django/trunk/docs/faq/admin.txt
   django/trunk/docs/ref/contrib/admin/index.txt
   django/trunk/docs/ref/contrib/contenttypes.txt
   django/trunk/docs/ref/contrib/gis/testing.txt
   django/trunk/docs/ref/contrib/index.txt
   django/trunk/docs/ref/django-admin.txt
   django/trunk/docs/ref/models/fields.txt
   django/trunk/docs/ref/models/querysets.txt
   django/trunk/docs/ref/settings.txt
   django/trunk/docs/ref/templates/api.txt
   django/trunk/docs/topics/testing.txt
Log:
Fixed #14112 -- Various Markup fixes for the docs. Thanks to ramiro for the 
patch.

Modified: django/trunk/docs/faq/admin.txt
===
--- django/trunk/docs/faq/admin.txt 2010-08-23 07:54:07 UTC (rev 13627)
+++ django/trunk/docs/faq/admin.txt 2010-08-23 08:07:35 UTC (rev 13628)
@@ -35,19 +35,22 @@
 How do I automatically set a field's value to the user who last edited the 
object in the admin?
 
---
 
-The :class:`ModelAdmin` class provides customization hooks that allow you to 
transform
-an object as it saved, using details from the request. By extracting the 
current user
-from the request, and customizing the :meth:`ModelAdmin.save_model` hook, you 
can update
-an object to reflect the user that edited it. See :ref:`the documentation on 
ModelAdmin
-methods ` for an example.
+The :class:`~django.contrib.admin.ModelAdmin` class provides customization 
hooks
+that allow you to transform an object as it saved, using details from the
+request. By extracting the current user from the request, and customizing the
+:meth:`~django.contrib.admin.ModelAdmin.save_model` hook, you can update an
+object to reflect the user that edited it. See :ref:`the documentation on
+ModelAdmin methods ` for an example.
 
 How do I limit admin access so that objects can only be edited by the users 
who created them?
 
-
 
-The :class:`ModelAdmin` class also provides customization hooks that allow you 
to control the
-visibility and editability of objects in the admin. Using the same trick of 
extracting the
-user from the request, the :meth:`ModelAdmin.queryset` and 
:meth:`ModelAdmin.has_change_permission`
-can be used to control the visibility and editability of objects in the admin.
+The :class:`~django.contrib.admin.ModelAdmin` class also provides customization
+hooks that allow you to control the visibility and editability of objects in 
the
+admin. Using the same trick of extracting the user from the request, the
+:meth:`~django.contrib.admin.ModelAdmin.queryset` and
+:meth:`~django.contrib.admin.ModelAdmin.has_change_permission` can be used to
+control the visibility and editability of objects in the admin.
 
 My admin-site CSS and images showed up fine using the development server, but 
they're not displaying when using mod_python.
 
---

Modified: django/trunk/docs/ref/contrib/admin/index.txt
===
--- django/trunk/docs/ref/contrib/admin/index.txt   2010-08-23 07:54:07 UTC 
(rev 13627)
+++ django/trunk/docs/ref/contrib/admin/index.txt   2010-08-23 08:07:35 UTC 
(rev 13628)
@@ -5,8 +5,6 @@
 .. module:: django.contrib.admin
:synopsis: Django's admin site.
 
-.. currentmodule:: django.contrib.admin
-
 One of the most powerful parts of Django is the automatic admin interface. It
 reads metadata in your model to provide a powerful and production-ready
 interface that content producers can immediately use to start adding content to
@@ -831,7 +829,7 @@
 
 Since this is usually not what you want, Django provides a convenience wrapper
 to check permissions and mark the view as non-cacheable. This wrapper is
-:meth:`AdminSite.admin_view` (i.e.  ``self.admin_site.admin_view`` inside a
+:meth:`AdminSite.admin_view` (i.e. ``self.admin_site.admin_view`` inside a
 ``ModelAdmin`` instance); use it like so::
 
 class MyModelAdmin(admin.ModelAdmin):
@@ -1010,6 +1008,8 @@
 ``InlineModelAdmin`` objects
 
 
+.. class:: InlineModelAdmin
+
 The admin interface has the ability to edit models on the same page as a
 parent model. These are called inlines. Suppose you have these two models::
 

Modified: django/trunk/docs/ref/contrib/contenttypes.txt
===
--- django/trunk/docs/ref/contrib/contenttypes.txt  2010-08-23 07:54:07 UTC 
(rev 13627)
+++ django/trunk/docs/ref/contrib/contenttypes.txt  2010-08-23 08:07:35 UTC 
(rev 13628)
@@ -112,7 +112,7 @@
 
 Takes a set of valid :ref:`lookup arguments ` for the
 model the 

[Changeset] r13627 - django/branches/releases/1.2.X/docs/topics

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 02:54:07 -0500 (Mon, 23 Aug 2010)
New Revision: 13627

Modified:
   django/branches/releases/1.2.X/docs/topics/testing.txt
Log:
[1.2.X] Fixed #3051 -- Documented the requirements for standalone testing. 
Thanks to Daniel Roseman for the draft text.

Backport of r13626 from trunk.

Modified: django/branches/releases/1.2.X/docs/topics/testing.txt
===
--- django/branches/releases/1.2.X/docs/topics/testing.txt  2010-08-23 
07:43:50 UTC (rev 13626)
+++ django/branches/releases/1.2.X/docs/topics/testing.txt  2010-08-23 
07:54:07 UTC (rev 13627)
@@ -309,6 +309,24 @@
 but not gracefully. No details of the tests run before the interruption will
 be reported, and any test databases created by the run will not be destroyed.
 
+Running tests outside the test runner
+~
+
+If you want to run tests outside of ``./manage.py test`` -- for example,
+from a shell prompt -- you will need to set up the test
+environment first. Django provides a convenience method to do this::
+
+>>> from django.test.utils import setup_test_environment
+>>> setup_test_environment()
+
+This convenience method sets up the test database, and puts other
+Django features into modes that allow for repeatable testing.
+
+The call to :meth:`~django.test.utils.setup_test_environment` is made
+automatically as part of the setup of `./manage.py test`. You only
+need to manually invoke this method if you're not using running your
+tests via Django's test runner.
+
 The test database
 -
 

-- 
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] r13626 - django/trunk/docs/topics

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 02:43:50 -0500 (Mon, 23 Aug 2010)
New Revision: 13626

Modified:
   django/trunk/docs/topics/testing.txt
Log:
Fixed #3051 -- Documented the requirements for standalone testing. Thanks to 
Daniel Roseman for the draft text.

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-08-23 07:15:14 UTC (rev 
13625)
+++ django/trunk/docs/topics/testing.txt2010-08-23 07:43:50 UTC (rev 
13626)
@@ -309,6 +309,24 @@
 but not gracefully. No details of the tests run before the interruption will
 be reported, and any test databases created by the run will not be destroyed.
 
+Running tests outside the test runner
+~
+
+If you want to run tests outside of ``./manage.py test`` -- for example,
+from a shell prompt -- you will need to set up the test
+environment first. Django provides a convenience method to do this::
+
+>>> from django.test.utils import setup_test_environment
+>>> setup_test_environment()
+
+This convenience method sets up the test database, and puts other
+Django features into modes that allow for repeatable testing.
+
+The call to :meth:`~django.test.utils.setup_test_environment` is made
+automatically as part of the setup of `./manage.py test`. You only
+need to manually invoke this method if you're not using running your
+tests via Django's test runner.
+
 The test database
 -
 

-- 
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] r13625 - django/branches/releases/1.2.X/docs/topics

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 02:15:14 -0500 (Mon, 23 Aug 2010)
New Revision: 13625

Modified:
   django/branches/releases/1.2.X/docs/topics/testing.txt
Log:
[1.2.X] Fixed #14147 -- Added documentation metadata for new 
assertQuerysetEqual test method. Thanks to djoume for the report.

Backport of r13624 from trunk.

Modified: django/branches/releases/1.2.X/docs/topics/testing.txt
===
--- django/branches/releases/1.2.X/docs/topics/testing.txt  2010-08-23 
07:13:42 UTC (rev 13624)
+++ django/branches/releases/1.2.X/docs/topics/testing.txt  2010-08-23 
07:15:14 UTC (rev 13625)
@@ -1248,19 +1248,6 @@
 ``target_status_code`` will be the url and status code for the final
 point of the redirect chain.
 
-.. method:: TestCase.assertQuerysetEqual(response, qs, values, transform=repr)
-
-Asserts that a queryset ``qs`` returns a particular list of values 
``values``.
-
-The comparison of the contents of ``qs`` and ``values`` is performed using
-the function ``transform``; by default, this means that the ``repr()`` of
-each value is compared. Any other callable can be used if ``repr()`` 
doesn't
-provide a unique or helpful comparison.
-
-The comparison is also ordering dependent. If ``qs`` doesn't provide an
-implicit ordering, you will need to apply a ``order_by()`` clause to your
-queryset to ensure that the test will pass reliably.
-
 .. _topics-testing-email:
 
 E-mail services

-- 
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] r13624 - django/trunk/docs/topics

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 02:13:42 -0500 (Mon, 23 Aug 2010)
New Revision: 13624

Modified:
   django/trunk/docs/topics/testing.txt
Log:
Fixed #14147 -- Added documentation metadata for new assertQuerysetEqual test 
method. Thanks to djoume for the report.

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-08-23 07:06:10 UTC (rev 
13623)
+++ django/trunk/docs/topics/testing.txt2010-08-23 07:13:42 UTC (rev 
13624)
@@ -1250,6 +1250,8 @@
 
 .. method:: TestCase.assertQuerysetEqual(response, qs, values, transform=repr)
 
+.. versionadded:: 1.3
+
 Asserts that a queryset ``qs`` returns a particular list of values 
``values``.
 
 The comparison of the contents of ``qs`` and ``values`` is performed using

-- 
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] #14147: django 1.2 documentation refer to assertQuerysetEqual which is only available in trunk

2010-08-23 Thread Django
#14147: django 1.2 documentation refer to assertQuerysetEqual which is only
available in trunk
+---
  Reporter:  djoume | Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * milestone:  => 1.3

Comment:

 If we follow the backwards compatibility policy strictly, we can't
 introduce a new feature into 1.2; also, the feature doesn't (and can't)
 exist in Django 1.2.0 or 1.2.1. It will appear in 1.2.2, by virtue of a
 backported test case.

 Strictly by the book, we should revert the changesets that need to use
 assertQuerysetEqual. However, the overhead of maintaining two different
 test suites (plus the speed boost associated with moving to unit tests) is
 too much to ignore.

 In the interests of practicality, I'm going to mark this as a "new in 1.3"
 feature; it will exist as a feature in 1.2, but it will be a stealth
 feature, and won't be documented.

-- 
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] r13623 - in django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package: . models

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 02:06:10 -0500 (Mon, 23 Aug 2010)
New Revision: 13623

Added:
   
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/tests.py
Modified:
   
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/models/__init__.py
Log:
[1.2.X] Fixed #14155 -- Refactored another doctest suite and call to flush. 
Thanks to Alex Gaynor for the patch.

Backport of r13622 from trunk.

Modified: 
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/models/__init__.py
===
--- 
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/models/__init__.py
   2010-08-23 07:04:41 UTC (rev 13622)
+++ 
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/models/__init__.py
   2010-08-23 07:06:10 UTC (rev 13623)
@@ -12,43 +12,3 @@
 app_label = 'fixtures_model_package'
 ordering = ('-pub_date', 'headline')
 
-__test__ = {'API_TESTS': """
->>> from django.core import management
->>> from django.db.models import get_app
-
-# Reset the database representation of this app.
-# This will return the database to a clean initial state.
->>> management.call_command('flush', verbosity=0, interactive=False)
-
-# Syncdb introduces 1 initial data object from initial_data.json.
->>> Article.objects.all()
-[]
-
-# Load fixture 1. Single JSON file, with two objects.
->>> management.call_command('loaddata', 'fixture1.json', verbosity=0)
->>> Article.objects.all()
-[, , 
]
-
-# Load fixture 2. JSON file imported by default. Overwrites some existing 
objects
->>> management.call_command('loaddata', 'fixture2.json', verbosity=0)
->>> Article.objects.all()
-[, , , ]
-
-# Load a fixture that doesn't exist
->>> management.call_command('loaddata', 'unknown.json', verbosity=0)
-
-# object list is unaffected
->>> Article.objects.all()
-[, , , ]
-"""}
-
-
-from django.test import TestCase
-
-class SampleTestCase(TestCase):
-fixtures = ['fixture1.json', 'fixture2.json']
-
-def testClassFixtures(self):
-"Check that test case has installed 4 fixture objects"
-self.assertEqual(Article.objects.count(), 4)
-self.assertEquals(str(Article.objects.all()), "[, , , ]")

Added: 
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/tests.py
===
--- 
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/tests.py 
(rev 0)
+++ 
django/branches/releases/1.2.X/tests/modeltests/fixtures_model_package/tests.py 
2010-08-23 07:06:10 UTC (rev 13623)
@@ -0,0 +1,71 @@
+from django.core import management
+from django.test import TestCase
+
+from models import Article
+
+
+class SampleTestCase(TestCase):
+fixtures = ['fixture1.json', 'fixture2.json']
+
+def testClassFixtures(self):
+"Test cases can load fixture objects into models defined in packages"
+self.assertEqual(Article.objects.count(), 4)
+self.assertQuerysetEqual(
+Article.objects.all(),[
+"Django conquers world!",
+"Copyright is fine the way it is",
+"Poker has no place on ESPN",
+"Python program becomes self aware"
+],
+lambda a: a.headline
+)
+
+
+class FixtureTestCase(TestCase):
+def test_initial_data(self):
+"Fixtures can load initial data into models defined in packages"
+#Syncdb introduces 1 initial data object from initial_data.json
+self.assertQuerysetEqual(
+Article.objects.all(), [
+"Python program becomes self aware"
+],
+lambda a: a.headline
+)
+
+def test_loaddata(self):
+"Fixtures can load data into models defined in packages"
+# Load fixture 1. Single JSON file, with two objects
+management.call_command("loaddata", "fixture1.json", verbosity=0)
+self.assertQuerysetEqual(
+Article.objects.all(), [
+"Time to reform copyright",
+"Poker has no place on ESPN",
+"Python program becomes self aware",
+],
+lambda a: a.headline,
+)
+
+# Load fixture 2. JSON file imported by default. Overwrites some
+# existing objects
+management.call_command("loaddata", "fixture2.json", verbosity=0)
+self.assertQuerysetEqual(
+Article.objects.all(), [
+"Django conquers world!",
+"Copyright is fine the way it is",
+"Poker has no place on ESPN",
+"Python program becomes self aware",
+],
+lambda a: a.headline,
+)
+
+# Load a fixture that doesn't exist
+management.call_command("loaddata", "unknown.json", verbosity=0)
+self.assertQuerysetEqual(
+Article.objects.all(), [

[Changeset] r13622 - in django/trunk/tests/modeltests/fixtures_model_package: . models

2010-08-23 Thread noreply
Author: russellm
Date: 2010-08-23 02:04:41 -0500 (Mon, 23 Aug 2010)
New Revision: 13622

Added:
   django/trunk/tests/modeltests/fixtures_model_package/tests.py
Modified:
   django/trunk/tests/modeltests/fixtures_model_package/models/__init__.py
Log:
Fixed #14155 -- Refactored another doctest suite and call to flush. Thanks to 
Alex Gaynor for the patch.

Modified: 
django/trunk/tests/modeltests/fixtures_model_package/models/__init__.py
===
--- django/trunk/tests/modeltests/fixtures_model_package/models/__init__.py 
2010-08-21 03:02:47 UTC (rev 13621)
+++ django/trunk/tests/modeltests/fixtures_model_package/models/__init__.py 
2010-08-23 07:04:41 UTC (rev 13622)
@@ -12,43 +12,3 @@
 app_label = 'fixtures_model_package'
 ordering = ('-pub_date', 'headline')
 
-__test__ = {'API_TESTS': """
->>> from django.core import management
->>> from django.db.models import get_app
-
-# Reset the database representation of this app.
-# This will return the database to a clean initial state.
->>> management.call_command('flush', verbosity=0, interactive=False)
-
-# Syncdb introduces 1 initial data object from initial_data.json.
->>> Article.objects.all()
-[]
-
-# Load fixture 1. Single JSON file, with two objects.
->>> management.call_command('loaddata', 'fixture1.json', verbosity=0)
->>> Article.objects.all()
-[, , 
]
-
-# Load fixture 2. JSON file imported by default. Overwrites some existing 
objects
->>> management.call_command('loaddata', 'fixture2.json', verbosity=0)
->>> Article.objects.all()
-[, , , ]
-
-# Load a fixture that doesn't exist
->>> management.call_command('loaddata', 'unknown.json', verbosity=0)
-
-# object list is unaffected
->>> Article.objects.all()
-[, , , ]
-"""}
-
-
-from django.test import TestCase
-
-class SampleTestCase(TestCase):
-fixtures = ['fixture1.json', 'fixture2.json']
-
-def testClassFixtures(self):
-"Check that test case has installed 4 fixture objects"
-self.assertEqual(Article.objects.count(), 4)
-self.assertEquals(str(Article.objects.all()), "[, , , ]")

Added: django/trunk/tests/modeltests/fixtures_model_package/tests.py
===
--- django/trunk/tests/modeltests/fixtures_model_package/tests.py   
(rev 0)
+++ django/trunk/tests/modeltests/fixtures_model_package/tests.py   
2010-08-23 07:04:41 UTC (rev 13622)
@@ -0,0 +1,71 @@
+from django.core import management
+from django.test import TestCase
+
+from models import Article
+
+
+class SampleTestCase(TestCase):
+fixtures = ['fixture1.json', 'fixture2.json']
+
+def testClassFixtures(self):
+"Test cases can load fixture objects into models defined in packages"
+self.assertEqual(Article.objects.count(), 4)
+self.assertQuerysetEqual(
+Article.objects.all(),[
+"Django conquers world!",
+"Copyright is fine the way it is",
+"Poker has no place on ESPN",
+"Python program becomes self aware"
+],
+lambda a: a.headline
+)
+
+
+class FixtureTestCase(TestCase):
+def test_initial_data(self):
+"Fixtures can load initial data into models defined in packages"
+#Syncdb introduces 1 initial data object from initial_data.json
+self.assertQuerysetEqual(
+Article.objects.all(), [
+"Python program becomes self aware"
+],
+lambda a: a.headline
+)
+
+def test_loaddata(self):
+"Fixtures can load data into models defined in packages"
+# Load fixture 1. Single JSON file, with two objects
+management.call_command("loaddata", "fixture1.json", verbosity=0)
+self.assertQuerysetEqual(
+Article.objects.all(), [
+"Time to reform copyright",
+"Poker has no place on ESPN",
+"Python program becomes self aware",
+],
+lambda a: a.headline,
+)
+
+# Load fixture 2. JSON file imported by default. Overwrites some
+# existing objects
+management.call_command("loaddata", "fixture2.json", verbosity=0)
+self.assertQuerysetEqual(
+Article.objects.all(), [
+"Django conquers world!",
+"Copyright is fine the way it is",
+"Poker has no place on ESPN",
+"Python program becomes self aware",
+],
+lambda a: a.headline,
+)
+
+# Load a fixture that doesn't exist
+management.call_command("loaddata", "unknown.json", verbosity=0)
+self.assertQuerysetEqual(
+Article.objects.all(), [
+"Django conquers world!",
+"Copyright is fine the way it is",
+"Poker has no place on ESPN",
+"Python program becomes 

Re: [Django] #14155: Remove doctests (and flush calls) from tests

2010-08-23 Thread Django
#14155: Remove doctests (and flush calls) from tests
+---
  Reporter:  Alex   | Owner:  nobody
Status:  new| Milestone:
 Component:  Testing framework  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Django] #14155: Remove doctests (and flush calls) from tests

2010-08-23 Thread Django
#14155: Remove doctests (and flush calls) from tests
---+
 Reporter:  Alex   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Testing framework  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 The last ones are in fixture_model_package.

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