Re: [Django] #9249: Google Analytics' Cookies break CacheMiddleware when SessionMiddleware turns on Vary: Cookie

2009-05-12 Thread Django
#9249: Google Analytics' Cookies break CacheMiddleware when SessionMiddleware
turns on Vary: Cookie
+---
  Reporter:  pixelcort  | Owner:  vvd
Status:  new| Milestone: 
 Component:  HTTP handling  |   Version:  1.0
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by vvd):

  * owner:  nobody => vvd

-- 
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] #11092: APPEND_SLASH behaviour in DEBUG mode not documented

2009-05-12 Thread Django
#11092: APPEND_SLASH behaviour in DEBUG mode not documented
+---
  Reporter:  mikelim| Owner:  nobody   
Status:  new| Milestone:   
 Component:  Documentation  |   Version:  1.0  
Resolution: |  Keywords:  APPEND_SLASH, not working
 Stage:  Unreviewed | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by mikelim):

  * 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-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] #11092: APPEND_SLASH behaviour in DEBUG mode not documented

2009-05-12 Thread Django
#11092: APPEND_SLASH behaviour in DEBUG mode not documented
---+
 Reporter:  mikelim|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.0   
 Keywords:  APPEND_SLASH, not working  |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 The APPEND_SLASH setting is disabled in DEBUG mode.

 However, this feature is not documented. I spent a few minutes asking on
 IRC, and then eventually figuring it out myself. No one else should spend
 this 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] #11091: SSL POST hangs if view function does not use POST object

2009-05-12 Thread Django
#11091: SSL POST hangs if view function does not use POST object
-+--
 Reporter:  bensmith |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Template system  | Version:  1.0   
 Keywords:  ssl form post|   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Here's how to reproduce:

 1. Setup a simple view function.

 def myview(request):
 return render_to_response('mytemplate.html')

 2. Write a simple form containing one named value that POSTs to the view:
 https://www.mysite.com/myview;>
   
   
 

 3.  Submit the form

 The browser will send the POST but no data will be returned.
 ssl_access.log and ssl_error.log will not have any record of the POST.

 You can also do the submit with curl like this:

 curl -v -d test=value https://www.mysite.com/myview

 curl will just hang after telling you that it's submitted the 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] #11090: Query.group_by no longer supports MySQL specific behaviour

2009-05-12 Thread Django
#11090: Query.group_by no longer supports MySQL specific behaviour
--+-
  Reporter:  miracle2k| Owner: 
Status:  closed   | Milestone: 
 Component:  ORM aggregation  |   Version:  SVN
Resolution:  wontfix  |  Keywords: 
 Stage:  Unreviewed   | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by russellm):

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

Comment:

 The change was intentional, and was necessary to implement aggregates. As
 you noted - group_by is a Django internal, and backwards incompatibility
 is in no way guaranteed.

-- 
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] #7052: auth fixture fails to import when running test server

2009-05-12 Thread Django
#7052: auth  fixture fails to import when running test server
+---
  Reporter:  jb0t   | Owner:  nobody
 
Status:  new| Milestone:
 
 Component:  Serialization  |   Version:  SVN   
 
Resolution: |  Keywords:  auth_permission 
auth_content fixture import
 Stage:  Accepted   | Has_patch:  0 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Changes (by carljm):

 * cc: carljm (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] #11090: Query.group_by no longer supports MySQL specific behaviour

2009-05-12 Thread Django
#11090: Query.group_by no longer supports MySQL specific behaviour
--+-
  Reporter:  miracle2k| Owner: 
Status:  new  | Milestone: 
 Component:  ORM aggregation  |   Version:  SVN
Resolution:   |  Keywords: 
 Stage:  Unreviewed   | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by miracle2k):

  * needs_better_patch:  => 0
  * summary:  Query.group_by behaviour no longer supports MySQL specific
  behaviour => Query.group_by no longer supports
  MySQL specific behaviour
  * 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] #11090: Query.group_by behaviour no longer supports MySQL specific behaviour

2009-05-12 Thread Django
#11090: Query.group_by behaviour no longer supports MySQL specific behaviour
-+--
 Reporter:  miracle2k|   Owner:
   Status:  new  |   Milestone:
Component:  ORM aggregation  | Version:  SVN   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 I used to be able to do:

 {{{
 qs = Model.objects.extra(select={'foo': 'custom_aggregate()'},
 tables=['table'])
 qs.query.group_by = ['table.column']
 }}}

 This generated a query like:

 {{{
 SELECT model.a, model.b, custom_aggregate() AS foo FROM model, table GROUP
 BY table.column
 }}}

 As far as I understand, this is exploiting MySQL specific behaviour that
 supports collapsing multiple values within a group into a single return
 row, rather than enforcing every column to be either listed in GROUP BY,
 or be an aggregate, as Postgre does, for example.

 Now, with the changes from r9805 and later also r9838, when using any kind
 of group_by value at all, the resulting query will actually list all
 select, select_related and extra_select fields in the GROUP BY clause,
 meaning my query is now:

 {{{
 SELECT model.a, model.b, custom_aggregate() AS foo FROM model, table GROUP
 BY table.column, model.a, model.b, foo
 }}}

 I realize that group_by is internal API and Django may not want to support
 this at all, but in case the change was unintentional, I thought I'd bring
 it up.

-- 
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] #11089: contrib.auth.views.login should take an optional 'form' argument

2009-05-12 Thread Django
#11089: contrib.auth.views.login should take an optional 'form' argument
-+--
 Reporter:  gregplaysguitar  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Contrib apps | Version:  1.0   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 I've been using http://www.djangosnippets.org/snippets/74/ to allow users
 to log in with their email address, and it has been working really nicely
 except that users with an email address over 30 characters can't log in.
 The fix is simply to increase the max_length attribute on the login form's
 username field, however to effect this change I needed to write a custom
 view, which was a duplicate of contrib.auth.views.login except that it
 used my custom form.

 My proposal is to add an optional 'form' argument to
 contrib.auth.views.login - that way I could just put

 {{{
 (r'^accounts/login/$', auth_views.login, {'form':
 MyAuthenticationForm}),
 }}}

 in my url conf.

-- 
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] #6362: Remove blank spaces with strip when validating the data

2009-05-12 Thread Django
#6362: Remove blank spaces with strip when validating the data
-+--
  Reporter:  marinho | Owner:  nobody   
Status:  new | Milestone:   
 Component:  Forms   |   Version:  SVN  
Resolution:  |  Keywords:  blank space strip
 Stage:  Design decision needed  | Has_patch:  1
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by thebitguru):

 * cc: far...@thebitguru.com (added)

Comment:

 I am also looking for a decision on this (ideally, yes, do it).  Posting
 to the django developers group for a decision
 (http://groups.google.com/group/django-developers/t/90352cc0da78390b).

-- 
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] #11087: Filtering by Count aggregate does not work when using GeoManager

2009-05-12 Thread Django
#11087: Filtering by Count aggregate does not work when using GeoManager
-+--
  Reporter:  dgouldin| Owner:  nobody
Status:  new | Milestone:
 Component:  GIS |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by dgouldin):

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

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #11088: Aggregation problem, table JOINed twice

2009-05-12 Thread Django
#11088: Aggregation problem, table JOINed twice
---+
 Reporter:  l...@vflow.tv  |  Status:  new  
Milestone:  1.1|   Component:  ORM aggregation  
  Version:  1.1-beta-1 |Keywords:  aggregation, join
Stage:  Unreviewed |   Has_patch:  0
---+
 I don't know if I'm doing something wrong but I've tried to compile all
 the information needed to track this one.

 === Models ===
 video/models.py
  {{{
 class Video(models.Model):
 name = models.TextField()
 dir = models.TextField()
 videoclass = models.ForeignKey('Videoclass')
 status = models.CharField(max_length=24)
 date = models.DateTimeField()
 duration = models.FloatField()
 width = models.IntegerField()
 height = models.IntegerField()
 displayname = models.TextField()
 published = models.IntegerField()
 views = models.IntegerField()
 ratesum = models.IntegerField()
 ratenum = models.IntegerField()
 }}}


 statistics/models.py

 {{{
 class VisitorAction(models.Model):
 name = models.CharField(max_length = 200)

 def __unicode__(self):
 return self.name


 class VisitorLog(models.Model):
 visitor = models.ForeignKey("Visitor")
 video = models.ForeignKey(Video)
 action = models.ForeignKey(VisitorAction)
 seek_video = models.FloatField()
 event_time = models.DateTimeField(default = datetime.datetime.now)
 domain = models.CharField(max_length = 128)
 }}}


 === Datas ===
 statistics_visitorlog contains 100k+ entries

 video_video contains 400 entries

 statistics_visitoraction contains 6 entries ('play', 'seek' ... etc)

 === The QS ===
 {{{
 >>> from video.models import *
 >>> from django.db.models import Count
 >>> Video.objects.annotate(play_log =
 Count('visitorlog')).filter(visitorlog__action__name =
 'play').order_by('-play_log')[0:10]
 }}}
 [Kill the mysqld because it takes forever and have a nice backtrace]
 {{{
 >>> from django.db import connection
 >>> connection.queries[-1]
 {'time': '7.180', 'sql': u'SELECT `video_video`.`id`,
 `video_video`.`name`, `video_video`.`dir`, `video_video`.`videoclass_id`,
 `video_video`.`status`, `video_video`.`date`, `video_video`.`duration`,
 `video_video`.`width`, `video_video`.`height`,
 `video_video`.`displayname`, `video_video`.`published`,
 `video_video`.`views`, `video_video`.`ratesum`, `video_video`.`ratenum`,
 COUNT(`statistics_visitorlog`.`id`) AS `play_log` FROM `video_video` LEFT
 OUTER JOIN `statistics_visitorlog` ON (`video_video`.`id` =
 `statistics_visitorlog`.`video_id`) INNER JOIN `statistics_visitorlog` T4
 ON (`video_video`.`id` = T4.`video_id`) INNER JOIN
 `statistics_visitoraction` ON (T4.`action_id` =
 `statistics_visitoraction`.`id`) WHERE `statistics_visitoraction`.`name` =
 play  GROUP BY `video_video`.`id` ORDER BY play_log DESC LIMIT 10'}
 }}}

 === The sql request ===

 {{{
 SELECT   `video_video`.`id`   ,
 `video_video`.`name` ,
 `video_video`.`dir`  ,
 `video_video`.`videoclass_id`,
 `video_video`.`status`   ,
 `video_video`.`date` ,
 `video_video`.`duration` ,
 `video_video`.`width`,
 `video_video`.`height`   ,
 `video_video`.`displayname`  ,
 `video_video`.`published`,
 `video_video`.`views`,
 `video_video`.`ratesum`  ,
 `video_video`.`ratenum`  ,
 COUNT(`statistics_visitorlog`.`id`) AS `play_log`
FROM `video_video`
 LEFT OUTER JOIN `statistics_visitorlog`
 ON
  (
   `video_video`.`id` =
 `statistics_visitorlog`.`video_id`
  )
 INNER JOIN `statistics_visitorlog` T4
 ON
  (
   `video_video`.`id` = T4.`video_id`
  )
 INNER JOIN `statistics_visitoraction`
 ON
  (
   T4.`action_id` =
 `statistics_visitoraction`.`id`
  )
WHERE`statistics_visitoraction`.`name` = 'play'
GROUP BY `video_video`.`id`
 }}}

 It takes forever and burns my cpu. However, if I remove the LEFT OUTER
 JOIN on statistics_visitorlog (which seems to be joined twice), and fix
 the select to call the proper JOINed table:

 {{{
 SELECT   `video_video`.`id`   ,
 `video_video`.`name` ,
 `video_video`.`dir`  ,
 `video_video`.`videoclass_id`,
 `video_video`.`status`   ,
 `video_video`.`date` ,
 `video_video`.`duration` ,
 `video_video`.`width`,
 `video_video`.`height`   

Re: [Django] #11087: Filtering by Count aggregate does not work when using GeoManager

2009-05-12 Thread Django
#11087: Filtering by Count aggregate does not work when using GeoManager
-+--
  Reporter:  dgouldin| Owner:  nobody
Status:  new | Milestone:
 Component:  GIS |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by jdunck):

 * cc: jdu...@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-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] #11087: Filtering by Count aggregate does not work when using GeoManager

2009-05-12 Thread Django
#11087: Filtering by Count aggregate does not work when using GeoManager
--+-
 Reporter:  dgouldin  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  GIS   | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Using the following models:

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

 class Book(models.Model):
 name = models.CharField(max_length=100)
 objects = models.GeoManager()

 class Author(models.Model):
 name = models.CharField(max_length=100)
 books = models.ForeignKey(Book, related_name="authors")
 objects = models.GeoManager()
 }}}

 Filtering on an annotated Count aggregate raises an AttributeError.
 Example:

 {{{
 >>> from mytestapp.models import Book, Author

 >>> from django.db.models import Count

 >>>
 Book.objects.annotate(num_authors=Count('authors')).filter(num_authors__gt=1)
 ...
 : 'Count' object has no attribute
 'alias'
 }}}

-- 
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] #10258: many files with the same file name cannot be saved correctly

2009-05-12 Thread Django
#10258: many files with the same file name cannot be saved correctly
---+
  Reporter:  liangent  | Owner:  duncan
Status:  new   | Milestone:  1.2   
 Component:  File uploads/storage  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * milestone:  1.1 => 1.2

Comment:

 Punting to 1.2. For now, use a custom upload_to and/or override the
 storage engine's get_available_filename function.

-- 
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] #10788: Actual name of uploaded file available later than it was in 1.0

2009-05-12 Thread Django
#10788: Actual name of uploaded file available later than it was in 1.0
-+--
  Reporter:  kmtracey| Owner:  jacob
Status:  closed  | Milestone:  1.1  
 Component:  File uploads/storage|   Version:  SVN  
Resolution:  wontfix |  Keywords:   
 Stage:  Design decision needed  | Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by jacob):

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

Comment:

 Given Armin's notes here, and Marty's concurrence on django-developers
 (http://groups.google.com/group/django-
 developers/browse_thread/thread/560b3d7cad9bd491), I'm going to mark this
 wontifx and note in the 1.1 release notes that the final file name isn't
 available until the file has actually been saved to disk. It's of dubious
 use anyway to allow someone to try to "predict" the final file name;
 better to use the storage APIs always to access the given object.

-- 
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] r10755 - django/branches/releases/1.0.X/django/contrib/formtools

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 17:03:32 -0500 (Tue, 12 May 2009)
New Revision: 10755

Modified:
   django/branches/releases/1.0.X/django/contrib/formtools/tests.py
   django/branches/releases/1.0.X/django/contrib/formtools/utils.py
Log:
[1.0.X] Fixed #10643: fixed the formtools security hash to handle allowed empty 
forms or forms without changed data. Backport of [10753] from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/formtools/tests.py
===
--- django/branches/releases/1.0.X/django/contrib/formtools/tests.py
2009-05-12 22:03:19 UTC (rev 10754)
+++ django/branches/releases/1.0.X/django/contrib/formtools/tests.py
2009-05-12 22:03:32 UTC (rev 10755)
@@ -110,16 +110,31 @@
 leading/trailing whitespace so as to be friendly to broken browsers 
that
 submit it (usually in textareas).
 """
-class TestForm(forms.Form):
-name = forms.CharField()
-bio = forms.CharField()
+f1 = HashTestForm({'name': 'joe', 'bio': 'Nothing notable.'})
+f2 = HashTestForm({'name': '  joe', 'bio': 'Nothing notable.  '})
+hash1 = utils.security_hash(None, f1)
+hash2 = utils.security_hash(None, f2)
+self.assertEqual(hash1, hash2)
 
-f1 = TestForm({'name': 'joe', 'bio': 'Nothing notable.'})
-f2 = TestForm({'name': '  joe', 'bio': 'Nothing notable.  '})
+def test_empty_permitted(self):
+"""
+Regression test for #10643: the security hash should allow forms with
+empty_permitted = True, or forms where data has not changed.
+"""
+f1 = HashTestBlankForm({})
+f2 = HashTestForm({}, empty_permitted=True)
 hash1 = utils.security_hash(None, f1)
 hash2 = utils.security_hash(None, f2)
 self.assertEqual(hash1, hash2)
 
+class HashTestForm(forms.Form):
+name = forms.CharField()
+bio = forms.CharField()
+
+class HashTestBlankForm(forms.Form):
+name = forms.CharField(required=False)
+bio = forms.CharField(required=False)
+
 #
 # FormWizard tests
 #

Modified: django/branches/releases/1.0.X/django/contrib/formtools/utils.py
===
--- django/branches/releases/1.0.X/django/contrib/formtools/utils.py
2009-05-12 22:03:19 UTC (rev 10754)
+++ django/branches/releases/1.0.X/django/contrib/formtools/utils.py
2009-05-12 22:03:32 UTC (rev 10755)
@@ -18,10 +18,16 @@
 
 data = []
 for bf in form:
-value = bf.field.clean(bf.data) or ''
+# Get the value from the form data. If the form allows empty or hasn't
+# changed then don't call clean() to avoid trigger validation errors.
+if form.empty_permitted and not form.has_changed():
+value = bf.data or ''
+else:
+value = bf.field.clean(bf.data) or ''
 if isinstance(value, basestring):
 value = value.strip()
 data.append((bf.name, value))
+
 data.extend(args)
 data.append(settings.SECRET_KEY)
 


--~--~-~--~~~---~--~~
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] r10754 - django/branches/releases/1.0.X/django/contrib/formtools

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 17:03:19 -0500 (Tue, 12 May 2009)
New Revision: 10754

Modified:
   django/branches/releases/1.0.X/django/contrib/formtools/tests.py
   django/branches/releases/1.0.X/django/contrib/formtools/utils.py
Log:
[1.0.X] Fixed #10034: the formtools security hash function is now friendlier to 
browsers that submit leading/trailing whitespace in form fields. Backport of 
[10752] from trunk.

Modified: django/branches/releases/1.0.X/django/contrib/formtools/tests.py
===
--- django/branches/releases/1.0.X/django/contrib/formtools/tests.py
2009-05-12 22:02:38 UTC (rev 10753)
+++ django/branches/releases/1.0.X/django/contrib/formtools/tests.py
2009-05-12 22:03:19 UTC (rev 10754)
@@ -1,5 +1,6 @@
+import unittest
 from django import forms
-from django.contrib.formtools import preview, wizard
+from django.contrib.formtools import preview, wizard, utils
 from django import http
 from django.test import TestCase
 
@@ -101,6 +102,24 @@
 response = self.client.post('/test1/', self.test_data)
 self.assertEqual(response.content, success_string)
 
+class SecurityHashTests(unittest.TestCase):
+
+def test_textfield_hash(self):
+"""
+Regression test for #10034: the hash generation function should ignore
+leading/trailing whitespace so as to be friendly to broken browsers 
that
+submit it (usually in textareas).
+"""
+class TestForm(forms.Form):
+name = forms.CharField()
+bio = forms.CharField()
+
+f1 = TestForm({'name': 'joe', 'bio': 'Nothing notable.'})
+f2 = TestForm({'name': '  joe', 'bio': 'Nothing notable.  '})
+hash1 = utils.security_hash(None, f1)
+hash2 = utils.security_hash(None, f2)
+self.assertEqual(hash1, hash2)
+
 #
 # FormWizard tests
 #

Modified: django/branches/releases/1.0.X/django/contrib/formtools/utils.py
===
--- django/branches/releases/1.0.X/django/contrib/formtools/utils.py
2009-05-12 22:02:38 UTC (rev 10753)
+++ django/branches/releases/1.0.X/django/contrib/formtools/utils.py
2009-05-12 22:03:19 UTC (rev 10754)
@@ -16,7 +16,12 @@
 hash of that.
 """
 
-data = [(bf.name, bf.field.clean(bf.data) or '') for bf in form]
+data = []
+for bf in form:
+value = bf.field.clean(bf.data) or ''
+if isinstance(value, basestring):
+value = value.strip()
+data.append((bf.name, value))
 data.extend(args)
 data.append(settings.SECRET_KEY)
 


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

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 17:02:38 -0500 (Tue, 12 May 2009)
New Revision: 10753

Modified:
   django/trunk/django/contrib/formtools/tests.py
   django/trunk/django/contrib/formtools/utils.py
Log:
Fixed #10643: fixed the formtools security hash to handle allowed empty forms 
or forms without changed data.

Modified: django/trunk/django/contrib/formtools/tests.py
===
--- django/trunk/django/contrib/formtools/tests.py  2009-05-12 21:54:58 UTC 
(rev 10752)
+++ django/trunk/django/contrib/formtools/tests.py  2009-05-12 22:02:38 UTC 
(rev 10753)
@@ -110,16 +110,31 @@
 leading/trailing whitespace so as to be friendly to broken browsers 
that
 submit it (usually in textareas).
 """
-class TestForm(forms.Form):
-name = forms.CharField()
-bio = forms.CharField()
+f1 = HashTestForm({'name': 'joe', 'bio': 'Nothing notable.'})
+f2 = HashTestForm({'name': '  joe', 'bio': 'Nothing notable.  '})
+hash1 = utils.security_hash(None, f1)
+hash2 = utils.security_hash(None, f2)
+self.assertEqual(hash1, hash2)
 
-f1 = TestForm({'name': 'joe', 'bio': 'Nothing notable.'})
-f2 = TestForm({'name': '  joe', 'bio': 'Nothing notable.  '})
+def test_empty_permitted(self):
+"""
+Regression test for #10643: the security hash should allow forms with
+empty_permitted = True, or forms where data has not changed.
+"""
+f1 = HashTestBlankForm({})
+f2 = HashTestForm({}, empty_permitted=True)
 hash1 = utils.security_hash(None, f1)
 hash2 = utils.security_hash(None, f2)
 self.assertEqual(hash1, hash2)
 
+class HashTestForm(forms.Form):
+name = forms.CharField()
+bio = forms.CharField()
+
+class HashTestBlankForm(forms.Form):
+name = forms.CharField(required=False)
+bio = forms.CharField(required=False)
+
 #
 # FormWizard tests
 #

Modified: django/trunk/django/contrib/formtools/utils.py
===
--- django/trunk/django/contrib/formtools/utils.py  2009-05-12 21:54:58 UTC 
(rev 10752)
+++ django/trunk/django/contrib/formtools/utils.py  2009-05-12 22:02:38 UTC 
(rev 10753)
@@ -18,10 +18,16 @@
 
 data = []
 for bf in form:
-value = bf.field.clean(bf.data) or ''
+# Get the value from the form data. If the form allows empty or hasn't
+# changed then don't call clean() to avoid trigger validation errors.
+if form.empty_permitted and not form.has_changed():
+value = bf.data or ''
+else:
+value = bf.field.clean(bf.data) or ''
 if isinstance(value, basestring):
 value = value.strip()
 data.append((bf.name, value))
+
 data.extend(args)
 data.append(settings.SECRET_KEY)
 


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

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 16:54:58 -0500 (Tue, 12 May 2009)
New Revision: 10752

Modified:
   django/trunk/django/contrib/formtools/tests.py
   django/trunk/django/contrib/formtools/utils.py
Log:
Fixed #10034: the formtools security hash function is now friendlier to 
browsers that submit leading/trailing whitespace in form fields.

Modified: django/trunk/django/contrib/formtools/tests.py
===
--- django/trunk/django/contrib/formtools/tests.py  2009-05-12 21:45:03 UTC 
(rev 10751)
+++ django/trunk/django/contrib/formtools/tests.py  2009-05-12 21:54:58 UTC 
(rev 10752)
@@ -1,5 +1,6 @@
+import unittest
 from django import forms
-from django.contrib.formtools import preview, wizard
+from django.contrib.formtools import preview, wizard, utils
 from django import http
 from django.test import TestCase
 
@@ -101,6 +102,24 @@
 response = self.client.post('/test1/', self.test_data)
 self.assertEqual(response.content, success_string)
 
+class SecurityHashTests(unittest.TestCase):
+
+def test_textfield_hash(self):
+"""
+Regression test for #10034: the hash generation function should ignore
+leading/trailing whitespace so as to be friendly to broken browsers 
that
+submit it (usually in textareas).
+"""
+class TestForm(forms.Form):
+name = forms.CharField()
+bio = forms.CharField()
+
+f1 = TestForm({'name': 'joe', 'bio': 'Nothing notable.'})
+f2 = TestForm({'name': '  joe', 'bio': 'Nothing notable.  '})
+hash1 = utils.security_hash(None, f1)
+hash2 = utils.security_hash(None, f2)
+self.assertEqual(hash1, hash2)
+
 #
 # FormWizard tests
 #

Modified: django/trunk/django/contrib/formtools/utils.py
===
--- django/trunk/django/contrib/formtools/utils.py  2009-05-12 21:45:03 UTC 
(rev 10751)
+++ django/trunk/django/contrib/formtools/utils.py  2009-05-12 21:54:58 UTC 
(rev 10752)
@@ -16,7 +16,12 @@
 hash of that.
 """
 
-data = [(bf.name, bf.field.clean(bf.data) or '') for bf in form]
+data = []
+for bf in form:
+value = bf.field.clean(bf.data) or ''
+if isinstance(value, basestring):
+value = value.strip()
+data.append((bf.name, value))
 data.extend(args)
 data.append(settings.SECRET_KEY)
 


--~--~-~--~~~---~--~~
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] #6262: Cache templates

2009-05-12 Thread Django
#6262: Cache templates
-+--
  Reporter:  SmileyChris | Owner:  SmileyChris
Status:  assigned| Milestone: 
 Component:  Template system |   Version:  SVN
Resolution:  |  Keywords: 
 Stage:  Design decision needed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by mc):

 Vadim,

 It would be best for you to test speedups on your own application.
 Normally template parsing would only be a small part of overall
 application time (~<20%).

 The loader_tags.diff changes by themselves would not result in a speedup.
 They are necessary but not sufficient for caching templates.

 I have implemented a very simple dict lookup in
 template.loader.get_template() similar to #9154.

 The reason I wanted to cache templates is that I have custom tags which do
 some processing during parsing which I don't want to repeat all the time.

 A very rough test of one of my pages yielded:
 Requests / sec
 18  Django-1.0.2
 24  template cache on (33% improvement)

-- 
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] r10751 - in django/trunk: django/core/management tests/regressiontests/admin_scripts

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 16:45:03 -0500 (Tue, 12 May 2009)
New Revision: 10751

Modified:
   django/trunk/django/core/management/__init__.py
   django/trunk/tests/regressiontests/admin_scripts/tests.py
Log:
Fixed #9751: admin scripts now calculate the project directory correctly when 
the settings module is a directory with an ``__init__.py``. Thanks to Eric 
Holscher.

Modified: django/trunk/django/core/management/__init__.py
===
--- django/trunk/django/core/management/__init__.py 2009-05-12 20:32:03 UTC 
(rev 10750)
+++ django/trunk/django/core/management/__init__.py 2009-05-12 21:45:03 UTC 
(rev 10751)
@@ -105,10 +105,9 @@
 # Find the project directory
 try:
 from django.conf import settings
-module = import_module(settings.SETTINGS_MODULE.split('.', 1)[0])
-project_directory = setup_environ(module,
-settings.SETTINGS_MODULE)
-except (AttributeError, EnvironmentError, ImportError):
+module = import_module(settings.SETTINGS_MODULE)
+project_directory = setup_environ(module, settings.SETTINGS_MODULE)
+except (AttributeError, EnvironmentError, ImportError, KeyError):
 project_directory = None
 
 # Find and load the management module for each installed app.
@@ -156,11 +155,11 @@
 raise CommandError, "Unknown command: %r" % name
 
 # Grab out a list of defaults from the options. optparse does this for us
-# when the script runs from the command line, but since call_command can 
+# when the script runs from the command line, but since call_command can
 # be called programatically, we need to simulate the loading and handling
 # of defaults (see #10080 for details).
 defaults = dict([(o.dest, o.default)
- for o in klass.option_list 
+ for o in klass.option_list
  if o.default is not NO_DEFAULT])
 defaults.update(options)
 
@@ -316,7 +315,11 @@
 # Add this project to sys.path so that it's importable in the conventional
 # way. For example, if this file (manage.py) lives in a directory
 # "myproject", this code would add "/path/to/myproject" to sys.path.
-project_directory, settings_filename = os.path.split(settings_mod.__file__)
+if '__init__.py' in settings_mod.__file__:
+p = os.path.dirname(settings_mod.__file__)
+else:
+p = settings_mod.__file__
+project_directory, settings_filename = os.path.split(p)
 if project_directory == os.curdir or not project_directory:
 project_directory = os.getcwd()
 project_name = os.path.basename(project_directory)

Modified: django/trunk/tests/regressiontests/admin_scripts/tests.py
===
--- django/trunk/tests/regressiontests/admin_scripts/tests.py   2009-05-12 
20:32:03 UTC (rev 10750)
+++ django/trunk/tests/regressiontests/admin_scripts/tests.py   2009-05-12 
21:45:03 UTC (rev 10751)
@@ -13,9 +13,14 @@
 from django.conf import settings
 
 class AdminScriptTestCase(unittest.TestCase):
-def write_settings(self, filename, apps=None):
+def write_settings(self, filename, apps=None, is_dir=False):
 test_dir = os.path.dirname(os.path.dirname(__file__))
-settings_file = open(os.path.join(test_dir,filename), 'w')
+if is_dir:
+settings_dir = os.path.join(test_dir,filename)
+os.mkdir(settings_dir)
+settings_file = open(os.path.join(settings_dir,'__init__.py'), 'w')
+else:
+settings_file = open(os.path.join(test_dir, filename), 'w')
 settings_file.write('# Settings file automatically generated by 
regressiontests.admin_scripts test case\n')
 exports = [
 'DATABASE_ENGINE',
@@ -38,10 +43,13 @@
 
 settings_file.close()
 
-def remove_settings(self, filename):
+def remove_settings(self, filename, is_dir=False):
 test_dir = os.path.dirname(os.path.dirname(__file__))
 full_name = os.path.join(test_dir, filename)
-os.remove(full_name)
+if is_dir:
+shutil.rmtree(full_name)
+else:
+os.remove(full_name)
 
 # Also try to remove the compiled file; if it exists, it could
 # mess up later tests that depend upon the .py file not existing
@@ -509,6 +517,70 @@
 self.assertNoOutput(err)
 self.assertOutput(out, "EXECUTE:NoArgsCommand")
 
+
+class DjangoAdminSettingsDirectory(AdminScriptTestCase):
+"""
+A series of tests for django-admin.py when the settings file is in a
+directory. (see #9751).
+"""
+
+def setUp(self):
+self.write_settings('settings', is_dir=True)
+
+def tearDown(self):
+self.remove_settings('settings', is_dir=True)
+
+def test_setup_environ(self):
+"directory: 

[Django] #11086: Django not recieveing the mountpoint when using mod_wsgi

2009-05-12 Thread Django
#11086: Django not recieveing the mountpoint when using mod_wsgi
---+
 Reporter:  emperorcezar   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 This is only occurring with multiple mountpoints. Below you will find my
 config. /password isn't being passed the /password when used in my url.
 For example. When I go to the url http://example.com/password/update/
 django only gets the path /update/

 When using the second mount point it gets passed the entire url.

 I'm able to work around this using the workaround mentioned in the
 [http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango Integration
 Documentation] to get /password to be passed.

 I'm not sure what is correct, for it to be passed or not, but I'm pretty
 sure that it should be consistent for each mountpoint.

 My config, all in the same virtual host.

 {{{
 WSGIDaemonProcess password
 WSGIProcessGroup password
 WSGIReloadMechanism Process

 WSGIScriptAlias /password
 /example/migrationpassword/apache/django.wsgi

 Alias /media/ /example/migrationpassword/media/

 WSGIDaemonProcess endofyearshow
 WSGIProcessGroup endofyearshow
 WSGIReloadMechanism Process

 WSGIScriptAlias /endofyearshow
 /example/endofyearshow/apache/django.wsgi

 Alias /media/ /example/endofyearshow/static/

 }}}

-- 
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] r10750 - django/branches/releases/1.0.X/django/db/backends/oracle

2009-05-12 Thread noreply

Author: mboersma
Date: 2009-05-12 15:32:03 -0500 (Tue, 12 May 2009)
New Revision: 10750

Modified:
   django/branches/releases/1.0.X/django/db/backends/oracle/introspection.py
Log:
[1.0.X] Fixed #11033 -- handle cx_Oracle.UNICODE when driver was compiled 
without Unicode support. Thanks, JirkaV. 


Modified: 
django/branches/releases/1.0.X/django/db/backends/oracle/introspection.py
===
--- django/branches/releases/1.0.X/django/db/backends/oracle/introspection.py   
2009-05-12 20:30:28 UTC (rev 10749)
+++ django/branches/releases/1.0.X/django/db/backends/oracle/introspection.py   
2009-05-12 20:32:03 UTC (rev 10750)
@@ -21,6 +21,11 @@
 except AttributeError:
 pass
 
+try:
+data_types_reverse[cx_Oracle.UNICODE] = 'CharField'
+except AttributeError:
+pass
+
 def get_table_list(self, cursor):
 "Returns a list of table names in the current database."
 cursor.execute("SELECT TABLE_NAME FROM USER_TABLES")


--~--~-~--~~~---~--~~
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] r10749 - django/trunk/django/db/backends/oracle

2009-05-12 Thread noreply

Author: mboersma
Date: 2009-05-12 15:30:28 -0500 (Tue, 12 May 2009)
New Revision: 10749

Modified:
   django/trunk/django/db/backends/oracle/introspection.py
Log:
Fixed #11033 -- handle cx_Oracle.UNICODE when driver was compiled without 
Unicode support.  Thanks, JirkaV.


Modified: django/trunk/django/db/backends/oracle/introspection.py
===
--- django/trunk/django/db/backends/oracle/introspection.py 2009-05-12 
17:25:29 UTC (rev 10748)
+++ django/trunk/django/db/backends/oracle/introspection.py 2009-05-12 
20:30:28 UTC (rev 10749)
@@ -21,6 +21,11 @@
 except AttributeError:
 pass
 
+try:
+data_types_reverse[cx_Oracle.UNICODE] = 'CharField'
+except AttributeError:
+pass
+
 def get_table_list(self, cursor):
 "Returns a list of table names in the current database."
 cursor.execute("SELECT TABLE_NAME FROM USER_TABLES")


--~--~-~--~~~---~--~~
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] #11082: exclude subquery executed twice

2009-05-12 Thread Django
#11082: exclude subquery executed twice
---+
  Reporter:  handrews  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by clement):

 In attached patch :

  * Added !__deepcopy!__ in !QuerySet to avoid having !__getstate!__
 forcing the result cache to be populated
  * Alex's fix (on django-users mailing list) to avoid evaluating the
 !QuerySet in add_filter
  * Simple regression test

-- 
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] #11033: cx_Oracle.UNICODE missing if cx_Oracle version 5.0.1 is compiled without Unicode support

2009-05-12 Thread Django
#11033: cx_Oracle.UNICODE missing if cx_Oracle version 5.0.1 is compiled without
Unicode support
---+
  Reporter:  JirkaV| Owner:  mboersma   
 
Status:  assigned  | Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  oracle 
unicode cx_Oracle
 Stage:  Unreviewed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by mboersma):

  * milestone:  1.2 => 1.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-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] #11033: cx_Oracle.UNICODE missing if cx_Oracle version 5.0.1 is compiled without Unicode support

2009-05-12 Thread Django
#11033: cx_Oracle.UNICODE missing if cx_Oracle version 5.0.1 is compiled without
Unicode support
---+
  Reporter:  JirkaV| Owner:  mboersma   
 
Status:  assigned  | Milestone:  1.2
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  oracle 
unicode cx_Oracle
 Stage:  Unreviewed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by mboersma):

  * owner:  ikelly => mboersma
  * status:  new => assigned
  * milestone:  => 1.2

-- 
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] #8593: Image upload in Windows changes filename to lowercase

2009-05-12 Thread Django
#8593: Image upload in Windows changes filename to lowercase
---+
  Reporter:  robvdl| Owner:  ramiro 
   
Status:  new   | Milestone: 
   
 Component:  File uploads/storage  |   Version:  1.0
   
Resolution:|  Keywords:  upload image 
lowercase
 Stage:  Accepted  | Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by mitsuhiko):

 * cc: mitsuhiko (added)

Comment:

 The case is more complex.  On OS X the IO system performs unicode
 normalization for the filename after the file was stored.  This is fine
 until you mount the volume on a linux machine or access it over the
 network.  I'm not sure what the fix is, OS X normalizes in the IO system
 somehow, it also affects IO access on NFS mounts and similar volumes.  You
 can't really find out how the normalization works from inside Python.

-- 
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] #11084: After r10737, ImageField sets height and width on model creation, every lookup

2009-05-12 Thread Django
#11084: After r10737, ImageField sets height and width on model creation, every
lookup
---+
  Reporter:  Mnewman   | Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  1 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by Mnewman):

  * needs_better_patch:  0 => 1
  * needs_tests:  0 => 1
  * needs_docs:  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-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] #11084: After r10737, ImageField sets height and width on model creation, every lookup

2009-05-12 Thread Django
#11084: After r10737, ImageField sets height and width on model creation, every
lookup
---+
  Reporter:  Mnewman   | Owner:  nobody
Status:  new   | Milestone:
 Component:  File uploads/storage  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Mnewman):

  * needs_better_patch:  => 0
  * summary:  r10737 opens file everytime a variable is looked up => After
  r10737, ImageField sets height and width on
  model creation, every lookup
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 So after a little digging I have figured out that it has to do with the
 ImageFileDescriptor,
 
http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/files.py#L297
 , where __set__ is called on creation of the instance, but also on
 database lookups down the line, meaning that if you have the height and
 width field defined, any time you want to use the ImageField on a model,
 it opens the Image file.

-- 
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] #11049: Oracle fails to return IntegerField in test_get_table_description_types

2009-05-12 Thread Django
#11049: Oracle fails to return IntegerField in test_get_table_description_types
---+
  Reporter:  mboersma  | Owner:  mboersma   
  
Status:  assigned  | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords:  Oracle 
oracle
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  0 |  
---+
Changes (by mboersma):

  * status:  new => assigned
  * needs_better_patch:  => 0
  * needs_tests:  => 1
  * owner:  nobody => mboersma
  * needs_docs:  => 0
  * has_patch:  0 => 1
  * stage:  Unreviewed => Accepted

-- 
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] #11082: exclude subquery executed twice

2009-05-12 Thread Django
#11082: exclude subquery executed twice
---+
  Reporter:  handrews  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by clement):

 Did a bit of digging, and it seems that this extra query is issued (gets
 in django.db.connection.queries) when the Q object for the exclude clause
 is inverted (then deepcopied). See
 
[http://code.djangoproject.com/browser/django/trunk/django/db/models/query.py#L482
 django.db.models.query] and
 
[http://code.djangoproject.com/browser/django/trunk/django/db/models/query_utils.py#L151
 django.db.models.query_utils].

 Interestingly enough, as Q._combine uses also deepcopy, the same problem
 exists when using a subquery in a Q object being a left hand operand on an
 & or | operation. Example :
 {{{
 >>> pub_all = Publisher.objects.all()
 >>> django.db.connection.queries
 []
 >>> Book.objects.filter( Q(publisher__in=pub_all) & Q(name='aa') )
 []
 >>> django.db.connection.queries
 [{'time': '0.001', 'sql': u'SELECT `app_publisher`.`id`,
 `app_publisher`.`name` FROM `app_publisher`'},
  {'time': '0.001', 'sql': u'SELECT `app_book`.`id`, `app_book`.`name`,
 `app_book`.`publisher_id` FROM
 `app_book` WHERE (`app_book`.`publisher_id` IN
 (SELECT U0.`id` FROM
 `app_publisher` U0) OR `app_book`.`name` = aa
 ) LIMIT 21'}]
 }}}

-- 
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] #11085: HTML shows up in title for Model Meta Options page

2009-05-12 Thread Django
#11085: HTML shows up in title for Model Meta Options page
+---
  Reporter:  Ubercore   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:
Resolution:  duplicate  |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

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

Comment:

 duplicate of #8885

-- 
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] #11046: Documentation on ifchanged should use new cycle syntax

2009-05-12 Thread Django
#11046: Documentation on ifchanged should use new cycle syntax
+---
  Reporter:  mitsuhiko  | Owner:  jacob
Status:  reopened   | Milestone:  1.1  
 Component:  Documentation  |   Version:  SVN  
Resolution: |  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by Alex):

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

Comment:

 Jacob, I think you missed it since the real version uses red,blue intead
 of foo,bar.

-- 
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] #11085: HTML shows up in title for Model Meta Options page

2009-05-12 Thread Django
#11085: HTML shows up in title for Model Meta Options page
---+
 Reporter:  Ubercore   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 When I browse to http://docs.djangoproject.com/en/dev/ref/models/options/
 I see the following as the title:

 {{{ Django | Model tt class=docutils
 literalspan
 class=preMeta/span/tt options | Django
 Documentation }}}

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

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 12:25:07 -0500 (Tue, 12 May 2009)
New Revision: 10747

Modified:
   django/branches/releases/1.0.X/docs/topics/install.txt
Log:
[1.0.X] Fixed #11063: updated install docs to mention mod_wsgi instead of 
mod_python. Backport of [10745] from trunk.

Modified: django/branches/releases/1.0.X/docs/topics/install.txt
===
--- django/branches/releases/1.0.X/docs/topics/install.txt  2009-05-12 
17:23:43 UTC (rev 10746)
+++ django/branches/releases/1.0.X/docs/topics/install.txt  2009-05-12 
17:25:07 UTC (rev 10747)
@@ -26,31 +26,33 @@
 
 .. _jython: http://jython.org/
 
-Install Apache and mod_python
+Install Apache and mod_wsgi
 =
 
-If you just want to experiment with Django, skip ahead to the next
-section; Django includes a lightweight web server you can use for
-testing, so you won't need to set up Apache until you're ready to
-deploy Django in production.
+If you just want to experiment with Django, skip ahead to the next section;
+Django includes a lightweight web server you can use for testing, so you won't
+need to set up Apache until you're ready to deploy Django in production.
 
-If you want to use Django on a production site, use Apache with `mod_python`_.
-mod_python is similar to mod_perl -- it embeds Python within Apache and loads
+If you want to use Django on a production site, use Apache with `mod_wsgi`_.
+mod_wsgi is similar to mod_perl -- it embeds Python within Apache and loads
 Python code into memory when the server starts. Code stays in memory throughout
-the life of an Apache process, which leads to significant performance gains
-over other server arrangements. Make sure you have Apache installed, with the
-mod_python module activated. Django requires Apache 2.x and mod_python 3.x.
+the life of an Apache process, which leads to significant performance gains 
over
+other server arrangements. Make sure you have Apache installed, with the
+mod_wsgi module activated. Django will work with any version of Apache that
+supports mod_wsgi.
 
-See :ref:`How to use Django with mod_python ` for
-information on how to configure mod_python once you have it installed.
+See :ref:`How to use Django with mod_wsgi ` for
+information on how to configure mod_wsgi once you have it installed.
 
-If you can't use mod_python for some reason, fear not: Django follows the WSGI_
-spec, which allows it to run on a variety of server platforms. See the
-`server-arrangements wiki page`_ for specific installation instructions for
-each platform.
+If you can't use mod_wsgi for some reason, fear not: Django supports many other
+deployment options. A great second choice is :ref:`mod_python
+`, the predecessor to mod_wsgi. Additionally, 
Django
+follows the WSGI_ spec, which allows it to run on a variety of server 
platforms.
+See the `server-arrangements wiki page`_ for specific installation instructions
+for each platform.
 
 .. _Apache: http://httpd.apache.org/
-.. _mod_python: http://www.modpython.org/
+.. _mod_wsgi: http://code.google.com/p/modwsgi/
 .. _WSGI: http://www.python.org/peps/pep-0333.html
 .. _server-arrangements wiki page: 
http://code.djangoproject.com/wiki/ServerArrangements
 


--~--~-~--~~~---~--~~
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] r10746 - django/trunk/docs/ref/contrib/comments

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 12:23:43 -0500 (Tue, 12 May 2009)
New Revision: 10746

Modified:
   django/trunk/docs/ref/contrib/comments/upgrade.txt
Log:
Fixed #9675: added note about upgrading the URLconf to the comment upgrade 
guide.

Modified: django/trunk/docs/ref/contrib/comments/upgrade.txt
===
--- django/trunk/docs/ref/contrib/comments/upgrade.txt  2009-05-12 17:23:33 UTC 
(rev 10745)
+++ django/trunk/docs/ref/contrib/comments/upgrade.txt  2009-05-12 17:23:43 UTC 
(rev 10746)
@@ -25,7 +25,16 @@
   functions: ``{% get_comment_form %}``, which returns a form for posting a
   new comment, and ``{% render_comment_form %}``, which renders said form
   using the ``comments/form.html`` template.
+  
+* The way comments are include in your URLconf have changed; you'll need to
+  replace::
+
+(r'^comments/', include('django.contrib.comments.urls.comments')),
+  
+  with::
 
+(r'^comments/', include('django.contrib.comments.urls')),
+
 Upgrading data
 --
 


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

2009-05-12 Thread noreply

Author: jacob
Date: 2009-05-12 12:23:33 -0500 (Tue, 12 May 2009)
New Revision: 10745

Modified:
   django/trunk/docs/topics/install.txt
Log:
Fixed #11063: updated install docs to mention mod_wsgi instead of mod_python.

Modified: django/trunk/docs/topics/install.txt
===
--- django/trunk/docs/topics/install.txt2009-05-11 20:56:38 UTC (rev 
10744)
+++ django/trunk/docs/topics/install.txt2009-05-12 17:23:33 UTC (rev 
10745)
@@ -26,31 +26,33 @@
 
 .. _jython: http://jython.org/
 
-Install Apache and mod_python
+Install Apache and mod_wsgi
 =
 
-If you just want to experiment with Django, skip ahead to the next
-section; Django includes a lightweight web server you can use for
-testing, so you won't need to set up Apache until you're ready to
-deploy Django in production.
+If you just want to experiment with Django, skip ahead to the next section;
+Django includes a lightweight web server you can use for testing, so you won't
+need to set up Apache until you're ready to deploy Django in production.
 
-If you want to use Django on a production site, use Apache with `mod_python`_.
-mod_python is similar to mod_perl -- it embeds Python within Apache and loads
+If you want to use Django on a production site, use Apache with `mod_wsgi`_.
+mod_wsgi is similar to mod_perl -- it embeds Python within Apache and loads
 Python code into memory when the server starts. Code stays in memory throughout
-the life of an Apache process, which leads to significant performance gains
-over other server arrangements. Make sure you have Apache installed, with the
-mod_python module activated. Django requires Apache 2.x and mod_python 3.x.
+the life of an Apache process, which leads to significant performance gains 
over
+other server arrangements. Make sure you have Apache installed, with the
+mod_wsgi module activated. Django will work with any version of Apache that
+supports mod_wsgi.
 
-See :ref:`How to use Django with mod_python ` for
-information on how to configure mod_python once you have it installed.
+See :ref:`How to use Django with mod_wsgi ` for
+information on how to configure mod_wsgi once you have it installed.
 
-If you can't use mod_python for some reason, fear not: Django follows the WSGI_
-spec, which allows it to run on a variety of server platforms. See the
-`server-arrangements wiki page`_ for specific installation instructions for
-each platform.
+If you can't use mod_wsgi for some reason, fear not: Django supports many other
+deployment options. A great second choice is :ref:`mod_python
+`, the predecessor to mod_wsgi. Additionally, 
Django
+follows the WSGI_ spec, which allows it to run on a variety of server 
platforms.
+See the `server-arrangements wiki page`_ for specific installation instructions
+for each platform.
 
 .. _Apache: http://httpd.apache.org/
-.. _mod_python: http://www.modpython.org/
+.. _mod_wsgi: http://code.google.com/p/modwsgi/
 .. _WSGI: http://www.python.org/peps/pep-0333.html
 .. _server-arrangements wiki page: 
http://code.djangoproject.com/wiki/ServerArrangements
 


--~--~-~--~~~---~--~~
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] #11046: Documentation on ifchanged should use new cycle syntax

2009-05-12 Thread Django
#11046: Documentation on ifchanged should use new cycle syntax
+---
  Reporter:  mitsuhiko  | Owner:  jacob
Status:  closed | Milestone:  1.1  
 Component:  Documentation  |   Version:  SVN  
Resolution:  invalid|  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Comment (by mitsuhiko):

 I must be missing something then:
 
http://code.djangoproject.com/browser/django/trunk/docs/ref/templates/builtins.txt#L368

-- 
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] #11046: Documentation on ifchanged should use new cycle syntax

2009-05-12 Thread Django
#11046: Documentation on ifchanged should use new cycle syntax
+---
  Reporter:  mitsuhiko  | Owner:  jacob
Status:  closed | Milestone:  1.1  
 Component:  Documentation  |   Version:  SVN  
Resolution:  invalid|  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by jacob):

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

Comment:

 I don't see this in the current docs any more; must have been fixed at
 some 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
-~--~~~~--~~--~--~---



[Django] #11084: r10737 opens file everytime a variable is looked up

2009-05-12 Thread Django
#11084: r10737 opens file everytime a variable is looked up
--+-
 Reporter:  Mnewman   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  File uploads/storage  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 I am going to give this a little more time, but I wanted to file quickly.

 r10737 was a large commit that changes the way that files variables are
 handled. On every lookup of ImageField, the image is opened on the OS.
 This causes huge IO overhead. Also if the file is unavailable, an uncaught
 OSError is raised, creating errors in templates if the filesystem is
 unavailable.

-- 
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] #11082: exclude subquery executed twice

2009-05-12 Thread Django
#11082: exclude subquery executed twice
---+
  Reporter:  handrews  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * stage:  Unreviewed => Accepted
  * version:  1.1-beta-1 => SVN
  * milestone:  => 1.1

Old description:

> When excluding using a subquery, I'm seeing the subquery being
> executed first as its own query, then seeing the correct query being
> run, including the subquery.  Using filter instead of exclude, this
> does not happen.
>
> Here's what I mean (Select fields edited out of the MySQL log for
> readability- connection 374 is from the Python prompt, 332 is me
> poking at the mysql command line in another window to make sure I
> don't confuse which queries go with which python statements).  Version
> and platform info follows:
>
> >>> baz=Publisher.objects.all()
> >>> for s in Series.objects.filter(publisher__in=baz):
>
> ...   pass
> ...
> >>> for s in Series.objects.exclude(publisher__in=baz):
>
> ...   pass
> ...
>
> 090509 19:30:22 332 Query   select count(*) from core_issue
> 090509 19:30:28 374 Query   SELECT * FROM `core_series` WHERE
> `core_series`.`publisher_id` IN (SELECT U0.`id` FROM `core_publisher`
> U0) ORDER BY `core_series`.`name` ASC, `core_series`.`year_began` ASC
> 090509 19:30:41 332 Query   select count(*) from core_issue
> 090509 19:30:54 374 Query   SELECT * FROM `core_publisher`
> ORDER BY `core_publisher`.`name` ASC
> 090509 19:30:55 374 Query   SELECT * FROM `core_series` WHERE
> NOT (`core_series`.`publisher_id` IN (SELECT U0.`id` FROM
> `core_publisher` U0)) ORDER BY `core_series`.`name` ASC,
> `core_series`.`year_began` ASC
> Version stuff:
> Django 1.1 beta 1
> Mac OS X 10.4.11
> MySQL 5.0.45
> Python 2.4.4
> MySQLdb 1.2.1_p2
>
> I checked on django-users first, where Alex Gaynor suggested that the
> issue is here:
> http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py#L1622

New description:

 When excluding using a subquery, I'm seeing the subquery being
 executed first as its own query, then seeing the correct query being
 run, including the subquery.  Using filter instead of exclude, this
 does not happen.

 Here's what I mean (Select fields edited out of the MySQL log for
 readability- connection 374 is from the Python prompt, 332 is me
 poking at the mysql command line in another window to make sure I
 don't confuse which queries go with which python statements).  Version
 and platform info follows:
 {{{
 >>> baz=Publisher.objects.all()
 >>> for s in Series.objects.filter(publisher__in=baz):

 ...   pass
 ...
 >>> for s in Series.objects.exclude(publisher__in=baz):

 ...   pass
 ...
 }}}
 {{{
 090509 19:30:22 332 Query   select count(*) from core_issue
 090509 19:30:28 374 Query   SELECT * FROM `core_series` WHERE
 `core_series`.`publisher_id` IN (SELECT U0.`id` FROM `core_publisher` U0)
 ORDER BY `core_series`.`name` ASC, `core_series`.`year_began` ASC
 090509 19:30:41 332 Query   select count(*) from core_issue
 090509 19:30:54 374 Query   SELECT * FROM `core_publisher` ORDER
 BY `core_publisher`.`name` ASC
 090509 19:30:55 374 Query   SELECT * FROM `core_series` WHERE NOT
 (`core_series`.`publisher_id` IN (SELECT U0.`id` FROM `core_publisher`
 U0)) ORDER BY `core_series`.`name` ASC, `core_series`.`year_began` ASC
 }}}
 Version stuff:
 Django 1.1 beta 1
 Mac OS X 10.4.11
 MySQL 5.0.45
 Python 2.4.4
 MySQLdb 1.2.1_p2

 I checked on django-users first, where Alex Gaynor suggested that the
 issue is here:
 
http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py#L1622

Comment:

 Fixed the formatting.

-- 
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] #11083: BackwardsIncompatibleChanges page does not mention OneToOneField change

2009-05-12 Thread Django
#11083: BackwardsIncompatibleChanges page does not mention OneToOneField change
+---
  Reporter:  adurdin| Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:
Resolution:  invalid|  Keywords:  wiki  
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Alex):

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

Comment:

 http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Queryset-
 refactormerge It's mentioned on the page linked here, just like the note
 says.

-- 
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] #11082: exclude subquery executed twice

2009-05-12 Thread Django
#11082: exclude subquery executed twice
---+
  Reporter:  handrews  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Henry Andrews ):

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

Comment:

 Forgot to include the rest of Alex's comment about the code link "with the
 if not value triggering the issue.  It's probably solvable by
 changing that to if (not hasattr(value, 'as_sql') and not hasattr(value,
 '_as_sql') and not value), but I haven't spent a ton of time thinking
 about
 it."

 Also, Malcolm Tredinnick replied that he could reproduce 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
-~--~~~~--~~--~--~---



[Django] #11083: BackwardsIncompatibleChanges page does not mention OneToOneField change

2009-05-12 Thread Django
#11083: BackwardsIncompatibleChanges page does not mention OneToOneField change
---+
 Reporter:  adurdin|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:
 Keywords:  wiki   |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 After queryset-refactor, OneToOneFields are no longer automatically the
 primary key of a model.  To make older code work post-queryset-refactor,
 the keyword argument `primary_key=True` must be added to the field
 instantiation.

 I would have updated the wiki page, but do not appear to have permissions
 to edit it.

-- 
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] #11082: exclude subquery executed twice

2009-05-12 Thread Django
#11082: exclude subquery executed twice
--+-
 Reporter:  handrews  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1-beta-1
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 When excluding using a subquery, I'm seeing the subquery being
 executed first as its own query, then seeing the correct query being
 run, including the subquery.  Using filter instead of exclude, this
 does not happen.

 Here's what I mean (Select fields edited out of the MySQL log for
 readability- connection 374 is from the Python prompt, 332 is me
 poking at the mysql command line in another window to make sure I
 don't confuse which queries go with which python statements).  Version
 and platform info follows:

 >>> baz=Publisher.objects.all()
 >>> for s in Series.objects.filter(publisher__in=baz):

 ...   pass
 ...
 >>> for s in Series.objects.exclude(publisher__in=baz):

 ...   pass
 ...

 090509 19:30:22 332 Query   select count(*) from core_issue
 090509 19:30:28 374 Query   SELECT * FROM `core_series` WHERE
 `core_series`.`publisher_id` IN (SELECT U0.`id` FROM `core_publisher`
 U0) ORDER BY `core_series`.`name` ASC, `core_series`.`year_began` ASC
 090509 19:30:41 332 Query   select count(*) from core_issue
 090509 19:30:54 374 Query   SELECT * FROM `core_publisher`
 ORDER BY `core_publisher`.`name` ASC
 090509 19:30:55 374 Query   SELECT * FROM `core_series` WHERE
 NOT (`core_series`.`publisher_id` IN (SELECT U0.`id` FROM
 `core_publisher` U0)) ORDER BY `core_series`.`name` ASC,
 `core_series`.`year_began` ASC
 Version stuff:
 Django 1.1 beta 1
 Mac OS X 10.4.11
 MySQL 5.0.45
 Python 2.4.4
 MySQLdb 1.2.1_p2

 I checked on django-users first, where Alex Gaynor suggested that the
 issue is here:
 
http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py#L1622

-- 
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] #10788: Actual name of uploaded file available later than it was in 1.0

2009-05-12 Thread Django
#10788: Actual name of uploaded file available later than it was in 1.0
-+--
  Reporter:  kmtracey| Owner:  jacob
Status:  new | Milestone:  1.1  
 Component:  File uploads/storage|   Version:  SVN  
Resolution:  |  Keywords:   
 Stage:  Design decision needed  | Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Comment (by lstep):

 Replying to [comment:8 mitsuhiko]:
 > Replying to [comment:7 anonymous]:
 > > Replying to [comment:6 mitsuhiko]:
 > > > The core no longer depends on that and I stronly suggest designing
 custom upload handlers in a way that they don't depend on the final
 filename of the file on the filesystem. This however is slighty backwards
 incomaptible as it seems so it requires a decision by a main developer.
 > >
 > > It's totally incompatible with every code I could see that needs to
 rename (uploaded) files. To rename the file, you have know its name first,
 but in the current status, this is not possible anymore (especially in
 pre_save() signals).
 > Why would you need to rename a file?  Can't see how this is useful.
 Just set the filename before the file is saved by the model then you don't
 have to rename the file, it would be stored with the correct name.

 Well, not necessarily renaming a file, in fact it's just accessing it. We
 don't have the path to access it. Just look at the example in the original
 django dev thread (http://groups.google.com/group/django-
 developers/browse_thread/thread/ce20f196f5e85296 ).

 As a real use-case (simple) example which is often used, for an uploaded
 image (put in an ImageField), generate a thumbnail for it, using the
 pre_save() signal.

-- 
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] #8087: Template tags 'ifin' and 'ifnotin' checking if element is present in sequence

2009-05-12 Thread Django
#8087: Template tags 'ifin' and 'ifnotin' checking if element is present in
sequence
-+--
  Reporter:  emes| Owner:  nobody   
 
Status:  new | Milestone:   
 
 Component:  Template system |   Version:  SVN  
 
Resolution:  |  Keywords:  templatetag, 
tag, sequence
 Stage:  Design decision needed  | Has_patch:  1
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Comment (by tomevans222):

 I think it is WAY too late to make it in 1.1 :)

 After 1.1 is released, I intend to try to help get this added in one way
 or another, so maybe 1.2 :)

-- 
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] #7732: Oracle Backend with SessionPool

2009-05-12 Thread Django
#7732: Oracle Backend with SessionPool
---+
  Reporter:  halturin  | Owner:  mboersma   
  
Status:  assigned  | Milestone:  1.2
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords:  
yandex-sprint oracle session pool
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  1 |   Needs_tests:  1  
  
Needs_better_patch:  1 |  
---+
Comment (by mboersma):

 ...(continued) I'm marking this as needed for the next big release.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #7732: Oracle Backend with SessionPool

2009-05-12 Thread Django
#7732: Oracle Backend with SessionPool
---+
  Reporter:  halturin  | Owner:  mboersma   
  
Status:  assigned  | Milestone:  1.2
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords:  
yandex-sprint oracle session pool
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  1 |   Needs_tests:  1  
  
Needs_better_patch:  1 |  
---+
Changes (by mboersma):

  * owner:  nobody => mboersma
  * status:  new => assigned
  * stage:  Design decision needed => Accepted
  * needs_tests:  0 => 1
  * milestone:  => 1.2

Comment:

 I'm still not able to get cx_Oracle's SessionPool to behave correctly for
 the entire Django test suite.  I've tried the 4/16/09 patch here as well
 as my own implementations, but we quickly get test case failures that I've
 had a very hard time tracking down.

 I have not given up--I think this should offer obvious speed improvements.
 I'm marking this as

-- 
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] #11081: Page rendering fails after upgrading to r10703

2009-05-12 Thread Django
#11081: Page rendering fails after upgrading to r10703
-+--
  Reporter:  awatts  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Core framework  |   Version:  SVN 
Resolution:  |  Keywords:  getdefaultlocale mac
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by awatts):

  * version:  1.0 => SVN

-- 
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] #11081: Page rendering fails after upgrading to r10703

2009-05-12 Thread Django
#11081: Page rendering fails after upgrading to r10703
-+--
  Reporter:  awatts  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Core framework  |   Version:  1.0 
Resolution:  |  Keywords:  getdefaultlocale mac
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by awatts):

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

Comment:

 I just noticed that after that traceback there's a 2nd one:
 {{{
 #!python
 Original Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/template/debug.py", line 71, in render_node
 result = node.render(context)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/template/debug.py", line 87, in render
 output = force_unicode(self.filter_expression.resolve(context))
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/template/__init__.py", line 572, in resolve
 new_obj = func(obj, *arg_vals)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/template/defaultfilters.py", line 681, in date
 from django.utils.dateformat import format
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/utils/dateformat.py", line 18, in 
 from django.utils.tzinfo import LocalTimezone
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/utils/tzinfo.py", line 5, in 
 from django.utils.encoding import smart_unicode, smart_str,
 DEFAULT_LOCALE_ENCODING
 ImportError: cannot import name DEFAULT_LOCALE_ENCODING
 }}}

-- 
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] #11081: Page rendering fails after upgrading to r10703

2009-05-12 Thread Django
#11081: Page rendering fails after upgrading to r10703
--+-
 Reporter:  awatts|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Core framework| Version:  1.0   
 Keywords:  getdefaultlocale mac  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 I did and svn update the other day and the changes made in
 source:/django/trunk/django/utils/encoding.py in changeset:10703 to fix
 ticket:10335 seems to be causing all template renderings to fail for me
 with a traceback like the following:

 {{{
 #!python
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/core/servers/basehttp.py", line 278, in run
 self.result = application(self.environ, self.start_response)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/core/servers/basehttp.py", line 636, in __call__
 return self.application(environ, start_response)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/core/handlers/wsgi.py", line 241, in __call__
 response = self.get_response(request)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/core/handlers/base.py", line 134, in get_response
 return self.handle_uncaught_exception(request, resolver, exc_info)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/core/handlers/base.py", line 154, in
 handle_uncaught_exception
 return debug.technical_500_response(request, *exc_info)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/views/debug.py", line 40, in technical_500_response
 html = reporter.get_traceback_html()
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/views/debug.py", line 114, in get_traceback_html
 return t.render(c)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/template/__init__.py", line 178, in render
 return self.nodelist.render(context)
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/template/__init__.py", line 779, in render
 bits.append(self.render_node(node, context))
   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/django/template/debug.py", line 81, in render_node
 raise wrapped
 TemplateSyntaxError: Caught an exception while rendering: cannot import
 name DEFAULT_LOCALE_ENCODING
 }}}

 I'm running MacOS X 10.5.6 with Python 2.6 and using the SVN version of
 Django.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #9819: Comments Framework needs better documentation

2009-05-12 Thread Django
#9819: Comments Framework needs better documentation
--+-
  Reporter:  kegan| Owner:  nobody
Status:  new  | Milestone:
 Component:  django.contrib.comments  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by martin.hviid.ander...@gmail.com):

 It doesn't either state in the documentation, that it depends on
 'django.contrib.sites', which I think is rather important for new users of
 Django.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #9977: CSRFMiddleware needs template tag

2009-05-12 Thread Django
#9977: CSRFMiddleware needs template tag
-+--
  Reporter:  bthomas | Owner:  lukeplant
Status:  assigned| Milestone:   
 Component:  HTTP handling   |   Version:  SVN  
Resolution:  |  Keywords:  csrf 
 Stage:  Design decision needed  | Has_patch:  1
Needs_docs:  1   |   Needs_tests:  0
Needs_better_patch:  1   |  
-+--
Comment (by lukeplant):

 I can't find a way to get notifications.  I guess we can discuss on here,
 but conclusions (so that other people can assess them) should be on the
 wiki page.

 I'm nervous about your proposal because it's just quite complex.  It would
 be easy for there to be some corner that we haven't thought about.  The
 solutions on the wiki page are all well known and well analysed ones
 (there was the one I implemented for Django 1.0, and the one you produced
 a patch for in #10816, which are documented exactly in the PDF paper,
 which nonetheless threw up issues that we hadn't thought about).  I'm not
 that worried about fixing cross subdomain attacks because allowing
 untrusted subdomains is a serious vulnerability anyway due to session
 fixation.  So, to ease analysis, implementation, documentation, and
 understanding by the end user, I vote KISS.

-- 
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] #11080: Named URL pattern for admin logout is missing

2009-05-12 Thread Django
#11080: Named URL pattern for admin logout is missing
---+
  Reporter:  basti | Owner:  nobody
Status:  closed| Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:  duplicate |  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 Marking as a dupe of #10061 since this is solved here, and this fix alone
 doesn't fix the myriad of problems with logout.

-- 
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] #11080: Named URL pattern for admin logout is missing

2009-05-12 Thread Django
#11080: Named URL pattern for admin logout is missing
---+
  Reporter:  basti | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by basti):

  * needs_better_patch:  => 0
  * component:  Uncategorized => django.contrib.admin
  * 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] #11080: Named URL pattern for admin logout is missing

2009-05-12 Thread Django
#11080: Named URL pattern for admin logout is missing
---+
 Reporter:  basti  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 I stumbled over this section by accident.

 {{{
 url(r'^$',
   wrap(self.index),
  name='%sadmin_index' % self.name),
 url(r'^logout/$',
   wrap(self.logout),
   name='%sadmin_logout'),
 }}}

 Seems that the string substitution for the named URL pattern of the logout
 link is missing.

-- 
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] #11068: Wrong language code for Norwegian (Bokmål)

2009-05-12 Thread Django
#11068: Wrong language code for Norwegian (Bokmål)
---+
  Reporter:  nfg   | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Internationalization  |   Version:  SVN

Resolution:|  Keywords:  language_code 
norwegian
 Stage:  Unreviewed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

  * needs_better_patch:  => 0
  * version:  1.0 => 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-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] #11079: Multi-table inheritance subclasses cannot be proxied

2009-05-12 Thread Django
#11079: Multi-table inheritance subclasses cannot be proxied
---+
  Reporter:  gsong | Owner:  nobody 

Status:  new   | Milestone: 

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

Resolution:|  Keywords:  model 
proxy multi-table inheritance
 Stage:  Unreviewed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

  * needs_better_patch:  => 0
  * summary:  Multi-table inheritance subclassed cannot be proxied =>
  Multi-table inheritance subclasses cannot be
  proxied
  * 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] #11079: Multi-table inheritance subclassed cannot be proxied

2009-05-12 Thread Django
#11079: Multi-table inheritance subclassed cannot be proxied
-+--
 Reporter:  gsong|   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Database layer (models, ORM) | Version:  SVN   
 Keywords:  model proxy multi-table inheritance  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Creating a proxy model for a multi-table inherited subclass fails.
 {{{
 #!python
 class Place(models.Model):
 name = models.CharField(max_length=50)

 class Restaurant(Place):
 genre = models.CharField(max_length=50)

 class PizzaJoint(Restaurant):
 class Meta:
 proxy = True

 >>> from proxy.models import Restaurant, PizzaJoint
 >>> Restaurant.objects.create(name='Greasy Pizza', genre='pizza')
 
 >>> Restaurant.objects.all()
 []
 >>> PizzaJoint.objects.all()
 []
 }}}

 Also when accessing `admin/proxy/pizzajoint/`, you get the following stack
 trace:
 {{{
 Template error:
 In template
 e:\lehrhaus\django\django\contrib\admin\templates\admin\change_list.html,
 error at line 78
Caught an exception while rendering: 'NoneType' object has no attribute
 'column'
68 : {% endif %}
69 :   {% endblock %}
70 :
71 :   
72 :   {% if cl.formset %}
73 : {{ cl.formset.management_form }}
74 :   {% endif %}
75 :
76 :   {% block result_list %}
77 :   {% if action_form and actions_on_top and
 cl.full_result_count %}{% admin_actions %}{% endif %}
78 :{% result_list cl %}
79 :   {% if action_form and actions_on_bottom and
 cl.full_result_count %}{% admin_actions %}{% endif %}
80 :   {% endblock %}
81 :   {% block pagination %}{% pagination cl %}{% endblock %}
82 :   
83 : 
84 :   
85 : {% endblock %}
86 :

 Traceback:
 File "E:\lehrhaus\django\django\core\handlers\base.py" in get_response
   92. response = callback(request, *callback_args,
 **callback_kwargs)
 File "E:\lehrhaus\django\django\contrib\admin\options.py" in wrapper
   226. return self.admin_site.admin_view(view)(*args,
 **kwargs)
 File "E:\lehrhaus\django\django\contrib\admin\sites.py" in inner
   184. return view(request, *args, **kwargs)
 File "E:\lehrhaus\django\django\contrib\admin\options.py" in
 changelist_view
   984. ], context,
 context_instance=template.RequestContext(request))
 File "E:\lehrhaus\django\django\shortcuts\__init__.py" in
 render_to_response
   20. return HttpResponse(loader.render_to_string(*args, **kwargs),
 **httpresponse_kwargs)
 File "E:\lehrhaus\django\django\template\loader.py" in render_to_string
   108. return t.render(context_instance)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   178. return self.nodelist.render(context)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   779. bits.append(self.render_node(node, context))
 File "E:\lehrhaus\django\django\template\debug.py" in render_node
   71. result = node.render(context)
 File "E:\lehrhaus\django\django\template\loader_tags.py" in render
   97. return compiled_parent.render(context)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   178. return self.nodelist.render(context)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   779. bits.append(self.render_node(node, context))
 File "E:\lehrhaus\django\django\template\debug.py" in render_node
   71. result = node.render(context)
 File "E:\lehrhaus\django\django\template\loader_tags.py" in render
   97. return compiled_parent.render(context)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   178. return self.nodelist.render(context)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   779. bits.append(self.render_node(node, context))
 File "E:\lehrhaus\django\django\template\debug.py" in render_node
   71. result = node.render(context)
 File "E:\lehrhaus\django\django\template\loader_tags.py" in render
   24. result = self.nodelist.render(context)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   779. bits.append(self.render_node(node, context))
 File "E:\lehrhaus\django\django\template\debug.py" in render_node
   71. result = node.render(context)
 File "E:\lehrhaus\django\django\template\loader_tags.py" in render
   24. result = self.nodelist.render(context)
 File "E:\lehrhaus\django\django\template\__init__.py" in render
   779. bits.append(self.render_node(node, context))
 File "E:\lehrhaus\django\django\template\debug.py" in 

[Django] #11078: Proxy models do not inherit META.app_label

2009-05-12 Thread Django
#11078: Proxy models do not inherit META.app_label
--+-
 Reporter:  gsong |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:  proxy model app_label |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 According to the [http://docs.djangoproject.com/en/dev/topics/db/models
 /#base-class-restrictions proxy model documentation]:
 "Proxy models inherit any `Meta` options that they don't define from their
 non-abstract model parent (the model they are proxying for)."

 In the case of `app_label`, this is not true.

 {{{
 #!python

 from django.db import models

 class Book(models.Model):
 name = models.CharField(max_length=50)

 class Meta:
 app_label = 'core'

 class Book1(Book):
 class Meta:
 proxy = True

 >>> from django.db import models
 >>> for model in models.get_models(): print model._meta
 ...
 core.book
 proxy.book1
 }}}

-- 
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] #11017: Oracle LIKEC query doesn't use index

2009-05-12 Thread Django
#11017: Oracle LIKEC query doesn't use index
---+
  Reporter:  jtiai | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:  oracle
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by jtiai):

 Replying to [comment:8 ikelly]:
 > Thanks for the test case.  This confirms that the problem happens at
 least with VARCHAR2 columns.  However, when I change the column type to
 NVARCHAR2, I get full table scans for both queries.  I may have something
 misconfigured -- it seems bizarre that this sort of query would ignore the
 index just because the column is NVARCHAR2.

 Full table scan was chosen by oracle optimizer because there was too few
 rows. Change that most inner loop {{{for c in 1..100}}} to something like
 1 and you start getting index usage with NVARCHAR2 too. Still it
 doesn't fix LIKEC problem...

 Of course I always can fallback to RAW SQL 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-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
-~--~~~~--~~--~--~---