Re: [Django] #14415: Multiple aliases for one database: testing problems

2010-11-19 Thread Django
#14415: Multiple aliases for one database: testing problems
-+--
  Reporter:  shai| Owner:  nobody   

Status:  new | Milestone:  1.3  

 Component:  Testing framework   |   Version:  1.2  

Resolution:  |  Keywords:  multidb, 
multiple databases, multiple aliases
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

  * needs_better_patch:  0 => 1
  * milestone:  => 1.3

Comment:

 I think you've tried to solve this in the wrong place. Rather than fixing
 this at the level of the database backend, it seems to me that the
 solution lies in fixing the test runner's setup_databases call. There is
 already some handling for avoiding duplicate database setup (via the
 handling for the TEST_MIRROR setting); it seems to me that the problem
 described here is really just an TEST_MIRROR that is implied because the
 database name is the same.

 So - if we refactor the handling of TEST_MIRROR so that we pre-evaluate
 the list of database that need to be created and the list that needs to be
 redirected, we should be able to avoid this problem entirely.

 Of course, this is just based on first inspection; there might be some
 detail that I'm missing. I'll take a closer look later tonight (my time).

 Also - bumping to 1.3 milestone because of the potential for unintentional
 data loss.

-- 
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] #5768: Allow QuerySet.values() to return values spanning joins (for multi-valued relations)

2010-11-19 Thread Django
#5768: Allow QuerySet.values() to return values spanning joins (for multi-valued
relations)
-+--
  Reporter:  anonymous   | Owner:   
 
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  SVN  
 
Resolution:  |  Keywords:  
values, values_list, one-to-many, many-to-many reverse
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  1   |  
-+--
Changes (by carljm):

  * needs_better_patch:  0 => 1
  * stage:  Ready for checkin => Accepted

Comment:

 I'm getting failures in the new tests on Postgres; appears to be a
 unicode/str issue. Shouldn't be too hard to fix, don't have time to dig
 into it at the moment.

-- 
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] #14512: Documentation & tools for decorating class-based-views.

2010-11-19 Thread Django
#14512: Documentation & tools for decorating class-based-views.
+---
  Reporter:  lrekucki   | Owner:  lrekucki 
Status:  closed | Milestone:  1.3  
 Component:  Generic views  |   Version:  SVN  
Resolution:  fixed  |  Keywords:  class-based-views
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by Alex):

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

Comment:

 Fixed by [14642].

-- 
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] r14642 - in django/trunk: django/utils django/views/generic docs/topics

2010-11-19 Thread noreply
Author: russellm
Date: 2010-11-19 23:10:13 -0600 (Fri, 19 Nov 2010)
New Revision: 14642

Modified:
   django/trunk/django/utils/decorators.py
   django/trunk/django/views/generic/base.py
   django/trunk/docs/topics/class-based-views.txt
Log:
Fixed #14512 -- Added documentation on how to apply decorators to class-based 
generic views. Thanks to ?\197?\129ukasz Rekucki for his work on the issue.

Modified: django/trunk/django/utils/decorators.py
===
--- django/trunk/django/utils/decorators.py 2010-11-20 01:56:34 UTC (rev 
14641)
+++ django/trunk/django/utils/decorators.py 2010-11-20 05:10:13 UTC (rev 
14642)
@@ -1,11 +1,15 @@
 "Functions that help with dynamically creating decorators for views."
 
-import types
 try:
 from functools import wraps, update_wrapper, WRAPPER_ASSIGNMENTS
 except ImportError:
 from django.utils.functional import wraps, update_wrapper, 
WRAPPER_ASSIGNMENTS  # Python 2.4 fallback.
 
+class classonlymethod(classmethod):
+def __get__(self, instance, owner):
+if instance is not None:
+raise AttributeError("This method is available only on the view 
class.")
+return super(classonlymethod, self).__get__(instance, owner)
 
 def method_decorator(decorator):
 """

Modified: django/trunk/django/views/generic/base.py
===
--- django/trunk/django/views/generic/base.py   2010-11-20 01:56:34 UTC (rev 
14641)
+++ django/trunk/django/views/generic/base.py   2010-11-20 05:10:13 UTC (rev 
14642)
@@ -1,19 +1,12 @@
-import copy
 from django import http
 from django.core.exceptions import ImproperlyConfigured
 from django.template import RequestContext, loader
-from django.utils.translation import ugettext_lazy as _
 from django.utils.functional import update_wrapper
 from django.utils.log import getLogger
+from django.utils.decorators import classonlymethod
 
 logger = getLogger('django.request')
 
-class classonlymethod(classmethod):
-def __get__(self, instance, owner):
-if instance is not None:
-raise AttributeError("This method is available only on the view 
class.")
-return super(classonlymethod, self).__get__(instance, owner)
-
 class View(object):
 """
 Intentionally simple parent class for all views. Only implements

Modified: django/trunk/docs/topics/class-based-views.txt
===
--- django/trunk/docs/topics/class-based-views.txt  2010-11-20 01:56:34 UTC 
(rev 14641)
+++ django/trunk/docs/topics/class-based-views.txt  2010-11-20 05:10:13 UTC 
(rev 14642)
@@ -537,3 +537,60 @@
 :func:`render_to_response()` implementation will override the
 versions provided by :class:`JSONResponseMixin` and
 :class:`~django.views.generic.detail.SingleObjectTemplateResponseMixin`.
+
+Decorating class-based views
+
+
+.. highlightlang:: python
+
+The extension of class-based views isn't limited to using mixins. You
+can use also use decorators.
+
+Decorating in URLconf
+-
+
+The simplest way of decorating class-based views is to decorate the
+result of the :meth:`~django.views.generic.base.View.as_view` method.
+The easiest place to do this is in the URLconf where you deploy your
+view::
+
+from django.contrib.auth.decorators import login_required
+from django.views.generic import TemplateView
+
+urlpatterns = patterns('',
+
(r'^about/',login_required(TemplateView.as_view(template_name="secret.html"))),
+)
+
+This approach applies the decorator on a per-instance basis. If you
+want every instance of a view to be decorated, you need to take a
+different approach.
+
+Decorating the class
+
+
+To decorate every instance of a class-based view, you need to decorate
+the class definition itself. To do this you apply the decorator to one
+of the view-like methods on the class; that is,
+:meth:`~django.views.generic.base.View.dispatch`, or one of the HTTP
+methods (:meth:`~django.views.generic.base.View.get`,
+:meth:`~django.views.generic.base.View.post` etc).
+
+A method on a class isn't quite the same as a standalone function, so
+you can't just apply a function decorator to the method -- you need to
+transform it into a method decorator first. The ``method_decorator``
+decorator transforms a function decorator into a method decorator so
+that it can be used on an instance method.
+
+from django.contrib.auth.decorators import login_required
+from django.utils.decorators import method_decorator
+from django.views.generic import TemplateView
+
+class ProtectedView(TemplateView):
+template_name = 'secret.html'
+
+@method_decorator(login_required)
+def dispatch(self, **kwargs):
+return super(ProtectedView, self).dispatch(**kwargs)
+
+In this example, every instance of :class:`ProtectedView` will have
+

Re: [Django] #5768: Allow QuerySet.values() to return values spanning joins (for multi-valued relations)

2010-11-19 Thread Django
#5768: Allow QuerySet.values() to return values spanning joins (for multi-valued
relations)
-+--
  Reporter:  anonymous   | Owner:   
 
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  SVN  
 
Resolution:  |  Keywords:  
values, values_list, one-to-many, many-to-many reverse
 Stage:  Ready for checkin   | Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * stage:  Accepted => Ready for checkin

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #5768: Allow QuerySet.values() to return values spanning joins (for multi-valued relations)

2010-11-19 Thread Django
#5768: Allow QuerySet.values() to return values spanning joins (for multi-valued
relations)
-+--
  Reporter:  anonymous   | Owner:   
 
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  SVN  
 
Resolution:  |  Keywords:  
values, values_list, one-to-many, many-to-many reverse
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Changes (by mrmachine):

  * needs_docs:  1 => 0

Comment:

 Updated the patch to allow m2m by default, with docs.

-- 
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] #14527: GeoDjango docs shouldn't recommend PostgreSQL 8.3

2010-11-19 Thread Django
#14527: GeoDjango docs shouldn't recommend PostgreSQL 8.3
+---
  Reporter:  PaulM  | Owner:  nobody   
Status:  new| Milestone:  1.3  
 Component:  Documentation  |   Version:  1.2  
Resolution: |  Keywords:  GeoDjango
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by PaulM):

 The Windows install wizard needs to be updated before this can be fixed.
 See the recent django-dev thread.

-- 
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] #14527: GeoDjango docs shouldn't recommend PostgreSQL 8.3

2010-11-19 Thread Django
#14527: GeoDjango docs shouldn't recommend PostgreSQL 8.3
+---
  Reporter:  PaulM  | Owner:  nobody   
Status:  new| Milestone:  1.3  
 Component:  Documentation  |   Version:  1.2  
Resolution: |  Keywords:  GeoDjango
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by ericpalakovichcarr):

 I can confirm it.  I currently am using PostgreSQL 8.4.5 with PostGIS
 1.5.1 for my GeoDjango based web site.  Do you need any other kind of
 proof/sources before the documentation can be updated?

-- 
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] #12398: Add `TypedMultipleChoiceField` to compliment `TypedChoiceField`.

2010-11-19 Thread Django
#12398: Add `TypedMultipleChoiceField` to compliment `TypedChoiceField`.
+---
  Reporter:  mrmachine  | Owner:  nobody
Status:  new| Milestone:
 Component:  Forms  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by mrmachine):

  * needs_better_patch:  1 => 0
  * version:  => SVN
  * stage:  Accepted => Ready for checkin

Comment:

 I've updated the patch according to your feedback. The underlying
 implementation changed a fair bit (to use `to_python()` instead of
 `clean()`), so the "hack" comment is gone as it was no longer relevant,
 anyway. The tests were named for consistency with the surrounding tests
 back then, which had a unique sequential number suffix for all tests in
 the module, rather than for each group of tests.

 I think we can also mark #5481 as fixed or invalid (with instruction to
 use `TypedMultipleChoiceField`) now?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #2856: Admin's Recent Actions will link to a 404 when an object has been deleted.

2010-11-19 Thread Django
#2856: Admin's Recent Actions will link to a 404 when an object has been 
deleted.
---+
  Reporter:  anonymous | Owner: 
Status:  new   | Milestone: 
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  1  
Needs_better_patch:  1 |  
---+
Comment (by anonymous):

 [http://www.texcigars.com Cigars]

-- 
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] #14637: There may an Internationalization bug in Forms

2010-11-19 Thread Django
#14637: There may an Internationalization bug in Forms
-+--
  Reporter:  thefm...@gmail.com  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Translations|   Version:  1.2 
Resolution:  |  Keywords:  Internationalization
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

  * component:  Forms => Translations

Comment:

 Replying to [comment:1 thefm...@gmail.com]:

 > so maybe po file should be update?

 So it seems:

 {{{
 django $ $ PYTHONPATH=.. bin/django-admin.py makemessages -l zh_CN
 processing language zh_CN


 django $ cd conf/locale/zh_CN/LC_MESSAGES/

 $ msgfmt --check --statistics -o /dev/null django.po
 django.po:4: nplurals = 1...
 django.po:842: ...but some messages have 2 plural forms
 msgfmt: found 1 fatal error
 945 translated messages, 75 fuzzy translations, 140 untranslated messages.
 }}}

 and it has other problems too.

 Status of translation in trunk is similarly depressing:

 {{{
 $ msgfmt --check --statistics -o /dev/null django.po
 django.po:4: nplurals = 1...
 django.po:838: ...but some messages have 2 plural forms
 msgfmt: found 1 fatal error
 941 translated messages, 87 fuzzy translations, 153 untranslated messages.
 }}}

-- 
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] #14540: Wrong localization (L10N) thousand separator & decimal point character for Puerto Rico

2010-11-19 Thread Django
#14540: Wrong localization (L10N) thousand separator & decimal point character 
for
Puerto Rico
---+
  Reporter:  rosarior  | Owner:  nobody   
Status:  closed| Milestone:   
 Component:  Internationalization  |   Version:  1.2  
Resolution:  invalid   |  Keywords:  L10N, Puerto Rico
 Stage:  Unreviewed| Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

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

Comment:

 Django currently has no Puerto Rico translation/format support. Maybe you
 are using files provided by another Django-based project (in that case you
 can reporte this to its maintainers) or locally created file (in which
 case you can edit the file yourself)?.

 Of course, we would gladly add such a translation if anyone contributes
 one in good shape to Django.

-- 
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] #14170: Issue in get_language_from_request() ?

2010-11-19 Thread Django
#14170: Issue in get_language_from_request() ?
-+--
  Reporter:  Kronuz  | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

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

Comment:

 See #14628 re: Documenting which settings can be modified.

-- 
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] #14339: Enable testing when you can't create/destroy databases

2010-11-19 Thread Django
#14339: Enable testing when you can't create/destroy databases
+---
  Reporter:  Martin Omander   | 
Owner:  nobody   
Status:  new| 
Milestone:   
 Component:  Testing framework  |   
Version:  1.2  
Resolution: |  
Keywords:  test database
 Stage:  Unreviewed | 
Has_patch:  0
Needs_docs:  0  |   
Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 The Oracle backend has the ``'TEST_CREATE'`` (and a
 ``'TEST_USER_CREATE'``) boolean var that allows control of the DB
 (actually tablespace) creation process. Maybe we could extend/generalize
 this to the other backends somehow?

-- 
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] r14641 - django/branches/releases/1.2.X/docs/ref/contrib/admin

2010-11-19 Thread noreply
Author: lukeplant
Date: 2010-11-19 19:56:34 -0600 (Fri, 19 Nov 2010)
New Revision: 14641

Modified:
   django/branches/releases/1.2.X/docs/ref/contrib/admin/admindocs.txt
Log:
[1.2.X] Fixed a garbage character that was somehow introduced into some 
backported docs.

Modified: django/branches/releases/1.2.X/docs/ref/contrib/admin/admindocs.txt
===
--- django/branches/releases/1.2.X/docs/ref/contrib/admin/admindocs.txt 
2010-11-20 01:56:20 UTC (rev 14640)
+++ django/branches/releases/1.2.X/docs/ref/contrib/admin/admindocs.txt 
2010-11-20 01:56:34 UTC (rev 14641)
@@ -131,7 +131,7 @@
 While ``admindocs`` does not include a place to document templates by
 themselves, if you use the ``:template:`path/to/template.html``` syntax in a
 docstring the resulting page will verify the path of that template with
-Django’s :ref:`template loaders `. This can be a handy way to
+Django’s :ref:`template loaders `. This can be a handy way to
 check if the specified template exists and to show where on the filesystem that
 template is stored.
 

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

2010-11-19 Thread noreply
Author: lukeplant
Date: 2010-11-19 19:56:20 -0600 (Fri, 19 Nov 2010)
New Revision: 14640

Modified:
   django/branches/releases/1.2.X/docs/_ext/djangodocs.py
Log:
[1.2.X] Fixed hyperlinking of template tags for Sphinx >= 1.0

Follow on from incomplete fix in [14477], and [14631] which removed
compatibility for Sphinx < 1.0

Backport of [14639] from trunk, and [14477] which was never applied to 1.2.X
branch but should have been.

Modified: django/branches/releases/1.2.X/docs/_ext/djangodocs.py
===
--- django/branches/releases/1.2.X/docs/_ext/djangodocs.py  2010-11-20 
01:37:54 UTC (rev 14639)
+++ django/branches/releases/1.2.X/docs/_ext/djangodocs.py  2010-11-20 
01:56:20 UTC (rev 14640)
@@ -233,14 +233,13 @@
 self.warn("cannot create templatebuiltins.js due to missing 
simplejson dependency")
 return
 self.info(bold("writing templatebuiltins.js..."))
-try:
-xrefs = self.env.reftargets.keys()
-templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 
'ttag']),
- ('tfilters', [n for (t,n) in xrefs if t 
== 'tfilter'])])
-except AttributeError:
-xrefs = self.env.domaindata["std"]["objects"]
-templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 
'templatetag']),
- ('tfilters', [n for (t,n) in xrefs if t 
== 'templatefilter'])])
+xrefs = self.env.domaindata["std"]["objects"]
+templatebuiltins = dict([('ttags', [n for ((t,n), (l,a)) in 
xrefs.items()
+if t == 'templatetag' and
+l == 'ref/templates/builtins' ]),
+ ('tfilters', [n for ((t,n), (l,a)) in 
xrefs.items()
+   if t == 'templatefilter' and
+   t == 
'ref/templates/builtins'])])
 outfilename = os.path.join(self.outdir, "templatebuiltins.js")
 f = open(outfilename, 'wb')
 f.write('var django_template_builtins = ')

-- 
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] #14733: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14733: Allow Manager.raw() execute not  only "Pure selects"
---+
  Reporter:  dzentoo   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Comment (by russellm):

 Right now? No. Could it? Sure. You just need to make the validation
 sufficiently flexible.

-- 
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] #14734: problem with postgresql views (psycopg2)

2010-11-19 Thread Django
#14734: problem with postgresql views (psycopg2)
---+
  Reporter:  fulviociriaco | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:  invalid   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 This sounds like a case of user-error, related to the default isolation
 mode of your server. Unless you can point at something specific that
 Django is doing wrong, I'm going to close 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.



[Changeset] r14639 - django/trunk/docs/_ext

2010-11-19 Thread noreply
Author: lukeplant
Date: 2010-11-19 19:37:54 -0600 (Fri, 19 Nov 2010)
New Revision: 14639

Modified:
   django/trunk/docs/_ext/djangodocs.py
Log:
Fixed hyperlinking of template tags for Sphinx >= 1.0

Follow on from incomplete fix in [14477], and [14631] which removed
compatibility for Sphinx < 1.0

Modified: django/trunk/docs/_ext/djangodocs.py
===
--- django/trunk/docs/_ext/djangodocs.py2010-11-20 01:15:14 UTC (rev 
14638)
+++ django/trunk/docs/_ext/djangodocs.py2010-11-20 01:37:54 UTC (rev 
14639)
@@ -233,18 +233,13 @@
 self.warn("cannot create templatebuiltins.js due to missing 
simplejson dependency")
 return
 self.info(bold("writing templatebuiltins.js..."))
-try:
-xrefs = self.env.reftargets.items()
-templatebuiltins = dict([('ttags', [n for ((t,n),(l,a)) in xrefs
-if t == 'ttag' and
-l == 
'ref/templates/builtins']),
- ('tfilters', [n for ((t,n),(l,a)) in xrefs
-   if t == 'tfilter' and
-   l == 
'ref/templates/builtins'])])
-except AttributeError:
-xrefs = self.env.domaindata["std"]["objects"]
-templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 
'templatetag']),
- ('tfilters', [n for (t,n) in xrefs if t 
== 'templatefilter'])])
+xrefs = self.env.domaindata["std"]["objects"]
+templatebuiltins = dict([('ttags', [n for ((t,n), (l,a)) in 
xrefs.items()
+if t == 'templatetag' and
+l == 'ref/templates/builtins' ]),
+ ('tfilters', [n for ((t,n), (l,a)) in 
xrefs.items()
+   if t == 'templatefilter' and
+   t == 
'ref/templates/builtins'])])
 outfilename = os.path.join(self.outdir, "templatebuiltins.js")
 f = open(outfilename, 'wb')
 f.write('var django_template_builtins = ')

-- 
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] #14569: Date field expression raw query returns unicode instead of datetime object in sqlite

2010-11-19 Thread Django
#14569: Date field expression raw query returns unicode instead of datetime 
object
in sqlite
---+
  Reporter:  robin | Owner:  nobody 
 
Status:  closed| Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  1.2
 
Resolution:  wontfix   |  Keywords:  raw query 
date sqlite postgresql
 Stage:  Unreviewed| Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * status:  new => closed
  * resolution:  => wontfix
  * summary:  Raw query for date field returns unicode instead of datetime
  object in sqlite => Date field expression raw
  query returns unicode instead of datetime
  object in sqlite

Comment:

 So, unfortunately we can't fix this in Django because that means it would
 need to interpret all raw SQL queries and deduce the correct data type of
 the query result. Closing as ''wontfix''

-- 
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] r14638 - in django/branches/releases/1.2.X: . docs/ref

2010-11-19 Thread noreply
Author: ikelly
Date: 2010-11-19 19:15:14 -0600 (Fri, 19 Nov 2010)
New Revision: 14638

Modified:
   django/branches/releases/1.2.X/
   django/branches/releases/1.2.X/docs/ref/databases.txt
Log:
[1.2.X] Updated an old workaround described in the Oracle backend notes with 
more modern advice.

Backport of r14637 from trunk.


Property changes on: django/branches/releases/1.2.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-13360,13400,13434,13480,13574,13600,13638,13652,13664,13666,13668,13680,13683,13685,13687-13688,13690,13694,13696,13701-13702,13705,13709,13712,13715,13717,13732,13735,13859,14537,14545,14547,14630
   + 
/django/trunk:1-13360,13400,13434,13480,13574,13600,13638,13652,13664,13666,13668,13680,13683,13685,13687-13688,13690,13694,13696,13701-13702,13705,13709,13712,13715,13717,13732,13735,13859,14537,14545,14547,14630,14637

Modified: django/branches/releases/1.2.X/docs/ref/databases.txt
===
--- django/branches/releases/1.2.X/docs/ref/databases.txt   2010-11-20 
01:11:34 UTC (rev 14637)
+++ django/branches/releases/1.2.X/docs/ref/databases.txt   2010-11-20 
01:15:14 UTC (rev 14638)
@@ -650,9 +650,9 @@
   * LOB columns may not be used in a ``SELECT DISTINCT`` list. This means that
 attempting to use the ``QuerySet.distinct`` method on a model that
 includes ``TextField`` columns will result in an error when run against
-Oracle. A workaround to this is to keep ``TextField`` columns out of any
-models that you foresee performing ``distinct()`` queries on, and to
-include the ``TextField`` in a related model instead.
+Oracle. As a workaround, use the ``QuerySet.defer`` method in conjunction
+with ``distinct()`` to prevent ``TextField`` columns from being included in
+the ``SELECT DISTINCT`` list.
 
 .. _third-party-notes:
 

-- 
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] #13860: Translate admin commands

2010-11-19 Thread Django
#13860: Translate admin commands
+---
  Reporter:  tonnzor| Owner:  nobody
Status:  new| Milestone:
 Component:  Translations   |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Someday/Maybe  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 I think the OP was talking about the description and help text shown for
 management commands not the command names themselves.

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

2010-11-19 Thread noreply
Author: ikelly
Date: 2010-11-19 19:11:34 -0600 (Fri, 19 Nov 2010)
New Revision: 14637

Modified:
   django/trunk/docs/ref/databases.txt
Log:
Updated an old workaround described in the Oracle backend notes with more 
modern advice.

Modified: django/trunk/docs/ref/databases.txt
===
--- django/trunk/docs/ref/databases.txt 2010-11-20 00:06:19 UTC (rev 14636)
+++ django/trunk/docs/ref/databases.txt 2010-11-20 01:11:34 UTC (rev 14637)
@@ -669,9 +669,9 @@
   * LOB columns may not be used in a ``SELECT DISTINCT`` list. This means that
 attempting to use the ``QuerySet.distinct`` method on a model that
 includes ``TextField`` columns will result in an error when run against
-Oracle. A workaround to this is to keep ``TextField`` columns out of any
-models that you foresee performing ``distinct()`` queries on, and to
-include the ``TextField`` in a related model instead.
+Oracle. As a workaround, use the ``QuerySet.defer`` method in conjunction
+with ``distinct()`` to prevent ``TextField`` columns from being included in
+the ``SELECT DISTINCT`` list.
 
 .. _third-party-notes:
 

-- 
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] #14266: Audit database backend support claims, particularly for MySQL

2010-11-19 Thread Django
#14266: Audit database backend support claims, particularly for MySQL
+---
  Reporter:  carljm | Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 See also #14618.

-- 
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] #14618: unable to "inspectdb" on mysql4 database

2010-11-19 Thread Django
#14618: unable to "inspectdb" on mysql4 database
+---
  Reporter:  pyrou  | Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  django-admin.py inspectdb  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

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

Comment:

 See also #14266.

-- 
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] #14730: Translation Mistake. MN

2010-11-19 Thread Django
#14730: Translation Mistake. MN
---+
  Reporter:  ankhbayar | Owner:  nobody
Status:  new   | Milestone:
 Component:  Translations  |   Version:  1.2   
Resolution:|  Keywords:  MN
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * needs_better_patch:  => 0
  * component:  Internationalization => Translations
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



Re: [Django] #14702: Add a "needs info" state to tickets

2010-11-19 Thread Django
#14702: Add a "needs info" state to tickets
--+-
  Reporter:  dmoisset | Owner:  nobody
Status:  new  | Milestone:  1.3   
 Component:  Django Web site  |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  1|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by ramiro):

  * stage:  Unreviewed => Accepted

Comment:

 Accepting per django-dev discussion.

-- 
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] #14091: PATCH: fix incorrect quoting in connection.queries for MySQL

2010-11-19 Thread Django
#14091: PATCH: fix incorrect quoting in connection.queries for MySQL
---+
  Reporter:  danielr   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

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

Comment:

 Replying to [ticket:14091 danielr]:
 > No tests attached, because I couldn't work out where to put them - happy
 to do so with some advice.

 ``tests/regressiontests/backends`` would be an appropriate location.

-- 
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] #14059: ForeignKey Field validates using the default database rather than the current model instance's database

2010-11-19 Thread Django
#14059: ForeignKey Field validates using the default database rather than the
current model instance's database
-+--
  Reporter:  psei...@predictivetechnologies.com  | Owner:  
nobody   
Status:  closed  | Milestone:   

 Component:  Forms   |   Version:  1.2  

Resolution:  duplicate   |  Keywords:  
multipledatabases
 Stage:  Unreviewed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

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

Comment:

 Duplicate of #14691 (That is newer but got picked and fixed first).
 Thanks for the report and fix suggestion.

-- 
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] #11333: ORA-01830 date format picture ends before converting entire input

2010-11-19 Thread Django
#11333: ORA-01830 date format picture ends before converting entire input
---+
  Reporter:  jtiai | Owner:  nobody 

Status:  closed| Milestone:  1.3

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:  wontfix   |  Keywords:  oracle 
date formats
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

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

Comment:

 In order to fix this, we would need to somehow distinguish whether a
 !DateTimeField is implemented in the database as a DATE or TIMESTAMP
 column.  I can see two ways of doing this:

  1. By doing automatic introspection on every !DateTimeField at start-up
 in order to determine the actual column types.  This would be quite a bit
 heavier than the introspection we currently do, and it doesn't seem very
 practical to me.

  2. By adding a precision keyword argument to !DateTimeField and
 !TimeField that denotes the fractional second precision to be used.  This
 might be a worthwhile feature to add, but it's outside the scope of this
 ticket.

 Also, there are a full complement of workarounds here.  Either use a
 !DateField with a DATE column, or a !DateTimeField with a TIMESTAMP
 column, or if you really need to mix and match, turn off auto_now and use
 a pre_save signal to manually set the field with the correct precision.

 So my conclusion is that the proper response to this for now is "don't do
 that", and I'm closing this as wontfix.

-- 
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] #14733: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14733: Allow Manager.raw() execute not  only "Pure selects"
---+
  Reporter:  dzentoo   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Comment (by dzentoo):

 Can raw() execute this kind of queries ?

 http://www.davidcramer.net/code/django/6939/scaling-threaded-comments-on-
 django-at-disqus.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.



[Changeset] r14636 - django/branches/releases/1.2.X/tests/regressiontests/forms/tests

2010-11-19 Thread noreply
Author: carljm
Date: 2010-11-19 18:06:19 -0600 (Fri, 19 Nov 2010)
New Revision: 14636

Modified:
   
django/branches/releases/1.2.X/tests/regressiontests/forms/tests/regressions.py
Log:
[1.2.X] Fixed poorly-constructed test from r14612. Thanks to Alex Gaynor for 
the eagle eyes.

Backport of r14635 from trunk.

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/forms/tests/regressions.py
===
--- 
django/branches/releases/1.2.X/tests/regressiontests/forms/tests/regressions.py 
2010-11-20 00:05:11 UTC (rev 14635)
+++ 
django/branches/releases/1.2.X/tests/regressiontests/forms/tests/regressions.py 
2010-11-20 00:06:19 UTC (rev 14636)
@@ -137,7 +137,9 @@
 form = CheeseForm({
 'name': 'Brie',
 })
-if form.is_valid():
-obj = form.save()
-obj.name = 'Camembert'
-obj.full_clean()
+
+self.assertTrue(form.is_valid())
+
+obj = form.save()
+obj.name = 'Camembert'
+obj.full_clean()

-- 
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] r14635 - django/trunk/tests/regressiontests/forms/tests

2010-11-19 Thread noreply
Author: carljm
Date: 2010-11-19 18:05:11 -0600 (Fri, 19 Nov 2010)
New Revision: 14635

Modified:
   django/trunk/tests/regressiontests/forms/tests/regressions.py
Log:
Fixed poorly-constructed test from r14612. Thanks to Alex Gaynor for the eagle 
eyes.

Modified: django/trunk/tests/regressiontests/forms/tests/regressions.py
===
--- django/trunk/tests/regressiontests/forms/tests/regressions.py   
2010-11-19 23:56:38 UTC (rev 14634)
+++ django/trunk/tests/regressiontests/forms/tests/regressions.py   
2010-11-20 00:05:11 UTC (rev 14635)
@@ -137,7 +137,9 @@
 form = CheeseForm({
 'name': 'Brie',
 })
-if form.is_valid():
-obj = form.save()
-obj.name = 'Camembert'
-obj.full_clean()
+
+self.assertTrue(form.is_valid())
+
+obj = form.save()
+obj.name = 'Camembert'
+obj.full_clean()

-- 
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] r14634 - django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor

2010-11-19 Thread noreply
Author: Alex
Date: 2010-11-19 17:56:38 -0600 (Fri, 19 Nov 2010)
New Revision: 14634

Modified:
   
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py
Log:
Corrected some issues with the backport from [14627].

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py
===
--- 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py 
2010-11-19 23:23:17 UTC (rev 14633)
+++ 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py 
2010-11-19 23:56:38 UTC (rev 14634)
@@ -1,6 +1,7 @@
+from unittest import TestCase
+
 from django.core.exceptions import ValidationError
 from django.core.validators import EMPTY_VALUES
-from django.utils.unittest import TestCase
 
 
 class LocalFlavorTestCase(TestCase):
@@ -23,16 +24,25 @@
 self.assertEqual(optional.clean(input), output)
 # test invalid inputs
 for input, errors in invalid.items():
-self.assertRaisesRegexp(ValidationError, unicode(errors),
-required.clean, input
-)
-self.assertRaisesRegexp(ValidationError, unicode(errors),
-optional.clean, input
-)
+try:
+required.clean(input)
+except ValidationError, e:
+self.assertTrue(unicode(errors) in unicode(e))
+else:
+self.fail()
+try:
+optional.clean(input)
+except ValidationError, e:
+self.assertTrue(unicode(errors) in unicode(e))
+else:
+self.fail()
 # test required inputs
 error_required = u'This field is required'
-for e in EMPTY_VALUES:
-self.assertRaisesRegexp(ValidationError, error_required,
-required.clean, e
-)
-self.assertEqual(optional.clean(e), u'')
+for val in EMPTY_VALUES:
+try:
+required.clean(val)
+except ValidationError, e:
+self.assertTrue(error_required in unicode(e))
+else:
+self.fail()
+self.assertEqual(optional.clean(val), u'')

-- 
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] #3357: Make Django's server optionally multithreaded

2010-11-19 Thread Django
#3357: Make Django's server optionally multithreaded
+---
  Reporter:  treborhud...@gmail.com | Owner:  adrian
Status:  closed | Milestone:
 Component:  django-admin.py runserver  |   Version:  SVN   
Resolution:  wontfix|  Keywords:  post10
 Stage:  Design decision needed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by trevorcroft):

 Allowing something like:
 manage.py runthreadedserver

 Is logically equivalent to allowing something like:
 manage.py runserver

 I think everyone will agree that you should keep runserver in django,
 therefore everyone (who is logical) would agree you could have
 runthreadedserver.

 The arguments for disallowing one are identical to disallowing the other
 (fear of stupid users abusing it, and the fact that issues arise during
 development that are not real issues), and the arguments for allowing one
 are identical for allowing the other (its a great development tool).

-- 
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] r14633 - in django/branches/releases/1.2.X/docs: . _ext

2010-11-19 Thread noreply
Author: ramiro
Date: 2010-11-19 17:23:17 -0600 (Fri, 19 Nov 2010)
New Revision: 14633

Modified:
   django/branches/releases/1.2.X/docs/_ext/djangodocs.py
   django/branches/releases/1.2.X/docs/conf.py
Log:
[1.2.X] Removed compatibility with Sphinx < 1.0 workarounds in our extension 
code. Also, started to use the 'needs_sphinx' Sphinx config var.

Follow up on r14624.

Backport of [14631] from trunk

Modified: django/branches/releases/1.2.X/docs/_ext/djangodocs.py
===
--- django/branches/releases/1.2.X/docs/_ext/djangodocs.py  2010-11-19 
23:23:03 UTC (rev 14632)
+++ django/branches/releases/1.2.X/docs/_ext/djangodocs.py  2010-11-19 
23:23:17 UTC (rev 14633)
@@ -83,10 +83,7 @@
 if not is_nextversion:
 if len(self.arguments) == 1:
 linktext = 'Please, see the release notes ' % 
(arg0)
-try:
-xrefs = roles.XRefRole()('doc', linktext, linktext, 
self.lineno, self.state) # Sphinx >= 1.0
-except AttributeError:
-xrefs = roles.xfileref_role('doc', linktext, linktext, 
self.lineno, self.state) # Sphinx < 1.0
+xrefs = roles.XRefRole()('doc', linktext, linktext, 
self.lineno, self.state)
 node.extend(xrefs[0])
 node['version'] = arg0
 else:
@@ -196,10 +193,7 @@
 
 def parse_django_adminopt_node(env, sig, signode):
 """A copy of sphinx.directives.CmdoptionDesc.parse_signature()"""
-try:
-from sphinx.domains.std import option_desc_re # Sphinx >= 1.0
-except ImportError:
-from sphinx.directives.desc import option_desc_re # Sphinx < 1.0
+from sphinx.domains.std import option_desc_re
 count = 0
 firstname = ''
 for m in option_desc_re.finditer(sig):

Modified: django/branches/releases/1.2.X/docs/conf.py
===
--- django/branches/releases/1.2.X/docs/conf.py 2010-11-19 23:23:03 UTC (rev 
14632)
+++ django/branches/releases/1.2.X/docs/conf.py 2010-11-19 23:23:17 UTC (rev 
14633)
@@ -22,7 +22,7 @@
 # -- General configuration 
-
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+needs_sphinx = '1.0'
 
 # Add any Sphinx extension module names here, as strings. They can be 
extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.

-- 
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] r14632 - in django/branches/releases/1.2.X: . docs/ref

2010-11-19 Thread noreply
Author: ikelly
Date: 2010-11-19 17:23:03 -0600 (Fri, 19 Nov 2010)
New Revision: 14632

Modified:
   django/branches/releases/1.2.X/
   django/branches/releases/1.2.X/docs/ref/databases.txt
Log:
[1.2.X] Fixed #13351: Added documentation about the cx_Oracle 'threaded' option 
to the oracle backend notes.

Backport of r14630 from trunk.

Thanks to Skaffen for the suggestion.


Property changes on: django/branches/releases/1.2.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-13360,13400,13434,13480,13574,13600,13638,13652,13664,13666,13668,13680,13683,13685,13687-13688,13690,13694,13696,13701-13702,13705,13709,13712,13715,13717,13732,13735,13859,14537,14545,14547
   + 
/django/trunk:1-13360,13400,13434,13480,13574,13600,13638,13652,13664,13666,13668,13680,13683,13685,13687-13688,13690,13694,13696,13701-13702,13705,13709,13712,13715,13717,13732,13735,13859,14537,14545,14547,14630

Modified: django/branches/releases/1.2.X/docs/ref/databases.txt
===
--- django/branches/releases/1.2.X/docs/ref/databases.txt   2010-11-19 
23:19:56 UTC (rev 14631)
+++ django/branches/releases/1.2.X/docs/ref/databases.txt   2010-11-19 
23:23:03 UTC (rev 14632)
@@ -530,7 +530,7 @@
 'USER': 'a_user',
 'PASSWORD': 'a_password',
 'HOST': '',
-'PORT': '' ,
+'PORT': '',
 }
 }
 
@@ -553,6 +553,19 @@
 You should supply both ``HOST`` and ``PORT``, or leave both
 as empty strings.
 
+Threaded option
+
+
+If you plan to run Django in a multithreaded environment (e.g. Apache in 
Windows
+using the default MPM module), then you **must** set the ``threaded`` option of
+your Oracle database configuration to True::
+
+'OPTIONS': {
+'threaded': True,
+},
+
+Failure to do this may result in crashes and other odd behavior.
+
 Tablespace options
 --
 

-- 
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] r14631 - in django/trunk/docs: . _ext

2010-11-19 Thread noreply
Author: ramiro
Date: 2010-11-19 17:19:56 -0600 (Fri, 19 Nov 2010)
New Revision: 14631

Modified:
   django/trunk/docs/_ext/djangodocs.py
   django/trunk/docs/conf.py
Log:
Removed compatibility with Sphinx < 1.0 workarounds in our extension code. 
Also, started to use the 'needs_sphinx' Sphinx config var.

Follow up on r14624.

Modified: django/trunk/docs/_ext/djangodocs.py
===
--- django/trunk/docs/_ext/djangodocs.py2010-11-19 23:19:23 UTC (rev 
14630)
+++ django/trunk/docs/_ext/djangodocs.py2010-11-19 23:19:56 UTC (rev 
14631)
@@ -83,10 +83,7 @@
 if not is_nextversion:
 if len(self.arguments) == 1:
 linktext = 'Please, see the release notes ' % 
(arg0)
-try:
-xrefs = roles.XRefRole()('doc', linktext, linktext, 
self.lineno, self.state) # Sphinx >= 1.0
-except AttributeError:
-xrefs = roles.xfileref_role('doc', linktext, linktext, 
self.lineno, self.state) # Sphinx < 1.0
+xrefs = roles.XRefRole()('doc', linktext, linktext, 
self.lineno, self.state)
 node.extend(xrefs[0])
 node['version'] = arg0
 else:
@@ -196,10 +193,7 @@
 
 def parse_django_adminopt_node(env, sig, signode):
 """A copy of sphinx.directives.CmdoptionDesc.parse_signature()"""
-try:
-from sphinx.domains.std import option_desc_re # Sphinx >= 1.0
-except ImportError:
-from sphinx.directives.desc import option_desc_re # Sphinx < 1.0
+from sphinx.domains.std import option_desc_re
 count = 0
 firstname = ''
 for m in option_desc_re.finditer(sig):

Modified: django/trunk/docs/conf.py
===
--- django/trunk/docs/conf.py   2010-11-19 23:19:23 UTC (rev 14630)
+++ django/trunk/docs/conf.py   2010-11-19 23:19:56 UTC (rev 14631)
@@ -22,7 +22,7 @@
 # -- General configuration 
-
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+needs_sphinx = '1.0'
 
 # Add any Sphinx extension module names here, as strings. They can be 
extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.

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

2010-11-19 Thread noreply
Author: ikelly
Date: 2010-11-19 17:19:23 -0600 (Fri, 19 Nov 2010)
New Revision: 14630

Modified:
   django/trunk/docs/ref/databases.txt
Log:
Fixed #13351: Added documentation about the cx_Oracle 'threaded' option to the 
oracle backend notes.

Thanks to Skaffen for the suggestion.

Modified: django/trunk/docs/ref/databases.txt
===
--- django/trunk/docs/ref/databases.txt 2010-11-19 23:04:48 UTC (rev 14629)
+++ django/trunk/docs/ref/databases.txt 2010-11-19 23:19:23 UTC (rev 14630)
@@ -549,7 +549,7 @@
 'USER': 'a_user',
 'PASSWORD': 'a_password',
 'HOST': '',
-'PORT': '' ,
+'PORT': '',
 }
 }
 
@@ -572,6 +572,19 @@
 You should supply both ``HOST`` and ``PORT``, or leave both
 as empty strings.
 
+Threaded option
+
+
+If you plan to run Django in a multithreaded environment (e.g. Apache in 
Windows
+using the default MPM module), then you **must** set the ``threaded`` option of
+your Oracle database configuration to True::
+
+'OPTIONS': {
+'threaded': True,
+},
+
+Failure to do this may result in crashes and other odd behavior.
+
 Tablespace options
 --
 

-- 
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] #14679: Change of behavior in add new user workflow when using "Save" button

2010-11-19 Thread Django
#14679: Change of behavior in add new user workflow when using "Save" button
---+
  Reporter:  ramiro| Owner:  nobody
Status:  closed| Milestone:  1.3   
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

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

Comment:

 Fixed in r14628 (trunk) and r14629 (1.2.X branch).

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r14629 - in django/branches/releases/1.2.X: django/contrib/auth tests/regressiontests/admin_views

2010-11-19 Thread noreply
Author: ramiro
Date: 2010-11-19 17:04:48 -0600 (Fri, 19 Nov 2010)
New Revision: 14629

Modified:
   django/branches/releases/1.2.X/django/contrib/auth/admin.py
   django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py
Log:
[1.2.X] Corrected change in behavior regarding the page shown after the 'Save' 
button is pressed when adding a user through the admin.

It had been introduced in trunk (r13503) and between 1.2.1 and 1.2.2 (r13504). 
The original fix intended to correct a similar problem introduced between 1.1 
and 1.2 (r12218) this time in the 'Save and add another' button.
We have now tests for the three buttons present in the Add User admin form to 
avoid future regressions.
Thanks to Juan Pedro Fisanotti and Cesar H. Roldan for their work.

Backport of [14628] from trunk

Modified: django/branches/releases/1.2.X/django/contrib/auth/admin.py
===
--- django/branches/releases/1.2.X/django/contrib/auth/admin.py 2010-11-19 
22:45:51 UTC (rev 14628)
+++ django/branches/releases/1.2.X/django/contrib/auth/admin.py 2010-11-19 
23:04:48 UTC (rev 14629)
@@ -1,4 +1,3 @@
-from django import template
 from django.db import transaction
 from django.conf import settings
 from django.contrib import admin
@@ -137,6 +136,17 @@
 'root_path': self.admin_site.root_path,
 }, context_instance=RequestContext(request))
 
+def response_add(self, request, obj, post_url_continue='../%s/'):
+"""
+Determines the HttpResponse for the add_view stage. It mostly defers to
+its superclass implementation but is customized because the User model
+has a slightly different workflow.
+"""
+if '_addanother' not in request.POST:
+# The 'Save' button should act like the 'Save and continue
+# editing' button
+request.POST['_continue'] = 1
+return super(UserAdmin, self).response_add(request, obj, 
post_url_continue)
 
 admin.site.register(Group, GroupAdmin)
 admin.site.register(User, UserAdmin)

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py
===
--- django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py   
2010-11-19 22:45:51 UTC (rev 14628)
+++ django/branches/releases/1.2.X/tests/regressiontests/admin_views/tests.py   
2010-11-19 23:04:48 UTC (rev 14629)
@@ -17,7 +17,7 @@
 from django.utils.cache import get_max_age
 from django.utils.encoding import iri_to_uri
 from django.utils.html import escape
-from django.utils.translation import get_date_formats, activate, deactivate
+from django.utils.translation import activate, deactivate
 import django.template.context
 
 # local test models
@@ -1515,7 +1515,7 @@
 def test_action_column_class(self):
 "Tests that the checkbox column class is present in the response"
 response = self.client.get('/test_admin/admin/admin_views/subscriber/')
-self.assertNotEquals(response.context["action_form"], None)
+self.assertNotEqual(response.context["action_form"], None)
 self.assert_('action-checkbox-column' in response.content,
 "Expected an action-checkbox-column in response")
 
@@ -2141,18 +2141,30 @@
 def tearDown(self):
 self.client.logout()
 
-def test_user_creation(self):
+def test_save_button(self):
 user_count = User.objects.count()
 response = self.client.post('/test_admin/admin/auth/user/add/', {
 'username': 'newuser',
 'password1': 'newpassword',
 'password2': 'newpassword',
+})
+new_user = User.objects.order_by('-id')[0]
+self.assertRedirects(response, '/test_admin/admin/auth/user/%s/' % 
new_user.pk)
+self.assertEqual(User.objects.count(), user_count + 1)
+self.assertNotEqual(new_user.password, UNUSABLE_PASSWORD)
+
+def test_save_continue_editing_button(self):
+user_count = User.objects.count()
+response = self.client.post('/test_admin/admin/auth/user/add/', {
+'username': 'newuser',
+'password1': 'newpassword',
+'password2': 'newpassword',
 '_continue': '1',
 })
 new_user = User.objects.order_by('-id')[0]
 self.assertRedirects(response, '/test_admin/admin/auth/user/%s/' % 
new_user.pk)
-self.assertEquals(User.objects.count(), user_count + 1)
-self.assertNotEquals(new_user.password, UNUSABLE_PASSWORD)
+self.assertEqual(User.objects.count(), user_count + 1)
+self.assertNotEqual(new_user.password, UNUSABLE_PASSWORD)
 
 def test_password_mismatch(self):
 response = self.client.post('/test_admin/admin/auth/user/add/', {
@@ -2160,21 +2172,22 @@
 'password1': 'newpassword',
 'password2': 'mismatch',
 })
-self.assertEquals(response.status_code, 200)
+ 

[Changeset] r14628 - in django/trunk: django/contrib/auth tests/regressiontests/admin_views

2010-11-19 Thread noreply
Author: ramiro
Date: 2010-11-19 16:45:51 -0600 (Fri, 19 Nov 2010)
New Revision: 14628

Modified:
   django/trunk/django/contrib/auth/admin.py
   django/trunk/tests/regressiontests/admin_views/tests.py
Log:
Corrected change in behavior regarding the page shown after the 'Save' button 
is pressed when adding a user through the admin.

It had been introduced in trunk (r13503) and between 1.2.1 and 1.2.2 (r13504). 
The original fix intended to correct a similar problem introduced between 1.1 
and 1.2 (r12218) this time in the 'Save and add another' button.
We have now tests for the three buttons present in the Add User admin form to 
avoid future regressions.
Thanks to Juan Pedro Fisanotti and Cesar H. Roldan for their work.

Modified: django/trunk/django/contrib/auth/admin.py
===
--- django/trunk/django/contrib/auth/admin.py   2010-11-19 19:34:17 UTC (rev 
14627)
+++ django/trunk/django/contrib/auth/admin.py   2010-11-19 22:45:51 UTC (rev 
14628)
@@ -1,4 +1,3 @@
-from django import template
 from django.db import transaction
 from django.conf import settings
 from django.contrib import admin
@@ -137,6 +136,17 @@
 'root_path': self.admin_site.root_path,
 }, context_instance=RequestContext(request))
 
+def response_add(self, request, obj, post_url_continue='../%s/'):
+"""
+Determines the HttpResponse for the add_view stage. It mostly defers to
+its superclass implementation but is customized because the User model
+has a slightly different workflow.
+"""
+if '_addanother' not in request.POST:
+# The 'Save' button should act like the 'Save and continue
+# editing' button
+request.POST['_continue'] = 1
+return super(UserAdmin, self).response_add(request, obj, 
post_url_continue)
 
 admin.site.register(Group, GroupAdmin)
 admin.site.register(User, UserAdmin)

Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===
--- django/trunk/tests/regressiontests/admin_views/tests.py 2010-11-19 
19:34:17 UTC (rev 14627)
+++ django/trunk/tests/regressiontests/admin_views/tests.py 2010-11-19 
22:45:51 UTC (rev 14628)
@@ -18,7 +18,7 @@
 from django.utils.cache import get_max_age
 from django.utils.encoding import iri_to_uri
 from django.utils.html import escape
-from django.utils.translation import get_date_formats, activate, deactivate
+from django.utils.translation import activate, deactivate
 from django.utils import unittest
 
 # local test models
@@ -1538,7 +1538,7 @@
 def test_action_column_class(self):
 "Tests that the checkbox column class is present in the response"
 response = self.client.get('/test_admin/admin/admin_views/subscriber/')
-self.assertNotEquals(response.context["action_form"], None)
+self.assertNotEqual(response.context["action_form"], None)
 self.assert_('action-checkbox-column' in response.content,
 "Expected an action-checkbox-column in response")
 
@@ -2164,18 +2164,30 @@
 def tearDown(self):
 self.client.logout()
 
-def test_user_creation(self):
+def test_save_button(self):
 user_count = User.objects.count()
 response = self.client.post('/test_admin/admin/auth/user/add/', {
 'username': 'newuser',
 'password1': 'newpassword',
 'password2': 'newpassword',
+})
+new_user = User.objects.order_by('-id')[0]
+self.assertRedirects(response, '/test_admin/admin/auth/user/%s/' % 
new_user.pk)
+self.assertEqual(User.objects.count(), user_count + 1)
+self.assertNotEqual(new_user.password, UNUSABLE_PASSWORD)
+
+def test_save_continue_editing_button(self):
+user_count = User.objects.count()
+response = self.client.post('/test_admin/admin/auth/user/add/', {
+'username': 'newuser',
+'password1': 'newpassword',
+'password2': 'newpassword',
 '_continue': '1',
 })
 new_user = User.objects.order_by('-id')[0]
 self.assertRedirects(response, '/test_admin/admin/auth/user/%s/' % 
new_user.pk)
-self.assertEquals(User.objects.count(), user_count + 1)
-self.assertNotEquals(new_user.password, UNUSABLE_PASSWORD)
+self.assertEqual(User.objects.count(), user_count + 1)
+self.assertNotEqual(new_user.password, UNUSABLE_PASSWORD)
 
 def test_password_mismatch(self):
 response = self.client.post('/test_admin/admin/auth/user/add/', {
@@ -2183,21 +2195,22 @@
 'password1': 'newpassword',
 'password2': 'mismatch',
 })
-self.assertEquals(response.status_code, 200)
+self.assertEqual(response.status_code, 200)
 adminform = response.context['adminform']
-self.assert_('password' not in adminform.form.errors)
-self

Re: [Django] #14626: DateField with auto_now=True is not coming in as Python's datetime.date object in Python 2.4 / 2.5

2010-11-19 Thread Django
#14626: DateField with auto_now=True is not coming in as Python's datetime.date
object in Python 2.4 / 2.5
---+
  Reporter:  mischko   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:  duplicate |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ikelly):

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

Comment:

 Dup of #10970

-- 
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] #14626: DateField with auto_now=True is not coming in as Python's datetime.date object in Python 2.4 / 2.5

2010-11-19 Thread Django
#14626: DateField with auto_now=True is not coming in as Python's datetime.date
object in Python 2.4 / 2.5
---+
  Reporter:  mischko   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ikelly):

  * summary:  DateField is not coming in as Python's datetime.date object
  (in Oracle) => DateField with auto_now=True is
  not coming in as Python's datetime.date object
  in Python 2.4 / 2.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] #14506: Crash on HEAD request

2010-11-19 Thread Django
#14506: Crash on HEAD request
+---
  Reporter:  azurit | Owner:  nobody
Status:  reopened   | 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 azurit):

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

-- 
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] #14626: DateField is not coming in as Python's datetime.date object (in Oracle)

2010-11-19 Thread Django
#14626: DateField is not coming in as Python's datetime.date object (in Oracle)
---+
  Reporter:  mischko   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ikelly):

 I think this may actually be an auto_now bug.  The
 {{{test_datefield_auto_now_add}}} test in the datatypes suite of the 1.2.X
 branch is failing for both oracle and sqlite3 backends when running Python
 2.5, but not with Python 2.7.  The {{{test_date_type}}} test in the same
 suite that tests for this bug in the more general case is not failing at
 all.

-- 
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] #14734: problem with postgresql views (psycopg2)

2010-11-19 Thread Django
#14734: problem with postgresql views (psycopg2)
---+
  Reporter:  fulviociriaco | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Old description:

> I attempted to use django with postgresql views by means of model class,
> the view rows
> however do not change when the db is externally updated untill reentering
> python, e.g.
> >>> mv=MyView.object
> >>> mv.all()
> []
> .
> insert row into table
> .
> >>> mv.all()
> [] #1 row
> ^d
> manage.py shell
> >>> from ... import MyView
> >>> MyView.objects.all()
> [,]  #2 rows
>
> That's all.
> Fulvio

New description:

 I attempted to use django with postgresql views by means of model class,
 the view rows
 however do not change when the db is externally updated untill reentering
 python, e.g.
 {{{
 >>> mv=MyView.object
 >>> mv.all()
 []
 .
 insert row into table
 .
 >>> mv.all()
 [] #1 row
 ^d
 manage.py shell
 >>> from ... import MyView
 >>> MyView.objects.all()
 [,]  #2 rows
 }}}
 That's all.
 Fulvio

Comment:

 I've reformatted the description of this ticket, in the future you can use
 the "Preview" button to ensure that your message is formatted the way you
 intended.

-- 
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] #14734: problem with postgresql views (psycopg2)

2010-11-19 Thread Django
#14734: problem with postgresql views (psycopg2)
--+-
 Reporter:  fulviociriaco |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 I attempted to use django with postgresql views by means of model class,
 the view rows
 however do not change when the db is externally updated untill reentering
 python, e.g.
 >>> mv=MyView.object
 >>> mv.all()
 []
 .
 insert row into table
 .
 >>> mv.all()
 [] #1 row
 ^d
 manage.py shell
 >>> from ... import MyView
 >>> MyView.objects.all()
 [,]  #2 rows

 That's all.
 Fulvio

-- 
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] r14627 - in django/branches/releases/1.2.X/tests/regressiontests/forms: . localflavor tests

2010-11-19 Thread noreply
Author: Alex
Date: 2010-11-19 13:34:17 -0600 (Fri, 19 Nov 2010)
New Revision: 14627

Added:
   
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py
Modified:
   django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/de.py
   
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavortests.py
   django/branches/releases/1.2.X/tests/regressiontests/forms/tests/__init__.py
Log:
[1.2.X] Began converting localflavor doctests into unittests, starting with the 
German ones.  Also introduced a new base class to facilitate ease of testing 
form fields. We have always been at war with doctests.  Thanks to Idan Gazit 
for the patch. Backport of [14626].

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/de.py
===
--- 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/de.py
2010-11-19 19:33:07 UTC (rev 14626)
+++ 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/de.py
2010-11-19 19:34:17 UTC (rev 14627)
@@ -1,35 +1,49 @@
-# -*- coding: utf-8 -*-
-# Tests for the contrib/localflavor/ DE form fields.
+from django.contrib.localflavor.de.forms import (DEZipCodeField, DEStateSelect,
+DEIdentityCardNumberField)
 
-tests = r"""
-# DEZipCodeField ##
+from utils import LocalFlavorTestCase
 
->>> from django.contrib.localflavor.de.forms import DEZipCodeField
->>> f = DEZipCodeField()
->>> f.clean('99423')
-u'99423'
->>> f.clean(' 99423')
-Traceback (most recent call last):
-...
-ValidationError: [u'Enter a zip code in the format X.']
 
-# DEStateSelect #
+class DELocalFlavorTests(LocalFlavorTestCase):
+def test_DEStateSelect(self):
+f = DEStateSelect()
+out = u'''
+Baden-Wuerttemberg
+Bavaria
+Berlin
+Brandenburg
+Bremen
+Hamburg
+Hessen
+Mecklenburg-Western Pomerania
+Lower Saxony
+North Rhine-Westphalia
+Rhineland-Palatinate
+Saarland
+Saxony
+Saxony-Anhalt
+Schleswig-Holstein
+Thuringia
+'''
+self.assertEqual(f.render('states', 'TH'), out)
 
->>> from django.contrib.localflavor.de.forms import DEStateSelect
->>> w = DEStateSelect()
->>> w.render('states', 'TH')
-u'\nBaden-Wuerttemberg\nBavaria\nBerlin\nBrandenburg\nBremen\nHamburg\nHessen\nMecklenburg-Western Pomerania\nLower 
Saxony\nNorth Rhine-Westphalia\nRhineland-Palatinate\nSaarland\nSaxony\nSaxony-Anhalt\nSchleswig-Holstein\nThuringia\n'
+def test_DEZipCodeField(self):
+error_format = [u'Enter a zip code in the format X.']
+valid = {
+'99423': '99423',
+}
+invalid = {
+' 99423': error_format,
+}
+self.assertFieldOutput(DEZipCodeField, valid, invalid)
 
-# DEIdentityCardNumberField #
-
->>> from django.contrib.localflavor.de.forms import DEIdentityCardNumberField
->>> f = DEIdentityCardNumberField()
->>> f.clean('7549313035D-6004103-0903042-0')
-u'7549313035D-6004103-0903042-0'
->>> f.clean('9786324830D 6104243 0910271 2')
-u'9786324830D-6104243-0910271-2'
->>> f.clean('0434657485D-6407276-0508137-9')
-Traceback (most recent call last):
-...
-ValidationError: [u'Enter a valid German identity card number in 
XXX-XXX-XXX-X format.']
-"""
+def test_DEIdentityCardNumberField(self):
+error_format = [u'Enter a valid German identity card number in 
XXX-XXX-XXX-X format.']
+valid = {
+'7549313035D-6004103-0903042-0': '7549313035D-6004103-0903042-0',
+'9786324830D 6104243 0910271 2': '9786324830D-6104243-0910271-2',
+}
+invalid = {
+'0434657485D-6407276-0508137-9': error_format,
+}
+self.assertFieldOutput(DEIdentityCardNumberField, valid, invalid)

Added: 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py
===
--- 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py 
(rev 0)
+++ 
django/branches/releases/1.2.X/tests/regressiontests/forms/localflavor/utils.py 
2010-11-19 19:34:17 UTC (rev 14627)
@@ -0,0 +1,38 @@
+from django.core.exceptions import ValidationError
+from django.core.validators import EMPTY_VALUES
+from django.utils.unittest import TestCase
+
+
+class LocalFlavorTestCase(TestCase):
+def assertFieldOutput(self, fieldclass, valid, invalid):
+"""Asserts that a field behaves correctly with various inputs.
+
+Args:
+fieldclass: the class of the field to be tested.
+valid: a dictionary mapping valid inputs to their expected
+cleaned values.
+invalid: a dictionary mapping invalid inputs to one or more
+raised error messages.

[Changeset] r14626 - in django/trunk/tests/regressiontests/forms: . localflavor tests

2010-11-19 Thread noreply
Author: Alex
Date: 2010-11-19 13:33:07 -0600 (Fri, 19 Nov 2010)
New Revision: 14626

Added:
   django/trunk/tests/regressiontests/forms/localflavor/utils.py
Modified:
   django/trunk/tests/regressiontests/forms/localflavor/de.py
   django/trunk/tests/regressiontests/forms/localflavortests.py
   django/trunk/tests/regressiontests/forms/tests/__init__.py
Log:
Began converting localflavor doctests into unittests, starting with the German 
ones.  Also introduced a new base class to facilitate ease of testing form 
fields. We have always been at war with doctests.  Thanks to Idan Gazit for the 
patch.

Modified: django/trunk/tests/regressiontests/forms/localflavor/de.py
===
--- django/trunk/tests/regressiontests/forms/localflavor/de.py  2010-11-19 
17:30:56 UTC (rev 14625)
+++ django/trunk/tests/regressiontests/forms/localflavor/de.py  2010-11-19 
19:33:07 UTC (rev 14626)
@@ -1,35 +1,49 @@
-# -*- coding: utf-8 -*-
-# Tests for the contrib/localflavor/ DE form fields.
+from django.contrib.localflavor.de.forms import (DEZipCodeField, DEStateSelect,
+DEIdentityCardNumberField)
 
-tests = r"""
-# DEZipCodeField ##
+from utils import LocalFlavorTestCase
 
->>> from django.contrib.localflavor.de.forms import DEZipCodeField
->>> f = DEZipCodeField()
->>> f.clean('99423')
-u'99423'
->>> f.clean(' 99423')
-Traceback (most recent call last):
-...
-ValidationError: [u'Enter a zip code in the format X.']
 
-# DEStateSelect #
+class DELocalFlavorTests(LocalFlavorTestCase):
+def test_DEStateSelect(self):
+f = DEStateSelect()
+out = u'''
+Baden-Wuerttemberg
+Bavaria
+Berlin
+Brandenburg
+Bremen
+Hamburg
+Hessen
+Mecklenburg-Western Pomerania
+Lower Saxony
+North Rhine-Westphalia
+Rhineland-Palatinate
+Saarland
+Saxony
+Saxony-Anhalt
+Schleswig-Holstein
+Thuringia
+'''
+self.assertEqual(f.render('states', 'TH'), out)
 
->>> from django.contrib.localflavor.de.forms import DEStateSelect
->>> w = DEStateSelect()
->>> w.render('states', 'TH')
-u'\nBaden-Wuerttemberg\nBavaria\nBerlin\nBrandenburg\nBremen\nHamburg\nHessen\nMecklenburg-Western Pomerania\nLower 
Saxony\nNorth Rhine-Westphalia\nRhineland-Palatinate\nSaarland\nSaxony\nSaxony-Anhalt\nSchleswig-Holstein\nThuringia\n'
+def test_DEZipCodeField(self):
+error_format = [u'Enter a zip code in the format X.']
+valid = {
+'99423': '99423',
+}
+invalid = {
+' 99423': error_format,
+}
+self.assertFieldOutput(DEZipCodeField, valid, invalid)
 
-# DEIdentityCardNumberField #
-
->>> from django.contrib.localflavor.de.forms import DEIdentityCardNumberField
->>> f = DEIdentityCardNumberField()
->>> f.clean('7549313035D-6004103-0903042-0')
-u'7549313035D-6004103-0903042-0'
->>> f.clean('9786324830D 6104243 0910271 2')
-u'9786324830D-6104243-0910271-2'
->>> f.clean('0434657485D-6407276-0508137-9')
-Traceback (most recent call last):
-...
-ValidationError: [u'Enter a valid German identity card number in 
XXX-XXX-XXX-X format.']
-"""
+def test_DEIdentityCardNumberField(self):
+error_format = [u'Enter a valid German identity card number in 
XXX-XXX-XXX-X format.']
+valid = {
+'7549313035D-6004103-0903042-0': '7549313035D-6004103-0903042-0',
+'9786324830D 6104243 0910271 2': '9786324830D-6104243-0910271-2',
+}
+invalid = {
+'0434657485D-6407276-0508137-9': error_format,
+}
+self.assertFieldOutput(DEIdentityCardNumberField, valid, invalid)

Added: django/trunk/tests/regressiontests/forms/localflavor/utils.py
===
--- django/trunk/tests/regressiontests/forms/localflavor/utils.py   
(rev 0)
+++ django/trunk/tests/regressiontests/forms/localflavor/utils.py   
2010-11-19 19:33:07 UTC (rev 14626)
@@ -0,0 +1,38 @@
+from django.core.exceptions import ValidationError
+from django.core.validators import EMPTY_VALUES
+from django.utils.unittest import TestCase
+
+
+class LocalFlavorTestCase(TestCase):
+def assertFieldOutput(self, fieldclass, valid, invalid):
+"""Asserts that a field behaves correctly with various inputs.
+
+Args:
+fieldclass: the class of the field to be tested.
+valid: a dictionary mapping valid inputs to their expected
+cleaned values.
+invalid: a dictionary mapping invalid inputs to one or more
+raised error messages.
+"""
+
+required = fieldclass()
+optional = fieldclass(required=False)
+# test valid inputs
+for input, output in valid.items():
+self.assertEqual(required.clean(input), ou

Re: [Django] #13007: Django fails to log in when a cookie is set on the same domain containing a colon

2010-11-19 Thread Django
#13007: Django fails to log in when a cookie is set on the same domain 
containing a
colon
+---
  Reporter:  Warlax | Owner:  nobody 
Status:  reopened   | Milestone: 
 Component:  HTTP handling  |   Version:  SVN
Resolution: |  Keywords:  cookies
 Stage:  Unreviewed | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  1  |  
+---
Changes (by Ubercore):

  * has_patch:  0 => 1

Comment:

 Without rolling some kind of cookie pre-processing, Trac's solution seems
 like a decent option until Python provides better hooks for error handling
 on individual keys. I've attached a patch based on
 http://trac.edgewall.org/browser/trunk/trac/web/api.py?rev=3734#L97.

-- 
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] #4617: permission_required decorator behaviour is odd

2010-11-19 Thread Django
#4617: permission_required decorator behaviour is odd
-+--
  Reporter:  cbr...@redback.com  | Owner:  ctrochalakis 
Status:  assigned| Milestone:   
 Component:  Contrib apps|   Version:  SVN  
Resolution:  |  Keywords:  easy-pickings
 Stage:  Accepted| Has_patch:  1
Needs_docs:  1   |   Needs_tests:  0
Needs_better_patch:  1   |  
-+--
Comment (by alex_dev):

 Please consider another approach:

 {{{
 from django.core.exceptions import PermissionDenied

 def permission_required(perm, login_url=None):
 """
 Decorator for views that checks whether a user has a particular
 permission
 enabled, redirecting to the log-in page if necessary.
 """
 def check_perms(user):
 if user.is_anonymous():
 return False
 if user.has_perm(perm):
 return True
 raise PermissionDenied

 return user_passes_test(check_perms, login_url=login_url)
 }}}
 This one doesn't change semantics of 'user_passes_test'. It depends on
 #9847 for handling PermissionDenied exception.

-- 
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] #13007: Django fails to log in when a cookie is set on the same domain containing a colon

2010-11-19 Thread Django
#13007: Django fails to log in when a cookie is set on the same domain 
containing a
colon
+---
  Reporter:  Warlax | Owner:  nobody 
Status:  reopened   | Milestone: 
 Component:  HTTP handling  |   Version:  SVN
Resolution: |  Keywords:  cookies
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  1  |  
+---
Changes (by Ubercore):

  * status:  closed => reopened
  * needs_better_patch:  0 => 1
  * version:  1.1 => SVN
  * resolution:  worksforme =>

Comment:

 I've added a test case to illustrate what I think is going on here. The
 culprit in my case was Glassfish running on the same server. Its admin
 console adds this cookie:

 {{{
 form:tree-hi=;
 }}}

 This breaks cookie parsing, and no cookies appear in the request.
 Including the csrf token. I think the ideal case here is to lose only the
 non-standard cookies, instead of returning a blank dict when a CookieError
 is raised. This is, I think, what Trac has done.



 http://bugs.python.org/issue2193

 http://trac.edgewall.org/ticket/2256

-- 
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] #5768: Allow QuerySet.values() to return values spanning joins (for multi-valued relations)

2010-11-19 Thread Django
#5768: Allow QuerySet.values() to return values spanning joins (for multi-valued
relations)
-+--
  Reporter:  anonymous   | Owner:   
 
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  SVN  
 
Resolution:  |  Keywords:  
values, values_list, one-to-many, many-to-many reverse
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  1   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Comment (by carljm):

 Conclusion from IRC discussion with Russell and mrmachine is that
 combinatorial explosions are already possible in the ORM, and will only
 happen here under certain circumstances of dataset size and fields used in
 combination, so it's acceptable to eliminate the allow_m2m kwarg and just
 allow (any number of) m2ms in values/values_list, with a note in the docs
 about the possible explosion in returned dataset size.

-- 
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] #14512: Documentation & tools for decorating class-based-views.

2010-11-19 Thread Django
#14512: Documentation & tools for decorating class-based-views.
+---
  Reporter:  lrekucki   | Owner:  lrekucki 
Status:  new| Milestone:  1.3  
 Component:  Generic views  |   Version:  SVN  
Resolution: |  Keywords:  class-based-views
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by russellm):

 Hrm... I'm not wild about this implementation. `subclass=False` is a messy
 implementation detail that is hard to explain -- even the provided
 documentation does a Jedi Mind Track "don't do that"

 After some discussions on IRC, it seems like there may not be a clean way
 to handle this. I'm open to suggestions, but if the option is between a
 messy and brittle implementation of class decorators, and a mildly awkward
 but fundamentally predictable method decorator based solution, I'd rather
 go with the latter.

 The docs in this patch are a good starting point for explaining how to do
 decoration in other ways; unless someone can propose a good way to
 implement class decorators, I'll close this ticket in favor of just
 documenting the alternatives.

-- 
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] #14733: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14733: Allow Manager.raw() execute not  only "Pure selects"
---+
  Reporter:  dzentoo   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Comment (by russellm):

 Yeah - a regex should do the job.

-- 
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] #14733: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14733: Allow Manager.raw() execute not  only "Pure selects"
---+
  Reporter:  dzentoo   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Comment (by dzentoo):

 would a regexp suffice ?

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

2010-11-19 Thread noreply
Author: carljm
Date: 2010-11-19 11:30:56 -0600 (Fri, 19 Nov 2010)
New Revision: 14625

Modified:
   django/branches/releases/1.2.X/docs/internals/documentation.txt
Log:
[1.2.X] Bumped documentation-building requirements to Sphinx 1.0.2 and Pygments 
1.1. The use of 'console' highlight in staticfiles docs requires Pygments 1.1.

Backport of r14624 from trunk.

Modified: django/branches/releases/1.2.X/docs/internals/documentation.txt
===
--- django/branches/releases/1.2.X/docs/internals/documentation.txt 
2010-11-19 16:10:23 UTC (rev 14624)
+++ django/branches/releases/1.2.X/docs/internals/documentation.txt 
2010-11-19 17:30:56 UTC (rev 14625)
@@ -15,9 +15,13 @@
 
 .. note::
 
-The Django documentation can be generated with Sphinx version 0.6 or
-newer, but we recommend using Sphinx 1.0.2 or newer.
+Building the Django documentation requires Sphinx 1.0.2 or newer. Sphinx
+also requires the Pygments__ library for syntax highlighting; building the
+Django documentation requires Pygments 1.1 or newer (a new-enough version
+should automatically be installed along with Sphinx).
 
+__ http://pygments.org
+
 Then, building the HTML is easy; just ``make html`` from the ``docs`` 
directory.
 
 To get started contributing, you'll want to read the `reStructuredText

-- 
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] #14733: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14733: Allow Manager.raw() execute not  only "Pure selects"
---+
  Reporter:  dzentoo   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by russellm):

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

Comment:

 Like I said in IRC - the use cases for raw() are fairly strictly limited
 to SELECT clauses; I'd rather see the validation logic improved to catch
 the edge cases, rather than just dropping validation.

-- 
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] #14732: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14732: Allow Manager.raw() execute not  only "Pure selects"
---+
  Reporter:  dzentoo   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:  duplicate |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 Duplicate of #14733

-- 
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] #14733: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14733: Allow Manager.raw() execute not  only "Pure selects"
+---
   Reporter:  dzentoo   |Owner:  nobody
 Status:  new   |Milestone:
  Component:  Database layer (models, ORM)  |  Version:  1.2   
   Keywords:|Stage:  Unreviewed
  Has_patch:  1 |   Needs_docs:  0 
Needs_tests:  0 |   Needs_better_patch:  0 
+---
 Since the raw query validation only matches if the request
 startswith("select") I would like to execute queries like "(SELECT) UNION
 (SELECT)".

-- 
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] #14732: Allow Manager.raw() execute not only "Pure selects"

2010-11-19 Thread Django
#14732: Allow Manager.raw() execute not  only "Pure selects"
+---
   Reporter:  dzentoo   |Owner:  nobody
 Status:  new   |Milestone:
  Component:  Database layer (models, ORM)  |  Version:  1.2   
   Keywords:|Stage:  Unreviewed
  Has_patch:  0 |   Needs_docs:  0 
Needs_tests:  0 |   Needs_better_patch:  0 
+---
 Since the raw query validation only matches if the request
 startswith("select") I would like to execute queries like "(SELECT) UNION
 (SELECT)".

-- 
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] #14506: Crash on HEAD request

2010-11-19 Thread Django
#14506: Crash on HEAD request
+---
  Reporter:  azurit | 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  |  
+---
Comment (by azurit):

 Replying to [comment:3 jezdez]:
 > Looks like request.user is not set. Which means the Auth middleware was
 not successfully run.
 [[BR]]
 Yes, Auth middleware is NOT loaded.

-- 
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] r14624 - django/trunk/docs/internals

2010-11-19 Thread noreply
Author: carljm
Date: 2010-11-19 10:10:23 -0600 (Fri, 19 Nov 2010)
New Revision: 14624

Modified:
   django/trunk/docs/internals/documentation.txt
Log:
Bumped documentation-building requirements to Sphinx 1.0.2 and Pygments 1.1. 
The use of 'console' highlight in staticfiles docs requires Pygments 1.1.

Modified: django/trunk/docs/internals/documentation.txt
===
--- django/trunk/docs/internals/documentation.txt   2010-11-19 15:39:35 UTC 
(rev 14623)
+++ django/trunk/docs/internals/documentation.txt   2010-11-19 16:10:23 UTC 
(rev 14624)
@@ -15,9 +15,13 @@
 
 .. note::
 
-The Django documentation can be generated with Sphinx version 0.6 or
-newer, but we recommend using Sphinx 1.0.2 or newer.
+Building the Django documentation requires Sphinx 1.0.2 or newer. Sphinx
+also requires the Pygments__ library for syntax highlighting; building the
+Django documentation requires Pygments 1.1 or newer (a new-enough version
+should automatically be installed along with Sphinx).
 
+__ http://pygments.org
+
 Then, building the HTML is easy; just ``make html`` from the ``docs`` 
directory.
 
 To get started contributing, you'll want to read the `reStructuredText

-- 
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] #12653: add Meta option when working with multiple databases

2010-11-19 Thread Django
#12653: add Meta option when working with multiple databases
---+
  Reporter:  ccurvey   | Owner:  nobody   
Status:  closed| Milestone:   
 Component:  Database layer (models, ORM)  |   Version:  1.2-alpha
Resolution:  wontfix   |  Keywords:   
 Stage:  Unreviewed| Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Comment (by ccurvey):

 I agree.   The "database router" solution is a FAR better solution.  Glad
 to have been wrong on this one!

-- 
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] #3544: Fix {% include %} to allow recursive includes

2010-11-19 Thread Django
#3544: Fix {% include %} to allow recursive includes
+---
  Reporter:  David Danier   | 
Owner:  nobody   
Status:  new| 
Milestone:   
 Component:  Template system|   
Version:  SVN  
Resolution: |  
Keywords:  tplrf-patched
 Stage:  Accepted   | 
Has_patch:  0
Needs_docs:  1  |   
Needs_tests:  1
Needs_better_patch:  1  |  
+---
Comment (by lrekucki):

 Replying to [comment:20 David Danier ]:
 > The current implementation does it right I think, it loads the template
 on compile time to check for syntax errors. This should definately stay,
 as this is a cool feature.
 >
 > So what needs to be changes is, that {% include %} needs to hase some
 kind of registry which templates alreads were loaded and not to reload
 them. Meaning {% include "some/file.html" %} loads the template and fires
 up the parser. Every folowing {% include "some/file.html" %} should not do
 that, regardless of this happens as a recursive call or not. This could
 even improve performance in non-recursive use cases.

 Isn't that what "django.template.loaders.cached.Loader" does ?

-- 
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] #9213: PasswordResetForm should not reset passwords for inactive users

2010-11-19 Thread Django
#9213: PasswordResetForm should not reset passwords for inactive users
---+
  Reporter:  john_scott| Owner:  anonymous
Status:  assigned  | Milestone:  1.3  
 Component:  Contrib apps  |   Version:  1.3-alpha
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * 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] #8162: Changes to Permissions model

2010-11-19 Thread Django
#8162: Changes to Permissions model
-+--
  Reporter:  juliae  | Owner:  nobody
Status:  new | Milestone:  1.3   
 Component:  Authentication  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Someday/Maybe   | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by anonymous):

  * 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] #1199: Supporting more than one argument in a custom filter

2010-11-19 Thread Django
#1199: Supporting more than one argument in a custom filter
+---
  Reporter:  Aggelos Orfanakos  | Owner:  insin
Status:  assigned   | Milestone:   
 Component:  Template system|   Version:   
Resolution: |  Keywords:   
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  1  |   Needs_tests:  1
Needs_better_patch:  0  |  
+---
Changes (by chrischambers):

 * cc: chrischambers (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.



[Changeset] r14623 - in django/trunk: django/conf django/core/cache django/core/cache/backends docs/ref docs/releases docs/topics tests/regressiontests/cache

2010-11-19 Thread noreply
Author: russellm
Date: 2010-11-19 09:39:35 -0600 (Fri, 19 Nov 2010)
New Revision: 14623

Modified:
   django/trunk/django/conf/global_settings.py
   django/trunk/django/core/cache/__init__.py
   django/trunk/django/core/cache/backends/base.py
   django/trunk/django/core/cache/backends/db.py
   django/trunk/django/core/cache/backends/dummy.py
   django/trunk/django/core/cache/backends/filebased.py
   django/trunk/django/core/cache/backends/locmem.py
   django/trunk/django/core/cache/backends/memcached.py
   django/trunk/docs/ref/settings.txt
   django/trunk/docs/releases/1.3.txt
   django/trunk/docs/topics/cache.txt
   django/trunk/tests/regressiontests/cache/tests.py
Log:
Fixed #13795 -- Added a site-wide cache prefix and cache versioning. Thanks to 
bruth for the patch.

Modified: django/trunk/django/conf/global_settings.py
===
--- django/trunk/django/conf/global_settings.py 2010-11-19 14:57:50 UTC (rev 
14622)
+++ django/trunk/django/conf/global_settings.py 2010-11-19 15:39:35 UTC (rev 
14623)
@@ -433,6 +433,9 @@
 # The cache backend to use.  See the docstring in django.core.cache for the
 # possible values.
 CACHE_BACKEND = 'locmem://'
+CACHE_VERSION = 1
+CACHE_KEY_PREFIX = ''
+CACHE_KEY_FUNCTION = None
 CACHE_MIDDLEWARE_KEY_PREFIX = ''
 CACHE_MIDDLEWARE_SECONDS = 600
 

Modified: django/trunk/django/core/cache/__init__.py
===
--- django/trunk/django/core/cache/__init__.py  2010-11-19 14:57:50 UTC (rev 
14622)
+++ django/trunk/django/core/cache/__init__.py  2010-11-19 15:39:35 UTC (rev 
14623)
@@ -67,18 +67,30 @@
 
 return scheme, host, params
 
-def get_cache(backend_uri):
+def get_cache(backend_uri, key_prefix=None, version=None, key_func=None):
+if key_prefix is None:
+key_prefix = settings.CACHE_KEY_PREFIX
+if version is None:
+version = settings.CACHE_VERSION
+if key_func is None:
+key_func = settings.CACHE_KEY_FUNCTION
+
+if key_func is not None and not callable(key_func):
+key_func_module_path, key_func_name = key_func.rsplit('.', 1)
+key_func_module = importlib.import_module(key_func_module_path)
+key_func = getattr(key_func_module, key_func_name)
+
 scheme, host, params = parse_backend_uri(backend_uri)
 if scheme in BACKENDS:
 name = 'django.core.cache.backends.%s' % BACKENDS[scheme]
 else:
 name = scheme
 module = importlib.import_module(name)
-return module.CacheClass(host, params)
+return module.CacheClass(host, params, key_prefix=key_prefix, 
version=version, key_func=key_func)
 
 cache = get_cache(settings.CACHE_BACKEND)
 
-# Some caches -- pythont-memcached in particular -- need to do a cleanup at the
+# Some caches -- python-memcached in particular -- need to do a cleanup at the
 # end of a request cycle. If the cache provides a close() method, wire it up
 # here.
 if hasattr(cache, 'close'):

Modified: django/trunk/django/core/cache/backends/base.py
===
--- django/trunk/django/core/cache/backends/base.py 2010-11-19 14:57:50 UTC 
(rev 14622)
+++ django/trunk/django/core/cache/backends/base.py 2010-11-19 15:39:35 UTC 
(rev 14623)
@@ -3,6 +3,7 @@
 import warnings
 
 from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning
+from django.utils.encoding import smart_str
 
 class InvalidCacheBackendError(ImproperlyConfigured):
 pass
@@ -13,8 +14,17 @@
 # Memcached does not accept keys longer than this.
 MEMCACHE_MAX_KEY_LENGTH = 250
 
+def default_key_func(key, key_prefix, version):
+"""Default function to generate keys.
+
+Constructs the key used by all other methods. By default it prepends
+the `key_prefix'. CACHE_KEY_FUNCTION can be used to specify an alternate
+function with custom key making behavior.
+"""
+return ':'.join([key_prefix, str(version), smart_str(key)])
+
 class BaseCache(object):
-def __init__(self, params):
+def __init__(self, params, key_prefix='', version=1, key_func=None):
 timeout = params.get('timeout', 300)
 try:
 timeout = int(timeout)
@@ -34,8 +44,26 @@
 except (ValueError, TypeError):
 self._cull_frequency = 3
 
-def add(self, key, value, timeout=None):
+self.key_prefix = smart_str(key_prefix)
+self.version = version
+self.key_func = key_func or default_key_func
+
+def make_key(self, key, version=None):
+"""Constructs the key used by all other methods. By default it
+uses the key_func to generate a key (which, by default,
+prepends the `key_prefix' and 'version'). An different key
+function can be provided at the time of cache construction;
+alternatively, you can subclass the cache backend to provide
+custom key making behavior.
 """
+if version is None:
+  

Re: [Django] #3544: Fix {% include %} to allow recursive includes

2010-11-19 Thread Django
#3544: Fix {% include %} to allow recursive includes
+---
  Reporter:  David Danier   | 
Owner:  nobody   
Status:  new| 
Milestone:   
 Component:  Template system|   
Version:  SVN  
Resolution: |  
Keywords:  tplrf-patched
 Stage:  Accepted   | 
Has_patch:  0
Needs_docs:  1  |   
Needs_tests:  1
Needs_better_patch:  1  |  
+---
Comment (by David Danier ):

 The current implementation does it right I think, it loads the template on
 compile time to check for syntax errors. This should definately stay, as
 this is a cool feature.

 So what needs to be changes is, that {% include %} needs to hase some kind
 of registry which templates alreads were loaded and not to reload them.
 Meaning {% include "some/file.html" %} loads the template and fires up the
 parser. Every folowing {% include "some/file.html" %} should not do that,
 regardless of this happens as a recursive call or not. This could even
 improve performance in non-recursive use cases.

-- 
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] #3544: Fix {% include %} to allow recursive includes

2010-11-19 Thread Django
#3544: Fix {% include %} to allow recursive includes
+---
  Reporter:  David Danier   | 
Owner:  nobody   
Status:  new| 
Milestone:   
 Component:  Template system|   
Version:  SVN  
Resolution: |  
Keywords:  tplrf-patched
 Stage:  Accepted   | 
Has_patch:  0
Needs_docs:  1  |   
Needs_tests:  1
Needs_better_patch:  1  |  
+---
Comment (by alex_dev):

 to David Danier:

 just let you know: you can implement recursion by means of django template
 tags.
 Here is example of my [https://github.com/alex-dev/django-repeat-tag
 implementation].

 P.S.:
 I think the idea of 'include' tag to allow recursive load is bad: it can
 outcome in unobvious errors.

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

2010-11-19 Thread noreply
Author: carljm
Date: 2010-11-19 08:57:50 -0600 (Fri, 19 Nov 2010)
New Revision: 14622

Modified:
   django/branches/releases/1.2.X/docs/intro/tutorial01.txt
Log:
[1.2.X] Fixed #14728 -- Broadened warning about django-admin.py missing .py 
suffix to include more than just Ubuntu, since at least Fedora also does this. 
Thanks to giallu for the report.

Backport of r14621 from trunk.

Modified: django/branches/releases/1.2.X/docs/intro/tutorial01.txt
===
--- django/branches/releases/1.2.X/docs/intro/tutorial01.txt2010-11-19 
14:26:01 UTC (rev 14621)
+++ django/branches/releases/1.2.X/docs/intro/tutorial01.txt2010-11-19 
14:57:50 UTC (rev 14622)
@@ -39,11 +39,12 @@
 code, then run the command ``django-admin.py startproject mysite``. This will
 create a ``mysite`` directory in your current directory.
 
-.. admonition:: Script name differs on Ubuntu
+.. admonition:: Script name may differ in distribution packages
 
-   If you installed Django using the Ubuntu package manager (e.g. apt-get)
-   ``django-admin.py`` has been renamed to ``django-admin``. You may continue
-   through this documentation by omitting ``.py`` from each command.
+   If you installed Django using a Linux distribution's package manager
+   (e.g. apt-get or yum) ``django-admin.py`` may have been renamed to
+   ``django-admin``. You may continue through this documentation by omitting
+   ``.py`` from each command.
 
 .. admonition:: Mac OS X permissions
 

-- 
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] #14721: USE_THOUSAND_SEPARATOR fails with UnicodeDecodeError in several locales

2010-11-19 Thread Django
#14721: USE_THOUSAND_SEPARATOR fails with UnicodeDecodeError in several locales
---+
  Reporter:  intgr | Owner:  jezdez
Status:  new   | Milestone:  1.3   
 Component:  Internationalization  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Comment (by claudep):

 I don't like Unicode sequences exposed to users. I'm adding a second
 version of the patch with comments instead.

-- 
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] #3544: Fix {% include %} to allow recursive includes

2010-11-19 Thread Django
#3544: Fix {% include %} to allow recursive includes
+---
  Reporter:  David Danier   | 
Owner:  nobody   
Status:  new| 
Milestone:   
 Component:  Template system|   
Version:  SVN  
Resolution: |  
Keywords:  tplrf-patched
 Stage:  Accepted   | 
Has_patch:  0
Needs_docs:  1  |   
Needs_tests:  1
Needs_better_patch:  1  |  
+---
Comment (by twoolie):

 this should definitely be revisited. recursive includes are still sorely
 needed without with hacks.

 p.s. i would LOVE include tags to get the new with notation patch. This is
 a seriously good thing, especially because almost every time you do an
 include, you probably need a with anyway.

-- 
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] r14621 - django/trunk/docs/intro

2010-11-19 Thread noreply
Author: carljm
Date: 2010-11-19 08:26:01 -0600 (Fri, 19 Nov 2010)
New Revision: 14621

Modified:
   django/trunk/docs/intro/tutorial01.txt
Log:
Fixed #14728 -- Broadened warning about django-admin.py missing .py suffix to 
include more than just Ubuntu, since at least Fedora also does this. Thanks to 
giallu for the report.

Modified: django/trunk/docs/intro/tutorial01.txt
===
--- django/trunk/docs/intro/tutorial01.txt  2010-11-19 08:15:40 UTC (rev 
14620)
+++ django/trunk/docs/intro/tutorial01.txt  2010-11-19 14:26:01 UTC (rev 
14621)
@@ -39,11 +39,12 @@
 code, then run the command ``django-admin.py startproject mysite``. This will
 create a ``mysite`` directory in your current directory.
 
-.. admonition:: Script name differs on Ubuntu
+.. admonition:: Script name may differ in distribution packages
 
-   If you installed Django using the Ubuntu package manager (e.g. apt-get)
-   ``django-admin.py`` has been renamed to ``django-admin``. You may continue
-   through this documentation by omitting ``.py`` from each command.
+   If you installed Django using a Linux distribution's package manager
+   (e.g. apt-get or yum) ``django-admin.py`` may have been renamed to
+   ``django-admin``. You may continue through this documentation by omitting
+   ``.py`` from each command.
 
 .. admonition:: Mac OS X permissions
 

-- 
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] #5768: Allow QuerySet.values() to return values spanning joins (for multi-valued relations)

2010-11-19 Thread Django
#5768: Allow QuerySet.values() to return values spanning joins (for multi-valued
relations)
-+--
  Reporter:  anonymous   | Owner:   
 
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  SVN  
 
Resolution:  |  Keywords:  
values, values_list, one-to-many, many-to-many reverse
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  1   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Comment (by carljm):

 This looks pretty good to me, though I'm not entirely sold on allowing for
 combinatorial explosions.

 It seems to me that if we implement Malcolm's suggestion of limiting it to
 a single m2m relation per query, we could probably remove the new
 allow_m2m keyword arg altogether; it's not backwards-incompatible to have
 some additional fieldnames work that didn't before. Without the limit, I
 think the allow_m2m arg is necessary, just to force people to look at the
 docs and see the giant red warning that "you might be in for a
 combinatorial explosion if you use this."

 I'd like to hear from some others on this point -- could you bring it up
 on the -developers mailing list?

 Re the patch: the copy-pasted extra-kwargs TypeError in .values() still
 says "values_list" in its text. Also, there are already several tests for
 forward relations in .values(): some incidental, the one specifically
 testing it is in modeltests/many_to_one. However, I'm still not opposed to
 adding tests for that here; it seems best if test_values() actually tests
 the full range of .values() functionality.

-- 
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] #6669: @transaction.commit_on_success does not rollback when it should

2010-11-19 Thread Django
#6669: @transaction.commit_on_success does not rollback when it should
---+
  Reporter:  ja...@10gic.net   | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  
transaction, commit
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

 * cc: shai (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] #6669: @transaction.commit_on_success does not rollback when it should

2010-11-19 Thread Django
#6669: @transaction.commit_on_success does not rollback when it should
---+
  Reporter:  ja...@10gic.net   | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  
transaction, commit
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

 Replying to [comment:2 myself]:
 > Could this be related to #9964 ?

 It seems so; the patch which I uploaded there seems to fix this one too.
 If the patch is accepted, it may be adivsable to add to
 `tests/regression_tests/transaction_regress/tests.py` (a file created in
 that patch) the following lines:
 {{{
 def test_6669(self):

 from django.contrib.auth.models import User

 @transaction.commit_on_success
 def create_system_user():
 user = User.objects.create_user(username='system',
 password='iamr00t', email='r...@sitename.com')
 Mod.objects.create(fld=user.id)

 try:
 create_system_user()
 except:
 pass

 try:
 create_system_user()
 except:
 pass

 print User.objects.all()
 }}}

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

2010-11-19 Thread Django
#14731: [Patch] Change 14413 breaks old fixtures with permissions
+---
 Reporter:  chipx86 |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Authentication  | Version:  1.3-alpha 
 Keywords:  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 Changeset 14413 introduced a regression with fixtures containing
 permissions. Any old fixtures that contain data for permissions on an
 object (such as a User) will fail on any unit test using them, or during a
 loaddata.

 The cause appears to be that when creating the permissions in
 {{{contrib/auth/management/__init__.py:create_permissions}}}, the ordering
 used before this change is no longer maintained, and as such the IDs of
 the permissions no longer match up. When a fixture attempts to install the
 permission, it will attempt to use a new ID that doesn't match what Django
 is now creating.

 Updating the fixtures to use the new IDs results in regressions on older
 versions of Django for the same reason. This makes maintaining installable
 software that attempts to provide compatibility between Django versions a
 very difficult task.

 I understand that the new logic is intended to speed up the test suite,
 but it's a fairly major regression.

 To reproduce this, simply create a new site using an older Django revision
 (say, 14412), run syncdb, create the admin user, and then dumpdata to a
 fixture. Create a dummy unit test that loads the fixture. Run it and it
 will succeed. Upgrade to revision 14413 or newer and re-run the unit test.
 It will fail.

 On sqlite, the error message is:

 {{{
 Problem installing fixture '/home/chipx86/temp/django-breakage-
 test/fixturetest/../fixturetest/myapp/fixtures/test_users.json': Traceback
 (most recent call last):
   File "/usr/local/lib/python2.6/dist-
 packages/django/core/management/commands/loaddata.py", line 174, in handle
 obj.save(using=using)
   File "/usr/local/lib/python2.6/dist-
 packages/django/core/serializers/base.py", line 165, in save
 models.Model.save_base(self.object, using=using, raw=True)
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py",
 line 518, in save_base
 rows = manager.using(using).filter(pk=pk_val)._update(values)
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 490, in _update
 return query.get_compiler(self.db).execute_sql(None)
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/compiler.py", line 864, in execute_sql
 cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/compiler.py", line 730, in execute_sql
 cursor.execute(sql, params)
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/backends/sqlite3/base.py", line 221, in execute
 return Database.Cursor.execute(self, query, params)
 IntegrityError: columns content_type_id, codename are not unique
 }}}

 The ordering appears to be incorrect due to the use of a {{{set()}}} for
 {{{searched_perms}}}. Switching to using a list for this solves the
 problem.

 Providing a patch for 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.



[Django] #14730: Translation Mistake. MN

2010-11-19 Thread Django
#14730: Translation Mistake. MN
--+-
 Reporter:  ankhbayar |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Internationalization  | Version:  1.2   
 Keywords:  MN|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Translation Mistake. Forgot close  tag.


 
http://code.djangoproject.com/browser/django/trunk/django/conf/locale/mn/LC_MESSAGES/django.po#L1357

-- 
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] #14038: 1.2 Release notes don't mention new template loader classes

2010-11-19 Thread Django
#14038: 1.2 Release notes don't mention new template loader classes
+---
  Reporter:  3point2| Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  1  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by lukeplant):

 Updating the docs/releases/1.2.txt release notes on trunk and on the 1.2.X
 branch would be the best idea. Although it obviously won't help people
 reading the 1.2 docs from an existing tarball, it will help people using
 the docs online and those reading the docs with the next 1.2.X release.

-- 
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] #25: Filtering interface on ForeignKey boxes

2010-11-19 Thread Django
#25: Filtering interface on ForeignKey  boxes
---+
  Reporter:  adrian| Owner:  cpharmston
Status:  assigned  | Milestone:  1.3   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:  feature   
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Comment (by lukeplant):

 Another thing - I personally would drop the 'Available' header - that
 makes sense for the m2m selects where you have 'Available' and 'Selected',
 but here it just seems to add vertical space.

-- 
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] #25: Filtering interface on ForeignKey boxes

2010-11-19 Thread Django
#25: Filtering interface on ForeignKey  boxes
---+
  Reporter:  adrian| Owner:  cpharmston
Status:  assigned  | Milestone:  1.3   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:  feature   
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by lukeplant):

  * needs_better_patch:  0 => 1

Comment:

 Victor:

 It won't hit in it's current state. The patch needs a fair amount of
 cleaning up:

  * it doesn't apply to trunk (tests have recently been migrated to
 unittests)
  * it hard codes a path to '/media'
  * documentation needs to be wrapped to 80 chars

 Plus we definitely need some more info about compatibility with different
 browsers - what versions of Firefox, Internet Explorer, Safari, Chrome and
 Opera does it work on? From the look of the patch, and having implemented
 similar things before, the use of jQuery should prevent a lot of problems,
 but it is very easy for this kind of thing to break in some browsers, or
 be unusable slow etc.

 cpharmston: I'm not sure what kind of thumbs up you are looking for. Since
 the ticket already exists, it will be easiest just to keep an updated
 ticket here. Once it is ready, any committer will then be able to commit.

-- 
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] #14729: RawQuerySet.__repr__ fails when params passed as list

2010-11-19 Thread Django
#14729: RawQuerySet.__repr__ fails when params passed as list
--+-
 Reporter:  intgr |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Django 1.2.3. The documentation suggests passing arguments to a
 Model.objects.raw() query as a list:
 http://docs.djangoproject.com/en/dev/topics/db/sql/#passing-parameters-
 into-raw

 However, this breaks RawQuerySet.__repr__

 {{{
 In [1]: from django.contrib.auth import models

 In [2]: r=models.User.objects.raw('select * from auth_user where id=%s',
 10)

 In [3]: repr(r)
 Out[3]: ""

 In [4]: r=models.User.objects.raw('select * from auth_user where id=%s and
 id=%s', (10, 10))

 In [5]: repr(r)
 Out[5]: ""

 In [6]: r=models.User.objects.raw('select * from auth_user where id=%s and
 id=%s', [10, 10])

 In [7]: repr(r)
 ---
 TypeError Traceback (most recent call
 last)

 /tmp/foo/ in ()

 /usr/lib/pymodules/python2.6/django/db/models/query.pyc in __repr__(self)
1374
1375 def __repr__(self):
 -> 1376 return "" % (self.raw_query %
 self.params)
1377
1378 def __getitem__(self, k):

 TypeError: not enough arguments for format string
 }}}

-- 
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] #14728: More generic text about missing .py extension on commands

2010-11-19 Thread Django
#14728: More generic text about missing .py extension on commands
---+
 Reporter:  giallu |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I noticed the text

 {{{
 Script name differs on Ubuntu

 If you installed Django using the Ubuntu package manager (e.g. apt-get)
 django-admin.py has been
 renamed to django-admin. You may continue through this documentation by
 omitting .py from each command.
 }}}


 can be more general as it also applies to Fedora (which I'm using now) and
 probably other distros.

 I'd suggest generalizing the text like:


 {{{
 Script name differs in distro packages

 If you installed Django using the from your package manager (apt-get for
 Ubuntu/Debian, yum for Fedora, etc.)
 django-admin.py has been renamed to django-admin. You may continue through
 this documentation by omitting .py from each command.
 }}}

-- 
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] #14721: USE_THOUSAND_SEPARATOR fails with UnicodeDecodeError in several locales

2010-11-19 Thread Django
#14721: USE_THOUSAND_SEPARATOR fails with UnicodeDecodeError in several locales
---+
  Reporter:  intgr | Owner:  jezdez
Status:  new   | Milestone:  1.3   
 Component:  Internationalization  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Comment (by intgr):

 I'd suggest using something like `u'\u00a0'`, that way it's clear that
 it's not just a regular space, but a Unicode character.

-- 
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] #5768: Allow QuerySet.values() to return values spanning joins (for multi-valued relations)

2010-11-19 Thread Django
#5768: Allow QuerySet.values() to return values spanning joins (for multi-valued
relations)
-+--
  Reporter:  anonymous   | Owner:   
 
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  SVN  
 
Resolution:  |  Keywords:  
values, values_list, one-to-many, many-to-many reverse
 Stage:  Accepted| Has_patch:  1
 
Needs_docs:  1   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Changes (by mrmachine):

  * keywords:  => values, values_list, one-to-many, many-to-many reverse
  * needs_docs:  0 => 1
  * version:  0.96 => SVN

Comment:

 The patch I've just uploaded doesn't add any new functionality, but simply
 exposes the existing functionality with an `allow_m2m` argument on
 `values()` and `values_list()`. It should be completely backwards
 compatible, and I've added tests for forward relations (many-to-one) which
 were already possibly (but missing tests, unless I just couldn't find
 them) as well as reverse relations (one-to-many and many-to-many).

 I ran the entire test suite with `allow_m2m=True` by default without any
 breakage, but I've left it as `allow_m2m=False` by default in the patch
 just to make sure that users aren't accidentally surprised when their call
 to `values()` returns more results than there are in the original queryset
 due to the reverse relations, by requiring users to actively specify that
 they want to lookup values on these relations.

 I still need to add docs to the patch, but would like to hear feedback
 before I do so about any concerns that anyone may have with the
 implementation.

-- 
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] r14620 - in django/branches/releases/1.2.X: django/db/backends tests

2010-11-19 Thread noreply
Author: Alex
Date: 2010-11-19 02:15:40 -0600 (Fri, 19 Nov 2010)
New Revision: 14620

Modified:
   django/branches/releases/1.2.X/django/db/backends/__init__.py
   django/branches/releases/1.2.X/tests/test_sqlite.py
Log:
[1.2.X] Corrected the way databases were compared.  This allows running the 
test suite with two in memory SQLite databases. Backport of [14619].

Modified: django/branches/releases/1.2.X/django/db/backends/__init__.py
===
--- django/branches/releases/1.2.X/django/db/backends/__init__.py   
2010-11-19 08:08:08 UTC (rev 14619)
+++ django/branches/releases/1.2.X/django/db/backends/__init__.py   
2010-11-19 08:15:40 UTC (rev 14620)
@@ -22,7 +22,7 @@
 self.alias = alias
 
 def __eq__(self, other):
-return self.settings_dict == other.settings_dict
+return self.alias == other.alias
 
 def __ne__(self, other):
 return not self == other

Modified: django/branches/releases/1.2.X/tests/test_sqlite.py
===
--- django/branches/releases/1.2.X/tests/test_sqlite.py 2010-11-19 08:08:08 UTC 
(rev 14619)
+++ django/branches/releases/1.2.X/tests/test_sqlite.py 2010-11-19 08:15:40 UTC 
(rev 14620)
@@ -18,6 +18,5 @@
 },
 'other': {
 'ENGINE': 'django.db.backends.sqlite3',
-'TEST_NAME': 'other_db'
 }
 }

-- 
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] r14619 - in django/trunk: django/db/backends docs/internals tests

2010-11-19 Thread noreply
Author: Alex
Date: 2010-11-19 02:08:08 -0600 (Fri, 19 Nov 2010)
New Revision: 14619

Modified:
   django/trunk/django/db/backends/__init__.py
   django/trunk/docs/internals/contributing.txt
   django/trunk/tests/test_sqlite.py
Log:
Corrected the way databases were compared.  This allows running the test suite 
with two in memory SQLite databases.

Modified: django/trunk/django/db/backends/__init__.py
===
--- django/trunk/django/db/backends/__init__.py 2010-11-19 03:42:20 UTC (rev 
14618)
+++ django/trunk/django/db/backends/__init__.py 2010-11-19 08:08:08 UTC (rev 
14619)
@@ -24,7 +24,7 @@
 self.use_debug_cursor = None
 
 def __eq__(self, other):
-return self.settings_dict == other.settings_dict
+return self.alias == other.alias
 
 def __ne__(self, other):
 return not self == other

Modified: django/trunk/docs/internals/contributing.txt
===
--- django/trunk/docs/internals/contributing.txt2010-11-19 03:42:20 UTC 
(rev 14618)
+++ django/trunk/docs/internals/contributing.txt2010-11-19 08:08:08 UTC 
(rev 14619)
@@ -827,29 +827,29 @@
   have a reversion policy doesn't relax your responsibility to aim for
   the highest quality possible. Really: double-check your work before
   you commit it in the first place!
-  
+
 * If possible, have the original author revert his/her own commit.
-  
+
 * Don't revert another author's changes without permission from the
   original author.
-  
+
 * If the original author can't be reached (within a reasonable amount
   of time -- a day or so) and the problem is severe -- crashing bug,
   major test failures, etc -- then ask for objections on django-dev
   then revert if there are none.
-  
+
 * If the problem is small (a feature commit after feature freeze,
   say), wait it out.
-  
+
 * If there's a disagreement between the committer and the
   reverter-to-be then try to work it out on the `django-developers`_
   mailing list. If an agreement can't be reached then it should
   be put to a vote.
-  
+
 * If the commit introduced a confirmed, disclosed security
   vulnerability then the commit may be reverted immediately without
   permission from anyone.
-
+
 * The release branch maintainer may back out commits to the release
   branch without permission if the commit breaks the release branch.
 
@@ -892,29 +892,13 @@
   want. It doesn't need to use the same backend as the ``default``
   database (although it can use the same backend if you want to).
 
-If you're using the SQLite database backend, you need to define
-:setting:`ENGINE` for both databases, plus a
-:setting:`TEST_NAME` for the ``other`` database. The
-following is a minimal settings file that can be used to test SQLite::
+As a convenience, a minimal settings file, using two in memory SQLite
+databases, is included in your Django distribution. It is called
+``test_sqlite``, and is included in the ``tests`` directory. This allows you to
+get started running the tests against the sqlite database without doing
+anything on your filesystem. However it should be noted that running against
+other database backends is recommended for certain types of test cases.
 
-DATABASES = {
-'default': {
-'ENGINE': 'django.db.backends.sqlite3'
-},
-'other': {
-'ENGINE': 'django.db.backends.sqlite3',
-'TEST_NAME': 'other_db'
-}
-}
-
-As a convenience, this settings file is included in your Django
-distribution. It is called ``test_sqlite``, and is included in
-the ``tests`` directory. This allows you to get started running
-the tests against the sqlite database without doing anything on
-your filesystem. However it should be noted that running against
-other database backends is recommended for certain types of test
-cases.
-
 To run the tests with this included settings file, ``cd``
 to the ``tests/`` directory and type:
 
@@ -1230,9 +1214,9 @@
 if:
 
 * There are three "+1" votes from members of the core team.
-
+
 * There is no "-1" vote from any member of the core team.
-
+
 * The BDFLs haven't stepped in and executed their positive or negative
   veto.
 
@@ -1259,7 +1243,7 @@
 codebase, a solid track record of being polite and helpful on the
 mailing lists, and a proven desire to dedicate serious time to Django's
 development. The bar is high for full commit access.
-
+
 Partial committers
 These are people who are "domain experts." They have direct check-in access
 to the subsystems that fall under their jurisdiction, and they're given a

Modified: django/trunk/tests/test_sqlite.py
===
--- django/trunk/tests/test_sqlite.py   2010-11-19 03:42:20