Re: [Django] #15745: Description of DEBUG setting in email is misleading if DEBUG == False.

2011-04-02 Thread Django
#15745: Description of DEBUG setting in email is misleading if DEBUG == False.
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type:  Bug|   Status:  closed
  Milestone: |Component:  User Experience
Version:  1.3| Severity:  Normal
 Resolution:  needsinfo  | Keywords:  debug, mail, errors,
   Triage Stage: |  docstrings
  Unreviewed |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-

Comment (by jMyles):

 Yep - you're right.  I was still using 1.3 Beta 1 in that env.  My bad!

 In any case, I still like the idea of delivering an email to those listed
 as ADMIN.  Even though it's true that knowing the full set of effects of
 DEBUG is indeed a reasonable expectation, which you point out, I also
 think that in reality some people find themselves in that tuple without
 being as familiar with django as we'd hope.  If they are talented admins
 who come from another framework, this is exactly the kind of message that
 will help them in their transition.  I think it's worth keeping.

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

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



Re: [Django] #15745: Description of DEBUG setting in email is misleading if DEBUG == False.

2011-04-02 Thread Django
#15745: Description of DEBUG setting in email is misleading if DEBUG == False.
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type:  Bug|   Status:  closed
  Milestone: |Component:  User Experience
Version:  1.3| Severity:  Normal
 Resolution:  needsinfo  | Keywords:  debug, mail, errors,
   Triage Stage: |  docstrings
  Unreviewed |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by anonymous):

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


Comment:

 I'm confused. The problem with the email containing that incorrect "you're
 seeing this because" note was reported in #15597 and fixed in r15802. The
 attached patch shows that the the fix is in the version of the source you
 are using -- that block is bracketed by an `{% if not is_email %}/{% endif
 %}` (as are other portions of the template -- what gets sent in html email
 is not, in fact, exactly what would be sent to the browser). I tested the
 change then and again now, and when I receive HTML email from 1.3 it does
 NOT include the "You're seeing this because" paragraph. Are you really
 seeing this paragraph in HTML email with 1.3? Do you also get the other
 bits bracketed by `{% if not is_email %}` in your error emails?

 (Also since r15850 html email is not the default it has to be explictly
 configured...I also checked the non-HTML email and it does not contain
 anything like that paragraph either.)

 I don't believe it is necessary to say something else about why you are
 receiving this email. Anyone listed as an ADMIN in the settings file ought
 to already know why they are receiving this email.

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

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



Re: [Django] #13733: New Zealand localflavor

2011-04-02 Thread Django
#13733: New Zealand localflavor
---+---
   Reporter:  schinckel|Owner:  nobody
   Type:  New feature  |   Status:  new
  Milestone:   |Component:  contrib.localflavor
Version:   | Severity:  Normal
 Resolution:   | Keywords:
   Triage Stage:  Accepted |Has patch:  1
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  1|
---+---
Changes (by julien):

 * type:   => New feature
 * severity:   => Normal


Comment:

 Tests also need to be updated to use unittest.

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

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



Re: [Django] #15745: Description of DEBUG setting in email is misleading if DEBUG == False.

2011-04-02 Thread Django
#15745: Description of DEBUG setting in email is misleading if DEBUG == False.
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type:  Bug|   Status:  new
  Milestone: |Component:  User Experience
Version:  1.3| Severity:  Normal
 Resolution: | Keywords:  debug, mail, errors,
   Triage Stage: |  docstrings
  Unreviewed |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by jMyles):

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



Re: [Django] #11391: Legacy Database "%" escaping not documented

2011-04-02 Thread Django
#11391: Legacy Database "%" escaping not documented
-+-
   Reporter:  Greg   |Owner:  nobody
   Type:  Bug|   Status:  new
  Milestone: |Component:  Core (Management
Version:  1.0|  commands)
 Resolution: | Severity:  Normal
   Triage Stage:  Accepted   | Keywords:  legacy, models.py
Needs documentation:  0  |Has patch:  0
Patch needs improvement:  0  |  Needs tests:  0
-+-

Comment (by julien):

 See some other issues relating to the use of the `%` character and
 escaping: #3485, #6343, #12268, #13648. Perhaps some of these could be
 tackled at the same time.

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

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



Re: [Django] #12268: [PATCH] can't do %s on extra select

2011-04-02 Thread Django
#12268: [PATCH] can't do %s on extra select
-+-
   Reporter:  manuel@…   |Owner:  nobody
   Type:  Bug|   Status:  new
  Milestone: |Component:  Database layer
Version:  1.1|  (models, ORM)
 Resolution: | Severity:  Normal
   Triage Stage:  Accepted   | Keywords:  select extra escape
Needs documentation:  1  |Has patch:  1
Patch needs improvement:  0  |  Needs tests:  1
-+-

Comment (by julien):

 See some other issues relating to the use of the `%` character and
 escaping: #3485, #6343, #11391, #13648. Perhaps some of these could be
 tackled at the same time.

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

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



Re: [Django] #6343: % symbols not escaped in db_column column names when preparing queries

2011-04-02 Thread Django
#6343: % symbols not escaped in db_column column names when preparing queries
-+-
   Reporter:  Daniel |Owner:  nobody
  Pope|   Status:  new
   Type:  Bug|Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Design |Has patch:  1
  decision needed|  Needs tests:  1
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by julien):

 See some other issues relating to the use of the `%` character and
 escaping: #3485, #12268, #11391, #13648. Perhaps some of these could be
 tackled at the same time.

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

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



[Django] #15745: Description of DEBUG setting in email is misleading if DEBUG == False.

2011-04-02 Thread Django
#15745: Description of DEBUG setting in email is misleading if DEBUG == False.
-+-
 Reporter:  jMyles   | Owner:  nobody
 Type:  Bug  |Status:  new
Milestone:   | Component:  User
  Version:  1.3  |  Experience
 Keywords:  debug, mail, errors, docstrings  |  Severity:  Normal
Has patch:  1|  Triage Stage:  Unreviewed
-+-
 If DEBUG == False, Django sends emails to those listed in the ADMIN
 setting with the exact text of the debug message.

 At the bottom of this message is the following:

 "You're seeing this error because you have DEBUG = True in your Django
 settings file. Change that to False, and Django will display a standard
 500 page."

 In the case that the message is displayed in an email, this content is
 misleading.  Of course in order for the email to have been sent, we know
 that the user has DEBUG = False.

 Thus, we need a short branch divorcing these two cases and displaying
 slightly different content.

 Also (and please let me know if the convention is to separate these into
 two tickets) - there are some grammar issues with the docstrings - many
 need to be migrated to the present recurring tense / indicative mood if in
 fact that is going to remain the guideline.

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

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



Re: [Django] #3485: Initial SQL fails when data contains a % in it when settings.DEBUG = True

2011-04-02 Thread Django
#3485: Initial SQL fails when data contains a % in it when settings.DEBUG = True
-+-
   Reporter:  lakin@…|Owner:  nobody
   Type:  Bug|   Status:  reopened
  Milestone: |Component:  Database layer
Version:  SVN|  (models, ORM)
 Resolution: | Severity:  Normal
   Triage Stage:  Accepted   | Keywords:
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  1  |  Needs tests:  0
-+-

Comment (by julien):

 See some other issues relating to the use of the `%` character and
 escaping: #6343, #12268, #11391, #13648. Perhaps some of these could be
 tackled at the same time.

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

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



[Django] #15744: serialization docs improvement

2011-04-02 Thread Django
#15744: serialization docs improvement
--+--
 Reporter:  choj  | Owner:  nobody
 Type:  Cleanup/optimization  |Status:  new
Milestone:| Component:  Documentation
  Version:  1.3   |  Severity:  Normal
 Keywords:  docs serialization|  Triage Stage:  Unreviewed
Has patch:  0 |
--+--
 In [http://docs.djangoproject.com/en/1.3/topics/serialization/], the code
 fragment
 {{{
 return (self.first_name, self.last_name)
 }}}
 could be improved as a dict
 {{{
 return {'first name':self.first_name, 'last name':self.last_name}
 }}}
 to show how to enable fieldnames in the JSON output, rather than the
 default "naturalkey".

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

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



Re: [Django] #15735: Conflict with an app name of 'auth' even when not using Django auth

2011-04-02 Thread Django
#15735: Conflict with an app name of 'auth' even when not using Django auth
+-
   Reporter:  mattrobenolt  |Owner:  mattrobenolt
   Type:  Bug   |   Status:  new
  Milestone:  1.3   |Component:  Core (Other)
Version:  1.3   | Severity:  Normal
 Resolution:| Keywords:  auth settings
   Triage Stage:  Unreviewed|Has patch:  0
Needs documentation:  0 |  Needs tests:  1
Patch needs improvement:  1 |
+-
Changes (by mattrobenolt):

 * needs_better_patch:  0 => 1
 * has_patch:  1 => 0
 * component:  contrib.auth => Core (Other)


Comment:

 Actually, I retract my patch to fix the issue. It just masks it and
 unveils more issues for model testing. It appears that the problem is much
 more deep rooted than this and may require a design decision since I'm not
 sure why certain decisions were made on certain aspects in the first
 place. Specifically why the internal app_store cache is stored based on
 relative package names and not absolute.

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

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



[Changeset] r16009 - django/branches/releases/1.3.X/django/core/handlers

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 17:11:29 -0700 (Sat, 02 Apr 2011)
New Revision: 16009

Modified:
   django/branches/releases/1.3.X/django/core/handlers/wsgi.py
Log:
[1.3.X] Fixed #15672 -- Fixed bug in core/handlers/wsgi.py where we were 
referring to the 'request' variable before assigning to it. Thanks for the 
report, vkryachko

Backport of r15918 from trunk.

Modified: django/branches/releases/1.3.X/django/core/handlers/wsgi.py
===
--- django/branches/releases/1.3.X/django/core/handlers/wsgi.py 2011-04-02 
22:13:21 UTC (rev 16008)
+++ django/branches/releases/1.3.X/django/core/handlers/wsgi.py 2011-04-03 
00:11:29 UTC (rev 16009)
@@ -261,7 +261,7 @@
 try:
 request = self.request_class(environ)
 except UnicodeDecodeError:
-logger.warning('Bad Request (UnicodeDecodeError): %s' % 
request.path,
+logger.warning('Bad Request (UnicodeDecodeError)',
 exc_info=sys.exc_info(),
 extra={
 'status_code': 400,

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



Re: [Django] #10813: Database errors in the shell should roll back the transaction

2011-04-02 Thread Django
#10813: Database errors in the shell should roll back the transaction
-+-
   Reporter:  Glenn  |Owner:  nobody
   Type: |   Status:  new
  Uncategorized  |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  1  |
-+-

Comment (by Glenn):

 In my opinion, this is ultimately a bug in Postgresql: errors should *not*
 prevent subsequent commands in a transaction from working.  The only
 generic way I know to work around this is to set a savepoint before each
 command and commit it immediately after, so if an error occurs you can
 roll back to the checkpoint to unset the error flag.  The overhead of that
 isn't acceptable in production, of course, and doing that only when in a
 shell (which I'm not even sure is possible) would be a debugging
 nightmare.

 The correct fix is to convince Postgresql upstream to add a flag to
 disable this behavior, so errors within a transaction don't abort the
 entire transaction.  This would make Postgresql's behavior match other SQL
 engines.  I've had trouble with this many times over the years and have
 never had any luck getting them to fix this.

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

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



[Changeset] r16008 - django/trunk/tests/regressiontests/cache

2011-04-02 Thread noreply
Author: adrian
Date: 2011-04-02 15:13:21 -0700 (Sat, 02 Apr 2011)
New Revision: 16008

Modified:
   django/trunk/tests/regressiontests/cache/tests.py
Log:
Fixed #15704 -- Made cache tests more reusable by moving the backend path into 
a class attribute. Thanks for the patch, jonash

Modified: django/trunk/tests/regressiontests/cache/tests.py
===
--- django/trunk/tests/regressiontests/cache/tests.py   2011-04-02 21:49:39 UTC 
(rev 16007)
+++ django/trunk/tests/regressiontests/cache/tests.py   2011-04-02 22:13:21 UTC 
(rev 16008)
@@ -34,8 +34,10 @@
 class DummyCacheTests(unittest.TestCase):
 # The Dummy cache backend doesn't really behave like a test backend,
 # so it has different test requirements.
+backend_name = 'django.core.cache.backends.dummy.DummyCache'
+
 def setUp(self):
-self.cache = get_cache('django.core.cache.backends.dummy.DummyCache')
+self.cache = get_cache(self.backend_name)
 
 def test_simple(self):
 "Dummy cache backend ignores cache set calls"
@@ -727,15 +729,17 @@
 return 'CUSTOM-' + '-'.join([key_prefix, str(version), key])
 
 class DBCacheTests(unittest.TestCase, BaseCacheTests):
+backend_name = 'django.core.cache.backends.db.DatabaseCache'
+
 def setUp(self):
 # Spaces are used in the table name to ensure quoting/escaping is 
working
 self._table_name = 'test cache table'
 management.call_command('createcachetable', self._table_name, 
verbosity=0, interactive=False)
-self.cache = get_cache('django.core.cache.backends.db.DatabaseCache', 
LOCATION=self._table_name, OPTIONS={'MAX_ENTRIES': 30})
-self.prefix_cache = 
get_cache('django.core.cache.backends.db.DatabaseCache', 
LOCATION=self._table_name, KEY_PREFIX='cacheprefix')
-self.v2_cache = 
get_cache('django.core.cache.backends.db.DatabaseCache', 
LOCATION=self._table_name, VERSION=2)
-self.custom_key_cache = 
get_cache('django.core.cache.backends.db.DatabaseCache', 
LOCATION=self._table_name, KEY_FUNCTION=custom_key_func)
-self.custom_key_cache2 = 
get_cache('django.core.cache.backends.db.DatabaseCache', 
LOCATION=self._table_name, 
KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
+self.cache = get_cache(self.backend_name, LOCATION=self._table_name, 
OPTIONS={'MAX_ENTRIES': 30})
+self.prefix_cache = get_cache(self.backend_name, 
LOCATION=self._table_name, KEY_PREFIX='cacheprefix')
+self.v2_cache = get_cache(self.backend_name, 
LOCATION=self._table_name, VERSION=2)
+self.custom_key_cache = get_cache(self.backend_name, 
LOCATION=self._table_name, KEY_FUNCTION=custom_key_func)
+self.custom_key_cache2 = get_cache(self.backend_name, 
LOCATION=self._table_name, 
KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
 
 def tearDown(self):
 from django.db import connection
@@ -746,7 +750,7 @@
 self.perform_cull_test(50, 29)
 
 def test_zero_cull(self):
-self.cache = get_cache('django.core.cache.backends.db.DatabaseCache', 
LOCATION=self._table_name, OPTIONS={'MAX_ENTRIES': 30, 'CULL_FREQUENCY': 0})
+self.cache = get_cache(self.backend_name, LOCATION=self._table_name, 
OPTIONS={'MAX_ENTRIES': 30, 'CULL_FREQUENCY': 0})
 self.perform_cull_test(50, 18)
 
 def test_old_initialization(self):
@@ -754,12 +758,14 @@
 self.perform_cull_test(50, 18)
 
 class LocMemCacheTests(unittest.TestCase, BaseCacheTests):
+backend_name = 'django.core.cache.backends.locmem.LocMemCache'
+
 def setUp(self):
-self.cache = 
get_cache('django.core.cache.backends.locmem.LocMemCache', 
OPTIONS={'MAX_ENTRIES': 30})
-self.prefix_cache = 
get_cache('django.core.cache.backends.locmem.LocMemCache', 
KEY_PREFIX='cacheprefix')
-self.v2_cache = 
get_cache('django.core.cache.backends.locmem.LocMemCache', VERSION=2)
-self.custom_key_cache = 
get_cache('django.core.cache.backends.locmem.LocMemCache', 
OPTIONS={'MAX_ENTRIES': 30}, KEY_FUNCTION=custom_key_func)
-self.custom_key_cache2 = 
get_cache('django.core.cache.backends.locmem.LocMemCache', 
OPTIONS={'MAX_ENTRIES': 30}, 
KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
+self.cache = get_cache(self.backend_name, OPTIONS={'MAX_ENTRIES': 30})
+self.prefix_cache = get_cache(self.backend_name, 
KEY_PREFIX='cacheprefix')
+self.v2_cache = get_cache(self.backend_name, VERSION=2)
+self.custom_key_cache = get_cache(self.backend_name, 
OPTIONS={'MAX_ENTRIES': 30}, KEY_FUNCTION=custom_key_func)
+self.custom_key_cache2 = get_cache(self.backend_name, 
OPTIONS={'MAX_ENTRIES': 30}, 
KEY_FUNCTION='regressiontests.cache.tests.custom_key_func')
 
 # LocMem requires a hack to make the other caches
 # share a data store with the 'normal' cache.
@@ -782,7 +788,7 @@
 self.perform_cull_test(50, 29)
 
 def test_zero_cull(self):
- 

[Changeset] r16007 - django/trunk/docs/faq

2011-04-02 Thread noreply
Author: adrian
Date: 2011-04-02 14:49:39 -0700 (Sat, 02 Apr 2011)
New Revision: 16007

Modified:
   django/trunk/docs/faq/install.txt
Log:
Fixed a comma splice in docs/faq/install.txt from [16004]

Modified: django/trunk/docs/faq/install.txt
===
--- django/trunk/docs/faq/install.txt   2011-04-02 21:46:28 UTC (rev 16006)
+++ django/trunk/docs/faq/install.txt   2011-04-02 21:49:39 UTC (rev 16007)
@@ -70,12 +70,15 @@
 Can I use Django with Python 2.4?
 -
 
-Django 1.3 (and earlier) supported Python 2.4. Django 1.4 (not released yet)
-and newer will require Python 2.5 or greater (but no 3.x, see the next 
question.)
+As of Django 1.4, no.
 
-We highly recommend you upgrade Python if at all possible, but Django 1.3.x
-will continue to support Python 2.4.
+Django 1.3 and earlier supported Python 2.4. Django 1.4 (the current 
development
+version, which hasn't been officially released) and newer version require
+Python 2.5 or greater (but not 3.x; see the next question.)
 
+We highly recommend you upgrade Python if possible, but Django 1.3.x will
+continue to support Python 2.4.
+
 Can I use Django with Python 3?
 ---
 

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



[Changeset] r16006 - django/trunk/django/db/models

2011-04-02 Thread noreply
Author: adrian
Date: 2011-04-02 14:46:28 -0700 (Sat, 02 Apr 2011)
New Revision: 16006

Modified:
   django/trunk/django/db/models/base.py
Log:
Fixed #15743 -- Fixed tense in a docstring in db/models/base.py. Thanks, jMyles

Modified: django/trunk/django/db/models/base.py
===
--- django/trunk/django/db/models/base.py   2011-04-02 21:45:56 UTC (rev 
16005)
+++ django/trunk/django/db/models/base.py   2011-04-02 21:46:28 UTC (rev 
16006)
@@ -389,7 +389,7 @@
 
 def __reduce__(self):
 """
-Provide pickling support. Normally, this just dispatches to Python's
+Provides pickling support. Normally, this just dispatches to Python's
 standard handling. However, for models with deferred field loading, we
 need to do things manually, as they're dynamically created classes and
 only module-level classes can be pickled by the default path.

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



[Changeset] r16005 - django/trunk/django/utils

2011-04-02 Thread noreply
Author: adrian
Date: 2011-04-02 14:45:56 -0700 (Sat, 02 Apr 2011)
New Revision: 16005

Modified:
   django/trunk/django/utils/functional.py
Log:
Fixed grammar error in utils/functional.py from [15940]

Modified: django/trunk/django/utils/functional.py
===
--- django/trunk/django/utils/functional.py 2011-04-02 19:03:11 UTC (rev 
16004)
+++ django/trunk/django/utils/functional.py 2011-04-02 21:45:56 UTC (rev 
16005)
@@ -3,7 +3,7 @@
 
 # You can't trivially replace this `functools.partial` because this binds to
 # classes and returns bound instances, whereas functools.partial (on CPython)
-# is a type and it's instances don't bind.
+# is a type and its instances don't bind.
 def curry(_curried_func, *args, **kwargs):
 def _curried(*moreargs, **morekwargs):
 return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))

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



Re: [Django] #10813: Database errors in the shell should roll back the transaction

2011-04-02 Thread Django
#10813: Database errors in the shell should roll back the transaction
-+-
   Reporter:  Glenn  |Owner:  nobody
   Type: |   Status:  new
  Uncategorized  |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  1  |
-+-
Changes (by adrian):

 * needs_better_patch:  0 => 1
 * type:   => Uncategorized
 * severity:   => Normal
 * stage:  Design decision needed => Accepted


Comment:

 I agree we should fix this, but I don't think the attached patch is the
 right solution. It appears to affect only {{{manage.py shell}}}, and a
 more bulletproof solution would affect any shell, including IPython and
 the normal python shell.

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

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



Re: [Django] #12522: Unable to get request.POST after request.get_raw_post_data

2011-04-02 Thread Django
#12522: Unable to get request.POST after request.get_raw_post_data
-+-
   Reporter:  redbaron   |Owner:  nobody
   Type:  Bug|   Status:  closed
  Milestone: |Component:  HTTP handling
Version:  1.1| Severity:  Normal
 Resolution:  duplicate  | Keywords:
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  1  |
-+-
Changes (by vkryachko):

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


Comment:

 This is a duplicate of #15679

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

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



Re: [Django] #15672: wsgi handler bug in 1.3

2011-04-02 Thread Django
#15672: wsgi handler bug in 1.3
-+
   Reporter:  vkryachko  |Owner:  vkryachko
   Type:  Bug|   Status:  reopened
  Milestone: |Component:  Core (Other)
Version:  1.3| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+
Changes (by vkryachko):

 * status:  closed => reopened
 * type:   => Bug
 * resolution:  fixed =>
 * severity:   => Normal


Comment:

 Thanks for the fix, adrian. But looking at the 1.3.x branch, I see that
 this fix has not been backported there, so I think the issue has to be
 reopened. I would have backported it myself, but I don't have write access
 to the SVN. Regards

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

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



Re: [Django] #15743: Docstring for db.models.base.Model.__reduce__() has wrong tense

2011-04-02 Thread Django
#15743: Docstring for db.models.base.Model.__reduce__() has wrong tense
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type: |   Status:  new
  Cleanup/optimization   |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.3| Severity:  Normal
 Resolution: | Keywords:  docstring
   Triage Stage: |Has patch:  1
  Unreviewed |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by jMyles):

 Well, this is an utterly trivial case.  I'm not sure what to grep for to
 determine if non-trivial cases currently exist.  There are times when the
 convention, which is apparently to use the present recurring tense in the
 indicative mood ("action words") is far more clear than the simple present
 imperative ("provide spam and eggs to the other classes").

 I actually don't really care about the grammar issue all that much; I
 really just wanted to get my feet wet with opening a ticket and submitting
 a patch - my hats are, in order: [developer, grammar police].  ;-)

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

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



Re: [Django] #27: Single form field for multiple database fields

2011-04-02 Thread Django
#27: Single form field for multiple database fields
-+--
   Reporter:  adrian |Owner:  nobody
   Type:  New feature|   Status:  new
  Milestone: |Component:  Forms
Version: | Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Someday/Maybe  |Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+--
Changes (by msiedlarek):

 * cc: msiedlarek (added)


Comment:

 Forgot to login. comment:12 is mine.

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

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



Re: [Django] #27: Single form field for multiple database fields

2011-04-02 Thread Django
#27: Single form field for multiple database fields
-+--
   Reporter:  adrian |Owner:  nobody
   Type:  New feature|   Status:  new
  Milestone: |Component:  Forms
Version: | Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Someday/Maybe  |Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+--

Comment (by anonymous):

 I would not tie this kind of information to the Model. What would you say
 about the following syntax?

 {{{
 class PersonForm(forms.ModelForm):
 full_name = forms.CharField()

 class Meta:
 exclude = ('first_name', 'last_name',)
 aggregation = {
 'full_name': '%(last_name)s, %(first_name)s',
 }
 }}}

 There would be no {{{'full_name'}}} key in {{{PersonForm.cleaned_data}}},
 but {{{'first_name'}}} and {{{'last_name'}}}. Validation errors (like
 incompatibility with format string) would be raised for the
 {{{full_name}}} field.

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

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



[Changeset] r16004 - django/trunk/docs/faq

2011-04-02 Thread noreply
Author: ramiro
Date: 2011-04-02 12:03:11 -0700 (Sat, 02 Apr 2011)
New Revision: 16004

Modified:
   django/trunk/docs/faq/install.txt
Log:
Updated the Python version requirements FAQ entry in the installation section.

Modified: django/trunk/docs/faq/install.txt
===
--- django/trunk/docs/faq/install.txt   2011-04-02 18:48:18 UTC (rev 16003)
+++ django/trunk/docs/faq/install.txt   2011-04-02 19:03:11 UTC (rev 16004)
@@ -67,13 +67,15 @@
 
 .. _context managers: 
http://docs.python.org/reference/datamodel.html#context-managers
 
-Can I use Django with Python 2.3?
+Can I use Django with Python 2.4?
 -
 
-Django 1.1 (and earlier) supported Python 2.3. Django 1.2 and newer does not.
-We highly recommend you upgrade Python if at all possible, but Django 1.1 will
-continue to work on Python 2.3.
+Django 1.3 (and earlier) supported Python 2.4. Django 1.4 (not released yet)
+and newer will require Python 2.5 or greater (but no 3.x, see the next 
question.)
 
+We highly recommend you upgrade Python if at all possible, but Django 1.3.x
+will continue to support Python 2.4.
+
 Can I use Django with Python 3?
 ---
 

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



Re: [Django] #15743: Docstring for db.models.base.Model.__reduce__() has wrong tense

2011-04-02 Thread Django
#15743: Docstring for db.models.base.Model.__reduce__() has wrong tense
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type: |   Status:  new
  Cleanup/optimization   |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.3| Severity:  Normal
 Resolution: | Keywords:  docstring
   Triage Stage: |Has patch:  1
  Unreviewed |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by claudep):

 While grepping through the code, you'll find that both forms are often
 used. It might be due to the fact that Django coding guidelines in this
 case are against PEP 257. I'm not sure it's worth fixing. Or update the
 guidelines?

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

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



[Changeset] r16003 - django/trunk/django/views

2011-04-02 Thread noreply
Author: ramiro
Date: 2011-04-02 11:48:18 -0700 (Sat, 02 Apr 2011)
New Revision: 16003

Modified:
   django/trunk/django/views/debug.py
Log:
Removed support code for deprecated module-based template loaders from debug 
view postmortem.

Modified: django/trunk/django/views/debug.py
===
--- django/trunk/django/views/debug.py  2011-04-02 13:55:03 UTC (rev 16002)
+++ django/trunk/django/views/debug.py  2011-04-02 18:48:18 UTC (rev 16003)
@@ -88,21 +88,14 @@
 self.loader_debug_info = []
 for loader in template_source_loaders:
 try:
-module = import_module(loader.__module__)
-if hasattr(loader, '__class__'):
-source_list_func = loader.get_template_sources
-else: # NOTE: Remember to remove this branch when we 
deprecate old template loaders in 1.4
-source_list_func = module.get_template_sources
+source_list_func = loader.get_template_sources
 # NOTE: This assumes exc_value is the name of the template 
that
 # the loader attempted to load.
 template_list = [{'name': t, 'exists': os.path.exists(t)} \
 for t in source_list_func(str(self.exc_value))]
-except (ImportError, AttributeError):
+except AttributeError:
 template_list = []
-if hasattr(loader, '__class__'):
-loader_name = loader.__module__ + '.' + 
loader.__class__.__name__
-else: # NOTE: Remember to remove this branch when we deprecate 
old template loaders in 1.4
-loader_name = loader.__module__ + '.' + loader.__name__
+loader_name = loader.__module__ + '.' + 
loader.__class__.__name__
 self.loader_debug_info.append({
 'loader': loader_name,
 'templates': template_list,

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



Re: [Django] #15743: Docstring for db.models.base.Model.__reduce__() has wrong tense

2011-04-02 Thread Django
#15743: Docstring for db.models.base.Model.__reduce__() has wrong tense
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type: |   Status:  new
  Cleanup/optimization   |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.3| Severity:  Normal
 Resolution: | Keywords:  docstring
   Triage Stage: |Has patch:  1
  Unreviewed |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by jMyles):

 * status:  reopened => new


Comment:

 Looking back, it looks like I did a few things wrong with this ticket -
 still getting the hang of the social convention here.

 *I didn't name the patch .diff
 *I marked it fixed, which is supposed to be an action taken by the core
 team once the patch is rolled in (I have since marked it 're-opened'

 Have I done everything else properly?

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

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



Re: [Django] #15743: Docstring for db.models.base.Model.__reduce__() has wrong tense

2011-04-02 Thread Django
#15743: Docstring for db.models.base.Model.__reduce__() has wrong tense
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type: |   Status:  reopened
  Cleanup/optimization   |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.3| Severity:  Normal
 Resolution: | Keywords:  docstring
   Triage Stage: |Has patch:  1
  Unreviewed |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by jMyles):

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


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

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



Re: [Django] #15743: Docstring for db.models.base.Model.__reduce__() has wrong tense

2011-04-02 Thread Django
#15743: Docstring for db.models.base.Model.__reduce__() has wrong tense
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type: |   Status:  closed
  Cleanup/optimization   |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.3| Severity:  Normal
 Resolution:  fixed  | Keywords:  docstring
   Triage Stage: |Has patch:  1
  Unreviewed |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by jMyles):

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


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

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



Re: [Django] #15743: Docstring for db.models.base.Model.__reduce__() has wrong tense

2011-04-02 Thread Django
#15743: Docstring for db.models.base.Model.__reduce__() has wrong tense
-+-
   Reporter:  jMyles |Owner:  jMyles
   Type: |   Status:  assigned
  Cleanup/optimization   |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.3| Severity:  Normal
 Resolution: | Keywords:  docstring
   Triage Stage: |Has patch:  1
  Unreviewed |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by jMyles):

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



[Django] #15743: Docstring for db.models.base.Model.__reduce__() has wrong tense

2011-04-02 Thread Django
#15743: Docstring for db.models.base.Model.__reduce__() has wrong tense
-+-
 Reporter:  jMyles   | Owner:  nobody
 Type:   |Status:  new
  Cleanup/optimization   | Component:  Database layer (models, ORM)
Milestone:   |  Severity:  Normal
  Version:  1.3  |  Triage Stage:  Unreviewed
 Keywords:  docstring|
Has patch:  1|
-+-
 Currently reads "Provide pickling support."  Compliance with coding
 guidelines requires "Provides pickling support."

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

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



Re: [Django] #15673: Allow limit_choices_to to use a tuple for __in filters

2011-04-02 Thread Django
#15673: Allow limit_choices_to to use a tuple for __in filters
-+-
   Reporter:  EnTeQuAk   |Owner:  nobody
   Type:  New feature|   Status:  new
  Milestone: |Component:  contrib.admin
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Ready for checkin  |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-

Comment (by aaugustin):

 Patch is off by one line in a file, but it applies and the whole test
 suite passes.

 Based on the docs, the `limit_choices_to` argument of `ForeignKey` must be
 a dictionary that defines acceptable keyword arguments for `filter()`. So
 I checked what `filter()` would accept in a `__in=...` argument:
  - experimentally, both tuples and lists work.
  - the doc says "a given list"; in the context, that means "an iterable of
 values" rather than "a Python list object". See
 http://docs.djangoproject.com/en/dev/ref/models/querysets/#in

 Since this patch is consistent with the docs and with other parts of the
 framework, I also consider it is RFC.

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

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



Re: [Django] #15303: Clarify View.as_view() docs in respect to functions passed as kwargs. (was: Functions passed as kwargs to View.as_view() should be bound)

2011-04-02 Thread Django
#15303: Clarify View.as_view() docs in respect to functions passed as kwargs.
-+-
   Reporter:  gg |Owner:  nobody
   Type: |   Status:  new
  Cleanup/optimization   |Component:  Documentation
  Milestone:  1.3| Severity:  Normal
Version:  SVN| Keywords:
 Resolution: |Has patch:  0
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by lrekucki):

 * type:   => Cleanup/optimization
 * severity:   => Normal


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

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



Re: [Django] #4051: [] not in EMPTY_VALUES in forms

2011-04-02 Thread Django
#4051: [] not in EMPTY_VALUES in forms
-+-
   Reporter:  webograph  |Owner:  mdnesvold
|   Status:  assigned
   Type:  Bug|Component:  Forms
  Milestone: | Severity:  Normal
Version:  1.0| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  1
Needs documentation:  0  |
Patch needs improvement:  1  |
-+-

Comment (by claudep):

 Initial bug is now almost fixed, except that empty set/frozenset aren't
 considered in EMPTY_VALUES. Does that make sense? Are there use cases for
 widgets returning set? AFAIK MultipleSelect always returns a list.

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

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



Re: [Django] #15263: Make "now" templatetag accept locale formats. (was: "now" templatetag doesn't accept locale formats, as docs claim)

2011-04-02 Thread Django
#15263: Make "now" templatetag accept locale formats.
---+---
   Reporter:  danielr  |Owner:  nobody
   Type:  New feature  |   Status:  new
  Milestone:   |Component:  Template system
Version:  SVN  | Severity:  Normal
 Resolution:   | Keywords:
   Triage Stage:  Accepted |Has patch:  1
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+---
Changes (by lrekucki):

 * type:   => New feature
 * severity:   => Normal


Comment:

 With the change in the docs, it's now a feature request.

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

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



Re: [Django] #15742: Bug: Mark all does not contain full queryset when using intermidiate pages in Django admin

2011-04-02 Thread Django
#15742: Bug: Mark all does not contain full queryset when using intermidiate 
pages
in Django admin
-+-
   Reporter:  Herman S   |Owner:  nobody
  |   Status:  new
   Type:  Bug|Component:  Documentation
  Milestone: | Severity:  Normal
Version:  1.3| Keywords:
 Resolution: |Has patch:  0
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by kmtracey):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * component:  contrib.admin => Documentation
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 The problem here involves how the "queryset" is preserved from the
 original action handler to the code that handles POST for the intermediate
 page. In the referenced blog post this is done like so:

 {{{
 #!python
 if not form:
 form = self.AddTagForm(initial={'_selected_action':
 request.POST.getlist(admin.ACTION_CHECKBOX_NAME)})
 }}}

 This code is not actually using the `queryset` parameter passed into the
 action function but rather the list of selected action checkboxes in the
 post data, which is only going to be the 100 checkboxes on the individual
 page. The action code should be using the passed `queryset` parameter,
 which does contain the full list of all items, rather than this post data.
 However Django's doc at the moment shows
 [http://docs.djangoproject.com/en/1.3/ref/contrib/admin/actions/#actions-
 that-provide-intermediate-pages exactly this technique] of using the POST
 data, and that should be fixed.

 As noted in the referenced blog post, the doc here is a bit lacking and in
 general would benefit from more complete examples. Besides not working
 correctly for the "select all" case, the current example of stuffing all
 the pks into a querystring doesn't extend well to potentially thousands of
 items selected -- you're going to run into querystring length issues I
 think. at some point. It would be good if the doc here considered some
 workable techniques for handling the case of thousands of selected items.

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

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



[Django] #15742: Bug: Mark all does not contain full queryset when using intermidiate pages in Django admin

2011-04-02 Thread Django
#15742: Bug: Mark all does not contain full queryset when using intermidiate 
pages
in Django admin
--+--
 Reporter:  Herman S   | Owner:  nobody
 Type:  Bug   |Status:  new
Milestone:| Component:  contrib.admin
  Version:  1.3   |  Severity:  Normal
 Keywords:|  Triage Stage:  Unreviewed
Has patch:  0 |
--+--
 Let's say you implement some intermidiate page for your actions in django
 admin, as described in the docs here:
 http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/#actions-
 that-provide-intermediate-pages

 When you call the {{ queryset }} in the intermediate page, it is all good.
 But let's say you have a "confirm this action" page, and when you actually
 call the queryset again - then the problem occurs.
 It only happens when you choose more than the 100 objects on the first
 page and select all object with the "select all" javascript button. The
 action is only applied to the objects on the first page.

 In order to replicate this bug:
 1. Create 100++ objects of some type
 2. Create an intermediate page which is called at some action.
 3. Choose ALL objects with first pressing the top selectbox, now the
 "choose all" button should appear and press this. Apply the action.
 4. Confirm it at the intermediate page.
 5. Observe that the action is only applied to the objects at the first
 page.

 I found this article to explain the admin intermediate page actions very
 good: http://www.jpichon.net/blog/2010/08/django-admin-actions-and-
 intermediate-pages/

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

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



[Changeset] r16002 - django/trunk/django/contrib/databrowse/plugins

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 06:55:03 -0700 (Sat, 02 Apr 2011)
New Revision: 16002

Modified:
   django/trunk/django/contrib/databrowse/plugins/calendars.py
Log:
Fixed #15717 -- Updated databrowse to use class-based generic date views. 
Thanks to aaugustin for the report and draft patch

Modified: django/trunk/django/contrib/databrowse/plugins/calendars.py
===
--- django/trunk/django/contrib/databrowse/plugins/calendars.py 2011-04-02 
13:46:09 UTC (rev 16001)
+++ django/trunk/django/contrib/databrowse/plugins/calendars.py 2011-04-02 
13:55:03 UTC (rev 16002)
@@ -6,9 +6,43 @@
 from django.utils.text import capfirst
 from django.utils.encoding import force_unicode
 from django.utils.safestring import mark_safe
-from django.views.generic import date_based
+from django.views.generic import dates
 from django.utils import datetime_safe
 
+
+class DateViewMixin(object):
+allow_empty = False
+allow_future = True
+root_url = None
+model = None
+field = None
+
+def get_context_data(self, **kwargs):
+context = super(DateViewMixin, self).get_context_data(**kwargs)
+context.update({
+'root_url': self.root_url,
+'model': self.model,
+'field': self.field
+})
+return context
+
+
+class DayView(DateViewMixin, dates.DayArchiveView):
+template_name = 'databrowse/calendar_day.html'
+
+
+class MonthView(DateViewMixin, dates.MonthArchiveView):
+template_name = 'databrowse/calendar_month.html'
+
+
+class YearView(DateViewMixin, dates.YearArchiveView):
+template_name = 'databrowse/calendar_year.html'
+
+
+class IndexView(DateViewMixin, dates.ArchiveIndexView):
+template_name = 'databrowse/calendar_main.html'
+
+
 class CalendarPlugin(DatabrowsePlugin):
 def __init__(self, field_names=None):
 self.field_names = field_names
@@ -61,26 +95,50 @@
 easy_model = EasyModel(self.site, self.model)
 field_list = self.fields.values()
 field_list.sort(key=lambda k:k.verbose_name)
-return render_to_response('databrowse/calendar_homepage.html', 
{'root_url': self.site.root_url, 'model': easy_model, 'field_list': field_list})
+return render_to_response('databrowse/calendar_homepage.html', {
+'root_url': self.site.root_url,
+'model': easy_model,
+'field_list': field_list
+})
 
 def calendar_view(self, request, field, year=None, month=None, day=None):
 easy_model = EasyModel(self.site, self.model)
-queryset = easy_model.get_query_set()
-extra_context = {'root_url': self.site.root_url, 'model': easy_model, 
'field': field}
+root_url = self.site.root_url
+
 if day is not None:
-return date_based.archive_day(request, year, month, day, queryset, 
field.name,
-template_name='databrowse/calendar_day.html', 
allow_empty=False, allow_future=True,
-extra_context=extra_context)
+return DayView.as_view(
+year=year, month=month, day=day,
+date_field=field.name,
+queryset=easy_model.get_query_set(),
+root_url=root_url,
+model=easy_model,
+field=field
+)(request)
 elif month is not None:
-return date_based.archive_month(request, year, month, queryset, 
field.name,
-template_name='databrowse/calendar_month.html', 
allow_empty=False, allow_future=True,
-extra_context=extra_context)
+return MonthView.as_view(
+year=year, month=month,
+date_field=field.name,
+queryset=easy_model.get_query_set(),
+root_url=root_url,
+model=easy_model,
+field=field
+)(request)
 elif year is not None:
-return date_based.archive_year(request, year, queryset, field.name,
-template_name='databrowse/calendar_year.html', 
allow_empty=False, allow_future=True,
-extra_context=extra_context)
+return YearView.as_view(
+year=year,
+date_field=field.name,
+queryset=easy_model.get_query_set(),
+root_url=root_url,
+model=easy_model,
+field=field
+)(request)
 else:
-return date_based.archive_index(request, queryset, field.name,
-template_name='databrowse/calendar_main.html', 
allow_empty=True, allow_future=T

[Changeset] r16001 - django/trunk/django/core/cache/backends

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 06:46:09 -0700 (Sat, 02 Apr 2011)
New Revision: 16001

Modified:
   django/trunk/django/core/cache/backends/memcached.py
Log:
Added missing warnings import

Modified: django/trunk/django/core/cache/backends/memcached.py
===
--- django/trunk/django/core/cache/backends/memcached.py2011-04-02 
13:27:40 UTC (rev 16000)
+++ django/trunk/django/core/cache/backends/memcached.py2011-04-02 
13:46:09 UTC (rev 16001)
@@ -128,6 +128,7 @@
 
 class CacheClass(BaseMemcachedCache):
 def __init__(self, server, params):
+import warnings
 warnings.warn(
 "memcached.CacheClass has been split into memcached.MemcachedCache 
and memcached.PyLibMCCache. Please update your cache backend setting.",
 PendingDeprecationWarning

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



Re: [Django] #15737: Importing hotshot.stats fails

2011-04-02 Thread Django
#15737: Importing hotshot.stats fails
--+
   Reporter:  adamnelson  |Owner:  nobody
   Type:  Bug |   Status:  closed
  Milestone:  |Component:  Core (Other)
Version:  1.3 | Severity:  Normal
 Resolution:  worksforme  | Keywords:
   Triage Stage:  Unreviewed  |Has patch:  0
Needs documentation:  0   |  Needs tests:  0
Patch needs improvement:  0   |
--+

Comment (by adamnelson):

 I do have an app named profile. Thanks.

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

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



Re: [Django] #15717: databrowse uses the date-based generic view that is pending deprecation

2011-04-02 Thread Django
#15717: databrowse uses the date-based generic view that is pending deprecation
-+-
   Reporter:  aaugustin  |Owner:  nobody
   Type: |   Status:  new
  Cleanup/optimization   |Component:  contrib.databrowse
  Milestone: | Severity:  Release blocker
Version:  1.3| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Ready for  |  Needs tests:  0
  checkin|
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by russellm):

 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Ready for checkin


Comment:

 I think this one is actually a blocker -- because of the way the test
 suite runs, the generic view is imported as part of the databrowse
 package, which means running the full test suite causes this deprecation
 warning to be raised.

 Marking RFC because the patch does what it needs to do, and tests for
 databrowse are a much bigger problem (See #15719).

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

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



[Changeset] r16000 - in django/trunk/tests/regressiontests/views: . tests tests/generic

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 06:27:40 -0700 (Sat, 02 Apr 2011)
New Revision: 16000

Added:
   django/trunk/tests/regressiontests/views/generic_urls.py
Modified:
   django/trunk/tests/regressiontests/views/tests/debug.py
   django/trunk/tests/regressiontests/views/tests/generic/create_update.py
   django/trunk/tests/regressiontests/views/tests/generic/date_based.py
   django/trunk/tests/regressiontests/views/tests/generic/object_list.py
   django/trunk/tests/regressiontests/views/tests/generic/simple.py
   django/trunk/tests/regressiontests/views/tests/shortcuts.py
   django/trunk/tests/regressiontests/views/tests/specials.py
   django/trunk/tests/regressiontests/views/urls.py
   django/trunk/tests/regressiontests/views/views.py
Log:
Refactored views regression tests to isolate generic views from the root URL 
space.

Added: django/trunk/tests/regressiontests/views/generic_urls.py
===
--- django/trunk/tests/regressiontests/views/generic_urls.py
(rev 0)
+++ django/trunk/tests/regressiontests/views/generic_urls.py2011-04-02 
13:27:40 UTC (rev 16000)
@@ -0,0 +1,117 @@
+# -*- coding:utf-8 -*-
+from django.conf.urls.defaults import patterns, url
+
+from models import *
+
+import views
+
+
+date_based_info_dict = {
+'queryset': Article.objects.all(),
+'date_field': 'date_created',
+'month_format': '%m',
+}
+
+object_list_dict = {
+'queryset': Article.objects.all(),
+'paginate_by': 2,
+}
+
+object_list_no_paginate_by = {
+'queryset': Article.objects.all(),
+}
+
+numeric_days_info_dict = dict(date_based_info_dict, day_format='%d')
+
+date_based_datefield_info_dict = dict(date_based_info_dict, 
queryset=DateArticle.objects.all())
+
+urlpatterns = patterns('',
+(r'^accounts/login/$', 'django.contrib.auth.views.login', 
{'template_name': 'login.html'}),
+(r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
+
+# Special URLs for particular regression cases.
+url(u'^中文/$', 'regressiontests.views.views.redirect'),
+url(u'^中文/target/$', 'regressiontests.views.views.index_page'),
+)
+
+# Date-based generic views.
+urlpatterns += patterns('django.views.generic.date_based',
+
(r'^date_based/object_detail/(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/(?P[-\w]+)/$',
+'object_detail',
+dict(slug_field='slug', **date_based_info_dict)),
+
(r'^date_based/object_detail/(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/(?P[-\w]+)/allow_future/$',
+'object_detail',
+dict(allow_future=True, slug_field='slug', **date_based_info_dict)),
+
(r'^date_based/archive_day/(?P\d{4})/(?P\d{1,2})/(?P\d{1,2})/$',
+'archive_day',
+numeric_days_info_dict),
+(r'^date_based/archive_month/(?P\d{4})/(?P\d{1,2})/$',
+'archive_month',
+date_based_info_dict),
+
(r'^date_based/datefield/archive_month/(?P\d{4})/(?P\d{1,2})/$',
+'archive_month',
+date_based_datefield_info_dict),
+)
+
+# crud generic views.
+urlpatterns += patterns('django.views.generic.create_update',
+(r'^create_update/member/create/article/$', 'create_object',
+dict(login_required=True, model=Article)),
+(r'^create_update/create/article/$', 'create_object',
+dict(post_save_redirect='/create_update/view/article/%(slug)s/',
+ model=Article)),
+(r'^create_update/update/article/(?P[-\w]+)/$', 'update_object',
+dict(post_save_redirect='/create_update/view/article/%(slug)s/',
+ slug_field='slug', model=Article)),
+(r'^create_update/create_custom/article/$', views.custom_create),
+(r'^create_update/delete/article/(?P[-\w]+)/$', 'delete_object',
+dict(post_delete_redirect='/create_update/', slug_field='slug',
+ model=Article)),
+
+# No post_save_redirect and no get_absolute_url on model.
+(r'^create_update/no_redirect/create/article/$', 'create_object',
+dict(model=Article)),
+(r'^create_update/no_redirect/update/article/(?P[-\w]+)/$',
+'update_object', dict(slug_field='slug', model=Article)),
+
+# get_absolute_url on model, but no passed post_save_redirect.
+(r'^create_update/no_url/create/article/$', 'create_object',
+dict(model=UrlArticle)),
+(r'^create_update/no_url/update/article/(?P[-\w]+)/$',
+'update_object', dict(slug_field='slug', model=UrlArticle)),
+)
+
+urlpatterns += patterns('django.views.generic.list_detail',
+(r'^object_list/page(?P[\w]*)/$', 'object_list', object_list_dict),
+(r'^object_list_no_paginate_by/page(?P[0-9]+)/$', 'object_list',
+ object_list_no_paginate_by),
+)
+
+# rediriects, both temporary and permanent, with non-ASCII targets
+urlpatterns += patterns('django.views.generic.simple',
+('^nonascii_redirect/$', 'redirect_to',
+{'url': u'/中文/target/', 'permanent': False}),
+('^permanent_nonascii_redirect/$', 'redirect_to',
+{'url': u'/中文/target/', 'permanent': True}),
+)
+

[Changeset] r15999 - in django/trunk/tests: . regressiontests/conditional_processing regressiontests/middleware_exceptions regressiontests/special_headers regressiontests/syndication regressiontests/

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 06:27:17 -0700 (Sat, 02 Apr 2011)
New Revision: 15999

Modified:
   django/trunk/tests/regressiontests/conditional_processing/models.py
   django/trunk/tests/regressiontests/conditional_processing/urls.py
   django/trunk/tests/regressiontests/middleware_exceptions/tests.py
   django/trunk/tests/regressiontests/middleware_exceptions/urls.py
   django/trunk/tests/regressiontests/special_headers/tests.py
   django/trunk/tests/regressiontests/special_headers/urls.py
   django/trunk/tests/regressiontests/syndication/tests.py
   django/trunk/tests/regressiontests/syndication/urls.py
   django/trunk/tests/regressiontests/test_utils/tests.py
   django/trunk/tests/regressiontests/test_utils/urls.py
   django/trunk/tests/urls.py
Log:
Modified some regression tests to make them independent of the default root 
urlconf.

Modified: django/trunk/tests/regressiontests/conditional_processing/models.py
===
--- django/trunk/tests/regressiontests/conditional_processing/models.py 
2011-04-02 13:26:54 UTC (rev 15998)
+++ django/trunk/tests/regressiontests/conditional_processing/models.py 
2011-04-02 13:27:17 UTC (rev 15999)
@@ -16,6 +16,8 @@
 
 
 class ConditionalGet(TestCase):
+urls = 'regressiontests.conditional_processing.urls'
+
 def assertFullResponse(self, response, check_last_modified=True, 
check_etag=True):
 self.assertEqual(response.status_code, 200)
 self.assertEqual(response.content, FULL_RESPONSE)

Modified: django/trunk/tests/regressiontests/conditional_processing/urls.py
===
--- django/trunk/tests/regressiontests/conditional_processing/urls.py   
2011-04-02 13:26:54 UTC (rev 15998)
+++ django/trunk/tests/regressiontests/conditional_processing/urls.py   
2011-04-02 13:27:17 UTC (rev 15999)
@@ -2,9 +2,9 @@
 import views
 
 urlpatterns = patterns('',
-('^$', views.index),
-('^last_modified/$', views.last_modified_view1),
-('^last_modified2/$', views.last_modified_view2),
-('^etag/$', views.etag_view1),
-('^etag2/$', views.etag_view2),
+('^condition/$', views.index),
+('^condition/last_modified/$', views.last_modified_view1),
+('^condition/last_modified2/$', views.last_modified_view2),
+('^condition/etag/$', views.etag_view1),
+('^condition/etag2/$', views.etag_view2),
 )

Modified: django/trunk/tests/regressiontests/middleware_exceptions/tests.py
===
--- django/trunk/tests/regressiontests/middleware_exceptions/tests.py   
2011-04-02 13:26:54 UTC (rev 15998)
+++ django/trunk/tests/regressiontests/middleware_exceptions/tests.py   
2011-04-02 13:27:17 UTC (rev 15999)
@@ -94,6 +94,8 @@
 
 
 class BaseMiddlewareExceptionTest(TestCase):
+urls = 'regressiontests.middleware_exceptions.urls'
+
 def setUp(self):
 self.exceptions = []
 got_request_exception.connect(self._on_request_exception)
@@ -768,6 +770,8 @@
 
 _missing = object()
 class RootUrlconfTests(TestCase):
+urls = 'regressiontests.middleware_exceptions.urls'
+
 def test_missing_root_urlconf(self):
 try:
 original_ROOT_URLCONF = settings.ROOT_URLCONF

Modified: django/trunk/tests/regressiontests/middleware_exceptions/urls.py
===
--- django/trunk/tests/regressiontests/middleware_exceptions/urls.py
2011-04-02 13:26:54 UTC (rev 15998)
+++ django/trunk/tests/regressiontests/middleware_exceptions/urls.py
2011-04-02 13:27:17 UTC (rev 15999)
@@ -4,12 +4,12 @@
 import views
 
 urlpatterns = patterns('',
-(r'^view/$', views.normal_view),
-(r'^not_found/$', views.not_found),
-(r'^error/$', views.server_error),
-(r'^null_view/$', views.null_view),
-(r'^permission_denied/$', views.permission_denied),
+(r'^middleware_exceptions/view/$', views.normal_view),
+(r'^middleware_exceptions/not_found/$', views.not_found),
+(r'^middleware_exceptions/error/$', views.server_error),
+(r'^middleware_exceptions/null_view/$', views.null_view),
+(r'^middleware_exceptions/permission_denied/$', views.permission_denied),
 
-(r'^template_response/$', views.template_response),
-(r'^template_response_error/$', views.template_response_error),
+(r'^middleware_exceptions/template_response/$', views.template_response),
+(r'^middleware_exceptions/template_response_error/$', 
views.template_response_error),
 )

Modified: django/trunk/tests/regressiontests/special_headers/tests.py
===
--- django/trunk/tests/regressiontests/special_headers/tests.py 2011-04-02 
13:26:54 UTC (rev 15998)
+++ django/trunk/tests/regressiontests/special_headers/tests.py 2011-04-02 
13:27:17 UTC (rev 15999)
@@ -6,6 +6,7 @@
 
 class SpecialHeadersTest(TestCase):
 fixtures = ['data.xml']
+urls = 'reg

[Changeset] r15998 - django/trunk/tests/regressiontests/special_headers

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 06:26:54 -0700 (Sat, 02 Apr 2011)
New Revision: 15998

Modified:
   django/trunk/tests/regressiontests/special_headers/tests.py
Log:
Silenced DeprecationWarning raised by tests for populate_xheaders tests. Refs 
#15741

Modified: django/trunk/tests/regressiontests/special_headers/tests.py
===
--- django/trunk/tests/regressiontests/special_headers/tests.py 2011-04-02 
13:26:39 UTC (rev 15997)
+++ django/trunk/tests/regressiontests/special_headers/tests.py 2011-04-02 
13:26:54 UTC (rev 15998)
@@ -1,13 +1,23 @@
+import warnings
+
 from django.test import TestCase
 from django.contrib.auth.models import User
 
+
 class SpecialHeadersTest(TestCase):
 fixtures = ['data.xml']
 
+def setUp(self):
+self.save_warnings_state()
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+module='django.views.generic.list_detail')
+
+def tearDown(self):
+self.restore_warnings_state()
+
 def test_xheaders(self):
 user = User.objects.get(username='super')
 response = self.client.get('/special_headers/article/1/')
-# import pdb; pdb.set_trace()
 self.assertFalse('X-Object-Type' in response)
 self.client.login(username='super', password='secret')
 response = self.client.get('/special_headers/article/1/')

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



[Changeset] r15997 - django/trunk/tests/regressiontests/test_runner

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 06:26:39 -0700 (Sat, 02 Apr 2011)
New Revision: 15997

Modified:
   django/trunk/tests/regressiontests/test_runner/tests.py
Log:
Silenced DeprecationWarning caused by testing deprecated DjangoTestRunner

Modified: django/trunk/tests/regressiontests/test_runner/tests.py
===
--- django/trunk/tests/regressiontests/test_runner/tests.py 2011-04-02 
13:26:19 UTC (rev 15996)
+++ django/trunk/tests/regressiontests/test_runner/tests.py 2011-04-02 
13:26:39 UTC (rev 15997)
@@ -2,13 +2,23 @@
 Tests for django test runner
 """
 import StringIO
+import warnings
 
 from django.core.exceptions import ImproperlyConfigured
 from django.test import simple
+from django.test.utils import get_warnings_state, restore_warnings_state
 from django.utils import unittest
 
+
 class DjangoTestRunnerTests(unittest.TestCase):
+def setUp(self):
+self._warnings_state = get_warnings_state()
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+module='django.test.simple')
 
+def tearDown(self):
+restore_warnings_state(self._warnings_state)
+
 def test_failfast(self):
 class MockTestOne(unittest.TestCase):
 def runTest(self):

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



[Changeset] r15996 - django/trunk/django/contrib/formtools/tests

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 06:26:19 -0700 (Sat, 02 Apr 2011)
New Revision: 15996

Modified:
   django/trunk/django/contrib/formtools/tests/__init__.py
Log:
Silenced a DeprecationWarning in formtools caused by testing the deprecated 
security_hash function

Modified: django/trunk/django/contrib/formtools/tests/__init__.py
===
--- django/trunk/django/contrib/formtools/tests/__init__.py 2011-04-02 
08:50:05 UTC (rev 15995)
+++ django/trunk/django/contrib/formtools/tests/__init__.py 2011-04-02 
13:26:19 UTC (rev 15996)
@@ -1,9 +1,11 @@
 import os
+import warnings
 
 from django import forms, http
 from django.conf import settings
 from django.contrib.formtools import preview, wizard, utils
 from django.test import TestCase
+from django.test.utils import get_warnings_state, restore_warnings_state
 from django.utils import unittest
 
 
@@ -32,12 +34,19 @@
 urls = 'django.contrib.formtools.tests.urls'
 
 def setUp(self):
+self.save_warnings_state()
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+module='django.contrib.formtools.utils')
+
 # Create a FormPreview instance to share between tests
 self.preview = preview.FormPreview(TestForm)
 input_template = ''
 self.input = input_template % (self.preview.unused_name('stage'), "%d")
 self.test_data = {'field1':u'foo', 'field1_':u'asdf'}
 
+def tearDown(self):
+self.restore_warnings_state()
+
 def test_unused_name(self):
 """
 Verifies name mangling to get uniue field name.
@@ -150,7 +159,14 @@
 
 
 class SecurityHashTests(unittest.TestCase):
+def setUp(self):
+self._warnings_state = get_warnings_state()
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+module='django.contrib.formtools.utils')
 
+def tearDown(self):
+restore_warnings_state(self._warnings_state)
+
 def test_textfield_hash(self):
 """
 Regression test for #10034: the hash generation function should ignore

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



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

2011-04-02 Thread Django
#10476: Fix(?) model insert handling when autcommit=True for PostgreSQL <= 8.1
-+-
   Reporter: |Owner:  mtredinnick
  mtredinnick|   Status:  closed
   Type:  Bug|Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution:  wontfix| Keywords:
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by adamnelson):

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


Comment:

 PostgreSQL 8.1 is
 [http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy no
 longer supported] by the Postgres community. I think this ticket should
 simply be closed at this point.

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

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



Re: [Django] #15648: [Feature request] NamedTupleQuerySet

2011-04-02 Thread Django
#15648: [Feature request] NamedTupleQuerySet
-+-
   Reporter:  pbagwl |Owner:  nobody
   Type:  New|   Status:  new
  feature|Component:  Database layer
  Milestone:  1.4|  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:  namedtuple, tuple,
   Triage Stage:  Accepted   |  queryset
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  1  |  Needs tests:  1
-+-
Changes (by EnTeQuAk):

 * cc: cg@… (added)


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

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



Re: [Django] #15741: Class-based generic views dropped support for X-Object-* headers

2011-04-02 Thread Django
#15741: Class-based generic views dropped support for X-Object-* headers
---+-
   Reporter:  russellm |Owner:  nobody
   Type:  New feature  |   Status:  new
  Milestone:   |Component:  Generic views
Version:  1.3  | Severity:  Normal
 Resolution:   | Keywords:
   Triage Stage:  Accepted |Has patch:  0
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+-
Changes (by russellm):

 * stage:  Design decision needed => Accepted


Comment:

 After a brief discussion with Jannis on IRC, option (2) seems like the
 best approach.

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

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



Re: [Django] #15741: Class-based generic views dropped support for X-Object-* headers

2011-04-02 Thread Django
#15741: Class-based generic views dropped support for X-Object-* headers
-+-
   Reporter:  russellm   |Owner:  nobody
   Type:  New|   Status:  new
  feature|Component:  Generic views
  Milestone: | Severity:  Normal
Version:  1.3| Keywords:
 Resolution: |Has patch:  0
   Triage Stage:  Design |  Needs tests:  0
  decision needed|
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by russellm):

 This came to my attention in the process of deprecating function-based
 generic views; the regressiontests.special_headers regression test
 contains specific tests for the X-Object-Type headers, and the test wasn't
 directly convertible to generic views.

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

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



Re: [Django] #15741: Class-based generic views dropped support for X-Object-* headers

2011-04-02 Thread Django
#15741: Class-based generic views dropped support for X-Object-* headers
-+-
   Reporter:  russellm   |Owner:  nobody
   Type:  New|   Status:  new
  feature|Component:  Generic views
  Milestone: | Severity:  Normal
Version:  1.3| Keywords:
 Resolution: |Has patch:  0
   Triage Stage:  Design |  Needs tests:  0
  decision needed|
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Description changed by russellm:

Old description:

> The function-based generic views use the
> django.core.xheaders.populate_xheaders method to attach a X-Object-Type
> and X-Object-Id header to responses served by a generic view. This debug
> information in the response
>
> Django needs to either:
>  1) Deprecate and remove populate_xheaders, or
>  2) Add X-Object-Type and X-Object-Id header support to class-based
> generic views.
>
> If we choose to do (2), then we can't just wrap the generic view response
> in populate_xheaders, because we don't have access to the response object
> at the time at which we determine the object that is in use. It will
> probably be necessary to add generic support to define headers anywhere
> in the lifespan of a request, and then apply those headers when the
> response is constructed; i.e., in much the same way that self.request is
> available throughout the lifespan of a request, make
> self.response_headers available throughout the lifespan of a request.

New description:

 The function-based generic views use the
 django.core.xheaders.populate_xheaders method to attach a X-Object-Type
 and X-Object-Id header to responses served by a generic view. This debug
 information in the response

 Django needs to either:
  1. Deprecate and remove populate_xheaders, or
  2. Add X-Object-Type and X-Object-Id header support to class-based
 generic views.

 If we choose to do (2), then we can't just wrap the generic view response
 in populate_xheaders, because we don't have access to the response object
 at the time at which we determine the object that is in use. It will
 probably be necessary to add generic support to define headers anywhere in
 the lifespan of a request, and then apply those headers when the response
 is constructed; i.e., in much the same way that self.request is available
 throughout the lifespan of a request, make self.response_headers available
 throughout the lifespan of a request.

--

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

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



[Django] #15741: Class-based generic views dropped support for X-Object-* headers

2011-04-02 Thread Django
#15741: Class-based generic views dropped support for X-Object-* headers
-+-
   Reporter:  russellm   |Owner:  nobody
   Type:  New feature|   Status:  new
  Milestone: |Component:  Generic
Version:  1.3|  views
   Keywords: | Severity:  Normal
  Has patch:  0  | Triage Stage:  Design
Needs tests:  0  |  decision needed
 |  Needs documentation:  0
 |  Patch needs improvement:  0
-+-
 The function-based generic views use the
 django.core.xheaders.populate_xheaders method to attach a X-Object-Type
 and X-Object-Id header to responses served by a generic view. This debug
 information in the response

 Django needs to either:
  1) Deprecate and remove populate_xheaders, or
  2) Add X-Object-Type and X-Object-Id header support to class-based
 generic views.

 If we choose to do (2), then we can't just wrap the generic view response
 in populate_xheaders, because we don't have access to the response object
 at the time at which we determine the object that is in use. It will
 probably be necessary to add generic support to define headers anywhere in
 the lifespan of a request, and then apply those headers when the response
 is constructed; i.e., in much the same way that self.request is available
 throughout the lifespan of a request, make self.response_headers available
 throughout the lifespan of a request.

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

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



Re: [Django] #14091: Fix incorrect quoting in connection.queries

2011-04-02 Thread Django
#14091: Fix incorrect quoting in connection.queries
-+-
   Reporter:  danielr|Owner:  aaugustin
   Type:  Bug|   Status:  new
  Milestone: |Component:  Database layer
Version:  1.2|  (models, ORM)
 Resolution: | Severity:  Normal
   Triage Stage:  Accepted   | Keywords:
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  0  |  Needs tests:  0
-+-
Changes (by aaugustin):

 * type:  Uncategorized => Bug


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

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



Re: [Django] #14091: Fix incorrect quoting in connection.queries (was: PATCH: fix incorrect quoting in connection.queries for MySQL)

2011-04-02 Thread Django
#14091: Fix incorrect quoting in connection.queries
-+-
   Reporter:  danielr|Owner:  aaugustin
   Type: |   Status:  new
  Uncategorized  |Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.2| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by aaugustin):

 * type:   => Uncategorized
 * severity:   => Normal


Comment:

 I updated the patch after the postgresql backend was removed and the
 postgresql_psycopg2 backend was refactored.

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

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



Re: [Django] #10499: Maybe make _default_manager part of the public API

2011-04-02 Thread Django
#10499: Maybe make _default_manager part of the public API
-+-
   Reporter: |Owner:  nobody
  mtredinnick|   Status:  new
   Type:  New|Component:  Database layer
  feature|  (models, ORM)
  Milestone: | Severity:  Normal
Version:  SVN| Keywords:
 Resolution: |Has patch:  0
   Triage Stage:  Design |  Needs tests:  0
  decision needed|
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => New feature
 * severity:   => Normal


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

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



Re: [Django] #10504: Consistency between HttpResponse* params and render_to_response

2011-04-02 Thread Django
#10504: Consistency between HttpResponse* params and render_to_response
-+-
   Reporter:  bhagany|Owner:  nobody
   Type: |   Status:  new
  Cleanup/optimization   |Component:  HTTP handling
  Milestone: | Severity:  Normal
Version:  1.0| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => Cleanup/optimization
 * severity:   => Normal


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

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



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

2011-04-02 Thread Django
#10506: Automatically use correct auto-manager class for inherited models
-+-
   Reporter: |Owner:  mtredinnick
  mtredinnick|   Status:  new
   Type:  Bug|Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



Re: [Django] #10509: Better handling of database version-specific feature initialisation

2011-04-02 Thread Django
#10509: Better handling of database version-specific feature initialisation
-+-
   Reporter: |Owner:  Xof
  mtredinnick|   Status:  assigned
   Type:  Bug|Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



Re: [Django] #10515: Add __rand__ and __ror__ to QuerySet [PATCH]

2011-04-02 Thread Django
#10515: Add __rand__ and __ror__ to QuerySet [PATCH]
-+-
   Reporter: |Owner:  nobody
  sebastian_noack|   Status:  new
   Type:  New|Component:  Database layer
  feature|  (models, ORM)
  Milestone: | Severity:  Normal
Version:  1.0| Keywords:
 Resolution: |Has patch:  1
   Triage Stage:  Design |  Needs tests:  1
  decision needed|
Needs documentation:  1  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => New feature
 * severity:   => Normal


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

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



Re: [Django] #10523: Changing object with long __repr__ causes error

2011-04-02 Thread Django
#10523: Changing object with long __repr__ causes error
+-
   Reporter:  bromer|Owner:  nobody
   Type:  Bug   |   Status:  reopened
  Milestone:|Component:  contrib.admin
Version:  1.2-beta  | Severity:  Normal
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



Re: [Django] #10532: An overridden get method on a custom manager passed to get_object_or_404 will not be called.

2011-04-02 Thread Django
#10532: An overridden get method on a custom manager passed to get_object_or_404
will not be called.
-+-
   Reporter:  anonymous  |Owner:  nobody
   Type:  Bug|   Status:  new
  Milestone: |Component:  Database layer
Version:  SVN|  (models, ORM)
 Resolution: | Severity:  Normal
   Triage Stage:  Design | Keywords:
  decision needed|Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



Re: [Django] #10494: show query params DoesNotExist from QuerySet.get

2011-04-02 Thread Django
#10494: show query params DoesNotExist from QuerySet.get
-+-
   Reporter:  brondsem   |Owner:  nobody
   Type:  New|   Status:  new
  feature|Component:  Database layer
  Milestone: |  (models, ORM)
Version:  1.0| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Design |Has patch:  0
  decision needed|  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => New feature
 * severity:   => Normal


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

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



Re: [Django] #10491: an unevaluated lazy object

2011-04-02 Thread Django
#10491: an unevaluated lazy object
+-
   Reporter:  liangent  |Owner:  nobody
   Type:  Bug   |   Status:  new
  Milestone:|Component:  HTTP handling
Version:  SVN   | Severity:  Normal
 Resolution:| Keywords:
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



Re: [Django] #10414: select_related ignores unrecognized fields

2011-04-02 Thread Django
#10414: select_related ignores unrecognized fields
-+-
   Reporter: |Owner:  trebor74hr
  trebor74hr |   Status:  assigned
   Type:  Bug|Component:  Database layer
  Milestone: |  (models, ORM)
Version: | Severity:  Normal
 Resolution: | Keywords:  select_related
   Triage Stage:  Design |Has patch:  1
  decision needed|  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

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



Re: [Django] #10435: WSGI handler class cannot be overridden in runserver

2011-04-02 Thread Django
#10435: WSGI handler class cannot be overridden in runserver
-+-
   Reporter:  trevor |Owner:  nobody
   Type:  New|   Status:  new
  feature|Component:  Core (Management
  Milestone: |  commands)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Design |Has patch:  1
  decision needed|  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => New feature
 * severity:   => Normal


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

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



Re: [Django] #10436: Application names i18n in the admin app broken

2011-04-02 Thread Django
#10436: Application names i18n in the admin app broken
-+-
   Reporter:  ramiro |Owner:  ramiro
   Type:  New|   Status:  new
  feature|Component:  contrib.admin
  Milestone:  1.4| Severity:  Normal
Version:  SVN| Keywords:  blocktrans trans
 Resolution: |  app_label breadcrumbs capfirst
   Triage Stage:  Accepted   |  title
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  0  |  Needs tests:  0
-+-
Changes (by SmileyChris):

 * type:   => New feature
 * severity:   => Normal


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

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



Re: [Django] #10449: HTML accents not escaped out when using newforms (was: Bug: HTML accents not escaped out when using newforms)

2011-04-02 Thread Django
#10449: HTML accents not escaped out when using newforms
-+-
   Reporter:  tipan  |Owner:  nobody
   Type:  Bug|   Status:  reopened
  Milestone: |Component:  Internationalization
Version:  1.0| Severity:  Normal
 Resolution: | Keywords:  accents, newforms
   Triage Stage:  Design |Has patch:  0
  decision needed|  Needs tests:  1
Needs documentation:  1  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal
 * stage:  Accepted => Design decision needed


Comment:

 I'm bumping this issue back to a design decision. Not sure I agree with
 malcolm's logic either - even though he is the master of all things
 escape-related.

 It also seems like this late in the game it's a rather large backwards
 incompatibility to introduce (even if the current behaviour isn't
 explicitly documented).

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

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



Re: [Django] #15740: Manipulating the test client session doesn't work as documented

2011-04-02 Thread Django
#15740: Manipulating the test client session doesn't work as documented
-+-
   Reporter: |Owner:  prestontimmons
  prestontimmons |   Status:  new
   Type:  Bug|Component:  Testing framework
  Milestone: | Severity:  Normal
Version:  1.3| Keywords:
 Resolution: |Has patch:  1
   Triage Stage: |  Needs tests:  0
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by prestontimmons):

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


Comment:

 This ticket is partially related to this one:
 http://code.djangoproject.com/ticket/10899.

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

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



Re: [Django] #10456: Canada localflavor improvements/fixes

2011-04-02 Thread Django
#10456: Canada localflavor improvements/fixes
+---
   Reporter:  mmulley   |Owner:  nobody
   Type:  Bug   |   Status:  new
  Milestone:|Component:  contrib.localflavor
Version:  SVN   | Severity:  Normal
 Resolution:| Keywords:  localflavor ca
   Triage Stage:  Accepted  |Has patch:  1
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+---
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



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

2011-04-02 Thread Django
#10461: Annotation and generic relations do not work well together
+-
   Reporter:  mk|Owner:
   Type:  Bug   |   Status:  new
  Milestone:|Component:  ORM aggregation
Version:  SVN   | Severity:  Normal
 Resolution:| Keywords:  generic relations
   Triage Stage:  Accepted  |Has patch:  0
Needs documentation:  0 |  Needs tests:  0
Patch needs improvement:  0 |
+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



Re: [Django] #10464: Django Lighttpd Deployment Addition

2011-04-02 Thread Django
#10464: Django Lighttpd Deployment Addition
---+-
   Reporter:  dgt84|Owner:
   Type:  New feature  |   Status:  assigned
  Milestone:   |Component:  Documentation
Version:  1.0  | Severity:  Normal
 Resolution:   | Keywords:  deployment
   Triage Stage:  Accepted |Has patch:  0
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+-
Changes (by SmileyChris):

 * type:   => New feature
 * severity:   => Normal


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

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



Re: [Django] #10466: Document that functions in QuerySets' parameters are eagerly evaluated.

2011-04-02 Thread Django
#10466: Document that functions in QuerySets' parameters are eagerly evaluated.
-+-
   Reporter:  liangent   |Owner:  nobody
   Type: |   Status:  reopened
  Cleanup/optimization   |Component:  Documentation
  Milestone: | Severity:  Normal
Version:  SVN| Keywords:
 Resolution: |Has patch:  0
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => Cleanup/optimization
 * severity:   => Normal


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

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



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

2011-04-02 Thread Django
#10476: Fix(?) model insert handling when autcommit=True for PostgreSQL <= 8.1
-+-
   Reporter: |Owner:  mtredinnick
  mtredinnick|   Status:  new
   Type:  Bug|Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  1
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

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



Re: [Django] #10498: Passing ugettext_lazy to related object's create() doesn't work

2011-04-02 Thread Django
#10498: Passing ugettext_lazy to related object's create() doesn't work
-+-
   Reporter: |Owner:  nobody
  mtredinnick|   Status:  new
   Type:  Bug|Component:  Database layer
  Milestone: |  (models, ORM)
Version:  SVN| Severity:  Normal
 Resolution: | Keywords:
   Triage Stage:  Accepted   |Has patch:  0
Needs documentation:  0  |  Needs tests:  0
Patch needs improvement:  0  |
-+-
Changes (by SmileyChris):

 * type:   => Bug
 * severity:   => Normal


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

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



[Django] #15740: Manipulating the test client session doesn't work as documented

2011-04-02 Thread Django
#15740: Manipulating the test client session doesn't work as documented
+--
 Reporter:  prestontimmons  | Owner:  prestontimmons
 Type:  Bug |Status:  new
Milestone:  | Component:  Testing framework
  Version:  1.3 |  Severity:  Normal
 Keywords:  |  Triage Stage:  Unreviewed
Has patch:  1   |
+--
 The example for manipulating session variables at this url does not work
 as documented:

 
http://docs.djangoproject.com/en/1.3/topics/testing/#django.test.client.Client.session

 {{{#!python
 def test_something(self):
 session = self.client.session
 session['somekey'] = 'test'
 session.save()
 }}}

 The test client returns a dictionary rather than a session object, unless
 a session object is manually added to the client or a view is called that
 initiates a session.

 Attached is a patch that modifies the client to return a session object
 whenever django.contrib.sessions is installed.

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

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



[Changeset] r15995 - in django/branches/releases/1.3.X: django/views/generic tests/regressiontests/generic_views

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:50:05 -0700 (Sat, 02 Apr 2011)
New Revision: 15995

Modified:
   django/branches/releases/1.3.X/django/views/generic/base.py
   django/branches/releases/1.3.X/tests/regressiontests/generic_views/base.py
Log:
[1.3.X] Fixed #15739 -- Added support to RedirectView for HEAD, OPTIONS, POST, 
PUT and DELETE requests

Backport of r15992 from trunk.

Modified: django/branches/releases/1.3.X/django/views/generic/base.py
===
--- django/branches/releases/1.3.X/django/views/generic/base.py 2011-04-02 
08:45:54 UTC (rev 15994)
+++ django/branches/releases/1.3.X/django/views/generic/base.py 2011-04-02 
08:50:05 UTC (rev 15995)
@@ -161,3 +161,18 @@
 'request': self.request
 })
 return http.HttpResponseGone()
+
+def head(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def post(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def options(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def delete(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def put(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)

Modified: 
django/branches/releases/1.3.X/tests/regressiontests/generic_views/base.py
===
--- django/branches/releases/1.3.X/tests/regressiontests/generic_views/base.py  
2011-04-02 08:45:54 UTC (rev 15994)
+++ django/branches/releases/1.3.X/tests/regressiontests/generic_views/base.py  
2011-04-02 08:50:05 UTC (rev 15995)
@@ -261,3 +261,33 @@
 response = 
RedirectView.as_view(url='/bar/%(object_id)d/')(self.rf.get('/foo/42/'), 
object_id=42)
 self.assertEqual(response.status_code, 301)
 self.assertEqual(response['Location'], '/bar/42/')
+
+def test_redirect_POST(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.post('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_HEAD(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.head('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_OPTIONS(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.options('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_PUT(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.put('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_DELETE(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.delete('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')

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



[Changeset] r15994 - django/trunk/tests/regressiontests/test_client_regress

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:45:54 -0700 (Sat, 02 Apr 2011)
New Revision: 15994

Modified:
   django/trunk/tests/regressiontests/test_client_regress/models.py
Log:
Corrected warning filter in test_client_regress

Modified: django/trunk/tests/regressiontests/test_client_regress/models.py
===
--- django/trunk/tests/regressiontests/test_client_regress/models.py
2011-04-02 08:45:38 UTC (rev 15993)
+++ django/trunk/tests/regressiontests/test_client_regress/models.py
2011-04-02 08:45:54 UTC (rev 15994)
@@ -886,8 +886,7 @@
 """
 def setUp(self):
 self.save_warnings_state()
-warnings.filterwarnings('ignore', category=DeprecationWarning,
-module='django.test.client')
+warnings.filterwarnings('ignore', category=DeprecationWarning)
 
 def tearDown(self):
 self.restore_warnings_state()

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



[Changeset] r15993 - django/trunk/tests/modeltests/test_client

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:45:38 -0700 (Sat, 02 Apr 2011)
New Revision: 15993

Modified:
   django/trunk/tests/modeltests/test_client/urls.py
Log:
More migrations to use RedirectView instead of redirect_to

Modified: django/trunk/tests/modeltests/test_client/urls.py
===
--- django/trunk/tests/modeltests/test_client/urls.py   2011-04-02 08:45:22 UTC 
(rev 15992)
+++ django/trunk/tests/modeltests/test_client/urls.py   2011-04-02 08:45:38 UTC 
(rev 15993)
@@ -1,5 +1,5 @@
 from django.conf.urls.defaults import *
-from django.views.generic.simple import redirect_to
+from django.views.generic import RedirectView
 import views
 
 urlpatterns = patterns('',
@@ -9,10 +9,10 @@
 (r'^raw_post_view/$', views.raw_post_view),
 (r'^redirect_view/$', views.redirect_view),
 (r'^secure_view/$', views.view_with_secure),
-(r'^permanent_redirect_view/$', redirect_to, {'url': 
'/test_client/get_view/'}),
-(r'^temporary_redirect_view/$', redirect_to, {'url': 
'/test_client/get_view/', 'permanent': False}),
-(r'^http_redirect_view/$', redirect_to, {'url': 
'/test_client/secure_view/'}),
-(r'^https_redirect_view/$', redirect_to, {'url': 
'https://testserver/test_client/secure_view/'}),
+(r'^permanent_redirect_view/$', 
RedirectView.as_view(url='/test_client/get_view/')),
+(r'^temporary_redirect_view/$', 
RedirectView.as_view(url='/test_client/get_view/', permanent=False)),
+(r'^http_redirect_view/$', 
RedirectView.as_view(url='/test_client/secure_view/')),
+(r'^https_redirect_view/$', 
RedirectView.as_view(url='https://testserver/test_client/secure_view/')),
 (r'^double_redirect_view/$', views.double_redirect_view),
 (r'^bad_view/$', views.bad_view),
 (r'^form_view/$', views.form_view),

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



[Changeset] r15992 - in django/trunk: django/views/generic tests/regressiontests/generic_views

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:45:22 -0700 (Sat, 02 Apr 2011)
New Revision: 15992

Modified:
   django/trunk/django/views/generic/base.py
   django/trunk/tests/regressiontests/generic_views/base.py
Log:
Fixed #15739 -- Added support to RedirectView for HEAD, OPTIONS, POST, PUT and 
DELETE requests

Modified: django/trunk/django/views/generic/base.py
===
--- django/trunk/django/views/generic/base.py   2011-04-02 08:45:06 UTC (rev 
15991)
+++ django/trunk/django/views/generic/base.py   2011-04-02 08:45:22 UTC (rev 
15992)
@@ -161,3 +161,18 @@
 'request': self.request
 })
 return http.HttpResponseGone()
+
+def head(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def post(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def options(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def delete(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)
+
+def put(self, request, *args, **kwargs):
+return self.get(request, *args, **kwargs)

Modified: django/trunk/tests/regressiontests/generic_views/base.py
===
--- django/trunk/tests/regressiontests/generic_views/base.py2011-04-02 
08:45:06 UTC (rev 15991)
+++ django/trunk/tests/regressiontests/generic_views/base.py2011-04-02 
08:45:22 UTC (rev 15992)
@@ -261,3 +261,33 @@
 response = 
RedirectView.as_view(url='/bar/%(object_id)d/')(self.rf.get('/foo/42/'), 
object_id=42)
 self.assertEqual(response.status_code, 301)
 self.assertEqual(response['Location'], '/bar/42/')
+
+def test_redirect_POST(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.post('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_HEAD(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.head('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_OPTIONS(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.options('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_PUT(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.put('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')
+
+def test_redirect_DELETE(self):
+"Default is a permanent redirect"
+response = RedirectView.as_view(url='/bar/')(self.rf.delete('/foo/'))
+self.assertEqual(response.status_code, 301)
+self.assertEqual(response['Location'], '/bar/')

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



[Changeset] r15991 - django/trunk/tests/regressiontests/test_client_regress

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:45:06 -0700 (Sat, 02 Apr 2011)
New Revision: 15991

Modified:
   django/trunk/tests/regressiontests/test_client_regress/models.py
   django/trunk/tests/regressiontests/test_client_regress/urls.py
Log:
Updated to test_client_regress to use RedirectView instead of deprecated 
redirect_to.

Modified: django/trunk/tests/regressiontests/test_client_regress/models.py
===
--- django/trunk/tests/regressiontests/test_client_regress/models.py
2011-04-02 08:44:47 UTC (rev 15990)
+++ django/trunk/tests/regressiontests/test_client_regress/models.py
2011-04-02 08:45:06 UTC (rev 15991)
@@ -3,6 +3,7 @@
 Regression tests for the Test Client, especially the customized assertions.
 """
 import os
+import warnings
 
 from django.conf import settings
 from django.core.exceptions import SuspiciousOperation
@@ -883,6 +884,14 @@
 Response.template still works backwards-compatibly, but with pending 
deprecation warning. Refs #12226.
 
 """
+def setUp(self):
+self.save_warnings_state()
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+module='django.test.client')
+
+def tearDown(self):
+self.restore_warnings_state()
+
 def test_response_template_data(self):
 response = self.client.get("/test_client_regress/request_data/", 
data={'foo':'whiz'})
 self.assertEqual(response.template.__class__, Template)

Modified: django/trunk/tests/regressiontests/test_client_regress/urls.py
===
--- django/trunk/tests/regressiontests/test_client_regress/urls.py  
2011-04-02 08:44:47 UTC (rev 15990)
+++ django/trunk/tests/regressiontests/test_client_regress/urls.py  
2011-04-02 08:45:06 UTC (rev 15991)
@@ -1,5 +1,5 @@
 from django.conf.urls.defaults import *
-from django.views.generic.simple import redirect_to
+from django.views.generic import RedirectView
 import views
 
 urlpatterns = patterns('',
@@ -10,22 +10,22 @@
 (r'^request_data_extended/$', views.request_data, 
{'template':'extended.html', 'data':'bacon'}),
 url(r'^arg_view/(?P.+)/$', views.view_with_argument, 
name='arg_view'),
 (r'^login_protected_redirect_view/$', views.login_protected_redirect_view),
-(r'^redirects/$', redirect_to, {'url': 
'/test_client_regress/redirects/further/'}),
-(r'^redirects/further/$', redirect_to, {'url': 
'/test_client_regress/redirects/further/more/'}),
-(r'^redirects/further/more/$', redirect_to, {'url': 
'/test_client_regress/no_template_view/'}),
-(r'^redirect_to_non_existent_view/$', redirect_to, {'url': 
'/test_client_regress/non_existent_view/'}),
-(r'^redirect_to_non_existent_view2/$', redirect_to, {'url': 
'/test_client_regress/redirect_to_non_existent_view/'}),
-(r'^redirect_to_self/$', redirect_to, {'url': 
'/test_client_regress/redirect_to_self/'}),
-(r'^circular_redirect_1/$', redirect_to, {'url': 
'/test_client_regress/circular_redirect_2/'}),
-(r'^circular_redirect_2/$', redirect_to, {'url': 
'/test_client_regress/circular_redirect_3/'}),
-(r'^circular_redirect_3/$', redirect_to, {'url': 
'/test_client_regress/circular_redirect_1/'}),
+(r'^redirects/$', 
RedirectView.as_view(url='/test_client_regress/redirects/further/')),
+(r'^redirects/further/$', 
RedirectView.as_view(url='/test_client_regress/redirects/further/more/')),
+(r'^redirects/further/more/$', 
RedirectView.as_view(url='/test_client_regress/no_template_view/')),
+(r'^redirect_to_non_existent_view/$', 
RedirectView.as_view(url='/test_client_regress/non_existent_view/')),
+(r'^redirect_to_non_existent_view2/$', 
RedirectView.as_view(url='/test_client_regress/redirect_to_non_existent_view/')),
+(r'^redirect_to_self/$', 
RedirectView.as_view(url='/test_client_regress/redirect_to_self/')),
+(r'^circular_redirect_1/$', 
RedirectView.as_view(url='/test_client_regress/circular_redirect_2/')),
+(r'^circular_redirect_2/$', 
RedirectView.as_view(url='/test_client_regress/circular_redirect_3/')),
+(r'^circular_redirect_3/$', 
RedirectView.as_view(url='/test_client_regress/circular_redirect_1/')),
 (r'^set_session/$', views.set_session_view),
 (r'^check_session/$', views.check_session_view),
 (r'^request_methods/$', views.request_methods_view),
 (r'^check_unicode/$', views.return_unicode),
 (r'^parse_unicode_json/$', views.return_json_file),
 (r'^check_headers/$', views.check_headers),
-(r'^check_headers_redirect/$', redirect_to, {'url': 
'/test_client_regress/check_headers/'}),
+(r'^check_headers_redirect/$', 
RedirectView.as_view(url='/test_client_regress/check_headers/')),
 (r'^raw_post_data/$', views.raw_post_data),
 (r'^request_context_view/$', views.request_context_view),
 )

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to 

[Changeset] r15990 - in django/trunk: django/contrib/auth/fixtures django/contrib/auth/tests tests tests/modeltests/field_subclassing tests/regressiontests/admin_scripts tests/regressiontests/backend

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:44:47 -0700 (Sat, 02 Apr 2011)
New Revision: 15990

Added:
   django/trunk/django/contrib/auth/fixtures/context-processors-users.xml
   django/trunk/django/contrib/auth/tests/context_processors.py
Removed:
   django/trunk/tests/regressiontests/context_processors/fixtures/
Modified:
   django/trunk/django/contrib/auth/tests/urls.py
   django/trunk/tests/modeltests/field_subclassing/fields.py
   django/trunk/tests/regressiontests/admin_scripts/tests.py
   django/trunk/tests/regressiontests/backends/tests.py
   django/trunk/tests/regressiontests/comment_tests/tests/feed_tests.py
   django/trunk/tests/regressiontests/comment_tests/urls.py
   django/trunk/tests/regressiontests/context_processors/tests.py
   django/trunk/tests/regressiontests/context_processors/urls.py
   django/trunk/tests/regressiontests/context_processors/views.py
   django/trunk/tests/regressiontests/csrf_tests/tests.py
   django/trunk/tests/regressiontests/forms/localflavor/cz.py
   django/trunk/tests/regressiontests/i18n/test_warnings.py
   django/trunk/tests/regressiontests/settings_tests/tests.py
   django/trunk/tests/regressiontests/syndication/feeds.py
   django/trunk/tests/regressiontests/syndication/tests.py
   django/trunk/tests/regressiontests/syndication/urls.py
   django/trunk/tests/regressiontests/templates/loaders.py
   django/trunk/tests/regressiontests/templates/tests.py
   django/trunk/tests/regressiontests/views/tests/debug.py
   django/trunk/tests/regressiontests/views/tests/generic/create_update.py
   django/trunk/tests/regressiontests/views/tests/generic/date_based.py
   django/trunk/tests/regressiontests/views/tests/generic/object_list.py
   django/trunk/tests/regressiontests/views/tests/generic/simple.py
   django/trunk/tests/regressiontests/views/tests/shortcuts.py
   django/trunk/tests/regressiontests/views/views.py
   django/trunk/tests/runtests.py
Log:
Updates to the test suite to allow for newly deprecated and removed features

Copied: django/trunk/django/contrib/auth/fixtures/context-processors-users.xml 
(from rev 15989, 
django/trunk/tests/regressiontests/context_processors/fixtures/context-processors-users.xml)
===
--- django/trunk/django/contrib/auth/fixtures/context-processors-users.xml  
(rev 0)
+++ django/trunk/django/contrib/auth/fixtures/context-processors-users.xml  
2011-04-02 08:44:47 UTC (rev 15990)
@@ -0,0 +1,17 @@
+
+
+
+super
+Super
+User
+su...@example.com
+sha1$995a3$6011485ea3834267d719b4c801409b8b1ddd0158
+True
+True
+True
+2007-05-30 
13:20:10
+2007-05-30 
13:20:10
+
+
+
+

Added: django/trunk/django/contrib/auth/tests/context_processors.py
===
--- django/trunk/django/contrib/auth/tests/context_processors.py
(rev 0)
+++ django/trunk/django/contrib/auth/tests/context_processors.py
2011-04-02 08:44:47 UTC (rev 15990)
@@ -0,0 +1,77 @@
+# from django.conf import settings
+from django.contrib.auth import authenticate
+from django.db.models import Q
+from django.test import TestCase
+# from django.template import Template
+
+class AuthContextProcessorTests(TestCase):
+"""
+Tests for the ``django.contrib.auth.context_processors.auth`` processor
+"""
+urls = 'regressiontests.context_processors.urls'
+fixtures = ['context-processors-users.xml']
+
+def test_session_not_accessed(self):
+"""
+Tests that the session is not accessed simply by including
+the auth context processor
+"""
+response = self.client.get('/auth_processor_no_attr_access/')
+self.assertContains(response, "Session not accessed")
+
+def test_session_is_accessed(self):
+"""
+Tests that the session is accessed if the auth context processor
+is used and relevant attributes accessed.
+"""
+response = self.client.get('/auth_processor_attr_access/')
+self.assertContains(response, "Session accessed")
+
+def test_perms_attrs(self):
+self.client.login(username='super', password='secret')
+response = self.client.get('/auth_processor_perms/')
+self.assertContains(response, "Has auth permissions")
+
+def test_message_attrs(self):
+self.client.login(username='super', password='secret')
+response = self.client.get('/auth_processor_messages/')
+self.assertContains(response, "Message 1")
+
+def test_user_attrs(self):
+"""
+Test that the lazy objects returned behave just like the wrapped 
objects.
+"""
+# These are 'functional' level tests for common use cases.  Direct
+# testing of the implementation (SimpleLazyObject) is in the 'utils'
+# tests.
+self.client.login(username='super'

[Changeset] r15989 - django/trunk/django/views/generic

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:44:04 -0700 (Sat, 02 Apr 2011)
New Revision: 15989

Modified:
   django/trunk/django/views/generic/create_update.py
   django/trunk/django/views/generic/date_based.py
   django/trunk/django/views/generic/list_detail.py
   django/trunk/django/views/generic/simple.py
Log:
Advanced deprecations for function-based generic views

Modified: django/trunk/django/views/generic/create_update.py
===
--- django/trunk/django/views/generic/create_update.py  2011-04-02 08:43:43 UTC 
(rev 15988)
+++ django/trunk/django/views/generic/create_update.py  2011-04-02 08:44:04 UTC 
(rev 15989)
@@ -11,7 +11,7 @@
 import warnings
 warnings.warn(
 'Function-based generic views have been deprecated; use class-based views 
instead.',
-PendingDeprecationWarning
+DeprecationWarning
 )
 
 

Modified: django/trunk/django/views/generic/date_based.py
===
--- django/trunk/django/views/generic/date_based.py 2011-04-02 08:43:43 UTC 
(rev 15988)
+++ django/trunk/django/views/generic/date_based.py 2011-04-02 08:44:04 UTC 
(rev 15989)
@@ -10,7 +10,7 @@
 import warnings
 warnings.warn(
 'Function-based generic views have been deprecated; use class-based views 
instead.',
-PendingDeprecationWarning
+DeprecationWarning
 )
 
 

Modified: django/trunk/django/views/generic/list_detail.py
===
--- django/trunk/django/views/generic/list_detail.py2011-04-02 08:43:43 UTC 
(rev 15988)
+++ django/trunk/django/views/generic/list_detail.py2011-04-02 08:44:04 UTC 
(rev 15989)
@@ -7,7 +7,7 @@
 import warnings
 warnings.warn(
 'Function-based generic views have been deprecated; use class-based views 
instead.',
-PendingDeprecationWarning
+DeprecationWarning
 )
 
 

Modified: django/trunk/django/views/generic/simple.py
===
--- django/trunk/django/views/generic/simple.py 2011-04-02 08:43:43 UTC (rev 
15988)
+++ django/trunk/django/views/generic/simple.py 2011-04-02 08:44:04 UTC (rev 
15989)
@@ -5,7 +5,7 @@
 import warnings
 warnings.warn(
 'Function-based generic views have been deprecated; use class-based views 
instead.',
-PendingDeprecationWarning
+DeprecationWarning
 )
 
 logger = getLogger('django.request')

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



[Changeset] r15988 - in django/trunk/django: conf conf/locale contrib/admin/locale contrib/admindocs/locale contrib/auth/locale contrib/comments/locale contrib/contenttypes/locale contrib/flatpages/l

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:43:43 -0700 (Sat, 02 Apr 2011)
New Revision: 15988

Removed:
   django/trunk/django/conf/locale/no/
   django/trunk/django/contrib/admin/locale/no/
   django/trunk/django/contrib/admindocs/locale/no/
   django/trunk/django/contrib/auth/locale/no/
   django/trunk/django/contrib/comments/locale/no/
   django/trunk/django/contrib/contenttypes/locale/no/
   django/trunk/django/contrib/flatpages/locale/no/
   django/trunk/django/contrib/formtools/locale/no/
   django/trunk/django/contrib/gis/locale/no/
   django/trunk/django/contrib/humanize/locale/no/
   django/trunk/django/contrib/localflavor/locale/no/
   django/trunk/django/contrib/messages/locale/no/
   django/trunk/django/contrib/redirects/locale/no/
   django/trunk/django/contrib/sessions/locale/no/
   django/trunk/django/contrib/sites/locale/no/
Modified:
   django/trunk/django/conf/global_settings.py
   django/trunk/django/utils/translation/trans_real.py
Log:
Removed deprecated 'no' translation

Modified: django/trunk/django/conf/global_settings.py
===
--- django/trunk/django/conf/global_settings.py 2011-04-02 08:41:51 UTC (rev 
15987)
+++ django/trunk/django/conf/global_settings.py 2011-04-02 08:43:43 UTC (rev 
15988)
@@ -84,7 +84,6 @@
 ('ml', gettext_noop('Malayalam')),
 ('mn', gettext_noop('Mongolian')),
 ('nl', gettext_noop('Dutch')),
-('no', gettext_noop('Norwegian')),
 ('nb', gettext_noop('Norwegian Bokmal')),
 ('nn', gettext_noop('Norwegian Nynorsk')),
 ('pa', gettext_noop('Punjabi')),

Modified: django/trunk/django/utils/translation/trans_real.py
===
--- django/trunk/django/utils/translation/trans_real.py 2011-04-02 08:41:51 UTC 
(rev 15987)
+++ django/trunk/django/utils/translation/trans_real.py 2011-04-02 08:43:43 UTC 
(rev 15988)
@@ -187,12 +187,6 @@
 language and installs it as the current translation object for the current
 thread.
 """
-if isinstance(language, basestring) and language == 'no':
-warnings.warn(
-"The use of the language code 'no' is deprecated. "
-"Please use the 'nb' translation instead.",
-DeprecationWarning
-)
 _active.value = translation(language)
 
 def deactivate():

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



[Changeset] r15987 - django/trunk/django/utils/translation

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:41:51 -0700 (Sat, 02 Apr 2011)
New Revision: 15987

Modified:
   django/trunk/django/utils/translation/__init__.py
   django/trunk/django/utils/translation/trans_null.py
   django/trunk/django/utils/translation/trans_real.py
Log:
Advanced deprecations in django.utils.translation.

Modified: django/trunk/django/utils/translation/__init__.py
===
--- django/trunk/django/utils/translation/__init__.py   2011-04-02 08:41:26 UTC 
(rev 15986)
+++ django/trunk/django/utils/translation/__init__.py   2011-04-02 08:41:51 UTC 
(rev 15987)
@@ -55,7 +55,7 @@
 warnings.warn("Translations in the project directory "
   "aren't supported anymore. Use the "
   "LOCALE_PATHS setting instead.",
-  PendingDeprecationWarning)
+  DeprecationWarning)
 else:
 from django.utils.translation import trans_null as trans
 setattr(self, real_name, getattr(trans, real_name))

Modified: django/trunk/django/utils/translation/trans_null.py
===
--- django/trunk/django/utils/translation/trans_null.py 2011-04-02 08:41:26 UTC 
(rev 15986)
+++ django/trunk/django/utils/translation/trans_null.py 2011-04-02 08:41:51 UTC 
(rev 15987)
@@ -58,21 +58,3 @@
 
 def get_language_from_request(request):
 return settings.LANGUAGE_CODE
-
-# get_date_formats and get_partial_date_formats aren't used anymore by Django
-# but are kept for backward compatibility.
-def get_date_formats():
-warnings.warn(
-'`django.utils.translation.get_date_formats` is deprecated. '
-'Please update your code to use the new i18n aware formatting.',
-DeprecationWarning
-)
-return settings.DATE_FORMAT, settings.DATETIME_FORMAT, settings.TIME_FORMAT
-
-def get_partial_date_formats():
-warnings.warn(
-'`django.utils.translation.get_partial_date_formats` is deprecated. '
-'Please update your code to use the new i18n aware formatting.',
-DeprecationWarning
-)
-return settings.YEAR_MONTH_FORMAT, settings.MONTH_DAY_FORMAT

Modified: django/trunk/django/utils/translation/trans_real.py
===
--- django/trunk/django/utils/translation/trans_real.py 2011-04-02 08:41:26 UTC 
(rev 15986)
+++ django/trunk/django/utils/translation/trans_real.py 2011-04-02 08:41:51 UTC 
(rev 15987)
@@ -551,51 +551,3 @@
 result.append((lang, priority))
 result.sort(key=lambda k: k[1], reverse=True)
 return result
-
-# get_date_formats and get_partial_date_formats aren't used anymore by Django
-# and are kept for backward compatibility.
-# Note, it's also important to keep format names marked for translation.
-# For compatibility we still want to have formats on translation catalogs.
-# That makes template code like {{ my_date|date:_('DATE_FORMAT') }} still work
-def get_date_formats():
-"""
-Checks whether translation files provide a translation for some technical
-message ID to store date and time formats. If it doesn't contain one, the
-formats provided in the settings will be used.
-"""
-warnings.warn(
-"'django.utils.translation.get_date_formats' is deprecated. "
-"Please update your code to use the new i18n aware formatting.",
-DeprecationWarning
-)
-from django.conf import settings
-date_format = ugettext('DATE_FORMAT')
-datetime_format = ugettext('DATETIME_FORMAT')
-time_format = ugettext('TIME_FORMAT')
-if date_format == 'DATE_FORMAT':
-date_format = settings.DATE_FORMAT
-if datetime_format == 'DATETIME_FORMAT':
-datetime_format = settings.DATETIME_FORMAT
-if time_format == 'TIME_FORMAT':
-time_format = settings.TIME_FORMAT
-return date_format, datetime_format, time_format
-
-def get_partial_date_formats():
-"""
-Checks whether translation files provide a translation for some technical
-message ID to store partial date formats. If it doesn't contain one, the
-formats provided in the settings will be used.
-"""
-warnings.warn(
-"'django.utils.translation.get_partial_date_formats' is deprecated. "
-"Please update your code to use the new i18n aware formatting.",
-DeprecationWarning
-)
-from django.conf import settings
-year_month_format = ugettext('YEAR_MONTH_FORMAT')
-month_day_format = ugettext('MONTH_DAY_FORMAT')
-if year_month_format == 'YEAR_MONTH_FORMAT':
-year_month_format = settings.YEAR_MONTH_FORMAT
-if month_day_format == 'MONTH_DAY_FORMAT':
-month_day_format = settings.MONTH_DAY_FORMAT
-return year_month_format, month_day_format

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates

[Changeset] r15986 - django/trunk/django/test

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:41:26 -0700 (Sat, 02 Apr 2011)
New Revision: 15986

Modified:
   django/trunk/django/test/client.py
   django/trunk/django/test/simple.py
Log:
Advanced deprecations in django.test.

Modified: django/trunk/django/test/client.py
===
--- django/trunk/django/test/client.py  2011-04-02 08:41:03 UTC (rev 15985)
+++ django/trunk/django/test/client.py  2011-04-02 08:41:26 UTC (rev 15986)
@@ -421,7 +421,7 @@
 # Provide a backwards-compatible (but pending deprecation) 
response.template
 def _get_template(self):
 warnings.warn("response.template is deprecated; use 
response.templates instead (which is always a list)",
-  PendingDeprecationWarning, stacklevel=2)
+  DeprecationWarning, stacklevel=2)
 if not self.templates:
 return None
 elif len(self.templates) == 1:

Modified: django/trunk/django/test/simple.py
===
--- django/trunk/django/test/simple.py  2011-04-02 08:41:03 UTC (rev 15985)
+++ django/trunk/django/test/simple.py  2011-04-02 08:41:26 UTC (rev 15986)
@@ -19,7 +19,7 @@
 import warnings
 warnings.warn(
 "DjangoTestRunner is deprecated; it's functionality is 
indistinguishable from TextTestRunner",
-PendingDeprecationWarning
+DeprecationWarning
 )
 super(DjangoTestRunner, self).__init__(*args, **kwargs)
 
@@ -355,12 +355,3 @@
 self.teardown_databases(old_config)
 self.teardown_test_environment()
 return self.suite_result(suite, result)
-
-def run_tests(test_labels, verbosity=1, interactive=True, failfast=False, 
extra_tests=None):
-import warnings
-warnings.warn(
-'The run_tests() test runner has been deprecated in favor of 
DjangoTestSuiteRunner.',
-DeprecationWarning
-)
-test_runner = DjangoTestSuiteRunner(verbosity=verbosity, 
interactive=interactive, failfast=failfast)
-return test_runner.run_tests(test_labels, extra_tests=extra_tests)

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



[Changeset] r15985 - in django/trunk/django/template: . loaders

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:41:03 -0700 (Sat, 02 Apr 2011)
New Revision: 15985

Modified:
   django/trunk/django/template/defaulttags.py
   django/trunk/django/template/loader.py
   django/trunk/django/template/loaders/app_directories.py
   django/trunk/django/template/loaders/eggs.py
   django/trunk/django/template/loaders/filesystem.py
Log:
Advanced deprecations in django.template.

Modified: django/trunk/django/template/defaulttags.py
===
--- django/trunk/django/template/defaulttags.py 2011-04-02 08:40:38 UTC (rev 
15984)
+++ django/trunk/django/template/defaulttags.py 2011-04-02 08:41:03 UTC (rev 
15985)
@@ -989,7 +989,7 @@
 
 import warnings
 warnings.warn('The syntax for the ssi template tag is changing. Load the 
`ssi` tag from the `future` tag library to start using the new behavior.',
-  category=PendingDeprecationWarning)
+  category=DeprecationWarning)
 
 bits = token.contents.split()
 parsed = False
@@ -1240,7 +1240,7 @@
 
 import warnings
 warnings.warn('The syntax for the url template tag is changing. Load the 
`url` tag from the `future` tag library to start using the new behavior.',
-  category=PendingDeprecationWarning)
+  category=DeprecationWarning)
 
 bits = token.split_contents()
 if len(bits) < 2:

Modified: django/trunk/django/template/loader.py
===
--- django/trunk/django/template/loader.py  2011-04-02 08:40:38 UTC (rev 
15984)
+++ django/trunk/django/template/loader.py  2011-04-02 08:41:03 UTC (rev 
15985)
@@ -137,18 +137,6 @@
 pass
 raise TemplateDoesNotExist(name)
 
-def find_template_source(name, dirs=None):
-# For backward compatibility
-import warnings
-warnings.warn(
-"`django.template.loader.find_template_source` is deprecated; use 
`django.template.loader.find_template` instead.",
-DeprecationWarning
-)
-template, origin = find_template(name, dirs)
-if hasattr(template, 'render'):
-raise Exception("Found a compiled template that is incompatible with 
the deprecated `django.template.loader.find_template_source` function.")
-return template, origin
-
 def get_template(template_name):
 """
 Returns a compiled Template object for the given template name,

Modified: django/trunk/django/template/loaders/app_directories.py
===
--- django/trunk/django/template/loaders/app_directories.py 2011-04-02 
08:40:38 UTC (rev 15984)
+++ django/trunk/django/template/loaders/app_directories.py 2011-04-02 
08:41:03 UTC (rev 15985)
@@ -62,13 +62,3 @@
 raise TemplateDoesNotExist(template_name)
 
 _loader = Loader()
-
-def load_template_source(template_name, template_dirs=None):
-# For backwards compatibility
-import warnings
-warnings.warn(
-"'django.template.loaders.app_directories.load_template_source' is 
deprecated; use 'django.template.loaders.app_directories.Loader' instead.",
-DeprecationWarning
-)
-return _loader.load_template_source(template_name, template_dirs)
-load_template_source.is_usable = True

Modified: django/trunk/django/template/loaders/eggs.py
===
--- django/trunk/django/template/loaders/eggs.py2011-04-02 08:40:38 UTC 
(rev 15984)
+++ django/trunk/django/template/loaders/eggs.py2011-04-02 08:41:03 UTC 
(rev 15985)
@@ -28,12 +28,3 @@
 raise TemplateDoesNotExist(template_name)
 
 _loader = Loader()
-
-def load_template_source(template_name, template_dirs=None):
-import warnings
-warnings.warn(
-"'django.template.loaders.eggs.load_template_source' is deprecated; 
use 'django.template.loaders.eggs.Loader' instead.",
-DeprecationWarning
-)
-return _loader.load_template_source(template_name, template_dirs)
-load_template_source.is_usable = resource_string is not None

Modified: django/trunk/django/template/loaders/filesystem.py
===
--- django/trunk/django/template/loaders/filesystem.py  2011-04-02 08:40:38 UTC 
(rev 15984)
+++ django/trunk/django/template/loaders/filesystem.py  2011-04-02 08:41:03 UTC 
(rev 15985)
@@ -49,13 +49,3 @@
 load_template_source.is_usable = True
 
 _loader = Loader()
-
-def load_template_source(template_name, template_dirs=None):
-# For backwards compatibility
-import warnings
-warnings.warn(
-"'django.template.loaders.filesystem.load_template_source' is 
deprecated; use 'django.template.loaders.filesystem.Loader' instead.",
-DeprecationWarning
-)
-return _loader.load_template_source(template_name, template_dirs)
-load_template_source.is_usable = True

-- 
You received this message because you are subscribed to 

[Changeset] r15984 - django/trunk/django/http

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:40:38 -0700 (Sat, 02 Apr 2011)
New Revision: 15984

Modified:
   django/trunk/django/http/__init__.py
Log:
Advanced deprecation on CompatCookie.

Modified: django/trunk/django/http/__init__.py
===
--- django/trunk/django/http/__init__.py2011-04-02 08:40:14 UTC (rev 
15983)
+++ django/trunk/django/http/__init__.py2011-04-02 08:40:38 UTC (rev 
15984)
@@ -115,7 +115,7 @@
 super(CompatCookie, self).__init__(*args, **kwargs)
 import warnings
 warnings.warn("CompatCookie is deprecated, use 
django.http.SimpleCookie instead.",
-  PendingDeprecationWarning)
+  DeprecationWarning)
 
 from django.utils.datastructures import MultiValueDict, ImmutableList
 from django.utils.encoding import smart_str, iri_to_uri, force_unicode

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



[Changeset] r15983 - django/trunk/django/forms

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:40:14 -0700 (Sat, 02 Apr 2011)
New Revision: 15983

Modified:
   django/trunk/django/forms/fields.py
Log:
Removed deprecated en_format helper function.

Modified: django/trunk/django/forms/fields.py
===
--- django/trunk/django/forms/fields.py 2011-04-02 08:39:52 UTC (rev 15982)
+++ django/trunk/django/forms/fields.py 2011-04-02 08:40:14 UTC (rev 15983)
@@ -43,16 +43,6 @@
 'TypedChoiceField', 'TypedMultipleChoiceField'
 )
 
-def en_format(name):
-"""
-Helper function to stay backward compatible.
-"""
-from django.conf.locale.en import formats
-warnings.warn(
-"`django.forms.fields.DEFAULT_%s` is deprecated; use 
`django.utils.formats.get_format('%s')` instead." % (name, name),
-DeprecationWarning
-)
-return getattr(formats, name)
 
 DEFAULT_DATE_INPUT_FORMATS = lazy(lambda: en_format('DATE_INPUT_FORMATS'), 
tuple, list)()
 DEFAULT_TIME_INPUT_FORMATS = lazy(lambda: en_format('TIME_INPUT_FORMATS'), 
tuple, list)()

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



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

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:39:52 -0700 (Sat, 02 Apr 2011)
New Revision: 15982

Modified:
   django/trunk/django/db/models/fields/__init__.py
Log:
Removed deprecated XMLField.

Modified: django/trunk/django/db/models/fields/__init__.py
===
--- django/trunk/django/db/models/fields/__init__.py2011-04-02 08:39:31 UTC 
(rev 15981)
+++ django/trunk/django/db/models/fields/__init__.py2011-04-02 08:39:52 UTC 
(rev 15982)
@@ -1128,14 +1128,3 @@
 }
 defaults.update(kwargs)
 return super(URLField, self).formfield(**defaults)
-
-class XMLField(TextField):
-description = _("XML text")
-
-def __init__(self, verbose_name=None, name=None, schema_path=None, 
**kwargs):
-import warnings
-warnings.warn("Use of XMLField has been deprecated; please use 
TextField instead.",
-  DeprecationWarning)
-self.schema_path = schema_path
-Field.__init__(self, verbose_name, name, **kwargs)
-

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



[Changeset] r15981 - django/trunk/django/test

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:39:31 -0700 (Sat, 02 Apr 2011)
New Revision: 15981

Modified:
   django/trunk/django/test/utils.py
Log:
Removed a usage of the depreacted SMTPConnection in test.utils.

Modified: django/trunk/django/test/utils.py
===
--- django/trunk/django/test/utils.py   2011-04-02 08:39:08 UTC (rev 15980)
+++ django/trunk/django/test/utils.py   2011-04-02 08:39:31 UTC (rev 15981)
@@ -67,9 +67,6 @@
 Template.original_render = Template._render
 Template._render = instrumented_test_render
 
-mail.original_SMTPConnection = mail.SMTPConnection
-mail.SMTPConnection = locmem.EmailBackend
-
 mail.original_email_backend = settings.EMAIL_BACKEND
 settings.EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
 
@@ -88,9 +85,6 @@
 Template._render = Template.original_render
 del Template.original_render
 
-mail.SMTPConnection = mail.original_SMTPConnection
-del mail.original_SMTPConnection
-
 settings.EMAIL_BACKEND = mail.original_email_backend
 del mail.original_email_backend
 

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



[Changeset] r15980 - in django/trunk/django/db/backends: . postgresql_psycopg2

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:39:08 -0700 (Sat, 02 Apr 2011)
New Revision: 15980

Added:
   django/trunk/django/db/backends/postgresql_psycopg2/client.py
   django/trunk/django/db/backends/postgresql_psycopg2/creation.py
   django/trunk/django/db/backends/postgresql_psycopg2/operations.py
   django/trunk/django/db/backends/postgresql_psycopg2/version.py
Removed:
   django/trunk/django/db/backends/postgresql/
Modified:
   django/trunk/django/db/backends/postgresql_psycopg2/base.py
   django/trunk/django/db/backends/postgresql_psycopg2/introspection.py
Log:
Deprecated the psycopg-based postgresql database backend.

Modified: django/trunk/django/db/backends/postgresql_psycopg2/base.py
===
--- django/trunk/django/db/backends/postgresql_psycopg2/base.py 2011-04-02 
08:38:25 UTC (rev 15979)
+++ django/trunk/django/db/backends/postgresql_psycopg2/base.py 2011-04-02 
08:39:08 UTC (rev 15980)
@@ -9,10 +9,10 @@
 from django.db import utils
 from django.db.backends import *
 from django.db.backends.signals import connection_created
-from django.db.backends.postgresql.operations import DatabaseOperations as 
PostgresqlDatabaseOperations
-from django.db.backends.postgresql.client import DatabaseClient
-from django.db.backends.postgresql.creation import DatabaseCreation
-from django.db.backends.postgresql.version import get_version
+from django.db.backends.postgresql_psycopg2.operations import 
DatabaseOperations
+from django.db.backends.postgresql_psycopg2.client import DatabaseClient
+from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation
+from django.db.backends.postgresql_psycopg2.version import get_version
 from django.db.backends.postgresql_psycopg2.introspection import 
DatabaseIntrospection
 from django.utils.safestring import SafeUnicode, SafeString
 
@@ -71,16 +71,6 @@
 has_real_datatype = True
 can_defer_constraint_checks = True
 
-class DatabaseOperations(PostgresqlDatabaseOperations):
-def last_executed_query(self, cursor, sql, params):
-# With psycopg2, cursor objects have a "query" attribute that is the
-# exact query sent to the database. See docs here:
-# 
http://www.initd.org/tracker/psycopg/wiki/psycopg2_documentation#postgresql-status-message-and-executed-query
-return cursor.query
-
-def return_insert_id(self):
-return "RETURNING %s", ()
-
 class DatabaseWrapper(BaseDatabaseWrapper):
 vendor = 'postgresql'
 operators = {

Copied: django/trunk/django/db/backends/postgresql_psycopg2/client.py (from rev 
15979, django/trunk/django/db/backends/postgresql/client.py)
===
--- django/trunk/django/db/backends/postgresql_psycopg2/client.py   
(rev 0)
+++ django/trunk/django/db/backends/postgresql_psycopg2/client.py   
2011-04-02 08:39:08 UTC (rev 15980)
@@ -0,0 +1,23 @@
+import os
+import sys
+
+from django.db.backends import BaseDatabaseClient
+
+class DatabaseClient(BaseDatabaseClient):
+executable_name = 'psql'
+
+def runshell(self):
+settings_dict = self.connection.settings_dict
+args = [self.executable_name]
+if settings_dict['USER']:
+args += ["-U", settings_dict['USER']]
+if settings_dict['HOST']:
+args.extend(["-h", settings_dict['HOST']])
+if settings_dict['PORT']:
+args.extend(["-p", str(settings_dict['PORT'])])
+args += [settings_dict['NAME']]
+if os.name == 'nt':
+sys.exit(os.system(" ".join(args)))
+else:
+os.execvp(self.executable_name, args)
+

Copied: django/trunk/django/db/backends/postgresql_psycopg2/creation.py (from 
rev 15979, django/trunk/django/db/backends/postgresql/creation.py)
===
--- django/trunk/django/db/backends/postgresql_psycopg2/creation.py 
(rev 0)
+++ django/trunk/django/db/backends/postgresql_psycopg2/creation.py 
2011-04-02 08:39:08 UTC (rev 15980)
@@ -0,0 +1,77 @@
+from django.db.backends.creation import BaseDatabaseCreation
+from django.db.backends.util import truncate_name
+
+
+class DatabaseCreation(BaseDatabaseCreation):
+# This dictionary maps Field objects to their associated PostgreSQL column
+# types, as strings. Column-type strings can contain format strings; 
they'll
+# be interpolated against the values of Field.__dict__ before being output.
+# If a column type is set to None, it won't be included in the output.
+data_types = {
+'AutoField': 'serial',
+'BooleanField':  'boolean',
+'CharField': 'varchar(%(max_length)s)',
+'CommaSeparatedIntegerField': 'varchar(%(max_length)s)',
+'DateField': 'date',
+'DateTimeField': 'timestamp with time zone',
+'DecimalField':  'numeric(%(max_dig

[Changeset] r15979 - django/trunk/django/db/backends

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:38:25 -0700 (Sat, 02 Apr 2011)
New Revision: 15979

Modified:
   django/trunk/django/db/backends/creation.py
Log:
Removed deprecated DB backend functions for creating m2m tables.

Modified: django/trunk/django/db/backends/creation.py
===
--- django/trunk/django/db/backends/creation.py 2011-04-02 08:37:53 UTC (rev 
15978)
+++ django/trunk/django/db/backends/creation.py 2011-04-02 08:38:25 UTC (rev 
15979)
@@ -132,115 +132,6 @@
 del pending_references[model]
 return final_output
 
-def sql_for_many_to_many(self, model, style):
-"Return the CREATE TABLE statments for all the many-to-many tables 
defined on a model"
-import warnings
-warnings.warn(
-'Database creation API for m2m tables has been deprecated. M2M 
models are now automatically generated',
-DeprecationWarning
-)
-
-output = []
-for f in model._meta.local_many_to_many:
-if model._meta.managed or f.rel.to._meta.managed:
-output.extend(self.sql_for_many_to_many_field(model, f, style))
-return output
-
-def sql_for_many_to_many_field(self, model, f, style):
-"Return the CREATE TABLE statements for a single m2m field"
-import warnings
-warnings.warn(
-'Database creation API for m2m tables has been deprecated. M2M 
models are now automatically generated',
-DeprecationWarning
-)
-
-from django.db import models
-from django.db.backends.util import truncate_name
-
-output = []
-if f.auto_created:
-opts = model._meta
-qn = self.connection.ops.quote_name
-tablespace = f.db_tablespace or opts.db_tablespace
-if tablespace:
-sql = self.connection.ops.tablespace_sql(tablespace, 
inline=True)
-if sql:
-tablespace_sql = ' ' + sql
-else:
-tablespace_sql = ''
-else:
-tablespace_sql = ''
-table_output = [style.SQL_KEYWORD('CREATE TABLE') + ' ' + \
-style.SQL_TABLE(qn(f.m2m_db_table())) + ' (']
-table_output.append('%s %s %s%s,' %
-(style.SQL_FIELD(qn('id')),
-
style.SQL_COLTYPE(models.AutoField(primary_key=True).db_type(connection=self.connection)),
-style.SQL_KEYWORD('NOT NULL PRIMARY KEY'),
-tablespace_sql))
-
-deferred = []
-inline_output, deferred = 
self.sql_for_inline_many_to_many_references(model, f, style)
-table_output.extend(inline_output)
-
-table_output.append('%s (%s, %s)%s' %
-(style.SQL_KEYWORD('UNIQUE'),
-style.SQL_FIELD(qn(f.m2m_column_name())),
-style.SQL_FIELD(qn(f.m2m_reverse_name())),
-tablespace_sql))
-table_output.append(')')
-if opts.db_tablespace:
-# f.db_tablespace is only for indices, so ignore its value 
here.
-
table_output.append(self.connection.ops.tablespace_sql(opts.db_tablespace))
-table_output.append(';')
-output.append('\n'.join(table_output))
-
-for r_table, r_col, table, col in deferred:
-r_name = '%s_refs_%s_%s' % (r_col, col, self._digest(r_table, 
table))
-output.append(style.SQL_KEYWORD('ALTER TABLE') + ' %s ADD 
CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s)%s;' %
-(qn(r_table),
-qn(truncate_name(r_name, 
self.connection.ops.max_name_length())),
-qn(r_col), qn(table), qn(col),
-self.connection.ops.deferrable_sql()))
-
-# Add any extra SQL needed to support auto-incrementing PKs
-autoinc_sql = self.connection.ops.autoinc_sql(f.m2m_db_table(), 
'id')
-if autoinc_sql:
-for stmt in autoinc_sql:
-output.append(stmt)
-return output
-
-def sql_for_inline_many_to_many_references(self, model, field, style):
-"Create the references to other tables required by a many-to-many 
table"
-import warnings
-warnings.warn(
-'Database creation API for m2m tables has been deprecated. M2M 
models are now automatically generated',
-DeprecationWarning
-)
-
-from django.db import models
-opts = model._meta
-qn = self.connection.ops.quote_name
-
-table_output = [
-'%s %s %s %s (%s)%s,' %
-(style.SQL_FIELD(qn(field.m2m_column_name())),
-
style.SQL_COLTYPE(models.ForeignKey(model).db_type(connection=self.connection)),
-style.SQL_KEYWORD('NOT NULL REFERENCES'),
-style.SQL_TABLE(qn(opts.db_table)),
-style

[Changeset] r15978 - in django/trunk/django/core: . handlers mail management management/commands

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:37:53 -0700 (Sat, 02 Apr 2011)
New Revision: 15978

Modified:
   django/trunk/django/core/context_processors.py
   django/trunk/django/core/handlers/modpython.py
   django/trunk/django/core/mail/__init__.py
   django/trunk/django/core/management/commands/reset.py
   django/trunk/django/core/management/commands/test.py
   django/trunk/django/core/management/sql.py
Log:
Advanced deprecations in core.mail, core.commands, core.context_processors and 
core.handlers.

Modified: django/trunk/django/core/context_processors.py
===
--- django/trunk/django/core/context_processors.py  2011-04-02 08:37:15 UTC 
(rev 15977)
+++ django/trunk/django/core/context_processors.py  2011-04-02 08:37:53 UTC 
(rev 15978)
@@ -11,24 +11,6 @@
 from django.middleware.csrf import get_token
 from django.utils.functional import lazy
 
-def auth(request):
-"""
-DEPRECATED. This context processor is the old location, and has been moved
-to `django.contrib.auth.context_processors`.
-
-This function still exists for backwards-compatibility; it will be removed
-in Django 1.4.
-"""
-import warnings
-warnings.warn(
-"The context processor at `django.core.context_processors.auth` is " \
-"deprecated; use the path 
`django.contrib.auth.context_processors.auth` " \
-"instead.",
-DeprecationWarning
-)
-from django.contrib.auth.context_processors import auth as 
auth_context_processor
-return auth_context_processor(request)
-
 def csrf(request):
 """
 Context processor that provides a CSRF token, or the string 'NOTPROVIDED' 
if
@@ -97,7 +79,7 @@
 "`django.core.context_processors.PermLookupDict` is " \
 "deprecated; use 
`django.contrib.auth.context_processors.PermLookupDict` " \
 "instead.",
-PendingDeprecationWarning
+DeprecationWarning
 )
 super(PermLookupDict, self).__init__(*args, **kwargs)
 
@@ -108,6 +90,6 @@
 "`django.core.context_processors.PermWrapper` is " \
 "deprecated; use 
`django.contrib.auth.context_processors.PermWrapper` " \
 "instead.",
-PendingDeprecationWarning
+DeprecationWarning
 )
 super(PermWrapper, self).__init__(*args, **kwargs)

Modified: django/trunk/django/core/handlers/modpython.py
===
--- django/trunk/django/core/handlers/modpython.py  2011-04-02 08:37:15 UTC 
(rev 15977)
+++ django/trunk/django/core/handlers/modpython.py  2011-04-02 08:37:53 UTC 
(rev 15978)
@@ -160,7 +160,7 @@
 
 def __call__(self, req):
 warn(('The mod_python handler is deprecated; use a WSGI or FastCGI 
server instead.'),
- PendingDeprecationWarning)
+ DeprecationWarning)
 
 # mod_python fakes the environ, and thus doesn't process SetEnv.  This 
fixes that
 os.environ.update(req.subprocess_env)

Modified: django/trunk/django/core/mail/__init__.py
===
--- django/trunk/django/core/mail/__init__.py   2011-04-02 08:37:15 UTC (rev 
15977)
+++ django/trunk/django/core/mail/__init__.py   2011-04-02 08:37:53 UTC (rev 
15978)
@@ -107,13 +107,3 @@
 if html_message:
 mail.attach_alternative(html_message, 'text/html')
 mail.send(fail_silently=fail_silently)
-
-
-class SMTPConnection(_SMTPConnection):
-def __init__(self, *args, **kwds):
-import warnings
-warnings.warn(
-'mail.SMTPConnection is deprecated; use mail.get_connection() 
instead.',
-DeprecationWarning
-)
-super(SMTPConnection, self).__init__(*args, **kwds)

Modified: django/trunk/django/core/management/commands/reset.py
===
--- django/trunk/django/core/management/commands/reset.py   2011-04-02 
08:37:15 UTC (rev 15977)
+++ django/trunk/django/core/management/commands/reset.py   2011-04-02 
08:37:53 UTC (rev 15978)
@@ -24,7 +24,7 @@
 import warnings
 warnings.warn(
 'This command has been deprecated. The command ``flush`` can be 
used to delete everything. You can also use ALTER TABLE or DROP TABLE 
statements manually.',
-PendingDeprecationWarning
+DeprecationWarning
 )
 using = options.get('database', DEFAULT_DB_ALIAS)
 connection = connections[using]

Modified: django/trunk/django/core/management/commands/test.py
===
--- django/trunk/django/core/management/commands/test.py2011-04-02 
08:37:15 UTC (rev 15977)
+++ django/trunk/django/core/management/commands/test.py2011-04-02 
08:37:53 UTC (rev 15978)
@@ -23,18 +23,8 @@
 failfast = options.get('failfast', False)

[Changeset] r15977 - in django/trunk: django/core/cache django/core/cache/backends docs/internals

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:37:15 -0700 (Sat, 02 Apr 2011)
New Revision: 15977

Modified:
   django/trunk/django/core/cache/__init__.py
   django/trunk/django/core/cache/backends/memcached.py
   django/trunk/docs/internals/deprecation.txt
Log:
Advanced deprecations in core.cache.

Modified: django/trunk/django/core/cache/__init__.py
===
--- django/trunk/django/core/cache/__init__.py  2011-04-02 08:36:40 UTC (rev 
15976)
+++ django/trunk/django/core/cache/__init__.py  2011-04-02 08:37:15 UTC (rev 
15977)
@@ -80,7 +80,7 @@
 import warnings
 warnings.warn(
 "settings.CACHE_* is deprecated; use settings.CACHES instead.",
-PendingDeprecationWarning
+DeprecationWarning
 )
 else:
 # The default cache setting is put here so that we

Modified: django/trunk/django/core/cache/backends/memcached.py
===
--- django/trunk/django/core/cache/backends/memcached.py2011-04-02 
08:36:40 UTC (rev 15976)
+++ django/trunk/django/core/cache/backends/memcached.py2011-04-02 
08:37:15 UTC (rev 15977)
@@ -126,24 +126,18 @@
 def clear(self):
 self._cache.flush_all()
 
-# For backwards compatibility -- the default cache class tries a
-# cascading lookup of cmemcache, then memcache.
 class CacheClass(BaseMemcachedCache):
 def __init__(self, server, params):
+warnings.warn(
+"memcached.CacheClass has been split into memcached.MemcachedCache 
and memcached.PyLibMCCache. Please update your cache backend setting.",
+PendingDeprecationWarning
+)
 try:
-import cmemcache as memcache
-import warnings
-warnings.warn(
-"Support for the 'cmemcache' library has been deprecated. 
Please use python-memcached or pyblimc instead.",
-DeprecationWarning
-)
-except ImportError:
-try:
-import memcache
-except:
-raise InvalidCacheBackendError(
-"Memcached cache backend requires either the 'memcache' or 
'cmemcache' library"
-)
+import memcache
+except:
+raise InvalidCacheBackendError(
+"Memcached cache backend requires either the 'memcache' or 
'cmemcache' library"
+)
 super(CacheClass, self).__init__(server, params,
  library=memcache,
  value_not_found_exception=ValueError)

Modified: django/trunk/docs/internals/deprecation.txt
===
--- django/trunk/docs/internals/deprecation.txt 2011-04-02 08:36:40 UTC (rev 
15976)
+++ django/trunk/docs/internals/deprecation.txt 2011-04-02 08:37:15 UTC (rev 
15977)
@@ -186,6 +186,12 @@
   synonym for ``django.views.decorators.csrf.csrf_exempt``, which 
should
   be used to replace it.
 
+* The :class:`~django.core.cache.backends.memcached.CacheClass` backend
+  was split into two in Django 1.3 in order to introduce support for
+  PyLibMC. The historical 
:class:`~django.core.cache.backends.memcached.CacheClass`
+  is now an alias for 
:class:`~django.core.cache.backends.memcached.MemcachedCache`.
+  In Django 1.6, the historical alias will be removed.
+
 * 2.0
 * ``django.views.defaults.shortcut()``. This function has been moved
   to ``django.contrib.contenttypes.views.shortcut()`` as part of the

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



[Changeset] r15976 - django/trunk/django/contrib/syndication

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:36:40 -0700 (Sat, 02 Apr 2011)
New Revision: 15976

Removed:
   django/trunk/django/contrib/syndication/feeds.py
Modified:
   django/trunk/django/contrib/syndication/views.py
Log:
Advanced deprecations in contrib.syndication.

Deleted: django/trunk/django/contrib/syndication/feeds.py
===
--- django/trunk/django/contrib/syndication/feeds.py2011-04-02 08:36:04 UTC 
(rev 15975)
+++ django/trunk/django/contrib/syndication/feeds.py2011-04-02 08:36:40 UTC 
(rev 15976)
@@ -1,38 +0,0 @@
-from django.contrib.syndication import views
-from django.core.exceptions import ObjectDoesNotExist
-import warnings
-
-# This is part of the deprecated API
-from django.contrib.syndication.views import FeedDoesNotExist, add_domain
-
-class Feed(views.Feed):
-"""Provided for backwards compatibility."""
-def __init__(self, slug, request):
-warnings.warn('The syndication feeds.Feed class is deprecated. Please '
-  'use the new class based view API.',
-  category=DeprecationWarning)
-
-self.slug = slug
-self.request = request
-self.feed_url = getattr(self, 'feed_url', None) or request.path
-self.title_template = self.title_template or ('feeds/%s_title.html' % 
slug)
-self.description_template = self.description_template or 
('feeds/%s_description.html' % slug)
-
-def get_object(self, bits):
-return None
-
-def get_feed(self, url=None):
-"""
-Returns a feedgenerator.DefaultFeed object, fully populated, for
-this feed. Raises FeedDoesNotExist for invalid parameters.
-"""
-if url:
-bits = url.split('/')
-else:
-bits = []
-try:
-obj = self.get_object(bits)
-except ObjectDoesNotExist:
-raise FeedDoesNotExist
-return super(Feed, self).get_feed(obj, self.request)
-

Modified: django/trunk/django/contrib/syndication/views.py
===
--- django/trunk/django/contrib/syndication/views.py2011-04-02 08:36:04 UTC 
(rev 15975)
+++ django/trunk/django/contrib/syndication/views.py2011-04-02 08:36:40 UTC 
(rev 15976)
@@ -183,47 +183,3 @@
 **self.item_extra_kwargs(item)
 )
 return feed
-
-
-def feed(request, url, feed_dict=None):
-"""Provided for backwards compatibility."""
-from django.contrib.syndication.feeds import Feed as LegacyFeed
-import warnings
-warnings.warn('The syndication feed() view is deprecated. Please use the '
-  'new class based view API.',
-  category=DeprecationWarning)
-
-if not feed_dict:
-raise Http404("No feeds are registered.")
-
-try:
-slug, param = url.split('/', 1)
-except ValueError:
-slug, param = url, ''
-
-try:
-f = feed_dict[slug]
-except KeyError:
-raise Http404("Slug %r isn't registered." % slug)
-
-# Backwards compatibility within the backwards compatibility;
-# Feeds can be updated to be class-based, but still be deployed
-# using the legacy feed view. This only works if the feed takes
-# no arguments (i.e., get_object returns None). Refs #14176.
-if not issubclass(f, LegacyFeed):
-instance = f()
-instance.feed_url = getattr(f, 'feed_url', None) or request.path
-instance.title_template = f.title_template or ('feeds/%s_title.html' % 
slug)
-instance.description_template = f.description_template or 
('feeds/%s_description.html' % slug)
-
-return instance(request)
-
-try:
-feedgen = f(slug, request).get_feed(param)
-except FeedDoesNotExist:
-raise Http404("Invalid feed parameters. Slug %r is valid, but other 
parameters, or lack thereof, are not." % slug)
-
-response = HttpResponse(mimetype=feedgen.mime_type)
-feedgen.write(response, 'utf-8')
-return response
-

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



[Changeset] r15975 - in django/trunk: django/conf django/contrib/auth django/contrib/messages django/contrib/messages/storage django/contrib/messages/tests docs/ref/contrib

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:36:04 -0700 (Sat, 02 Apr 2011)
New Revision: 15975

Removed:
   django/trunk/django/contrib/messages/storage/user_messages.py
   django/trunk/django/contrib/messages/tests/user_messages.py
Modified:
   django/trunk/django/conf/global_settings.py
   django/trunk/django/contrib/auth/models.py
   django/trunk/django/contrib/messages/api.py
   django/trunk/django/contrib/messages/tests/__init__.py
   django/trunk/django/contrib/messages/tests/base.py
   django/trunk/docs/ref/contrib/messages.txt
Log:
Advanced deprecation of user-based messages and the LegacyFallbackStorage in 
contrib.messages.

Modified: django/trunk/django/conf/global_settings.py
===
--- django/trunk/django/conf/global_settings.py 2011-04-02 08:35:25 UTC (rev 
15974)
+++ django/trunk/django/conf/global_settings.py 2011-04-02 08:36:04 UTC (rev 
15975)
@@ -502,7 +502,7 @@
 
 
 # Class to use as messges backend
-MESSAGE_STORAGE = 
'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
+MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
 
 # Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within
 # django.contrib.messages to avoid imports in this settings file.

Modified: django/trunk/django/contrib/auth/models.py
===
--- django/trunk/django/contrib/auth/models.py  2011-04-02 08:35:25 UTC (rev 
15974)
+++ django/trunk/django/contrib/auth/models.py  2011-04-02 08:36:04 UTC (rev 
15975)
@@ -345,13 +345,6 @@
 
 return _user_has_module_perms(self, app_label)
 
-def get_and_delete_messages(self):
-messages = []
-for m in self.message_set.all():
-messages.append(m.message)
-m.delete()
-return messages
-
 def email_user(self, subject, message, from_email=None):
 "Sends an email to this User."
 from django.core.mail import send_mail
@@ -387,21 +380,6 @@
 return self._profile_cache
 
 
-class Message(models.Model):
-"""
-The message system is a lightweight way to queue messages for given
-users. A message is associated with a User instance (so it is only
-applicable for registered users). There's no concept of expiration or
-timestamps. Messages are created by the Django admin after successful
-actions. For example, "The poll Foo was created successfully." is a
-message.
-"""
-user = models.ForeignKey(User, related_name='_message_set')
-message = models.TextField(_('message'))
-
-def __unicode__(self):
-return self.message
-
 class AnonymousUser(object):
 id = None
 username = ''

Modified: django/trunk/django/contrib/messages/api.py
===
--- django/trunk/django/contrib/messages/api.py 2011-04-02 08:35:25 UTC (rev 
15974)
+++ django/trunk/django/contrib/messages/api.py 2011-04-02 08:36:04 UTC (rev 
15975)
@@ -20,8 +20,6 @@
 """
 if hasattr(request, '_messages'):
 return request._messages.add(level, message, extra_tags)
-if hasattr(request, 'user') and request.user.is_authenticated():
-return request.user.message_set.create(message=message)
 if not fail_silently:
 raise MessageFailure('Without the django.contrib.messages '
 'middleware, messages can only be added to '

Deleted: django/trunk/django/contrib/messages/storage/user_messages.py
===
--- django/trunk/django/contrib/messages/storage/user_messages.py   
2011-04-02 08:35:25 UTC (rev 15974)
+++ django/trunk/django/contrib/messages/storage/user_messages.py   
2011-04-02 08:36:04 UTC (rev 15975)
@@ -1,64 +0,0 @@
-"""
-Storages used to assist in the deprecation of contrib.auth User messages.
-
-"""
-from django.contrib.messages import constants
-from django.contrib.messages.storage.base import BaseStorage, Message
-from django.contrib.auth.models import User
-from django.contrib.messages.storage.fallback import FallbackStorage
-
-
-class UserMessagesStorage(BaseStorage):
-"""
-Retrieves messages from the User, using the legacy user.message_set API.
-
-This storage is "read-only" insofar as it can only retrieve and delete
-messages, not store them.
-"""
-session_key = '_messages'
-
-def _get_messages_queryset(self):
-"""
-Returns the QuerySet containing all user messages (or ``None`` if
-request.user is not a contrib.auth User).
-"""
-user = getattr(self.request, 'user', None)
-if isinstance(user, User):
-return user._message_set.all()
-
-def add(self, *args, **kwargs):
-raise NotImplementedError('This message storage is read-only.')
-
-def _get(self, *args, **kwargs):
-"""
-Retrieves a list of messages assigned

[Changeset] r15974 - django/trunk/django/contrib/localflavor/cz

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:35:25 -0700 (Sat, 02 Apr 2011)
New Revision: 15974

Modified:
   django/trunk/django/contrib/localflavor/cz/forms.py
Log:
Advanced deprecations in contrib.localflavor.

Modified: django/trunk/django/contrib/localflavor/cz/forms.py
===
--- django/trunk/django/contrib/localflavor/cz/forms.py 2011-04-02 08:34:50 UTC 
(rev 15973)
+++ django/trunk/django/contrib/localflavor/cz/forms.py 2011-04-02 08:35:25 UTC 
(rev 15974)
@@ -73,7 +73,7 @@
 import warnings
 warnings.warn(
 "Support for validating the gender of a CZ Birth number has 
been deprecated.",
-PendingDeprecationWarning)
+DeprecationWarning)
 if gender == 'f':
 female_const = 50
 elif gender == 'm':

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



[Changeset] r15973 - django/trunk/django/contrib/gis/tests

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:34:50 -0700 (Sat, 02 Apr 2011)
New Revision: 15973

Modified:
   django/trunk/django/contrib/gis/tests/__init__.py
Log:
Advanced deprecations in contrib.gis.

Modified: django/trunk/django/contrib/gis/tests/__init__.py
===
--- django/trunk/django/contrib/gis/tests/__init__.py   2011-04-02 08:34:15 UTC 
(rev 15972)
+++ django/trunk/django/contrib/gis/tests/__init__.py   2011-04-02 08:34:50 UTC 
(rev 15973)
@@ -7,16 +7,6 @@
 return base_run_tests(*args, **kwargs)
 
 
-def run_gis_tests(test_labels, verbosity=1, interactive=True, failfast=False, 
extra_tests=None):
-import warnings
-warnings.warn(
-'The run_gis_tests() test runner has been deprecated in favor of 
GeoDjangoTestSuiteRunner.',
-DeprecationWarning
-)
-test_runner = GeoDjangoTestSuiteRunner(verbosity=verbosity, 
interactive=interactive, failfast=failfast)
-return test_runner.run_tests(test_labels, extra_tests=extra_tests)
-
-
 def geo_apps(namespace=True, runtests=False):
 """
 Returns a list of GeoDjango test applications that reside in

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



[Changeset] r15972 - django/trunk/django/contrib/formtools

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:34:15 -0700 (Sat, 02 Apr 2011)
New Revision: 15972

Modified:
   django/trunk/django/contrib/formtools/utils.py
Log:
Advanced deprecations in contrib.formtools.

Modified: django/trunk/django/contrib/formtools/utils.py
===
--- django/trunk/django/contrib/formtools/utils.py  2011-04-02 08:33:40 UTC 
(rev 15971)
+++ django/trunk/django/contrib/formtools/utils.py  2011-04-02 08:34:15 UTC 
(rev 15972)
@@ -19,7 +19,7 @@
 """
 import warnings
 warnings.warn("security_hash is deprecated; use form_hmac instead",
-  PendingDeprecationWarning)
+  DeprecationWarning)
 data = []
 for bf in form:
 # Get the value from the form data. If the form allows empty or hasn't

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



[Changeset] r15971 - django/trunk/django/contrib

2011-04-02 Thread noreply
Author: russellm
Date: 2011-04-02 01:33:40 -0700 (Sat, 02 Apr 2011)
New Revision: 15971

Removed:
   django/trunk/django/contrib/csrf/
Log:
Removed deprecated contrib.csrf app.

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



  1   2   >