Re: [Django] #14401: Add a contributing HOWTO page for new contributors

2010-11-30 Thread Django
#14401: Add a contributing HOWTO page for new contributors
+---
  Reporter:  gabrielhurley  | Owner:  gabrielhurley
Status:  new| Milestone:  1.3  
 Component:  Documentation  |   Version:  SVN  
Resolution: |  Keywords:  contributing 
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by gg):

 * cc: g...@briel.ca (removed)
 * cc: gg (added)

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

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



Re: [Django] #14819: Superfluous quote in docstring

2010-11-30 Thread Django
#14819: Superfluous quote in docstring
+---
  Reporter:  stringify  | Owner:  nobody
Status:  new| Milestone:
 Component:  Serialization  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by stringify):

  * needs_better_patch:  => 0
  * version:  1.2 => SVN
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Django] #14819: Superfluous quote in docstring

2010-11-30 Thread Django
#14819: Superfluous quote in docstring
---+
 Reporter:  stringify  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Serialization  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 A trivial fix to be sure, but it was messing up my editor's syntax
 highlighting so I had to do something.

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

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



Re: [Django] #14813: Order of fieldnames in exclude= (inside ModelForm) can mess things up

2010-11-30 Thread Django
#14813: Order of fieldnames in exclude= (inside ModelForm) can mess things up
-+--
  Reporter:  czartur | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Forms   |   Version:  1.2   
Resolution:  invalid |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by kmtracey):

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

Comment:

 You are missing a comma at the end of each 'last_response_created_at'
 line. This does not cause a problem when it is listed last, but it does
 when it is embedded in the list, since that line then gets combined with
 the next line, resulting in exclude listing a field that does not exist.
 Both affected lines are thus not excluded, which seems to be exactly what
 you have said is happening. Fix is to include the comma at the end of the
 line when the item is in the middle of the 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14818: cycle tag is not safe

2010-11-30 Thread Django
#14818: cycle tag is not safe
--+-
  Reporter:  steveire | Owner:  nobody
Status:  closed   | Milestone:
 Component:  Template system  |   Version:  1.2   
Resolution:  invalid  |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by mattmcc):

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

Comment:

 I don't see a bug here.  You might be misunderstanding how the cycle tag
 works.

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

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



Re: [Django] #5025: Add a "truncate" template filter

2010-11-30 Thread Django
#5025: Add a "truncate" template filter
--+-
  Reporter:  SmileyChris  | Owner:  nobody
Status:  reopened | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  1|  
--+-
Changes (by gg):

  * needs_better_patch:  0 => 1
  * needs_docs:  1 => 0

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

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



Re: [Django] #5025: Add a "truncate" template filter

2010-11-30 Thread Django
#5025: Add a "truncate" template filter
--+-
  Reporter:  SmileyChris  | Owner:  nobody
Status:  reopened | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  1|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by gg):

  * needs_docs:  0 => 1

Comment:

 marking as needs improvement, as per mtredinnick's comment, above

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

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



Re: [Django] #10870: Aggregates with joins ignore extra filters provided by setup_joins

2010-11-30 Thread Django
#10870: Aggregates with joins ignore extra filters provided by setup_joins
--+-
  Reporter:  fas  | Owner:  fas 

Status:  new  | Milestone:  1.3 

 Component:  ORM aggregation  |   Version:  SVN 

Resolution:   |  Keywords:  orm, aggregation, join, 
contenttypes, filter
 Stage:  Accepted | Has_patch:  0   

Needs_docs:  0|   Needs_tests:  0   

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

 * cc: chrischambers (added)

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

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



Re: [Django] #14809: Broken login related tests after r14733

2010-11-30 Thread Django
#14809: Broken login related tests after r14733
+---
  Reporter:  jezdez | Owner:  SmileyChris
Status:  assigned   | Milestone:  1.3
 Component:  Authentication |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by SmileyChris):

 The difference here is that `smart_str` is being done explicitly anyway
 since a `QueryDict` may have its own specified encoding. But I guess it
 doesn't hurt passing it through our functions again -- just seems rather
 pointless to me (and a negligibly larger change, since previously it
 didn't use Django's `urlencode`).

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

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



Re: [Django] #14816: Error in documentation of InlineModelAdmin options

2010-11-30 Thread Django
#14816: Error in documentation of InlineModelAdmin options
+---
  Reporter:  shelldweller   | Owner:  nobody   
Status:  new| Milestone:  1.3  
 Component:  Documentation  |   Version:  SVN  
Resolution: |  Keywords:  easy-pickings
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by elbarto):

 With modify the source I wanted to say "send a patch".

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

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



Re: [Django] #14816: Error in documentation of InlineModelAdmin options

2010-11-30 Thread Django
#14816: Error in documentation of InlineModelAdmin options
+---
  Reporter:  shelldweller   | Owner:  nobody   
Status:  new| Milestone:  1.3  
 Component:  Documentation  |   Version:  SVN  
Resolution: |  Keywords:  easy-pickings
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by elbarto):

 If you write the correct text which replace the current's one, I can
 modify it in source.

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

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



Re: [Django] #8363: Make it possible to specify tests to skip when running runtests.py

2010-11-30 Thread Django
#8363: Make it possible to specify tests to skip when running runtests.py
+---
  Reporter:  ramiro | Owner:  ramiro
Status:  new| Milestone:  1.3   
 Component:  Testing framework  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 Replying to [comment:10 ericholscher]:
 > Responded to ramiro on IRC, but putting my thoughts here too to have a
 better record.
 >
 > Seems that this should be exposed to the user-facing test management
 command as well. I think that having as little special in runtests, and
 keeping feature parity there is a good goal. This also means that
 appropriate documentation should be added.

 Problem is that currently building of the test suite is delegated to a
 tightly cooperation of the Django app cache and unittest2
 
(http://code.djangoproject.com/browser/django/trunk/django/test/simple.py?rev=14696#L209).
 *

 In the `test` management command case, the app cache is populated from
 INSTALLED_APPS and we don't have (yet) an API to get app names (the ones
 we would get form the command line) from app objects (the ones we are
 handling in `django.db.models.get_apps()`), we need this to hook there and
 skip addition of an app to the suite.

 Also, `unittest[2]` doesn't have an API to remove tests from a suite once
 it is built and before running it.

 In runtests.py we have more control over what apps from
 tests/regressiontests and tests/modeltests are loaded and can control the
 suite contents by simply avoiding the loading of the apps we want
 excluded.

 AFAICT this mean it would be practical to only add this feature to the
 `runtests.py` script.

 * This lack of granularity is the same root cause that keep us from
 excluding test cases or test methods; so the syntax supported by the
 `--exclude` switch will only allow the user to exclude entire test apps
 from the test run.

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

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



[Changeset] r14757 - django/branches/releases/1.2.X/django/test

2010-11-30 Thread noreply
Author: jacob
Date: 2010-11-30 16:16:53 -0600 (Tue, 30 Nov 2010)
New Revision: 14757

Modified:
   django/branches/releases/1.2.X/django/test/simple.py
Log:
[1.2.X] Ensured that the test suite creates the default DB before any others.

Refs #14799. Backport of [14756], and see the note there for a caveat.

Modified: django/branches/releases/1.2.X/django/test/simple.py
===
--- django/branches/releases/1.2.X/django/test/simple.py2010-11-30 
22:14:03 UTC (rev 14756)
+++ django/branches/releases/1.2.X/django/test/simple.py2010-11-30 
22:16:53 UTC (rev 14757)
@@ -254,7 +254,7 @@
 return reorder_suite(suite, (TestCase,))
 
 def setup_databases(self, **kwargs):
-from django.db import connections
+from django.db import connections, DEFAULT_DB_ALIAS
 
 # First pass -- work out which databases actually need to be created,
 # and which ones are test mirrors or duplicate entries in DATABASES
@@ -276,11 +276,21 @@
 connection.settings_dict['ENGINE'],
 connection.settings_dict['NAME'],
 ), []).append(alias)
-
-# Second pass -- actually create the databases.
+
+# Re-order the list of databases to create, making sure the default
+# database is first. Otherwise, creation order is semi-random (i.e. 
+# dict ordering dependent).
+dbs_to_create = []
+for dbinfo, aliases in test_databases.items():
+if DEFAULT_DB_ALIAS in aliases:
+dbs_to_create.insert(0, (dbinfo, aliases))
+else:
+dbs_to_create.append((dbinfo, aliases))
+
+# Final pass -- actually create the databases.
 old_names = []
 mirrors = []
-for (host, port, engine, db_name), aliases in test_databases.items():
+for (host, port, engine, db_name), aliases in dbs_to_create:
 # Actually create the database for the first connection
 connection = connections[aliases[0]]
 old_names.append((connection, db_name, True))

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



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

2010-11-30 Thread noreply
Author: jacob
Date: 2010-11-30 16:14:03 -0600 (Tue, 30 Nov 2010)
New Revision: 14756

Modified:
   django/trunk/django/test/simple.py
Log:
Ensured that the test suite creates the default DB before any others.

Refs #14799. Technically this fixes the problem, but I'm far from convinced
it's the perfect solution, so I'm leaving the ticket open. I'm committing
this now because it's the minimum required to get the test suite running
again, but this commit can -- and probably should -- be reverted in favor of
a more holistic fix later on.

Modified: django/trunk/django/test/simple.py
===
--- django/trunk/django/test/simple.py  2010-11-30 21:39:54 UTC (rev 14755)
+++ django/trunk/django/test/simple.py  2010-11-30 22:14:03 UTC (rev 14756)
@@ -216,7 +216,7 @@
 return reorder_suite(suite, (TestCase,))
 
 def setup_databases(self, **kwargs):
-from django.db import connections
+from django.db import connections, DEFAULT_DB_ALIAS
 
 # First pass -- work out which databases actually need to be created,
 # and which ones are test mirrors or duplicate entries in DATABASES
@@ -238,11 +238,21 @@
 connection.settings_dict['ENGINE'],
 connection.settings_dict['NAME'],
 ), []).append(alias)
-
-# Second pass -- actually create the databases.
+
+# Re-order the list of databases to create, making sure the default
+# database is first. Otherwise, creation order is semi-random (i.e. 
+# dict ordering dependent).
+dbs_to_create = []
+for dbinfo, aliases in test_databases.items():
+if DEFAULT_DB_ALIAS in aliases:
+dbs_to_create.insert(0, (dbinfo, aliases))
+else:
+dbs_to_create.append((dbinfo, aliases))
+
+# Final pass -- actually create the databases.
 old_names = []
 mirrors = []
-for (host, port, engine, db_name), aliases in test_databases.items():
+for (host, port, engine, db_name), aliases in dbs_to_create:
 # Actually create the database for the first connection
 connection = connections[aliases[0]]
 old_names.append((connection, db_name, True))

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



Re: [Django] #14809: Broken login related tests after r14733

2010-11-30 Thread Django
#14809: Broken login related tests after r14733
+---
  Reporter:  jezdez | Owner:  SmileyChris
Status:  assigned   | Milestone:  1.3
 Component:  Authentication |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by jezdez):

 I suppose using our own utility functions is a worthwhile effort to
 prevent reimplementing the same thing over and over again.

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

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



[Changeset] r14755 - in django/branches/releases/1.2.X/django/conf: . project_template

2010-11-30 Thread noreply
Author: ramiro
Date: 2010-11-30 15:39:54 -0600 (Tue, 30 Nov 2010)
New Revision: 14755

Modified:
   django/branches/releases/1.2.X/django/conf/global_settings.py
   django/branches/releases/1.2.X/django/conf/project_template/settings.py
Log:
[1.2.X] Small grammar fix in 'user-uploaded files' comment from [14561]

Backport of r14582 from trunk.

Modified: django/branches/releases/1.2.X/django/conf/global_settings.py
===
--- django/branches/releases/1.2.X/django/conf/global_settings.py   
2010-11-30 21:32:11 UTC (rev 14754)
+++ django/branches/releases/1.2.X/django/conf/global_settings.py   
2010-11-30 21:39:54 UTC (rev 14755)
@@ -258,7 +258,7 @@
 # Default file storage mechanism that holds media.
 DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
 
-# Absolute filesystem path to the directory that will hold user uploaded files.
+# Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/home/media/media.lawrence.com/"
 MEDIA_ROOT = ''
 

Modified: 
django/branches/releases/1.2.X/django/conf/project_template/settings.py
===
--- django/branches/releases/1.2.X/django/conf/project_template/settings.py 
2010-11-30 21:32:11 UTC (rev 14754)
+++ django/branches/releases/1.2.X/django/conf/project_template/settings.py 
2010-11-30 21:39:54 UTC (rev 14755)
@@ -43,7 +43,7 @@
 # calendars according to the current locale
 USE_L10N = True
 
-# Absolute filesystem path to the directory that will hold user uploaded files.
+# Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/home/media/media.lawrence.com/"
 MEDIA_ROOT = ''
 

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



[Changeset] r14754 - in django/branches/releases/1.2.X: django/views tests/regressiontests/views/tests

2010-11-30 Thread noreply
Author: ramiro
Date: 2010-11-30 15:32:11 -0600 (Tue, 30 Nov 2010)
New Revision: 14754

Modified:
   django/branches/releases/1.2.X/django/views/static.py
   django/branches/releases/1.2.X/tests/regressiontests/views/tests/static.py
Log:
[1.2.X] Fixed #14812 -- Made parsing of the If-Modified-Since HTTP header more 
robust in presence of malformed values when serving static content. Thanks 
shaohua for the report, and alexey.smol...@gmail.com for a similar report and 
patch.
Backport of r14753 from trunk.

Modified: django/branches/releases/1.2.X/django/views/static.py
===
--- django/branches/releases/1.2.X/django/views/static.py   2010-11-30 
21:27:26 UTC (rev 14753)
+++ django/branches/releases/1.2.X/django/views/static.py   2010-11-30 
21:32:11 UTC (rev 14754)
@@ -129,7 +129,10 @@
 raise ValueError
 matches = re.match(r"^([^;]+)(; length=([0-9]+))?$", header,
re.IGNORECASE)
-header_mtime = mktime_tz(parsedate_tz(matches.group(1)))
+header_date = parsedate_tz(matches.group(1))
+if header_date is None:
+raise ValueError
+header_mtime = mktime_tz(header_date)
 header_len = matches.group(3)
 if header_len and int(header_len) != size:
 raise ValueError

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/views/tests/static.py
===
--- django/branches/releases/1.2.X/tests/regressiontests/views/tests/static.py  
2010-11-30 21:27:26 UTC (rev 14753)
+++ django/branches/releases/1.2.X/tests/regressiontests/views/tests/static.py  
2010-11-30 21:32:11 UTC (rev 14754)
@@ -61,3 +61,17 @@
 self.assertEquals(len(response.content),
   int(response['Content-Length']))
 
+def test_invalid_if_modified_since2(self):
+"""Handle even more bogus If-Modified-Since values gracefully
+
+Assume that a file is modified since an invalid timestamp as per RFC
+2616, section 14.25.
+"""
+file_name = 'file.txt'
+invalid_date = ': 1291108438, Wed, 20 Oct 2010 14:05:00 GMT'
+response = self.client.get('/views/site_media/%s' % file_name,
+   HTTP_IF_MODIFIED_SINCE=invalid_date)
+file = open(path.join(media_dir, file_name))
+self.assertEquals(file.read(), response.content)
+self.assertEquals(len(response.content),
+  int(response['Content-Length']))

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



[Changeset] r14753 - in django/trunk: django/contrib/staticfiles tests/regressiontests/views/tests

2010-11-30 Thread noreply
Author: ramiro
Date: 2010-11-30 15:27:26 -0600 (Tue, 30 Nov 2010)
New Revision: 14753

Modified:
   django/trunk/django/contrib/staticfiles/views.py
   django/trunk/tests/regressiontests/views/tests/static.py
Log:
Fixed #14812 -- Made parsing of the If-Modified-Since HTTP header more robust 
in presence of malformed values when serving static content. Thanks shaohua for 
the report, and alexey.smol...@gmail.com for a similar report and patch.

Modified: django/trunk/django/contrib/staticfiles/views.py
===
--- django/trunk/django/contrib/staticfiles/views.py2010-11-30 21:21:37 UTC 
(rev 14752)
+++ django/trunk/django/contrib/staticfiles/views.py2010-11-30 21:27:26 UTC 
(rev 14753)
@@ -150,7 +150,10 @@
 raise ValueError
 matches = re.match(r"^([^;]+)(; length=([0-9]+))?$", header,
re.IGNORECASE)
-header_mtime = mktime_tz(parsedate_tz(matches.group(1)))
+header_date = parsedate_tz(matches.group(1))
+if header_date is None:
+raise ValueError
+header_mtime = mktime_tz(header_date)
 header_len = matches.group(3)
 if header_len and int(header_len) != size:
 raise ValueError

Modified: django/trunk/tests/regressiontests/views/tests/static.py
===
--- django/trunk/tests/regressiontests/views/tests/static.py2010-11-30 
21:21:37 UTC (rev 14752)
+++ django/trunk/tests/regressiontests/views/tests/static.py2010-11-30 
21:27:26 UTC (rev 14753)
@@ -69,3 +69,17 @@
 self.assertEquals(len(response.content),
   int(response['Content-Length']))
 
+def test_invalid_if_modified_since2(self):
+"""Handle even more bogus If-Modified-Since values gracefully
+
+Assume that a file is modified since an invalid timestamp as per RFC
+2616, section 14.25.
+"""
+file_name = 'file.txt'
+invalid_date = ': 1291108438, Wed, 20 Oct 2010 14:05:00 GMT'
+response = self.client.get('/views/site_media/%s' % file_name,
+   HTTP_IF_MODIFIED_SINCE=invalid_date)
+file = open(path.join(media_dir, file_name))
+self.assertEquals(file.read(), response.content)
+self.assertEquals(len(response.content),
+  int(response['Content-Length']))

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



Re: [Django] #14814: Check for file binding in FieldFile.delete()

2010-11-30 Thread Django
#14814: Check for file binding in FieldFile.delete()
---+
  Reporter:  dimier| Owner:  nobody 
  
Status:  reopened  | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords:  field 
file, FieldFile
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by dimier):

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

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

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



[Changeset] r14752 - django/trunk/tests/regressiontests/utils

2010-11-30 Thread noreply
Author: SmileyChris
Date: 2010-11-30 15:21:37 -0600 (Tue, 30 Nov 2010)
New Revision: 14752

Modified:
   django/trunk/tests/regressiontests/utils/text.py
Log:
Tests for utils.text.wrap

Modified: django/trunk/tests/regressiontests/utils/text.py
===
--- django/trunk/tests/regressiontests/utils/text.py2010-11-30 12:46:22 UTC 
(rev 14751)
+++ django/trunk/tests/regressiontests/utils/text.py2010-11-30 21:21:37 UTC 
(rev 14752)
@@ -3,6 +3,7 @@
 from django.utils import text
 
 class TestUtilsText(unittest.TestCase):
+
 def test_truncate_words(self):
 self.assertEqual(u'The quick brown fox jumped over the lazy dog.',
 text.truncate_words(u'The quick brown fox jumped over the lazy 
dog.', 10))
@@ -10,6 +11,8 @@
 text.truncate_words('The quick brown fox jumped over the lazy 
dog.', 4))
 self.assertEqual(u'The quick brown fox ',
 text.truncate_words('The quick brown fox jumped over the lazy 
dog.', 4, ''))
+
+def test_truncate_html_words(self):
 self.assertEqual(u'The quick brown fox jumped over the 
lazy dog.',
 text.truncate_html_words('The quick brown fox 
jumped over the lazy dog.', 10))
 self.assertEqual(u'The quick brown fox 
...',
@@ -18,3 +21,20 @@
 text.truncate_html_words('The quick brown fox 
jumped over the lazy dog.', 4, ''))
 self.assertEqual(u'The quick brown 
fox',
 text.truncate_html_words('The quick brown fox 
jumped over the lazy dog.', 4, None))
+
+def test_wrap(self):
+digits = '1234 67 9'
+self.assertEqual(text.wrap(digits, 100), u'1234 67 9')
+self.assertEqual(text.wrap(digits, 9), u'1234 67 9')
+self.assertEqual(text.wrap(digits, 8), u'1234 67\n9')
+
+self.assertEqual(text.wrap('short\na long line', 7),
+ u'short\na long\nline')
+
+self.assertEqual(text.wrap('do-not-break-long-words please? ok', 8),
+ u'do-not-break-long-words\nplease?\nok')
+
+long_word = 'l%sng' % ('o' * 20)
+self.assertEqual(text.wrap(long_word, 20), long_word)
+self.assertEqual(text.wrap('a %s word' % long_word, 10),
+ u'a\n%s\nword' % long_word)

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



Re: [Django] #14747: parse error on HTTP_IF_MODIFIED_SINCE header

2010-11-30 Thread Django
#14747: parse error on HTTP_IF_MODIFIED_SINCE header
-+--
  Reporter:  shaohua | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  duplicate   |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

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

Comment:

 I'm going to close this ticket as duplicate of #14812 because the affected
 code is the same, even if it's in a different location in trunk.

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

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



Re: [Django] #14815: app "labels" are ambiguous and cause bugs in manage.py

2010-11-30 Thread Django
#14815: app "labels" are ambiguous and cause bugs in manage.py
-+--
  Reporter:  slinkp  | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  duplicate   |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by gabrielhurley):

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

Comment:

 As lrekucki already pointed out, this is a duplicate of #3591.

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

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



Re: [Django] #14811: Link render_to_response to template loader API

2010-11-30 Thread Django
#14811: Link render_to_response to template loader API
+---
  Reporter:  adamv  | Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by anonymous):

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

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

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



Re: [Django] #14816: Error in documentation of InlineModelAdmin options

2010-11-30 Thread Django
#14816: Error in documentation of InlineModelAdmin options
+---
  Reporter:  shelldweller   | Owner:  nobody   
Status:  new| Milestone:  1.3  
 Component:  Documentation  |   Version:  SVN  
Resolution: |  Keywords:  easy-pickings
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by anonymous):

  * keywords:  => easy-pickings
  * stage:  Unreviewed => Accepted
  * milestone:  => 1.3

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

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



Re: [Django] #14812: Wrong processing of If-Modified-Since header

2010-11-30 Thread Django
#14812: Wrong processing of If-Modified-Since header
---+
  Reporter:  alexey.smol...@gmail.com  | Owner:  nobody 

Status:  new   | Milestone:  1.3

 Component:  Contrib apps  |   Version:  SVN

Resolution:|  Keywords:  static files, 
If-Modified-Since
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

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

  * version:  1.2 => SVN
  * needs_tests:  0 => 1

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

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



Re: [Django] #14815: app "labels" are ambiguous and cause bugs in manage.py

2010-11-30 Thread Django
#14815: app "labels" are ambiguous and cause bugs in manage.py
-+--
  Reporter:  slinkp  | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by lrekucki):

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

Comment:

 See a related ticket #3591 and this branch:
 http://code.djangoproject.com/browser/django/branches/soc2010/app-loading
 (it doesn't solve exactly this problem, but makes a step forward a
 reasonable solution). Backwards compatibility is the main problem here.

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

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



Re: [Django] #8162: Changes to Permissions model

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

  * milestone:  1.3 =>

Comment:

 This should not be in milestone:1.3 if the Triage stage is someday/maybe.

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

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



[Django] #14818: cycle tag is not safe

2010-11-30 Thread Django
#14818: cycle tag is not safe
-+--
 Reporter:  steveire |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Template system  | Version:  1.2   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 {{{
 In [1]: from django.template import Template, Context
 In [3]: t = Template("{% cycle one two as foo %} {% cycle foo %}")
 In [5]: c = Context({"one" : "A & B", "two": "C & D"})
 In [6]: t.render(c)
 Out[6]: u'A & B C & D'
 }}}

 This is likely fixed by using _render_value_in_context() in the
 implementation of the cycle node render method.

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

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



Re: [Django] #14786: get_db_prep_lookup call get_prep_value twice for each value if prepared == False

2010-11-30 Thread Django
#14786: get_db_prep_lookup call get_prep_value twice for each value if prepared 
==
False
---+
  Reporter:  homm  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jonash):

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



[Django] #14817: ...models.sql.where.WhereNode.as_sql docstring is outdated

2010-11-30 Thread Django
#14817: ...models.sql.where.WhereNode.as_sql docstring is outdated
--+-
 Reporter:  jonash|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.2   
 Keywords:  docstring |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 needs to be updated. The method doesn't take ``node`` argument and does
 not return ``None, None`` in any case, either.

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

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



Re: [Django] #14814: Check for file binding in FieldFile.delete()

2010-11-30 Thread Django
#14814: Check for file binding in FieldFile.delete()
---+
  Reporter:  dimier| Owner:  nobody 
  
Status:  closed| Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:  invalid   |  Keywords:  field 
file, FieldFile
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by dimier):

 Thanks, lukeplant and Alex.

 Of course, I didn't call {{{FieldFile.delete()}}} directly.

 First, calling {{{delete()}}} without associated file will raise
 {{{OSError}}} exception:
 {{{
 OSError: [Errno 21] Is a directory: '/home/dimier/testproject/media'
 }}}

 And no exception will be raised if I do {{{album.cover_img = None}}}
 before {{{delete()}}}. It's ambiguously, I think.

 Second, the point of this patch is to minimize number of checks to delete
 a file.

 For example, if I want to update an album cover I need to write the
 following code:
 {{{
 if album.cover_img:
 album.cover_img.delete()
 album.cover_img = new_cover_path
 }}}
 In some models in my project I have several image fields needed to update
 and I get/set them through {{{getattr}}}/{{{setattr}}}, so without
 described check the code become more readable.
 If I just set {{{album.cover_img}}} to a new value without {{{delete()}}},
 previous associated file will not be deleted.

 So, the following will be simpler:
 {{{
 album.cover_img.delete()
 album.cover_img = new_cover_path
 }}}


 This small patch is just my first experience in contribution to open-
 source and I have another improvements to publish. If the patch is
 useless, just leave the ticket closed.

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

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



Re: [Django] #11025: Ability to specify LOGIN_URL as full qualified absolute URL, ex: https://passport.example.com/passport?mode=login

2010-11-30 Thread Django
#11025: Ability to specify LOGIN_URL as full qualified absolute URL, ex:
https://passport.example.com/passport?mode=login
+---
  Reporter:  arikon | Owner:  SmileyChris
Status:  closed | Milestone:  1.3
 Component:  Authentication |   Version:  SVN
Resolution:  fixed  |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by SmileyChris):

 It's being fixed in #14809 - but thanks for the report!

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

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



Re: [Django] #11025: Ability to specify LOGIN_URL as full qualified absolute URL, ex: https://passport.example.com/passport?mode=login

2010-11-30 Thread Django
#11025: Ability to specify LOGIN_URL as full qualified absolute URL, ex:
https://passport.example.com/passport?mode=login
+---
  Reporter:  arikon | Owner:  SmileyChris
Status:  closed | Milestone:  1.3
 Component:  Authentication |   Version:  SVN
Resolution:  fixed  |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by timo):

 I'm not sure this is 100% backwards compatible.  For example, if I have
 the following assertion:

 {{{ self.assertRedirects(response, "/login/?next=/foo/") }}}

 I need to change it to:

 {{{ self.assertRedirects(response, "/login/?next=%2Ffoo%2F") }}}

 Might warrant a mention in the release notes?

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

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



Re: [Django] #2705: [patch] Add optional FOR UPDATE clause to QuerySets

2010-11-30 Thread Django
#2705: [patch] Add optional FOR UPDATE clause to QuerySets
---+
  Reporter:  Hawkeye   | Owner:  brunobraga
Status:  assigned  | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by danfairs):

  * needs_tests:  0 => 1

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

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



Re: [Django] #14809: Broken login related tests after r14733

2010-11-30 Thread Django
#14809: Broken login related tests after r14733
+---
  Reporter:  jezdez | Owner:  SmileyChris
Status:  assigned   | Milestone:  1.3
 Component:  Authentication |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by SmileyChris):

 Doesn't Django's version just ensure it has been cast to a bytestring
 though? We're doing that explicitly in the `urlencode` method anyway.

 Thanks for the docs (but note to self: there's a missing `mutable=True` on
 the example)

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

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



Re: [Django] #14816: Error in documentation of InlineModelAdmin options

2010-11-30 Thread Django
#14816: Error in documentation of InlineModelAdmin options
+---
  Reporter:  shelldweller   | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by shelldweller):

 * cc: s.kuzme...@gmail.com (added)
  * 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #14816: Error in documentation of InlineModelAdmin options

2010-11-30 Thread Django
#14816: Error in documentation of InlineModelAdmin options
---+
 Reporter:  shelldweller   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 On http://docs.djangoproject.com/en/dev/ref/contrib/admin
 /#inlinemodeladmin-options it says: "The InlineModelAdmin class is a
 subclass of ModelAdmin so it inherits all the same functionality as well
 as some of its own".

 This is incorrect. InlineModelAdmin is not a subclass of ModelAdmin and
 thus does not inherit all of the functionality of the latter. Instead both
 InlineModelAdmin and ModelAdmin are subclasses of BaseModelAdmin and they
 share only some common functionality.

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

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



[Django] #14815: app "labels" are ambiguous and cause bugs in manage.py

2010-11-30 Thread Django
#14815: app "labels" are ambiguous and cause bugs in manage.py
+---
 Reporter:  slinkp  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  1.2   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 In several places in django/db/models/loading.py, apps are looked up
 via a non-namespaced name: that is, if your settings.INSTALLED_APPS
 contains 'django.contrib.admin', the string 'admin' is used to look up
 apps.  This is done eg. in get_app().*

 This is bad because it requires the last part of the dotted name - the
 "app label" - to be unique across all installed apps, which I think is
 an undocumented assumption.  If there are duplicates, it makes the
 behavior of manage.py commands ambiguous at best.

 Here's one bug: my settings.INSTALLED_APPS contains among other things
 ('obadmin.admin', ... , 'django.contrib.admin', ...)

 If I do `manage.py test admin`, it runs only the tests from obadmin.admin.

 If I do `manage.py sqlall admin`, it prints only the SQL for
 django.contrib.admin.

 This is broken in several obvious ways:

  * The app chosen is inconsistent between the two commands
  * It is impossible for me to tell `manage.py test` to test only
 django.contrib.admin
  * It is impossible for me to tell `manage.py sqall` to give me only the
 sql for obadmin.admin


 "Namespaces are one honking great idea. Let's do more of those."

 I don't know how hard it would be to solve this while preserving
 backward compatibility.  Would it be possible to allow specifying the
 full dotted name of the app, and fall back to the current behavior if
 the name doesn't contain dots?  Maybe the various dicts on AppCache
 could have both labels and dotted names as keys?


 * Resolving the label to a module is also done in get_models(app_mod),
 via the cache, even though the app_mod argument is already a
 module. This might actually qualify as a separate bug: get_models
 should always return models belonging to the app_mod passed in; it
 should never use the name of that module to find models in a different
 module.

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

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



Re: [Django] #14747: parse error on HTTP_IF_MODIFIED_SINCE header

2010-11-30 Thread Django
#14747: parse error on HTTP_IF_MODIFIED_SINCE header
-+--
  Reporter:  shaohua | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by ramiro):

 #14812 reports the same for the a virw included with the new staticfiles
 app.

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

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



Re: [Django] #14747: parse error on HTTP_IF_MODIFIED_SINCE header

2010-11-30 Thread Django
#14747: parse error on HTTP_IF_MODIFIED_SINCE header
-+--
  Reporter:  shaohua | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

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

Old description:

> Some mobile browsers send localized time in 'HTTP_IF_MODIFIED_SINCE'
> like: '???, 21 ?? 2010 05:55:07 GMT', which can not be correctly parsed
> and cause exceptions:
>
>  File "/usr/local/lib/python2.6/dist-
> packages/django/core/handlers/base.py", line 100, in get_response
>response = callback(request, *callback_args, **callback_kwargs)
>
>  File "/usr/local/lib/python2.6/dist-packages/django/views/static.py",
> line 61, in serve
>statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):
>
>  File "/usr/local/lib/python2.6/dist-packages/django/views/static.py",
> line 129, in was_modified_since
>header_mtime = mktime_tz(parsedate_tz(matches.group(1)))
>
>  File "/usr/lib/python2.6/email/_parseaddr.py", line 142, in mktime_tz
>if data[9] is None:
>
> TypeError: 'NoneType' object is unsubscriptable

New description:

 Some mobile browsers send localized time in 'HTTP_IF_MODIFIED_SINCE' like:
 '???, 21 ?? 2010 05:55:07 GMT', which can not be correctly parsed and
 cause exceptions:
 {{{
  File "/usr/local/lib/python2.6/dist-
 packages/django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/local/lib/python2.6/dist-packages/django/views/static.py",
 line 61, in serve
statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):

  File "/usr/local/lib/python2.6/dist-packages/django/views/static.py",
 line 129, in was_modified_since
header_mtime = mktime_tz(parsedate_tz(matches.group(1)))

  File "/usr/lib/python2.6/email/_parseaddr.py", line 142, in mktime_tz
if data[9] is None:

 TypeError: 'NoneType' object is unsubscriptable
 }}}

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

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



Re: [Django] #14812: Wrong processing of If-Modified-Since header

2010-11-30 Thread Django
#14812: Wrong processing of If-Modified-Since header
---+
  Reporter:  alexey.smol...@gmail.com  | Owner:  nobody 

Status:  new   | Milestone:  1.3

 Component:  Contrib apps  |   Version:  1.2

Resolution:|  Keywords:  static files, 
If-Modified-Since
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

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

  * stage:  Unreviewed => Accepted

Old description:

> I have faced with this issue when Opera 10.63 sent requests like that:
> 'HTTP_IF_MODIFIED_SINCE': ': 1291108438, Wed, 20 Oct 2010 14:05:00 GMT',
> 'HTTP_USER_AGENT': 'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.6.30
> Version/10.63'
>
> It seems that IF_MODIFIED_SINCE header is invalid. I don't exactly why...
> But in RFC2616(HTTP/1.1) we can see a case: "...if the passed If-
> Modified-Since date is invalid, the response is exactly the same as for a
> normal GET". So I think, it would be better if django.contrib.staticfiles
> will handle this case with simple check. I've attached patch.

New description:

 I have faced with this issue when Opera 10.63 sent requests like that:
 {{{
 'HTTP_IF_MODIFIED_SINCE': ': 1291108438, Wed, 20 Oct 2010 14:05:00 GMT',
 'HTTP_USER_AGENT': 'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.6.30
 Version/10.63'
 }}}
 It seems that IF_MODIFIED_SINCE header is invalid. I don't exactly why...
 But in RFC2616(HTTP/1.1) we can see a case: "...if the passed If-Modified-
 Since date is invalid, the response is exactly the same as for a normal
 GET". So I think, it would be better if django.contrib.staticfiles will
 handle this case with simple check. I've attached patch.

Comment:

 See also #14747.

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

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



Re: [Django] #14814: Check for file binding in FieldFile.delete()

2010-11-30 Thread Django
#14814: Check for file binding in FieldFile.delete()
---+
  Reporter:  dimier| Owner:  nobody 
  
Status:  closed| Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:  invalid   |  Keywords:  field 
file, FieldFile
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 `self` evaluates to `False` if there's no file attached to the wrapper.

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

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



Re: [Django] #14814: Check for file binding in FieldFile.delete()

2010-11-30 Thread Django
#14814: Check for file binding in FieldFile.delete()
---+
  Reporter:  dimier| Owner:  nobody 
  
Status:  closed| Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:  invalid   |  Keywords:  field 
file, FieldFile
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Comment (by lukeplant):

 Sorry, that should be: it would make `FieldFile.delete(None)` a no-op. It
 isn't obvious why you would want to do that (instead of just, um,
 '''not''' calling that method).

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

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



Re: [Django] #14814: Check for file binding in FieldFile.delete()

2010-11-30 Thread Django
#14814: Check for file binding in FieldFile.delete()
---+
  Reporter:  dimier| Owner:  nobody 
  
Status:  closed| Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:  invalid   |  Keywords:  field 
file, FieldFile
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by lukeplant):

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

Comment:

 I don't understand the point of this patch. It would simply make calling
 `FieldFile.delete()` a no-op, rather than an error. But it should be an
 error, since calling an instance method without passing an instance is a
 mistake.

 If there is something I've missed, please explain and re-open.

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

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



Re: [Django] #14492: Model proxy instance does not equal the respective model instance

2010-11-30 Thread Django
#14492: Model proxy instance does not equal the respective model instance
---+
  Reporter:  bruth | Owner:  bruth
Status:  assigned  | Milestone:  1.3  
 Component:  Database layer (models, ORM)  |   Version:  SVN  
Resolution:|  Keywords:   
 Stage:  Ready for checkin | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by bruth):

  * component:  Core framework => Database layer (models, ORM)
  * stage:  Design decision needed => Ready for checkin

Comment:

 Since this is a relatively minor patch, I would like to see if it can get
 into 1.3. There has not been anymore discussion as to why this shouldn't
 be added. I think per what Russell and Malcolm has stated this is a valid
 implementation.

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

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



[Django] #14814: Check for file binding in FieldFile.delete()

2010-11-30 Thread Django
#14814: Check for file binding in FieldFile.delete()
--+-
 Reporter:  dimier|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:  field file, FieldFile |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Atteched patch adds a simple check for file association in
 FieldFile.delete method.

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

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



[Changeset] r14751 - django/trunk/docs/topics

2010-11-30 Thread noreply
Author: lukeplant
Date: 2010-11-30 06:46:22 -0600 (Tue, 30 Nov 2010)
New Revision: 14751

Modified:
   django/trunk/docs/topics/testing.txt
Log:
Fixed ReST error in assertNumQueries docs.

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-11-29 06:25:25 UTC (rev 
14750)
+++ django/trunk/docs/topics/testing.txt2010-11-30 12:46:22 UTC (rev 
14751)
@@ -1418,7 +1418,7 @@
 implicit ordering, you will need to apply a ``order_by()`` clause to your
 queryset to ensure that the test will pass reliably.
 
-.. method:: TestCase.assertNumQueries(num, func, *args, **kwargs):
+.. method:: TestCase.assertNumQueries(num, func, *args, **kwargs)
 
 .. versionadded:: 1.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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #14813: Order of fieldnames in exclude= (inside ModelForm) can mess things up

2010-11-30 Thread Django
#14813: Order of fieldnames in exclude= (inside ModelForm) can mess things up
-+--
 Reporter:  czartur  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Forms| Version:  1.2   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 I've got a ModelForm that goes like this:

 {{{
 class TicketForm(forms.ModelForm):
 text= forms.CharField(widget = forms.Textarea(),
   label = _("Text"))

 class Meta:
 model = Ticket
 exclude=(
 'last_responder_account',
 'last_response_created_at'
 'owner',
 'owner_email',
 'owner_language',
 'owner_name',
 'responses_count',
 'status',
 )

 }}}

 Where `last_responder_account` and `owner` are both ForeignKeys and
 `last_response_created_at` is DateTimeField.

 Now... When i leave it as is, then in my template i see the form with
 fields (title, priority, department, '''owner, last_response_created_at'''
 and text.

 Although when I change the order in exclude= to:

 {{{
 exclude=(
 'last_responder_account',
 'owner_email',
 'owner_language',
 'owner_name',
 'responses_count',
 'status',
 'owner',
 'last_response_created_at'
 )

 }}}

 I get only (title, priority, department and text) which is expected
 result.

 However... When i change it again to:
 {{{
 exclude=(
 'owner',
 'last_response_created_at'
 'last_responder_account',
 'owner_email',
 'owner_language',
 'owner_name',
 'responses_count',
 'status',
 )
 }}}

 I get: (title, priority, department, last_responder_account,
 last_response_created_at, text)

 (all things enclosed in parenthesis are in order)

 Personally I think that ordering in exclude= shouldn't matter, but (as
 shown above) somehow it has some influence on form output.

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

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



Re: [Django] #14812: Wrong processing of If-Modified-Since header

2010-11-30 Thread Django
#14812: Wrong processing of If-Modified-Since header
---+
  Reporter:  alexey.smol...@gmail.com  | Owner:  nobody 

Status:  new   | Milestone:  1.3

 Component:  Contrib apps  |   Version:  1.2

Resolution:|  Keywords:  static files, 
If-Modified-Since
 Stage:  Unreviewed| Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by alexey.smol...@gmail.com):

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

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

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



[Django] #14812: Wrong processing of If-Modified-Since header

2010-11-30 Thread Django
#14812: Wrong processing of If-Modified-Since header
-+--
 Reporter:  alexey.smol...@gmail.com |   Owner:  nobody
   Status:  new  |   Milestone:  1.3   
Component:  Contrib apps | Version:  1.2   
 Keywords:  static files, If-Modified-Since  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 I have faced with this issue when Opera 10.63 sent requests like that:
 'HTTP_IF_MODIFIED_SINCE': ': 1291108438, Wed, 20 Oct 2010 14:05:00 GMT',
 'HTTP_USER_AGENT': 'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.6.30
 Version/10.63'

 It seems that IF_MODIFIED_SINCE header is invalid. I don't exactly why...
 But in RFC2616(HTTP/1.1) we can see a case: "...if the passed If-Modified-
 Since date is invalid, the response is exactly the same as for a normal
 GET". So I think, it would be better if django.contrib.staticfiles will
 handle this case with simple check. I've attached patch.

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

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



Re: [Django] #14809: Broken login related tests after r14733

2010-11-30 Thread Django
#14809: Broken login related tests after r14733
+---
  Reporter:  jezdez | Owner:  SmileyChris
Status:  assigned   | Milestone:  1.3
 Component:  Authentication |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by jezdez):

  * stage:  Accepted => Ready for checkin

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

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



Re: [Django] #14809: Broken login related tests after r14733

2010-11-30 Thread Django
#14809: Broken login related tests after r14733
-+--
  Reporter:  jezdez  | Owner:  SmileyChris
Status:  assigned| Milestone:  1.3
 Component:  Authentication  |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by jezdez):

 I've slightly updated your patch to use Django's own
 django.utils.http.urlquote instead of urllib's, added a bit of
 documentation and updated the auth tests.

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

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