Re: [Django] #10190: Charset should be customizable with HttpResponse

2009-02-03 Thread Django
#10190: Charset should be customizable with HttpResponse
+---
  Reporter:  Wonlay | Owner:  nobody

Status:  new| Milestone:

 Component:  HTTP handling  |   Version:  SVN   

Resolution: |  Keywords:  HttpResponse, charset, 
runtime
 Stage:  Unreviewed | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

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

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

Comment:

 This patch should probably be just a one-liner: just setting
 `self._charset`. Don't mess around with the `mimetype` stuff, since that's
 not related. However, there's something more that should be worked out
 here to avoid all problems.

 If the value of `self._charset` is always going to be valid in the HTTP
 content-type header, we should just extract it from the `content_type`
 parameter. That would only be valid if all Python codec values are also
 valid HTTP header values.

 If that isn't possible, then `self._charset` shouldn't be used to
 construct the content-type header, as it will use an invalid value. The
 current "default" is only for really old code (and/or people using
 defaults likes utf-8). For anything non-standard, `content_type` should be
 being used with a proper character set definition.

 So, improvements needed here are:

  1. Remove the changes to `mimetype` setting. Make the smallest change
 possible and that isn't needed.
  2. Find out whether Python codec names are all valid as HTTP charset
 names. If so, parse the `content_type` to see if a special charset
 encoding is needed (no need for an extra `__init__` parameter).
  3. If the previous item is not applicable, don't use `_charset` in the
 `content_type` setting, since it could lead to invalid value (and we'll
 need a documentation update to clarify the requirements there).

-- 
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] #10190: Charset should be customizable with HttpResponse

2009-02-03 Thread Django
#10190: Charset should be customizable with HttpResponse
+---
 Reporter:  Wonlay  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  HTTP handling   | Version:  SVN   
 Keywords:  HttpResponse, charset, runtime  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 When our web site is talking to other application or client, the charset
 of web response may vary from each other.

 Currently only a {{{ settings.DEFAULT_CHARSET }}} can be set with a unique
 value, we cannot change the HttpResponse charset at runtime properly.

 I think we should add a charset parameter to HttpResponse.__init__.

-- 
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] #6792: Documentation for FileField does not mention the delete behavior

2009-02-03 Thread Django
#6792: Documentation for FileField does not mention the delete behavior
-+--
  Reporter:  thebitguru   | Owner:  
nobody
Status:  new | Milestone:   
 
 Component:  Database layer (models, ORM)|   Version:  SVN  
 
Resolution:  |  Keywords:  
delete file update bug
 Stage:  Accepted| Has_patch:  0
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Changes (by pixelcort):

 * cc: cortl...@apple.com (added)

Comment:

 Is this also the ticket representing the bug where using a ModelForm to
 change a FileField from one file to another causes the old file to remain
 on the filesystem?

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

2009-02-03 Thread noreply

Author: russellm
Date: 2009-02-03 17:13:02 -0600 (Tue, 03 Feb 2009)
New Revision: 9814

Modified:
   django/trunk/docs/topics/db/queries.txt
Log:
Fixed #10187 -- Added documentation on how to import F() objects. Thanks to 
trigeek38 for the report.

Modified: django/trunk/docs/topics/db/queries.txt
===
--- django/trunk/docs/topics/db/queries.txt 2009-02-03 22:10:46 UTC (rev 
9813)
+++ django/trunk/docs/topics/db/queries.txt 2009-02-03 23:13:02 UTC (rev 
9814)
@@ -508,6 +508,7 @@
 than pingbacks, we construct an ``F()`` object to reference the comment count,
 and use that ``F()`` object in the query::
 
+>>> from django.db.models import F
 >>> Entry.objects.filter(n_pingbacks__lt=F('n_comments'))
 
 Django supports the use of addition, subtraction, multiplication,


--~--~-~--~~~---~--~~
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] #10185: occasionnal 404s returned and request.get_full_path() returns /full/server/path/to/django.fcgi/request instead of /request

2009-02-03 Thread Django
#10185: occasionnal 404s returned and request.get_full_path() returns
/full/server/path/to/django.fcgi/request instead of /request
+---
  Reporter:  loncletom  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 The ticket system is for tracking bugs, not answering configuration
 questions. If you need help configuring yours server, please mail the
 django-users mailing list.

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



[Django] #10189: German translation improvements

2009-02-03 Thread Django
#10189: German translation improvements
--+-
 Reporter:  julianb   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Internationalization  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 I propose some changes for the German translation. I think the word
 "Website" (yes, it's in the Duden) can and should be used more generously.

-- 
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] #10188: HttpResponse does not filter CR/LF characters from headers

2009-02-03 Thread Django
#10188: HttpResponse does not filter CR/LF characters from headers
---+
 Reporter:  bthomas|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 E-mail headers currently throw an exception when a CR or LF character is
 put into a header (see forbid_multi_line_headers in django/core/mail.py).
 HttpResponse should have the same or equivalent protection in place,
 probably in _convert_to_ascii. A basic patch based on
 forbid_multi_line_headers attached.

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

2009-02-03 Thread noreply

Author: ikelly
Date: 2009-02-03 16:10:46 -0600 (Tue, 03 Feb 2009)
New Revision: 9813

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/django/db/backends/oracle/base.py
Log:
[1.0.X] Fixed #10125: fixed the Oracle dsn construction code that was broken in 
[9712]. Backport of [9812] from trunk.


Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9810
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9810,9812

Modified: django/branches/releases/1.0.X/django/db/backends/oracle/base.py
===
--- django/branches/releases/1.0.X/django/db/backends/oracle/base.py
2009-02-03 22:08:57 UTC (rev 9812)
+++ django/branches/releases/1.0.X/django/db/backends/oracle/base.py
2009-02-03 22:10:46 UTC (rev 9813)
@@ -253,9 +253,9 @@
 if len(settings.DATABASE_HOST.strip()) == 0:
 settings.DATABASE_HOST = 'localhost'
 if len(settings.DATABASE_PORT.strip()) != 0:
-dsn = '%s:%s/%s' % (settings.DATABASE_HOST,
-settings.DATABASE_PORT,
-settings.DATABASE_NAME)
+dsn = Database.makedsn(settings.DATABASE_HOST,
+   int(settings.DATABASE_PORT),
+   settings.DATABASE_NAME)
 else:
 dsn = settings.DATABASE_NAME
 return "%s/%...@%s" % (settings.DATABASE_USER,


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

2009-02-03 Thread noreply

Author: ikelly
Date: 2009-02-03 16:08:57 -0600 (Tue, 03 Feb 2009)
New Revision: 9812

Modified:
   django/trunk/django/db/backends/oracle/base.py
Log:
Fixed #10125: fixed the Oracle dsn construction code that was broken in [9712].

Modified: django/trunk/django/db/backends/oracle/base.py
===
--- django/trunk/django/db/backends/oracle/base.py  2009-02-03 14:24:06 UTC 
(rev 9811)
+++ django/trunk/django/db/backends/oracle/base.py  2009-02-03 22:08:57 UTC 
(rev 9812)
@@ -253,9 +253,9 @@
 if len(settings.DATABASE_HOST.strip()) == 0:
 settings.DATABASE_HOST = 'localhost'
 if len(settings.DATABASE_PORT.strip()) != 0:
-dsn = '%s:%s/%s' % (settings.DATABASE_HOST,
-settings.DATABASE_PORT,
-settings.DATABASE_NAME)
+dsn = Database.makedsn(settings.DATABASE_HOST,
+   int(settings.DATABASE_PORT),
+   settings.DATABASE_NAME)
 else:
 dsn = settings.DATABASE_NAME
 return "%s/%...@%s" % (settings.DATABASE_USER,


--~--~-~--~~~---~--~~
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] #10006: r9707 breaks dumpdata if you have python-json installed on a Debian based system and python2.4

2009-02-03 Thread Django
#10006: r9707 breaks dumpdata if you have python-json installed on a Debian 
based
system and python2.4
+---
  Reporter:  markmuetz  | Owner:  mtredinnick
Status:  assigned   | Milestone: 
 Component:  Serialization  |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Unreviewed | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by Davide "Design" Muzzarelli ):

 Patch tested: run well on my Ubuntu 7.10 with python-json and python-
 simpolejson packages installed, it was necessary on my system.
 Django-r9811.

-- 
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] #10186: "post_create" or "post_first_save" signal

2009-02-03 Thread Django
#10186: "post_create" or "post_first_save" signal
+---
  Reporter:  bmjames| Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ikelly):

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

Comment:

 The `post_save` signal already provides this information via its `created`
 argument.

-- 
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] #10187: No import doc for field-to-field-same-model filtering intoduced in 1.1

2009-02-03 Thread Django
#10187: No import doc for field-to-field-same-model filtering intoduced in 1.1
+---
  Reporter:  trigeek38  | Owner:  nobody  
Status:  new| Milestone:  post-1.0
 Component:  Documentation  |   Version:  SVN 
Resolution: |  Keywords:  F(), field, model, query
 Stage:  Unreviewed | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by trigeek38):

  * summary:  No documentation for importing 1.1 functionality => No import
  doc for field-to-field-same-model filtering
  intoduced in 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] #10187: No documentation for importing 1.1 functionality

2009-02-03 Thread Django
#10187: No documentation for importing 1.1 functionality
+---
  Reporter:  trigeek38  | Owner:  nobody  
Status:  new| Milestone:  post-1.0
 Component:  Documentation  |   Version:  SVN 
Resolution: |  Keywords:  F(), field, model, query
 Stage:  Unreviewed | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by cgrady):

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

Comment:

 to clarify, the issue is the docs have plenty of usage instructions, but
 no reference to where to import it from

-- 
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] #10187: No documentation for importing 1.1 functionality

2009-02-03 Thread Django
#10187: No documentation for importing 1.1 functionality
--+-
 Reporter:  trigeek38 |   Owner:  nobody
   Status:  new   |   Milestone:  post-1.0  
Component:  Documentation | Version:  SVN   
 Keywords:  F(), field, model, query  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 There is no info on using the F() described in
 http://docs.djangoproject.com/en/dev/topics/db/queries/#filters-can-
 reference-fields-on-the-model

-- 
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] #10186: "post_create" or "post_first_save" signal

2009-02-03 Thread Django
#10186: "post_create" or "post_first_save" signal
---+
 Reporter:  bmjames|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 It would be useful to have a built-in signal emitted when a model instance
 is saved *for the first time*. For example, when I post a new article on
 my site I want to announce it via Twitter, but I don't want it announced
 again if I edit the article later.

 There are some cases where using the pre_save signal, and checking if the
 id of the instance is None, is not sufficient. For example, if the URL of
 the article I want to announce on Twitter contains the article's ID, I
 can't announce the URL of the article because that ID is not yet known at
 the time of the pre_save signal.

 By the time the post_save signal is emitted, I can't tell whether it was
 the first time the article was saved if I use only the built-in signals. I
 must check if the ID of the instance is None before it is saved, store
 that stateful information somewhere, then access that information on
 post_save when I am finally able to dispatch the announcement. But this is
 messy and, in my opinion, far too much of a logical dance for a simple
 requirement.

 The only elegant way I have found is to create my own custom signal which
 is sent in the model's save() method:


 {{{
 def save(self):
 first_save = False
 if self.id is None:
 first_save = True
 Model.save(self)
 if first_save:
 post_create.send(sender=Post, instance=self)

 }}}


 I believe this should be a common-enough case to warrant a built-in
 signal, rather than needing to override the save() method in many models.

-- 
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] #10184: pickled QueryDicts lose multiple-values.

2009-02-03 Thread Django
#10184: pickled QueryDicts lose multiple-values.
--+-
  Reporter:  Andre LeBlanc   | Owner:  
Alex
Status:  new  | Milestone:  

 Component:  HTTP handling|   Version:  
SVN 
Resolution:   |  Keywords:  
QueryDict pickle session
 Stage:  Accepted | Has_patch:  
1   
Needs_docs:  0|   Needs_tests:  
0   
Needs_better_patch:  0|  
--+-
Changes (by Alex):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * owner:  nobody => Alex
  * 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] #10185: occasionnal 404s returned and request.get_full_path() returns /full/server/path/to/django.fcgi/request instead of /request

2009-02-03 Thread Django
#10185: occasionnal 404s returned and request.get_full_path() returns
/full/server/path/to/django.fcgi/request instead of /request
+---
  Reporter:  loncletom  | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by loncletom):

 you may reach me at "tom at loncletom dot fr"

-- 
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] #10185: occasionnal 404s returned and request.get_full_path() returns /full/server/path/to/django.fcgi/request instead of /request

2009-02-03 Thread Django
#10185: occasionnal 404s returned and request.get_full_path() returns
/full/server/path/to/django.fcgi/request instead of /request
+---
  Reporter:  loncletom  | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by loncletom):

  * needs_better_patch:  => 0
  * version:  1.0-alpha-2 => 1.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] #10185: occasionnal 404s returned and request.get_full_path() returns /full/server/path/to/django.fcgi/request instead of /request

2009-02-03 Thread Django
#10185: occasionnal 404s returned and request.get_full_path() returns
/full/server/path/to/django.fcgi/request instead of /request
---+
 Reporter:  loncletom  |   Owner:  nobody 
   Status:  new|   Milestone: 
Component:  Uncategorized  | Version:  1.0-alpha-2
 Keywords: |   Stage:  Unreviewed 
Has_patch:  0  |  
---+
 hi,

 i'm running a site using django 1.0.2. the site works fine but every once
 in a while i notice something weird in the logs.[[BR]]
 the request in the apache log looks fine but in my own logs which use
 request.get_full_path() the request is messed up with the django.fcgi
 path.[[BR]]
 a 404 is sent in response.

 here's two requests: the first two lines are apache logs, the last two are
 my own logs using get_full_path().[[BR]]
 the first request works fine (notice the 200 response and the short
 get_full_path()=="/categorie/Adultes/").[[BR]]
 in the next request, get_full_path() is messed up. instead of returning
 "/eloge-du-sein-des-femmes-1873/", i get a ".../django.fcgi/eloge-du-sein-
 des-femmes-1873/"[[BR]]


 {{{
 livrairie.loncletom.fr 142.169.##.### - - [27/Jan/2009:06:28:53 +0100]
 "GET /categorie/Adultes/ HTTP/1.0" 200 6244 "http://livrairie.loncletom.fr
 /comment-faire-une-reliure-japonaise/" "Mozilla/4.0 (compatible; MSIE 7.0;
 Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ;
 .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR
 3.0.04506.648)"
 livrairie.loncletom.fr 142.169.##.### - - [27/Jan/2009:06:28:56 +0100]
 "GET /eloge-du-sein-des-femmes-1873/ HTTP/1.0" 404 5799
 "http://livrairie.loncletom.fr/categorie/Adultes/; "Mozilla/4.0
 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0;
 Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR
 3.0.04506.30; .NET CLR 3.0.04506.648)"

 01-27 06:28 INFO 142.169.##.###   /categorie/Adultes/
 01-27 06:29 INFO 142.169.##.###
 
/alwaysdata/domains/lo/loncletom.fr/livrairie.loncletom.fr/livrairie.loncletom.fr/django.fcgi
 /eloge-du-sein-des-femmes-1873/
 }}}

 here's another case:
 {{{
 livrairie.loncletom.fr 86.72.##.### - - [27/Jan/2009:18:21:53 +0100] "GET
 /comment-faire-une-reliure-japonaise/ HTTP/1.1" 404 1894
 "http://www.onpeutlefaire.com/forum/index.php?showtopic=9443; "Mozilla/5.0
 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.5) Gecko/2008120122
 Firefox/3.0.5"

 01-27 18:21 INFO 86.72.##.###
 
/alwaysdata/domains/lo/loncletom.fr/livrairie.loncletom.fr/livrairie.loncletom.fr/django.fcgi
 /comment-faire-une-reliure-japonaise/
 http://www.onpeutlefaire.com/forum/index.php?showtopic=9443
 }}}

 i've tried setting {{{ FORCE_SCRIPT_NAME = '' }}} but it didn't help.

 unfortunately, it seems to happen totally randomly but a few times every
 day on a small website.[[BR]]
 i wouldn't have noticed without making my own logs using get_full_path().

-- 
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] #10184: pickled QueryDicts lose multiple-values.

2009-02-03 Thread Django
#10184: pickled QueryDicts lose multiple-values.
-+--
 Reporter:  Andre LeBlanc   |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  HTTP handling| Version:  SVN   
 Keywords:  QueryDict pickle session |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Pickling a querydict with multiple values for the same key causes it to
 only retain the one of its values.  attached a patch against
 tests/regressiontests/httpwrappers/tests.py including a new test to pickle
 multi-valued querydicts which fails on latest 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
-~--~~~~--~~--~--~---



[Django] #10183: assertContains fails when there is unicode in the response content

2009-02-03 Thread Django
#10183: assertContains fails when there is unicode in the response content
---+
 Reporter:  drakonen   |   Owner:  nobody
   Status:  new|   Milestone:  post-1.0  
Component:  Testing framework  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 {{{
 # views.py
 #

 from django.shortcuts import render_to_response

 def index(request):
 return render_to_response('index.html')

 #
 # index.html

 aaƤaa

 #
 # tests.py

 from django.test import TestCase

 class TestViews(TestCase):
 def test_index(self):
 response = self.client.get('/')
 self.assertContains(response, u'aa')


 #
 # results in:

 ==
 ERROR: test_index (stuff.tests.TestViews)
 --
 Traceback (most recent call last):
   File "/home/johan/devel/tester/stuff/tests.py", line 6, in test_index
 self.assertContains(response, u'aa')
   File "/usr/lib/python2.5/site-packages/django/test/testcases.py", line
 267, in assertContains
 real_count = response.content.count(text)
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2:
 ordinal not in range(128)

 --
 }}}

-- 
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] #9956: Problematic Regexp in django.contrib.comments.urls

2009-02-03 Thread Django
#9956: Problematic Regexp in django.contrib.comments.urls
--+-
  Reporter:  james_stevenson  | Owner:  nobody   
Status:  new  | Milestone:   
 Component:  django.contrib.comments  |   Version:  1.0  
Resolution:   |  Keywords:  comments urls
 Stage:  Unreviewed   | Has_patch:  1
Needs_docs:  0|   Needs_tests:  1
Needs_better_patch:  0|  
--+-
Comment (by devin_s):

 I also had this issue and the solution suggested works.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #9652: base.css is not loaded in admin index.html

2009-02-03 Thread Django
#9652: base.css is not loaded in admin index.html
---+
  Reporter:  zhaoz | Owner:  nobody
Status:  closed| Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:  fixed |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by hanksims):

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

Comment:

 Sorry, didn't mean to reopen.

-- 
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] #9652: base.css is not loaded in admin index.html

2009-02-03 Thread Django
#9652: base.css is not loaded in admin index.html
---+
  Reporter:  zhaoz | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by hanksims):

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

Comment:

 crapufish: If you're like me, then the problem is caused by your
 overridden admin templates (after installing django-filebrowser, for
 instance). You have to update the CSS imports in your custom templates to
 follow the changes in [9463].

-- 
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] #10180: Fixed bug saving inlineformset_factory formsets

2009-02-03 Thread Django
#10180: Fixed bug saving inlineformset_factory formsets
-+--
  Reporter:  simon29 | Owner:  nobody
Status:  new | Milestone:
 Component:  Forms   |   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Changes (by kmtracey):

  * needs_tests:  0 => 1

Comment:

 For the initial problem description, a complete test, preferably one
 integrated into the existing test suite, would help immensely.  See the
 commits associated with #9865 #10075 for examples.  As this code is
 modified to handle each new corner case that wasn't previously explicitly
 tested for, we really need to add a test to ensure that it is not broken
 by any subsequent changes to this code.  If an integrated test is more
 than you are able to do, it isn't entirely clear to me how the case you
 are reporting differs from ones we already test, so please spell it out.
 Is it that you are setting the instance for the formset after creating the
 formset?  I'm not sure that is valid...why is the instance not passed in
 on the call to create the formset?  Changing the instance after-the-fact
 strikes me as something likely to cause problems, though I can't say that
 it will for sure without delving more into the code than I have time for
 at the moment.

 For the added comment, is this really the same or a different problem?  It
 looks like it may be related to #9462 but I am not sure -- you don't say
 what "Broken" means.  It looks to me like the fix for #9462 was intended
 to implicitly do what you are doing in the "Worked" version, perhaps you
 are reporting the same thing as the comment by tobias but since neither of
 you have given any specifics on the nature of any failures resulting from
 the current code it is very hard to be sure what either of you are
 reporting.

-- 
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] #10121: ImageField loses data when re-saving from admin

2009-02-03 Thread Django
#10121: ImageField loses data when re-saving from admin
---+
  Reporter:  Uninen| Owner: 

Status:  new   | Milestone: 

 Component:  django.contrib.admin  |   Version:  SVN

Resolution:|  Keywords:  admin, ImageField, 
save
 Stage:  Unreviewed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

  * owner:  Uninen =>
  * status:  assigned => new

-- 
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] r9811 - in django/branches/releases/1.0.X: . django/forms tests/modeltests/model_formsets

2009-02-03 Thread noreply

Author: kmtracey
Date: 2009-02-03 08:24:06 -0600 (Tue, 03 Feb 2009)
New Revision: 9811

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/django/forms/models.py
   django/branches/releases/1.0.X/tests/modeltests/model_formsets/models.py
Log:
Fixed #10075: Allowed saving of inline-edited models that use multi-table 
inheritance. 

r9809 from trunk.



Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9783,9789-9790,9793-9795
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9810

Modified: django/branches/releases/1.0.X/django/forms/models.py
===
--- django/branches/releases/1.0.X/django/forms/models.py   2009-02-03 
14:19:51 UTC (rev 9810)
+++ django/branches/releases/1.0.X/django/forms/models.py   2009-02-03 
14:24:06 UTC (rev 9811)
@@ -493,7 +493,7 @@
 fk_attname = self.fk.get_attname()
 kwargs = {fk_attname: self.instance.pk}
 new_obj = self.model(**kwargs)
-if fk_attname == self._pk_field.attname:
+if fk_attname == self._pk_field.attname or self._pk_field.auto_created:
 exclude =  [self._pk_field.name]
 else:
 exclude = []

Modified: 
django/branches/releases/1.0.X/tests/modeltests/model_formsets/models.py
===
--- django/branches/releases/1.0.X/tests/modeltests/model_formsets/models.py
2009-02-03 14:19:51 UTC (rev 9810)
+++ django/branches/releases/1.0.X/tests/modeltests/model_formsets/models.py
2009-02-03 14:24:06 UTC (rev 9811)
@@ -36,6 +36,12 @@
 def __unicode__(self):
 return u'%s: %s' % (self.my_pk, self.title)
 
+class AlternateBook(Book):
+notes = models.CharField(max_length=100)
+
+def __unicode__(self):
+return u'%s - %s' % (self.title, self.notes)
+
 class AuthorMeeting(models.Model):
 name = models.CharField(max_length=100)
 authors = models.ManyToManyField(Author)
@@ -520,6 +526,33 @@
 ... print book.title
 Les Fleurs du Mal
 
+Test inline formsets where the inline-edited object uses multi-table 
inheritance, thus 
+has a non AutoField yet auto-created primary key.
+
+>>> AuthorBooksFormSet3 = inlineformset_factory(Author, AlternateBook, 
can_delete=False, extra=1)
+
+>>> formset = AuthorBooksFormSet3(instance=author)
+>>> for form in formset.forms:
+... print form.as_p()
+Title: 
+Notes: 
+
+
+>>> data = {
+... 'alternatebook_set-TOTAL_FORMS': '1', # the number of forms rendered
+... 'alternatebook_set-INITIAL_FORMS': '0', # the number of forms with 
initial data
+... 'alternatebook_set-0-title': 'Flowers of Evil',
+... 'alternatebook_set-0-notes': 'English translation of Les Fleurs du Mal'
+... }
+
+>>> formset = AuthorBooksFormSet3(data, instance=author)
+>>> formset.is_valid()
+True
+
+>>> formset.save()
+[]
+
+
 # Test a custom primary key ###
 
 We need to ensure that it is displayed


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

2009-02-03 Thread noreply

Author: kmtracey
Date: 2009-02-03 08:19:51 -0600 (Tue, 03 Feb 2009)
New Revision: 9810

Modified:
   django/branches/releases/1.0.X/
Log:
[1.0.X] Block changesets with new function and new function fixes from merge to 
branch.



Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-blocked
   - 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792
   + 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792,9799-9800,9803-9805,9808


--~--~-~--~~~---~--~~
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] r9809 - in django/trunk: django/forms tests/modeltests/model_formsets

2009-02-03 Thread noreply

Author: kmtracey
Date: 2009-02-03 08:02:09 -0600 (Tue, 03 Feb 2009)
New Revision: 9809

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/modeltests/model_formsets/models.py
Log:
Fixed 10075: Allowed saving of inline-edited models that use multi-table 
inheritance.


Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2009-02-03 11:07:21 UTC (rev 9808)
+++ django/trunk/django/forms/models.py 2009-02-03 14:02:09 UTC (rev 9809)
@@ -493,7 +493,7 @@
 fk_attname = self.fk.get_attname()
 kwargs = {fk_attname: self.instance.pk}
 new_obj = self.model(**kwargs)
-if fk_attname == self._pk_field.attname:
+if fk_attname == self._pk_field.attname or self._pk_field.auto_created:
 exclude =  [self._pk_field.name]
 else:
 exclude = []

Modified: django/trunk/tests/modeltests/model_formsets/models.py
===
--- django/trunk/tests/modeltests/model_formsets/models.py  2009-02-03 
11:07:21 UTC (rev 9808)
+++ django/trunk/tests/modeltests/model_formsets/models.py  2009-02-03 
14:02:09 UTC (rev 9809)
@@ -36,6 +36,12 @@
 def __unicode__(self):
 return u'%s: %s' % (self.my_pk, self.title)
 
+class AlternateBook(Book):
+notes = models.CharField(max_length=100)
+
+def __unicode__(self):
+return u'%s - %s' % (self.title, self.notes)
+
 class AuthorMeeting(models.Model):
 name = models.CharField(max_length=100)
 authors = models.ManyToManyField(Author)
@@ -520,6 +526,33 @@
 ... print book.title
 Les Fleurs du Mal
 
+Test inline formsets where the inline-edited object uses multi-table 
inheritance, thus 
+has a non AutoField yet auto-created primary key.
+
+>>> AuthorBooksFormSet3 = inlineformset_factory(Author, AlternateBook, 
can_delete=False, extra=1)
+
+>>> formset = AuthorBooksFormSet3(instance=author)
+>>> for form in formset.forms:
+... print form.as_p()
+Title: 
+Notes: 
+
+
+>>> data = {
+... 'alternatebook_set-TOTAL_FORMS': '1', # the number of forms rendered
+... 'alternatebook_set-INITIAL_FORMS': '0', # the number of forms with 
initial data
+... 'alternatebook_set-0-title': 'Flowers of Evil',
+... 'alternatebook_set-0-notes': 'English translation of Les Fleurs du Mal'
+... }
+
+>>> formset = AuthorBooksFormSet3(data, instance=author)
+>>> formset.is_valid()
+True
+
+>>> formset.save()
+[]
+
+
 # Test a custom primary key ###
 
 We need to ensure that it is displayed


--~--~-~--~~~---~--~~
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] #7324: {{ block.super }} doesn't work with nested {% block %} statements

2009-02-03 Thread Django
#7324: {{ block.super }} doesn't work with nested {% block %} statements
--+-
  Reporter:  jeverling| Owner:  nobody  
Status:  closed   | Milestone:  
 Component:  Template system  |   Version:  SVN 
Resolution:  invalid  |  Keywords:  block.super template
 Stage:  Unreviewed   | Has_patch:  0   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Comment (by bradleyw):

 Hi Karen,

 Indeed I had over-simplified the project, and it was late at night so I
 forgot to include some stuff. My apologies for wasting your time.

 Regardless, I've attached a better patch in the form of bug7324-better-
 testcase.zip . This should better illustrate what I'm trying to do. There
 are comments in the templates which indicate what I expect in each case.

 In {{{templates-top/test.html}}}, I have a {{{block main}}} with a nested
 {{{block submain}}}. This template extends {{{templates/new/test.html}}}.
 If I include a {{{block.super}}} in {{{block main}}} of the child
 template, the {{{block.super}}} from the nested {{{ block submain }}} is
 included twice. If I remove the "my new sub-content" string from the child
 template, and remove the parent block {{{block.super}}}, I get none of the
 inherited content at all. So it seems like the parent {{{block.super}}} is
 required for the child {{{block.super}}} to have any content, and the
 child's inherited content will be rendered twice.

 If you still disagree that it's a bug then fine, I won't re-open it until
 you've looked over my new test case, but I feel my improved test case
 (sorry about the first one) proves this is a bug.

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



Re: [Django] #9722: Use pyinotify (where available) instead of polling filesystem every second to detect changes

2009-02-03 Thread Django
#9722: Use pyinotify (where available) instead of polling filesystem every 
second
to detect changes
+---
  Reporter:  lamby  | Owner:  nobody
Status:  new| Milestone:
 Component:  django-admin.py runserver  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by lamby):

  * has_patch:  1 => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #9722: Use pyinotify (where available) instead of polling filesystem every second to detect changes

2009-02-03 Thread Django
#9722: Use pyinotify (where available) instead of polling filesystem every 
second
to detect changes
+---
  Reporter:  lamby  | Owner:  nobody
Status:  new| Milestone:
 Component:  django-admin.py runserver  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by lamby):

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

Comment:

 This doesn't yet for modules that are lazily loaded - need to hook into
 the request_finished signal to update the files inotify is waiting on,
 otherwise we will never update the watch list (as we are blocking on it
 forever). The inotify interface will get in the way a bit here - will
 probably require calling oll ourselves with an additional anonymous file
 descriptor which (if written to) will tell us to update our watch list.

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



Re: [Django] #10179: admin broken on FileField with blank=True

2009-02-03 Thread Django
#10179: admin broken on FileField with blank=True
--+-
  Reporter:  malte| Owner:  nobody 
Status:  new  | Milestone: 
 Component:  django-admin.py  |   Version:  1.0
Resolution:   |  Keywords:  admin filefield bug
 Stage:  Unreviewed   | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Old description:

> If you have a FileField declared like so:
> image_1 = models.FileField(upload_to=get_image_path, null=True,
> blank=True)
>
> Then in django admin, the field becomes voluntary as it should. If you
> save a file in an optional field that works as expected. But if you come
> back to the item in the admin, and just hit 'save' without touching the
> optional file that is uploaded, the db record gets updated with a blank
> value for the FileField, effectively killing the connection with the
> file.
>
> I'm using Sqlite, may make a difference here I suppose.

New description:

 If you have a FileField declared like so:
 {{{
 image_1 = models.FileField(upload_to=get_image_path, null=True,
 blank=True)
 }}}
 Then in django admin, the field becomes voluntary as it should. If you
 save a file in an optional field that works as expected. But if you come
 back to the item in the admin, and just hit 'save' without touching the
 optional file that is uploaded, the db record gets updated with a blank
 value for the FileField, effectively killing the connection with the file.

 I'm using Sqlite, may make a difference here I suppose.

Comment (by ramiro):

 (reformatted description)

 malte: What version of Django are you using? If youa re using a revision
 from trunk latter that r9766, can you please try with r9765 and report
 back?

-- 
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] r9808 - in django/trunk: django/db/models tests/modeltests/aggregation tests/modeltests/aggregation/fixtures tests/regressiontests/aggregation_regress tests/regressiontests/aggregation_reg

2009-02-03 Thread noreply

Author: russellm
Date: 2009-02-03 05:07:21 -0600 (Tue, 03 Feb 2009)
New Revision: 9808

Modified:
   django/trunk/django/db/models/query.py
   django/trunk/tests/modeltests/aggregation/fixtures/initial_data.json
   django/trunk/tests/modeltests/aggregation/models.py
   
django/trunk/tests/regressiontests/aggregation_regress/fixtures/initial_data.json
   django/trunk/tests/regressiontests/aggregation_regress/models.py
Log:
Fixed #10127 -- Corrected (no, really, this time!) the way the select_related() 
cache is populated when annotations are also contained in the query. Thanks to 
Sylvain Pasche  for the report and test case.

Modified: django/trunk/django/db/models/query.py
===
--- django/trunk/django/db/models/query.py  2009-02-03 03:15:25 UTC (rev 
9807)
+++ django/trunk/django/db/models/query.py  2009-02-03 11:07:21 UTC (rev 
9808)
@@ -281,7 +281,8 @@
 for row in self.query.results_iter():
 if fill_cache:
 obj, _ = get_cached_row(self.model, row,
-index_start, max_depth, 
requested=requested)
+index_start, max_depth,
+requested=requested, offset=len(aggregate_select))
 else:
 # omit aggregates in object creation
 obj = self.model(*row[index_start:aggregate_start])
@@ -898,7 +899,7 @@
 
 
 def get_cached_row(klass, row, index_start, max_depth=0, cur_depth=0,
-   requested=None):
+   requested=None, offset=0):
 """
 Helper function that recursively returns an object with the specified
 related attributes already populated.
@@ -915,6 +916,7 @@
 obj = None
 else:
 obj = klass(*fields)
+index_end += offset
 for f in klass._meta.fields:
 if not select_related_descend(f, restricted, requested):
 continue

Modified: django/trunk/tests/modeltests/aggregation/fixtures/initial_data.json
===
--- django/trunk/tests/modeltests/aggregation/fixtures/initial_data.json
2009-02-03 03:15:25 UTC (rev 9807)
+++ django/trunk/tests/modeltests/aggregation/fixtures/initial_data.json
2009-02-03 11:07:21 UTC (rev 9808)
@@ -49,6 +49,7 @@
 "price": "30.00",
 "rating": 4.5,
 "authors": [1, 2],
+"contact": 1,
 "pages": 447,
 "pubdate": "2007-12-6"
 }
@@ -63,6 +64,7 @@
 "price": "23.09",
 "rating": 3.0,
 "authors": [3],
+"contact": 3,
 "pages": 528,
 "pubdate": "2008-3-3"
 }
@@ -77,6 +79,7 @@
 "price": "29.69",
 "rating": 4.0,
 "authors": [4],
+"contact": 4,
 "pages": 300,
 "pubdate": "2008-6-23"
 }
@@ -91,6 +94,7 @@
 "price": "29.69",
 "rating": 4.0,
 "authors": [5, 6, 7],
+"contact": 5,
 "pages": 350,
 "pubdate": "2008-11-3"
 }
@@ -105,6 +109,7 @@
 "price": "82.80",
 "rating": 4.0,
 "authors": [8, 9],
+"contact": 8,
 "pages": 1132,
 "pubdate": "1995-1-15"
 }
@@ -119,6 +124,7 @@
 "price": "75.00",
 "rating": 5.0,
 "authors": [8],
+"contact": 8,
 "pages": 946,
 "pubdate": "1991-10-15"
 }
@@ -195,7 +201,7 @@
 "fields": {
 "age": 37,
 "friends": [6, 7],
-"name": "Jeffrey Forcier "
+"name": "Jeffrey Forcier"
 }
 },
 {

Modified: django/trunk/tests/modeltests/aggregation/models.py
===
--- django/trunk/tests/modeltests/aggregation/models.py 2009-02-03 03:15:25 UTC 
(rev 9807)
+++ django/trunk/tests/modeltests/aggregation/models.py 2009-02-03 11:07:21 UTC 
(rev 9808)
@@ -28,6 +28,7 @@
rating = models.FloatField()
price = models.DecimalField(decimal_places=2, max_digits=6)
authors = models.ManyToManyField(Author)
+   contact = models.ForeignKey(Author, related_name='book_contact_set')
publisher = models.ForeignKey(Publisher)
pubdate = models.DateField()
 
@@ -180,7 +181,7 @@
 # Count the number of books written by each author
 >>> authors = Author.objects.annotate(num_books=Count('book'))
 >>> sorted([(a.name, a.num_books) for a in authors])
-[(u'Adrian Holovaty', 1), (u'Brad Dayley', 1), (u'Jacob Kaplan-Moss', 1), 
(u'James Bennett', 1), (u'Jeffrey Forcier ', 1), (u'Paul Bissex', 1), (u'Peter 
Norvig', 2), (u'Stuart Russell', 1), (u'Wesley J. Chun', 1)]
+[(u'Adrian Holovaty', 1), (u'Brad Dayley', 1), (u'Jacob Kaplan-Moss', 1), 
(u'James Bennett', 1), (u'Jeffrey Forcier', 1), 

Re: [Django] #10175: Proposal for Serbian Cyrillic translation

2009-02-03 Thread Django
#10175: Proposal for Serbian Cyrillic translation
---+
  Reporter:  janos | Owner:  nobody  
Status:  new   | Milestone:  post-1.0
 Component:  Translations  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Unreviewed| Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by petar):

 * cc: petar.ma...@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
-~--~~~~--~~--~--~---



Re: [Django] #10182: "invalid reference to FROM-clause" for nested annotate query

2009-02-03 Thread Django
#10182: "invalid reference to FROM-clause" for nested annotate query
---+
  Reporter:  omat  | Owner:  nobody 
   
Status:  new   | Milestone: 
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:|  Keywords:  nested 
query, annotate
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by omat):

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

Comment:

 BTW: If I force the first query to be evaluated before it is used as a
 nested query, using the python step syntax or using list() for example,
 like:

 {{{
 >>> tag_ids =
 TaggedItem.objects.all().order_by('-added__max').values_list('id',
 flat=True).annotate(Max('added'))[:10:1]
 }}}

 Then the second runs fine.

-- 
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] #10182: "invalid reference to FROM-clause" for nested annotate query

2009-02-03 Thread Django
#10182: "invalid reference to FROM-clause" for nested annotate query
--+-
 Reporter:  omat  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:  nested query, annotate|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 As discussed here:
 http://groups.google.com/group/django-
 users/browse_thread/thread/6010c4375610f5cc/

 I have 2 models:

 {{{
 class Tag(models.Model):
 name = models.CharField(max_length=50, unique=True, db_index=True)
 slug = models.SlugField(unique=True)
 forward = models.ForeignKey('self', blank=True, null=True)
 rank = models.IntegerField(default=0)
 relevance = models.IntegerField(default=0)
 added = models.DateTimeField(auto_now_add=True)

 class TaggedItem(models.Model):
 tag = models.ForeignKey(Tag, related_name='items')
 added = models.DateTimeField(auto_now_add=True)
 content_type = models.ForeignKey(ContentType)
 object_id = models.PositiveIntegerField(_('object id'), db_index=True)
 object = generic.GenericForeignKey('content_type', 'object_id')
 }}}

 Get a list of tag ids and use it as a nested query:

 {{{
 # obtain a list of tag ids
 >>> tag_ids =
 TaggedItem.objects.all().order_by('-added__max').values_list('id',
 flat=True).annotate(Max('added'))[:10]
 >>> Tag.objects.filter(id__in=tag_ids)
 }}}

 and the result is

 {{{
 ProgrammingError: invalid reference to FROM-clause entry for table
 "tagging_taggeditem"
 LINE 1: ... WHERE "tagging_tag"."id" IN (SELECT U0."id", MAX("tagging_t...
  ^
 HINT:  Perhaps you meant to reference the table alias "u0".
 }}}

 The full traceback is:

 {{{
 Traceback (most recent call last):
   File "", line 1, in 
   File "/Library/Python/2.5/site-packages/django/db/models/query.py", line
 148, in __repr__
 data = list(self[:REPR_OUTPUT_SIZE + 1])
   File "/Library/Python/2.5/site-packages/django/db/models/query.py", line
 163, in __len__
 self._result_cache.extend(list(self._iter))
   File "/Library/Python/2.5/site-packages/django/db/models/query.py", line
 281, in iterator
 for row in self.query.results_iter():
   File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py",
 line 241, in results_iter
 for rows in self.execute_sql(MULTI):
   File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py",
 line 1974, in execute_sql
 cursor.execute(sql, params)
   File "/Library/Python/2.5/site-packages/django/db/backends/util.py",
 line 19, in execute
 return self.cursor.execute(sql, params)
 ProgrammingError: invalid reference to FROM-clause entry for table
 "tagging_taggeditem"
 LINE 1: ... WHERE "tagging_tag"."id" IN (SELECT U0."id", MAX("tagging_t...
  ^
 HINT:  Perhaps you meant to reference the table alias "u0".
 }}}

 Environment: Django r9803 / PostgreSQL 8.2 / Mac OS X.

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