Re: [Django] #10454: IntegrityError while deleting object with complex constraint

2009-03-13 Thread Django
#10454: IntegrityError while deleting object with complex constraint
---+
  Reporter:  liangent  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by liangent):

 in {{{ filter(lambda f: f.column == field.column,
 field.rel.to._meta.fields) }}}

 i cannot understand why, if model A:field F is pointing to model B, we can
 get the result that if F has the same column name as a field in model B
 then clear field F..

-- 
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] #10454: IntegrityError while deleting object with complex constraint

2009-03-13 Thread Django
#10454: IntegrityError while deleting object with complex constraint
---+
  Reporter:  liangent  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by liangent):

 i tried to read django source code, and found this:

 {{{
 def add(self, model, pk, obj, parent_model, nullable=False):
 """
 Adds an item to the container.

 Arguments:
 * model - the class of the object being added.
 * pk - the primary key.
 * obj - the object itself.
 * parent_model - the model of the parent object that this object
 was
   reached through.
 * nullable - should be True if this relation is nullable.

 Returns True if the item already existed in the structure and
 False otherwise.
 """
 d = self.data.setdefault(model, SortedDict())
 retval = pk in d
 d[pk] = obj
 # Nullable relationships can be ignored -- they are nulled out
 before
 # deleting, and therefore do not affect the order in which objects
 # have to be deleted.
 if parent_model is not None and not nullable:
 self.children.setdefault(parent_model, []).append(model)
 return retval
 }}}

 yes, there's some nullable foreignkeys pointing to P model/object in
 another model (i forgot to mention it above), and code below

 {{{
 for field, model in cls._meta.get_fields_with_model():
 if (field.rel and field.null and field.rel.to in seen_objs and
 filter(lambda f: f.column == field.column,
 field.rel.to._meta.fields)):
 assert False # i added an assert here
 if model:
 sql.UpdateQuery(model,
 connection).clear_related(field,
 pk_list)
 else:
 update_query.clear_related(field, pk_list)
 }}}

 i didn't catch any assertion error...

-- 
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] #9676: Explicit default managers

2009-03-13 Thread Django
#9676: Explicit default managers
---+
  Reporter:  mrts  | Owner:  mtredinnick
Status:  assigned  | Milestone: 
 Component:  Database layer (models, ORM)  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Design decision needed| Has_patch:  0  
Needs_docs:  1 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * owner:  nobody => mtredinnick
  * status:  new => assigned

Comment:

 Run out of time today. I'll commit this change tomorrow; I've got it done
 and ready to go.

-- 
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] #9676: Explicit default managers

2009-03-13 Thread Django
#9676: Explicit default managers
---+
  Reporter:  mrts  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  0 
Needs_docs:  1 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 I'm not going to worry about whether or not to make `_default_manager`
 public here, since that isn't a well defined problem at the moment, so a
 "fix" isn't going to clearly correct or incorrect (working out whether
 access to that parameter is part of the problem). Normally, if you're
 referring to some other model you either know the model you're referring
 to, so can use the right manager, or it's a relation, in which case the
 manager choice is automatic. It's only real edge-cases that need to
 understand the concept of a default manager and won't know it's name (such
 as the admin) and they are a corner case in the application space. I've
 moved that to #10499 and leaving this ticket as being about interleaving
 new default managers.

 The other problem is already possible to solve using class inheritance
 (mixins, since it's mixing in a new default manager to the default
 hierarchy). No new feature is required there. I'm about to commit some
 documentation to explain that pattern explicitly in the 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
-~--~~~~--~~--~--~---



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

2009-03-13 Thread Django
#10499: Maybe make _default_manager part of the public API
---+
  Reporter:  mtredinnick   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Design decision needed
  * 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] #10499: Maybe make _default_manager part of the public API

2009-03-13 Thread Django
#10499: Maybe make _default_manager part of the public API
--+-
 Reporter:  mtredinnick   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Moving the "design-decision-needed" portion of #9676 over here. The
 contention is that some applications might need access to
 `_default_manager` and so it should be part of the public API.

 Needs more thinking about the problem space before a decision can be
 reached here. Certainly post-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] #10358: manage.py sqlall is not truncating long table names for ManyToManyField

2009-03-13 Thread Django
#10358: manage.py sqlall is not truncating long table names for ManyToManyField
+---
  Reporter:  jb0t   | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * component:  Uncategorized => 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
-~--~~~~--~~--~--~---



Re: [Django] #10370: [patch] re-implement MultiValueDict.itervalues() to match values()

2009-03-13 Thread Django
#10370: [patch] re-implement MultiValueDict.itervalues() to match values()
-+--
  Reporter:  rfk | Owner:  nobody
Status:  new | Milestone:  1.1   
 Component:  Core framework  |   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * component:  Uncategorized => Core framework

-- 
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] #10410: FileField saves one filename on disk and another on DB

2009-03-13 Thread Django
#10410: FileField saves one filename on disk and another on DB
---+
  Reporter:  Elland| Owner:  nobody 
 
Status:  new   | Milestone:  1.1
 
 Component:  File uploads/storage  |   Version: 
 
Resolution:|  Keywords:  FileField valid 
filename
 Stage:  Accepted  | Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Uncategorized => File uploads/storage

-- 
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] #10413: RelatedManager.add fails silently when adding an object of the wrong type

2009-03-13 Thread Django
#10413: RelatedManager.add fails silently when adding an object of the wrong 
type
---+
  Reporter:  dgouldin  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Uncategorized => Database layer (models, ORM)

-- 
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] #10357: "manage.py dbshell" broken for MySQL on Windows

2009-03-13 Thread Django
#10357: "manage.py dbshell" broken for MySQL on Windows
--+-
  Reporter:  anonymous| Owner:  nobody
Status:  new  | Milestone:  1.1   
 Component:  django-admin.py  |   Version:  1.0   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  1|  
--+-
Changes (by russellm):

  * component:  Uncategorized => django-admin.py

-- 
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] #10102: daily_cleanup.py should have svn:executable set

2009-03-13 Thread Django
#10102: daily_cleanup.py should have svn:executable set
+---
  Reporter:  john_scott | Owner:  nobody
Status:  closed | Milestone:  1.1   
 Component:  Uncategorized  |   Version:  1.0   
Resolution:  fixed  |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 (In [10054]) Fixed #10102 -- Set svn:executable on daily_cleanup script.
 Thanks to John Scott for the report

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

2009-03-13 Thread noreply

Author: russellm
Date: 2009-03-14 00:18:02 -0500 (Sat, 14 Mar 2009)
New Revision: 10054

Modified:
   django/trunk/django/bin/daily_cleanup.py
Log:
Fixed #10102 -- Set svn:executable on daily_cleanup script. Thanks to John 
Scott for the report


Property changes on: django/trunk/django/bin/daily_cleanup.py
___
Name: svn:executable
   + *


--~--~-~--~~~---~--~~
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] #10094: do_extenbds function incorrectly parses Token

2009-03-13 Thread Django
#10094: do_extenbds function incorrectly parses Token
--+-
  Reporter:  pe...@monicol.co.uk  | Owner:  nobody
Status:  new  | Milestone:  1.1   
 Component:  Template system  |   Version:  1.0   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by russellm):

  * component:  Uncategorized => Template system

-- 
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] #9989: removal flaw in django.dispatch.Signal.disconnect

2009-03-13 Thread Django
#9989: removal flaw in django.dispatch.Signal.disconnect
-+--
  Reporter:  ferringb| Owner:  nobody
Status:  new | Milestone:  1.1   
 Component:  Core framework  |   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * component:  Uncategorized => Core framework

-- 
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] #10071: month and day lookup arguments should be integers

2009-03-13 Thread Django
#10071: month and day lookup arguments should be integers
---+
  Reporter:  leosoto   | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.0   
Resolution:|  Keywords:  jython
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Uncategorized => Database layer (models, ORM)

-- 
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] #9991: manage.py inspectdb guesses TextField on postgres' real column

2009-03-13 Thread Django
#9991: manage.py inspectdb guesses TextField on postgres' real column
+---
  Reporter:  Adys   | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  django-admin.py inspectdb  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * component:  Uncategorized => django-admin.py inspectdb

-- 
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] #9983: Javascript issue on admin interface with prepopulated_fields

2009-03-13 Thread Django
#9983: Javascript issue on admin interface with prepopulated_fields
---+
  Reporter:  msurdi| Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Uncategorized => django.contrib.admin

-- 
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] #9751: project_directory calculated incorrectly when "settings" is a directory (breaks 'startapp')

2009-03-13 Thread Django
#9751: project_directory calculated incorrectly when "settings" is a directory
(breaks 'startapp')
--+-
  Reporter:  lamby| Owner:  nobody  
Status:  new  | Milestone:  1.1 
 Component:  django-admin.py  |   Version:  1.0 
Resolution:   |  Keywords:  startapp,settings,module
 Stage:  Accepted | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by russellm):

  * component:  Uncategorized => django-admin.py

-- 
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] #9659: No output from `wsgi.file_wrapper`

2009-03-13 Thread Django
#9659: No output from `wsgi.file_wrapper`
+---
  Reporter:  jborg  | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  HTTP handling  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * component:  Uncategorized => HTTP handling

-- 
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] #9343: Changed text of testing page to reflect status of db between doctests

2009-03-13 Thread Django
#9343: Changed text of testing page to reflect status of db between doctests
+---
  Reporter:  davenaff   | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * component:  Uncategorized => 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
-~--~~~~--~~--~--~---



Re: [Django] #9167: shutdown_message option missing in runserver.py

2009-03-13 Thread Django
#9167: shutdown_message option missing in runserver.py
+---
  Reporter:  jjackson   | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  django-admin.py runserver  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  1 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * component:  Uncategorized => django-admin.py runserver

-- 
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] #9964: Transaction middleware closes the transaction only when it's marked as dirty

2009-03-13 Thread Django
#9964: Transaction middleware closes the transaction only when it's marked as
dirty
---+
  Reporter:  ishirav   | Owner:  
mtredinnick 
Status:  assigned  | Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  1.0-beta-1 
 
Resolution:|  Keywords:  
transactions
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  1 |   Needs_tests:  1  
 
Needs_better_patch:  1 |  
---+
Changes (by shai):

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

Comment:

 The patch I just attached is not ready for inclusion and not tested, I
 just want to get some feedback on the ideas:

  - Take the functions affected by 'dirty' out to separate modules, each
 providing a different version of them
- fast_select.py reflects current behavior
- safe.py always closes transactions
  - Selection between modules is done by settings.py
  - The default is fast_select (existing behavior), for backward
 compatibility
  - The project template is modified to select 'safe', so new projects get
 that by default
- But if they need the extra performance, and are willing to pay their
 dues in code diligence, they can

-- 
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] #8971: URL resolution for admindocs reST roles incorrect

2009-03-13 Thread Django
#8971: URL resolution for admindocs reST roles incorrect
---+
  Reporter:  benspaulding  | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:  admindocs urls
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Uncategorized => django.contrib.admin

-- 
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] #8853: admindoc :template: role should not append .html

2009-03-13 Thread Django
#8853: admindoc :template: role should not append .html
---+
  Reporter:  benspaulding  | Owner:  nobody   
Status:  reopened  | Milestone:  1.1  
 Component:  django.contrib.admin  |   Version:  SVN  
Resolution:|  Keywords:  admindocs
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Uncategorized => django.contrib.admin

-- 
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] r10053 - in django/trunk: django/db/models/sql tests/regressiontests/aggregation_regress

2009-03-13 Thread noreply

Author: russellm
Date: 2009-03-13 23:32:52 -0500 (Fri, 13 Mar 2009)
New Revision: 10053

Modified:
   django/trunk/django/db/models/sql/query.py
   django/trunk/tests/regressiontests/aggregation_regress/models.py
Log:
Fixed #10425 -- Corrected the interaction of .count() with .annotate() when 
.values() is also involved. Thanks to kmassey for the report.

Modified: django/trunk/django/db/models/sql/query.py
===
--- django/trunk/django/db/models/sql/query.py  2009-03-13 21:07:41 UTC (rev 
10052)
+++ django/trunk/django/db/models/sql/query.py  2009-03-14 04:32:52 UTC (rev 
10053)
@@ -329,7 +329,7 @@
 Performs a COUNT() query using the current filter constraints.
 """
 obj = self.clone()
-if len(self.select) > 1:
+if len(self.select) > 1 or self.aggregate_select:
 # If a select clause exists, then the query has already started to
 # specify the columns that are to be returned.
 # In this case, we need to use a subquery to evaluate the count.
@@ -1950,6 +1950,7 @@
 # Clear out the select cache to reflect the new unmasked aggregates.
 self.aggregates = {None: count}
 self.set_aggregate_mask(None)
+self.group_by = None
 
 def add_select_related(self, fields):
 """

Modified: django/trunk/tests/regressiontests/aggregation_regress/models.py
===
--- django/trunk/tests/regressiontests/aggregation_regress/models.py
2009-03-13 21:07:41 UTC (rev 10052)
+++ django/trunk/tests/regressiontests/aggregation_regress/models.py
2009-03-14 04:32:52 UTC (rev 10053)
@@ -252,6 +252,13 @@
 >>> [int(x['sheets']) for x in qs]
 [150, 175, 224, 264, 473, 566]
 
+# Regression for 10425 - annotations don't get in the way of a count() clause
+>>> Book.objects.values('publisher').annotate(Count('publisher')).count()
+4
+
+>>> Book.objects.annotate(Count('publisher')).values('publisher').count()
+6
+
 """
 }
 


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



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

2009-03-13 Thread Django
#10491: an unevaluated lazy object
+---
  Reporter:  liangent   | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by liangent):

 ( #10498 )

 and i wonder where to modify description of a ticket (or just opened by
 myself)

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



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

2009-03-13 Thread Django
#10498: Passing ugettext_lazy to related object's create() doesn't work
---+
  Reporter:  mtredinnick   | Owner:  nobody
Status:  new   | Milestone:
 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 liangent):

 note that the problem is:

 something like {{{}}} shows when i'm trying to access messages in template
 context {{{messages}}}.

 so i think there's some connection with #10491 and i put it in #10491 at
 first.

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



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

2009-03-13 Thread Django
#10449: Bug: HTML accents not escaped out when using newforms
---+
  Reporter:  tipan | Owner:  nobody   
Status:  reopened  | Milestone:   
 Component:  Internationalization  |   Version:  1.0  
Resolution:|  Keywords:  accents, newforms
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  1 |   Needs_tests:  1
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 You did express yourself clearly. I just don't agree with you and there's
 no reason for that requirement. The solution is to fix the widgets because
 they absolutely do know and no, assuming escaping was the mistake I made
 originally. It's only required in very specific situations.

 Talking about "safe" and "unsafe" is confusing this conversation, since is
 a template auto-escaping concept, not an issue with constant strings in
 Python. The resulting string returned from widget's `render()` method will
 always be safe from auto-escaping, since it contains raw HTML. The
 translated strings count as constants, not user-supplied data, so they
 shouldn't be escaped. Please stop fighting me on this one: we're being
 very consistent throughout Django on this issue and the current case was
 just an oversight on my part.

-- 
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] #7235: filtering on an EmptyQuerySet raises an Exception

2009-03-13 Thread Django
#7235: filtering on an EmptyQuerySet raises an Exception
---+
  Reporter:  anonymous | Owner:  nobody 
 
Status:  reopened  | Milestone:  1.0
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  
qsrf-cleanup query,emptyqueryset
 Stage:  Accepted  | Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * status:  closed => reopened
  * resolution:  invalid =>
  * stage:  Design decision needed => Accepted

Comment:

 In light of AdamG's observation, which I happened to notice going past
 (start a thread on django-dev next time, rather than commenting on a
 closed ticket, please), reopening. That's a valid case.

 The fix is to make every queryset operation on `EmptyQuerySet` pretty much
 just return `self`.

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



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

2009-03-13 Thread Django
#10498: Passing ugettext_lazy to related object's create() doesn't work
---+
  Reporter:  mtredinnick   | Owner:  nobody
Status:  new   | Milestone:
 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 mtredinnick):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * 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] #10498: Passing ugettext_lazy to related object's create() doesn't work

2009-03-13 Thread Django
#10498: Passing ugettext_lazy to related object's create() doesn't work
--+-
 Reporter:  mtredinnick   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 As originally reported in #10491, doing this appears to fail (unconfirmed
 by me at the moment):
 {{{
 #!python
 user.message_set.create(message=ugettext_lazy(u'xxx'))
 }}}

 It should work.

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



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

2009-03-13 Thread Django
#10491: an unevaluated lazy object
+---
  Reporter:  liangent   | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by mtredinnick):

  * version:  => 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] #10491: an unevaluated lazy object

2009-03-13 Thread Django
#10491: an unevaluated lazy object
+---
  Reporter:  liangent   | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by mtredinnick):

  * needs_better_patch:  => 0
  * component:  Internationalization => HTTP handling
  * needs_tests:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted

Old description:

> this shows {{{ 0x0110ED10>}}}, not {{{xxx}}} i expected
>
> this bug also occurs when i'm trying to
> {{{user.message_set.create(message=_(u'xxx'))}}}

New description:

 Passing a `ugettext_lazy()` object as the argument to
 `HttpResponseRedirect.__init__` doesn't work.

Comment:

 Please report only on bug per ticket. This is two bugs:
  1. Passing a unicode-proxy to `HttpResponse` classes doesn't convert it
 to ASCII (it assumes a str or str-proxy objects will be passed in).
  2. Calling `create()` on a reverse ForeignKey causes problems.

 I'm editing the description to describe the problem so that people don't
 have to work it out from the zip file and I'll open a new ticket for the
 second (entirely separate) problem. The original description was:


 this shows {{{}}},
 not {{{xxx}}} i expected

 this bug also occurs when i'm trying to
 user.message_set.create(message=_(u'xxx'))

-- 
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] #7977: add geo support to admindocs

2009-03-13 Thread Django
#7977: add geo support to admindocs
--+-
  Reporter:  andreplebl...@gmail.com  | Owner:  jbronn
Status:  assigned | Milestone:
 Component:  GIS  |   Version:  gis   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  1|  
--+-
Changes (by mtredinnick):

  * needs_better_patch:  0 => 1
  * stage:  Design decision needed => Accepted

Comment:

 I think Brett's broader point is valid here. This is a bit of an ugly
 patch, since it's so highly specific to one contrib app. Let's put on our
 brightly coloured thinking caps and do something better (dispatching to a
 "standard" function in each installed app in turn if there's a KeyError,
 for example).

 It was probably either me or Jacob who had Eric move this to "d-d-n"
 during the Lawrence sprint last year. Moving to "Accepted" since, yes, we
 should do this. But not this way, preferably.

-- 
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] #10497: Added 'stat' method to class Storage and FileSystemStorage

2009-03-13 Thread Django
#10497: Added 'stat' method to class Storage and FileSystemStorage
+---
 Reporter:  HuCy|   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  1.0   
 Keywords:  storage |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 The included patch implements a stat method for Storage and
 FileSystemStorage in django.core.files.storage

 Background:
 We implemented a storage engine for CouchDB in which catalog of products
 are stored as pdf documents.
 The catalogs are re-generated depending on their age - which was easy when
 the default FileSystemStorage was
 used, but more complicated using a custom storage engine that does not use
 a filesystem backend.

 Adding a stat method to the Storage class makes it easier to gain the
 required information, especially for
 derived classes as described above.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r10052 - in django/branches/releases/1.0.X: . django/core/cache/backends django/db/backends django/db/backends/oracle

2009-03-13 Thread noreply

Author: ikelly
Date: 2009-03-13 16:07:41 -0500 (Fri, 13 Mar 2009)
New Revision: 10052

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/django/core/cache/backends/db.py
   django/branches/releases/1.0.X/django/db/backends/__init__.py
   django/branches/releases/1.0.X/django/db/backends/oracle/base.py
Log:
[1.0.X] Fixed #10488: fixed DB cache backend test failures in Oracle. Backport 
of [10051] 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-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990,9992,9994,9996-9998,10003,10009,10013,10015,10017,10022,10024,10049
   + 
/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-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990,9992,9994,9996-9998,10003,10009,10013,10015,10017,10022,10024,10049,10051

Modified: django/branches/releases/1.0.X/django/core/cache/backends/db.py
===
--- django/branches/releases/1.0.X/django/core/cache/backends/db.py 
2009-03-13 21:04:48 UTC (rev 10051)
+++ django/branches/releases/1.0.X/django/core/cache/backends/db.py 
2009-03-13 21:07:41 UTC (rev 10052)
@@ -35,7 +35,8 @@
 cursor.execute("DELETE FROM %s WHERE cache_key = %%s" % 
self._table, [key])
 transaction.commit_unless_managed()
 return default
-return pickle.loads(base64.decodestring(row[1]))
+value = connection.ops.process_clob(row[1])
+return pickle.loads(base64.decodestring(value))
 
 def set(self, key, value, timeout=None):
 self._base_set('set', key, value, timeout)

Modified: django/branches/releases/1.0.X/django/db/backends/__init__.py
===
--- django/branches/releases/1.0.X/django/db/backends/__init__.py   
2009-03-13 21:04:48 UTC (rev 10051)
+++ django/branches/releases/1.0.X/django/db/backends/__init__.py   
2009-03-13 21:07:41 UTC (rev 10052)
@@ -212,6 +212,13 @@
 """
 return 'DEFAULT'
 
+def process_clob(self, value):
+"""
+Returns the value of a CLOB column, for backends that return a locator
+object that requires additional processing.
+"""
+return value
+
 def query_class(self, DefaultQueryClass):
 """
 Given the default Query class, returns a custom Query class

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-03-13 21:04:48 UTC (rev 10051)
+++ django/branches/releases/1.0.X/django/db/backends/oracle/base.py
2009-03-13 21:07:41 UTC (rev 10052)
@@ -115,6 +115,11 @@
 def prep_for_iexact_query(self, x):
 return x
 
+def process_clob(self, value):
+if value is None:
+return u''
+return force_unicode(value.read())
+
 def query_class(self, DefaultQueryClass):
 return query.query_class(DefaultQueryClass, Database)
 


--~--~-~--~~~---~--~~
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] r10051 - in django/trunk/django: core/cache/backends db/backends db/backends/oracle

2009-03-13 Thread noreply

Author: ikelly
Date: 2009-03-13 16:04:48 -0500 (Fri, 13 Mar 2009)
New Revision: 10051

Modified:
   django/trunk/django/core/cache/backends/db.py
   django/trunk/django/db/backends/__init__.py
   django/trunk/django/db/backends/oracle/base.py
Log:
Fixed #10488: fixed DB cache backend test failures in Oracle.

Modified: django/trunk/django/core/cache/backends/db.py
===
--- django/trunk/django/core/cache/backends/db.py   2009-03-13 19:58:56 UTC 
(rev 10050)
+++ django/trunk/django/core/cache/backends/db.py   2009-03-13 21:04:48 UTC 
(rev 10051)
@@ -35,7 +35,8 @@
 cursor.execute("DELETE FROM %s WHERE cache_key = %%s" % 
self._table, [key])
 transaction.commit_unless_managed()
 return default
-return pickle.loads(base64.decodestring(row[1]))
+value = connection.ops.process_clob(row[1])
+return pickle.loads(base64.decodestring(value))
 
 def set(self, key, value, timeout=None):
 self._base_set('set', key, value, timeout)

Modified: django/trunk/django/db/backends/__init__.py
===
--- django/trunk/django/db/backends/__init__.py 2009-03-13 19:58:56 UTC (rev 
10050)
+++ django/trunk/django/db/backends/__init__.py 2009-03-13 21:04:48 UTC (rev 
10051)
@@ -255,6 +255,13 @@
 """
 return 'DEFAULT'
 
+def process_clob(self, value):
+"""
+Returns the value of a CLOB column, for backends that return a locator
+object that requires additional processing.
+"""
+return value
+
 def return_insert_id(self):
 """
 For backends that support returning the last insert ID as part

Modified: django/trunk/django/db/backends/oracle/base.py
===
--- django/trunk/django/db/backends/oracle/base.py  2009-03-13 19:58:56 UTC 
(rev 10050)
+++ django/trunk/django/db/backends/oracle/base.py  2009-03-13 21:04:48 UTC 
(rev 10051)
@@ -123,6 +123,11 @@
 def prep_for_iexact_query(self, x):
 return x
 
+def process_clob(self, value):
+if value is None:
+return u''
+return force_unicode(value.read())
+
 def query_class(self, DefaultQueryClass):
 return query.query_class(DefaultQueryClass, Database)
 


--~--~-~--~~~---~--~~
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] #10496: root_path in admin is incorrect when "include(admin.site.urls)" is used

2009-03-13 Thread Django
#10496: root_path in admin is incorrect when "include(admin.site.urls)" is used
---+
  Reporter:  powerfox  | Owner:  nobody
Status:  closed| Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:  duplicate |  Keywords:
 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:  => duplicate
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 This is a dupe of #10061

-- 
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] #10496: root_path in admin is incorrect when "include(admin.site.urls)" is used

2009-03-13 Thread Django
#10496: root_path in admin is incorrect when "include(admin.site.urls)" is used
--+-
 Reporter:  powerfox  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 When I use include(admin.site.urls) root_path is 'admin/' (it's set in
 __init__() of AdminSite). So I get wrong links.
 I've noticed it's set only in admin_root (and it will be set to '/admin/'
 in my case), thus when I use deprecated "r'^admin/(.*)',
 gk_admin_site.root" everything is fine.
 Comments in the code say, that root_path and root shouldn't be used, but
 it's still used in admin templates for links like "Log out", "Change
 password".

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

2009-03-13 Thread noreply

Author: ikelly
Date: 2009-03-13 14:58:56 -0500 (Fri, 13 Mar 2009)
New Revision: 10050

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/django/db/backends/oracle/query.py
   django/branches/releases/1.0.X/tests/regressiontests/datatypes/models.py
Log:
[1.0.X] Fixed #10238: coerce TextField values to unicode in the oracle backend. 
Backport of [10049] 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-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990,9992,9994,9996-9998,10003,10009,10013,10015,10017,10022,10024
   + 
/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-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990,9992,9994,9996-9998,10003,10009,10013,10015,10017,10022,10024,10049

Modified: django/branches/releases/1.0.X/django/db/backends/oracle/query.py
===
--- django/branches/releases/1.0.X/django/db/backends/oracle/query.py   
2009-03-13 19:57:00 UTC (rev 10049)
+++ django/branches/releases/1.0.X/django/db/backends/oracle/query.py   
2009-03-13 19:58:56 UTC (rev 10050)
@@ -6,6 +6,7 @@
 import datetime
 
 from django.db.backends import util
+from django.utils.encoding import force_unicode
 
 # Cache. Maps default query class to new Oracle query class.
 _classes = {}
@@ -57,6 +58,9 @@
  TimeField, BooleanField, NullBooleanField, DecimalField, Field
 if isinstance(value, Database.LOB):
 value = value.read()
+if field and field.get_internal_type() == 'TextField':
+value = force_unicode(value)
+
 # Oracle stores empty strings as null. We need to undo this in
 # order to adhere to the Django convention of using the empty
 # string instead of null, but only if the field accepts the

Modified: 
django/branches/releases/1.0.X/tests/regressiontests/datatypes/models.py
===
--- django/branches/releases/1.0.X/tests/regressiontests/datatypes/models.py
2009-03-13 19:57:00 UTC (rev 10049)
+++ django/branches/releases/1.0.X/tests/regressiontests/datatypes/models.py
2009-03-13 19:58:56 UTC (rev 10050)
@@ -13,6 +13,7 @@
 baked_date = models.DateField(null=True)
 baked_time = models.TimeField(null=True)
 consumed_at = models.DateTimeField(null=True)
+review = models.TextField()
 
 class Meta:
 ordering = ('consumed_at',)
@@ -82,6 +83,12 @@
 >>> Donut.objects.filter(consumed_at__year=2008)
 []
 
+# Regression test for #10238: TextField values returned from the database
+# should be unicode.
+>>> d2 = Donut.objects.create(name=u'Jelly Donut', review=u'Outstanding')
+>>> Donut.objects.get(id=d2.id).review
+u'Outstanding'
+
 """}
 
 # Regression test for #8354: the MySQL backend should raise an error if given


--~--~-~--~~~---~--~~
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] r10049 - in django/trunk: django/db/backends/oracle tests/regressiontests/datatypes

2009-03-13 Thread noreply

Author: ikelly
Date: 2009-03-13 14:57:00 -0500 (Fri, 13 Mar 2009)
New Revision: 10049

Modified:
   django/trunk/django/db/backends/oracle/query.py
   django/trunk/tests/regressiontests/datatypes/models.py
Log:
Fixed #10238: coerce TextField values to unicode in the oracle backend.

Modified: django/trunk/django/db/backends/oracle/query.py
===
--- django/trunk/django/db/backends/oracle/query.py 2009-03-13 17:20:52 UTC 
(rev 10048)
+++ django/trunk/django/db/backends/oracle/query.py 2009-03-13 19:57:00 UTC 
(rev 10049)
@@ -6,6 +6,7 @@
 import datetime
 
 from django.db.backends import util
+from django.utils.encoding import force_unicode
 
 # Cache. Maps default query class to new Oracle query class.
 _classes = {}
@@ -55,6 +56,9 @@
 def convert_values(self, value, field):
 if isinstance(value, Database.LOB):
 value = value.read()
+if field and field.get_internal_type() == 'TextField':
+value = force_unicode(value)
+
 # Oracle stores empty strings as null. We need to undo this in
 # order to adhere to the Django convention of using the empty
 # string instead of null, but only if the field accepts the

Modified: django/trunk/tests/regressiontests/datatypes/models.py
===
--- django/trunk/tests/regressiontests/datatypes/models.py  2009-03-13 
17:20:52 UTC (rev 10048)
+++ django/trunk/tests/regressiontests/datatypes/models.py  2009-03-13 
19:57:00 UTC (rev 10049)
@@ -13,6 +13,7 @@
 baked_date = models.DateField(null=True)
 baked_time = models.TimeField(null=True)
 consumed_at = models.DateTimeField(null=True)
+review = models.TextField()
 
 class Meta:
 ordering = ('consumed_at',)
@@ -82,6 +83,12 @@
 >>> Donut.objects.filter(consumed_at__year=2008)
 []
 
+# Regression test for #10238: TextField values returned from the database
+# should be unicode.
+>>> d2 = Donut.objects.create(name=u'Jelly Donut', review=u'Outstanding')
+>>> Donut.objects.get(id=d2.id).review
+u'Outstanding'
+
 """}
 
 # Regression test for #8354: the MySQL backend should raise an error if given


--~--~-~--~~~---~--~~
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] #6523: PostgreSQL 8.3 cannot do text matching on uncast non-text columns

2009-03-13 Thread Django
#6523: PostgreSQL 8.3 cannot do text matching on uncast non-text columns
---+
  Reporter:  pat.j.ander...@gmail.com  | Owner:  mtredinnick
Status:  reopened  | Milestone:  1.0
 Component:  Database layer (models, ORM)  |   Version:  1.0-beta-1 
Resolution:|  Keywords:  postgresql 
 Stage:  Unreviewed| Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by jbrainspot):

 I apologize for using the wrong heading size. I did not know the font-size
 property of h1 was so large.

 Replying to [comment:25 jbrainspot]:
 > = It seems like the bug is still around. I am using PostgresSQL 8.3.5 on
 Mac OS 10.5.6 =
 >
 > == Here are my models: ==
 >
 > from django.contrib.comments.models import Comment
 > class Review(Comment):
 > 
 > special_mentions = generic.GenericRelation("SpecialMention")
 >
 > class Business(models.Model):
 > 
 > reviews = generic.GenericRelation("reviews.Review",
 object_id_field="object_pk")
 >
 > == From django shell: ==
 >
 > from businesses.models import *
 >
 > Business.objects.get(id=20).reviews.all()
 >
 > Traceback (most recent call last):
 >   File "", line 1, in 
 >   File "/Library/Python/2.5/site-packages/django/db/models/query.py",
 line 147, in __repr__
 > data = list(self[:REPR_OUTPUT_SIZE + 1])
 >   File "/Library/Python/2.5/site-packages/django/db/models/query.py",
 line 162, in __len__
 > self._result_cache.extend(list(self._iter))
 >   File "/Library/Python/2.5/site-packages/django/db/models/query.py",
 line 275, in iterator
 > for row in self.query.results_iter():
 >   File "/Library/Python/2.5/site-
 packages/django/db/models/sql/query.py", line 206, in results_iter
 > for rows in self.execute_sql(MULTI):
 >   File "/Library/Python/2.5/site-
 packages/django/db/models/sql/query.py", line 1734, 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: operator does not exist: text = integer
 > LINE 1: ...ments"."id") WHERE ("django_comments"."object_pk" = 20  AND
 ...
 >  ^
 > HINT:  No operator matches the given name and argument type(s). You
 might need to add explicit type casts.
 >

-- 
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] #6523: PostgreSQL 8.3 cannot do text matching on uncast non-text columns

2009-03-13 Thread Django
#6523: PostgreSQL 8.3 cannot do text matching on uncast non-text columns
---+
  Reporter:  pat.j.ander...@gmail.com  | Owner:  mtredinnick
Status:  reopened  | Milestone:  1.0
 Component:  Database layer (models, ORM)  |   Version:  1.0-beta-1 
Resolution:|  Keywords:  postgresql 
 Stage:  Unreviewed| Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by jbrainspot):

  * status:  closed => reopened
  * version:  SVN => 1.0-beta-1
  * resolution:  fixed =>
  * stage:  Accepted => Unreviewed

Comment:

 = It seems like the bug is still around. I am using PostgresSQL 8.3.5 on
 Mac OS 10.5.6 =

 == Here are my models: ==

 from django.contrib.comments.models import Comment
 class Review(Comment):
 
 special_mentions = generic.GenericRelation("SpecialMention")

 class Business(models.Model):
 
 reviews = generic.GenericRelation("reviews.Review",
 object_id_field="object_pk")

 == From django shell: ==

 from businesses.models import *

 Business.objects.get(id=20).reviews.all()

 Traceback (most recent call last):
   File "", line 1, in 
   File "/Library/Python/2.5/site-packages/django/db/models/query.py", line
 147, in __repr__
 data = list(self[:REPR_OUTPUT_SIZE + 1])
   File "/Library/Python/2.5/site-packages/django/db/models/query.py", line
 162, in __len__
 self._result_cache.extend(list(self._iter))
   File "/Library/Python/2.5/site-packages/django/db/models/query.py", line
 275, in iterator
 for row in self.query.results_iter():
   File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py",
 line 206, in results_iter
 for rows in self.execute_sql(MULTI):
   File "/Library/Python/2.5/site-packages/django/db/models/sql/query.py",
 line 1734, 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: operator does not exist: text = integer
 LINE 1: ...ments"."id") WHERE ("django_comments"."object_pk" = 20  AND ...
  ^
 HINT:  No operator matches the given name and argument type(s). You might
 need to add explicit type casts.

-- 
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] #10495: django documentation titles contain html tags

2009-03-13 Thread Django
#10495: django documentation titles contain html tags
-+--
 Reporter:  WoLpH|   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Django Web site  | Version:  1.0   
 Keywords:  documentation html tags  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 In the title tag for the
 [http://docs.djangoproject.com/en/dev/ref/models/options/ Model Meta
 options] documentation the title is currently "Django | Model Meta options | Django
 Documentation"

 The HTML tags should be stripped from the titles of all the files in the
 docs folder, a simple striptags filter on the title tag should do the
 trick. The dir:
 
http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/docs

 A patch is not included as the changes needed are rudimentary.

-- 
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] r10048 - django/trunk/django/db/models/sql

2009-03-13 Thread noreply

Author: ikelly
Date: 2009-03-13 12:20:52 -0500 (Fri, 13 Mar 2009)
New Revision: 10048

Modified:
   django/trunk/django/db/models/sql/query.py
Log:
Fixed a case where column aliases weren't being quoted properly.

Modified: django/trunk/django/db/models/sql/query.py
===
--- django/trunk/django/db/models/sql/query.py  2009-03-13 16:57:26 UTC (rev 
10047)
+++ django/trunk/django/db/models/sql/query.py  2009-03-13 17:20:52 UTC (rev 
10048)
@@ -579,7 +579,7 @@
 aliases.add(c_alias)
 col_aliases.add(c_alias)
 else:
-result.append('%s AS %s' % (r, col[1]))
+result.append('%s AS %s' % (r, qn2(col[1])))
 aliases.add(r)
 col_aliases.add(col[1])
 else:


--~--~-~--~~~---~--~~
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] r10047 - django/trunk/django/db/models/sql

2009-03-13 Thread noreply

Author: ikelly
Date: 2009-03-13 11:57:26 -0500 (Fri, 13 Mar 2009)
New Revision: 10047

Modified:
   django/trunk/django/db/models/sql/subqueries.py
Log:
Prevented InsertQuery from appending a 'RETURNING' clause when it's not 
actually interested in the result.  This was causing some problems for Oracle.

Modified: django/trunk/django/db/models/sql/subqueries.py
===
--- django/trunk/django/db/models/sql/subqueries.py 2009-03-13 04:45:11 UTC 
(rev 10046)
+++ django/trunk/django/db/models/sql/subqueries.py 2009-03-13 16:57:26 UTC 
(rev 10047)
@@ -291,10 +291,11 @@
 self.columns = []
 self.values = []
 self.params = ()
+self.return_id = False
 
 def clone(self, klass=None, **kwargs):
 extras = {'columns': self.columns[:], 'values': self.values[:],
-'params': self.params}
+  'params': self.params, 'return_id': self.return_id}
 extras.update(kwargs)
 return super(InsertQuery, self).clone(klass, **extras)
 
@@ -307,7 +308,7 @@
 result.append('(%s)' % ', '.join([qn(c) for c in self.columns]))
 result.append('VALUES (%s)' % ', '.join(self.values))
 params = self.params
-if self.connection.features.can_return_id_from_insert:
+if self.return_id and 
self.connection.features.can_return_id_from_insert:
 col = "%s.%s" % (qn(opts.db_table), qn(opts.pk.column))
 r_fmt, r_params = self.connection.ops.return_insert_id()
 result.append(r_fmt % col)
@@ -315,6 +316,7 @@
 return ' '.join(result), params
 
 def execute_sql(self, return_id=False):
+self.return_id = return_id
 cursor = super(InsertQuery, self).execute_sql(None)
 if not (return_id and cursor):
 return


--~--~-~--~~~---~--~~
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] #10486: DateTimeFormat in admin doesn't use DATETIME_FORMAT from settings

2009-03-13 Thread Django
#10486: DateTimeFormat in admin doesn't use DATETIME_FORMAT from settings
---+
  Reporter:  powerfox  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Translations  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by powerfox):

  * component:  django.contrib.admin => Translations

Comment:

 Here it is. Somebody has translated all things...
 {{{
 >>> from django.utils import dateformat
 >>> from django.utils.translation import get_date_formats
 >>> (date_format, datetime_format, time_format) = get_date_formats()
 >>> datetime_format
 u'N j, Y, P'
 >>> datetime_format == 'DATETIME_FORMAT'
 False
 >>> from django.conf import settings
 >>> settings.DATETIME_FORMAT
 'Y-m-d H:i:s'
 }}}

 Coolest model ever, but listing above had made all things clear:

 {{{
 class MTest(models.Model):
 datetime = models.DateTimeField() #adminModel should show it
 }}}


 About models with fk and seconds I was wrong, so don't mind about FKs and
 seconds.

-- 
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] #7231: New "join" parameter for the "extra" QuerySet method

2009-03-13 Thread Django
#7231: New "join" parameter for the "extra" QuerySet method
-+--
  Reporter:  Davide "Design" Muzzarelli  | Owner:  nobody   
  
Status:  new | Milestone:   
  
 Component:  Core framework  |   Version:  SVN  
  
Resolution:  |  Keywords:  queryset 
extra join
 Stage:  Design decision needed  | Has_patch:  1
  
Needs_docs:  1   |   Needs_tests:  1
  
Needs_better_patch:  0   |  
-+--
Changes (by anonymous):

 * cc: ssad...@mashi.org (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] #494: Collapse in admin interface for inline related objects

2009-03-13 Thread Django
#494: Collapse in admin interface for inline related objects
---+
  Reporter:  jcsto...@nilling.nl   | Owner:  aptiko 
 
Status:  assigned  | Milestone: 
 
 Component:  django.contrib.admin  |   Version:  newforms-admin 
 
Resolution:|  Keywords:  edit_inline, 
nfa-someday
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by andybak):

 * cc: a...@andybak.net (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] #10363: ModelForm excluded field can still be updated

2009-03-13 Thread Django
#10363: ModelForm excluded field can still be updated
+---
  Reporter:  jgoldberg  | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  Forms  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by k0001):

  * has_patch:  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
-~--~~~~--~~--~--~---



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

2009-03-13 Thread Django
#10494: show query params DoesNotExist from QuerySet.get
--+-
 Reporter:  brondsem  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 In db.models.query.QuerySet.get, it'd be nice if it included kwargs when
 raising DoesNotExist, like it does when it raises MultipleObjectsReturned

-- 
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] #10302: Add some date features to aggregation

2009-03-13 Thread Django
#10302: Add some date features to aggregation
---+
  Reporter:  tolano| Owner:  nobody 
  
Status:  new   | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords:  
aggregation dates
 Stage:  Accepted  | Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * milestone:  1.1 beta =>

Comment:

 Bumping this back to accepted, but not on v1.1 path, because this isn't
 something that is strictly related to aggregates. You can already do a
 GROUP BY on any date/datetime field that exists on the model. This ticket
 is asking for the ability to do a GROUP BY on a value computed from
 another field on the model. This will first require the ability to compute
 fields and annotate them.

 While this is definitely a good idea, it isn't a simple extension or
 omission from the v1.1 aggregates implementation. In the interim, it can
 be done using the approach Ian mentioned in the first comment.

-- 
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] #10486: DateTimeFormat in admin doesn't use DATETIME_FORMAT from settings

2009-03-13 Thread Django
#10486: DateTimeFormat in admin doesn't use DATETIME_FORMAT from settings
---+
  Reporter:  powerfox  | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 Regarding your original report, it would be very useful if you post: a) A
 minimal example of the model(s) you describe and b) if you can, the value
 of the `if datetime_format` variable at the `if datetime_format ==
 'DATETIME_FORMAT':` line because if you are using `en-us` at that point
 its valus ''should'' be `'DATETIME_FORMAT'`.

-- 
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] #10493: admin interface doesn't list members of a group

2009-03-13 Thread Django
#10493: admin interface doesn't list members of a group
+---
 Reporter:  brondsem|   Owner:  nobody
   Status:  new |   Milestone:
Component:  Authentication  | Version:  1.0   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 There's no way in the admin interface provided by contrib.auth to see a
 list of the current members of a given group.  You have to go through
 every single user and look to see if they are in the group.

 One easy solution (which I've already done for myself locally) is in
 contrib/auth/admin.py in UserAdmin, add 'groups' to list_filter.  As long
 as there is 2+ groups, you can then filter your users based on group
 membership.

 Another option would be to for the GroupManager to have an inline select
 box for available & chosen users, like it has for permissions.

-- 
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] #4196: [patch] Use select_related() when retrieving a user profile

2009-03-13 Thread Django
#4196: [patch] Use select_related() when retrieving a user profile
-+--
  Reporter:  Matt Riggott| Owner:  nobody
Status:  reopened| Milestone:
 Component:  Contrib apps|   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by anonymous):

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

Comment:

 Is it possible to have a get_profile(related=True) sort of implementation
 wherein based on the value of related, we can have get_profile getting
 either select_related or not?
 I understand is was closed as very minor, but this does help quite a bit
 and I do not want to change the django code in my system for this.
 The problem is that when a new version comes, we have to remember putting
 it again.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #10486: DateTimeFormat in admin doesn't use DATETIME_FORMAT from settings

2009-03-13 Thread Django
#10486: DateTimeFormat in admin doesn't use DATETIME_FORMAT from settings
---+
  Reporter:  powerfox  | Owner:  nobody
Status:  new   | 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 powerfox):

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

Comment:

 I've noticed, I still have a problem with seconds. I've commented 'if
 datetime_format == 'DATETIME_FORMAT':', so DATETIME_FORMAT is taken from
 settings.py, but seconds look like '18:01:23.653000'...

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



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

2009-03-13 Thread Django
#10449: Bug: HTML accents not escaped out when using newforms
---+
  Reporter:  tipan | Owner:  nobody   
Status:  reopened  | Milestone:   
 Component:  Internationalization  |   Version:  1.0  
Resolution:|  Keywords:  accents, newforms
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  1 |   Needs_tests:  1
Needs_better_patch:  0 |  
---+
Comment (by arien):

 Apparently I haven't expressed myself clearly; let me try again.

 IMHO it's bad practice to use markup like HTML entities in a `msgstr` when
 there's no such markup in the corresponding `msgid`.
  * In many (all?) cases, there is ''no need'' to use markup when
 translating a string that doesn't contain markup.  For example,
 `sesión` is just another way of writing `sesión` in HTML.
  * Using markup ''restricts possible usage'' of the target language
 strings with respect to the possible usage of the source language string.
 (`sesión` can be used no problem in XML, CSV, email, PDF, etc.  Results
 for `sesión` are somewhat different.)
  * In many cases it's ''not trivial to determine if the message strings
 are intended to be used solely in, e.g., HTML output (that is, impossible
 from the PO file alone)''.  A `models` module has many examples:
 `verbose_name` and `verbose_name_plural`, `verbose_name` for model fields,
 `FOO_CHOICES`.  A PO file will not show any other places where these are
 used.
  * Even if you can easily determine what the current usage of a certain
 message string is, ''what happens in the future if the translation string
 is used in other output formats''?  For example, some `FOO_CHOICES` that
 were previously only used in HTML now need to be used in emails' subjects
 as well.  That's rewriting translation strings right there.

 Anyway, that isn't the issue.  (It would have prevented this particular
 instance, though.)  The issue is that translated strings are sometimes
 escaped when they shouldn't be, as demonstrated by the reported example.

 The solution isn't changing some widgets so that they assume that data
 they're fed never needs to be escaped.  The widgets don't know if it's
 user supplied data (they can't know) and shouldn't care.  The data should
 be assumed to need escaping unless the data has been marked as safe by
 something ''outside'' the widget.  (Not to mention the inconsistency in
 auto-escaping behaviour between, say, `Select` and `TextInput` that would
 result from the proposed solution.)

 The solution is marking translated strings as "safe" the way
 `do_translate` does if it's fed `SafeData`, and probably changing
 `do_ntranslate` so that it works the same way.  When to mark translated
 strings as safe is exactly what this ticket is about.

 Anyway, I think the reporter probably thought that Django would convert
 HTML entities in translation string to the characters they represent (see
 also [http://groups.google.com/group/django-users/msg/5c514afd10edc20f his
 problem with HTML entities and email in the same thread]) and has changed
 his PO file as suggested while we're discussing something that is really a
 non-issue.

-- 
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] #2382: [patch] Save Filtering List Views in Admin into Session

2009-03-13 Thread Django
#2382: [patch] Save Filtering List Views in Admin into Session
---+
  Reporter:  anonymous | Owner:  nobody
Status:  closed| Milestone:
 Component:  django.contrib.admin  |   Version:
Resolution:  duplicate |  Keywords:  nfa-changelist
 Stage:  Someday/Maybe | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by ramiro):

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

Comment:

 Wait, this is a duplicate of #6903 that has an up-to-date patch. The
 current implementation there stored uses URL query strings to persist the
 filter status instead of sessions but the discussion in the ticket and in
 the associated mailing thread proposes also using session.

-- 
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] #2382: [patch] Save Filtering List Views in Admin into Session

2009-03-13 Thread Django
#2382: [patch] Save Filtering List Views in Admin into Session
---+
  Reporter:  anonymous | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:
Resolution:|  Keywords:  nfa-changelist
 Stage:  Someday/Maybe | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by alTus):

  * needs_better_patch:  0 => 1

Comment:

 This patch isn't up-to-date.
 Could someone provide a new one or at least give some recomendations how
 to get such functionality?

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

2009-03-13 Thread Django
#10492: Database connection string
---+
  Reporter:  lao   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:
Resolution:  wontfix   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by lao):

 I don't think what wrapper makes django many slower, but more flexible
 definition
  '''Compare current'''
 {{{
 # some simple project using sqlite
 DATABASE_ENGINE = 'sqlite3'
 DATABASE_NAME = '/tmp/db.sqlite'
 DATABASE_USER = ''
 DATABASE_PASSWORD = ''
 DATABASE_HOST = ''
 DATABASE_PORT = ''
 }}}
 '''And clear style'''
 {{{
 DATABASE = 'sqlite3:///tmp/db.sqlite'
 }}}

 many people use more than one connection to the databases in their
 projects (eg for replication).
 Django good framework, it supports many things that needed large projects
 (such as caching).
 I think that at one fine day the project will include support for multiple
 connections. and imagine it as
 {{{
 ...
 DATABASES = (
 ('db_alias1', 'mysql://user1:passwo...@host1/django'),
 ('db_alias2', 'mysql://user2:passwo...@host2/django'),
 )
 ...
 }}}
 I think it first step to support that

-- 
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] #10492: Database connection string

2009-03-13 Thread Django
#10492: Database connection string
---+
  Reporter:  lao   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:
Resolution:  wontfix   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 Umm... Why? You want to replace a clear and well defined settings
 framework with a great big regex and wrapper class. I fail to see any
 advantage to the proposed approach.

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



Re: [Django] #10425: Bad SQL generated for Book.objects.values('author').annotate(Count('author')).count()

2009-03-13 Thread Django
#10425: Bad SQL generated for
Book.objects.values('author').annotate(Count('author')).count()
--+-
  Reporter:  kmassey  | Owner:   
Status:  new  | Milestone:  1.1  
 Component:  ORM aggregation  |   Version:  SVN  
Resolution:   |  Keywords:  values annotate count
 Stage:  Accepted | Has_patch:  0
Needs_docs:  0|   Needs_tests:  0
Needs_better_patch:  0|  
--+-
Comment (by alen__ribic):

 Has this been fixed? I can't simulate the problem my end. My qs.count()
 returns a correct value with no exception.

 -Alen

-- 
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] #10492: Database connection string

2009-03-13 Thread Django
#10492: Database connection string
--+-
 Reporter:  lao   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 I propose to use a connection string, instead of DATABASE_* settings
 {{{
 # settings.py
 ...
 DATABASE = 'postgresql://djangouser:djangopassw...@host/djnagodb'
 DATABASE_OPTIONS = {
 ...
 }
 }}}

 Getting connection settings from '''someapp''', instead
 {{{
 #!python
 # someapp.py
 from django.conf import settings
 dbname = settings.DATABASE_NAME
 # or
 from django.db import settings
 dbname = settings.DATABASE_NAME
 }}}
 using
 {{{
 #!python
 # someapp.py
 from django.db import db # or some other object
 dbname = db.name
 }}}
 
 '''Example'''
 (sory for long regex)
 {{{
 #!python
 from re import compile

 class DBConectionStr:
 """
 Formats:
 sqlite3://path/to/file
 dbtype://dbuser/dbname
 dbtype://dbuser:dbpassword/dbname
 dbtype://dbuser:dbpassw...@dbhost/dbname
 dbtype://dbuser:dbpassw...@dbhost:port/dbname
 dbtype://dbuser(ROLE):dbpassw...@dbhost/dbname
 Example:
c = DBConection('sqlite3:///tmp/db.sqlite3')
 """
 def __init__(self, cstr):
 __re_dbstr =
 
compile(r'^(?P[^:]+)://((?P[^\(:]+)(\((?P.+)\))?(:(?P[...@]+))?(@(?P[^\/:]+)(:(?P\d+))?)?)?/(?P.+)')
 try:
 self.__db = __re_dbstr.search(cstr).groupdict()
 # Fix for sqlite path
 if self.__db['engine'].startswith('sqlite'):
 self.__db['name'] = "/%s" % self.__db['name']
 except:
 self.__db = {}
 #raise SomeException()

 def keys(self):
return self.__db.keys()

 def items(self):
return self.__db.items()

 def __getitem__(self, key):
 return self.__db.get(key, None)

 def __getattr__(self, key):
 return self.__db.get(key, None)

 #c = DBConectionStr('sqlite3:///:memory:')
 #c = DBConectionStr('sqlite3:///tmp/django.sqlite3')
 #c = DBConectionStr('mysql://user1/django')
 #c = DBConectionStr('mysql://user1:password1/django')
 #c = DBConectionStr('mysql://user1:passwo...@host1/django')
 #c = DBConectionStr('mysql://user1:passwo...@host1:1234/django')
 #c = DBConectionStr('postgresql://user1(role1):passwo...@host1/django')
 c =
 DBConectionStr('postgresql://user1(role1):passwo...@host1:1234/django')
 for i in c.items():
 print "%-8s: %s" % i
 # or
 #print c.engine, c.name
 }}}

 '''Output'''
 {{{
 engine  : postgresql
 name: django
 host: host1
 role: role1
 user: user1
 password: password1
 port: 1234
 }}}

-- 
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] #2698: Custom default managers interfere with delete operations

2009-03-13 Thread Django
#2698: Custom default managers interfere with delete operations
---+
  Reporter:  anonymous | Owner:  mtredinnick
Status:  assigned  | Milestone: 
 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 mtredinnick):

  * owner:  nobody => mtredinnick
  * status:  new => assigned

-- 
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
-~--~~~~--~~--~--~---