Re: [Django] #6028: add compatibility with glibc2 MD5-based crypt passwords

2010-01-29 Thread Django
#6028: add compatibility with glibc2 MD5-based crypt passwords
-+--
  Reporter:  akaihola| Owner:  nobody   
  
Status:  new | Milestone:   
  
 Component:  Contrib apps|   Version:  SVN  
  
Resolution:  |  Keywords:  auth password 
crypt mp5
 Stage:  Design decision needed  | Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  0   |  
-+--
Comment (by akaihola):

 #9194 is somewhat related (allow additional hashing algorithms for
 passwords).

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

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



Re: [Django] #9194: Allow additional hashing algorithms for passwords

2010-01-29 Thread Django
#9194: Allow additional hashing algorithms for passwords
-+--
  Reporter:  dcramer | Owner:  nobody
Status:  new | Milestone:
 Component:  Authentication  |   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by akaihola):

 #6028 is somewhat related (adding compatibility with glibc MD5-based crypt
 shadow passwords).

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

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



[Django] #12733: Added support for Extent aggregate on mysql databases

2010-01-29 Thread Django
#12733: Added support for Extent aggregate on mysql databases
--+-
 Reporter:  jann.kl...@freshx.de  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  GIS   | Version:  1.1   
 Keywords:  extent, mysql |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 This patch enables the usage of extent aggregates for mysql backends,
 using MIN/MAX queries.

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

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



[Changeset] r12359 - django/trunk/django/db/backends/postgresql

2010-01-29 Thread noreply
Author: russellm
Date: 2010-01-29 20:25:33 -0600 (Fri, 29 Jan 2010)
New Revision: 12359

Modified:
   django/trunk/django/db/backends/postgresql/base.py
Log:
Fixed #12732 -- Corrected an argument naming problem introduced by r12532. 
Thanks to stevedegrace for the report.

Modified: django/trunk/django/db/backends/postgresql/base.py
===
--- django/trunk/django/db/backends/postgresql/base.py  2010-01-29 18:38:28 UTC 
(rev 12358)
+++ django/trunk/django/db/backends/postgresql/base.py  2010-01-30 02:25:33 UTC 
(rev 12359)
@@ -54,7 +54,7 @@
 
 def execute(self, sql, params=()):
 try:
-return self.cursor.execute(query, args)
+return self.cursor.execute(sql, params)
 except Database.IntegrityError, e:
 raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), 
sys.exc_info()[2]
 except Database.DatabaseError, e:

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



Re: [Django] #11538: Documentation links wrong

2010-01-29 Thread Django
#11538: Documentation links wrong
+---
  Reporter:  Ianr   | Owner:  dwillis
Status:  assigned   | Milestone: 
 Component:  Documentation  |   Version:  1.0
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by dwillis):

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



Re: [Django] #12732: Change in svn revision 12098 incompatible with postgres

2010-01-29 Thread Django
#12732: Change in svn revision 12098 incompatible with postgres
---+
  Reporter:  stevedegrace  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:  postgresql
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 Looks to me like the problem was introduced in r12352, not r12098.

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

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



Re: [Django] #12732: Change in svn revision 12098 incompatible with postgres

2010-01-29 Thread Django
#12732: Change in svn revision 12098 incompatible with postgres
---+
  Reporter:  stevedegrace  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:  postgresql
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by kmtracey):

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

Old description:

> Hello,
>
> I have found a problem in the svn trunk starting revision 12098 and later
> that causes an internal server error when using a PostgreSQL database
> backend. I will post the apache error log below. I found this after
> attempting an svn update.
>
> I just svn update -r 12097 for now to make my installation work, but I
> would love to be caught up.
>
> I hope this problem can be identified and fixed quickly... I'm afraid my
> programming skills are probably not up to the task of identifying and
> fixing the actual problem, but the sole difference between 12097 and
> 12098 seems to be in db/models/base.py, which makes sense. I'm copying
> the error log below... I'm sorry I can't be more helpful.
>
> Stephen
>
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod_wsgi
> (pid=12911): Exception occurred processing WSGI script
> '/home/infinite/webapps/infinite/infinite.wsgi'.
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] Traceback (most
> recent call last):
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/wsgi.py",
> line 230, in __call__
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> self.load_middleware()
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/base.py",
> line 40, in load_middleware
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod =
> import_module(mw_module)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/utils/importlib.py",
> line 35, in import_module
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> __import__(name)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/infinite/news/__init__.py", line 1, in
> 
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] from news.feeds
> import SiteNews
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/infinite/news/feeds.py", line 6, in
> 
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
> Site.objects.get_current()
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/contrib/sites/models.py",
> line 22, in get_current
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
> self.get(pk=sid)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/manager.py",
> line 132, in get
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
> self.get_query_set().get(*args, **kwargs)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
> line 334, in get
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] num =
> len(clone)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
> line 79, in __len__
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> self._result_cache = list(self.iterator())
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
> line 267, in iterator
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for row in
> compiler.results_iter():
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
> line 685, in results_iter
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for rows in
> self.execute_sql(MULTI):
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
> line 740, in execute_sql
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> cursor.execute(sql, params)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
> "/

[Django] #12732: Change in svn revision 12098 incompatible with postgres

2010-01-29 Thread Django
#12732: Change in svn revision 12098 incompatible with postgres
--+-
 Reporter:  stevedegrace  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:  postgresql|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Hello,

 I have found a problem in the svn trunk starting revision 12098 and later
 that causes an internal server error when using a PostgreSQL database
 backend. I will post the apache error log below. I found this after
 attempting an svn update.

 I just svn update -r 12097 for now to make my installation work, but I
 would love to be caught up.

 I hope this problem can be identified and fixed quickly... I'm afraid my
 programming skills are probably not up to the task of identifying and
 fixing the actual problem, but the sole difference between 12097 and 12098
 seems to be in db/models/base.py, which makes sense. I'm copying the error
 log below... I'm sorry I can't be more helpful.

 Stephen

 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod_wsgi
 (pid=12911): Exception occurred processing WSGI script
 '/home/infinite/webapps/infinite/infinite.wsgi'.
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] Traceback (most
 recent call last):
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/wsgi.py",
 line 230, in __call__
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
 self.load_middleware()
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/base.py",
 line 40, in load_middleware
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod =
 import_module(mw_module)
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/utils/importlib.py",
 line 35, in import_module
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] __import__(name)
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/infinite/news/__init__.py", line 1, in
 
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] from news.feeds
 import SiteNews
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/infinite/news/feeds.py", line 6, in
 
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
 Site.objects.get_current()
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/contrib/sites/models.py",
 line 22, in get_current
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
 self.get(pk=sid)
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/manager.py",
 line 132, in get
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
 self.get_query_set().get(*args, **kwargs)
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
 line 334, in get
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] num = len(clone)
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
 line 79, in __len__
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
 self._result_cache = list(self.iterator())
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
 line 267, in iterator
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for row in
 compiler.results_iter():
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
 line 685, in results_iter
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for rows in
 self.execute_sql(MULTI):
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
 line 740, in execute_sql
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
 cursor.execute(sql, params)
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 "/home/infinite/webapps/infinite/lib/python2.5/django/db/backends/util.py",
 line 19, in execute
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
 self.cursor.execute(sql, params)
 [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]   File
 
"/home/infinite/webapps/infinite/lib/python2.5/django/db/backends/postgresql/base.py",
 line 57, in execute
 [Fri Jan 29 21:09:04 2010] [error] [client 1

Re: [Django] #11284: Support i18n tags in templates with .js extension

2010-01-29 Thread Django
#11284: Support i18n tags in templates with .js extension
---+
  Reporter:  andrewbadr| Owner:  garcia_marc
Status:  new   | Milestone: 
 Component:  Internationalization  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

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



Re: [Django] #8778: validate_unique - different phrases have the same translations

2010-01-29 Thread Django
#8778: validate_unique - different phrases have the same translations
+---
  Reporter:  Petr Marhoun   | Owner:  
nobody
Status:  new| Milestone:

 Component:  Internationalization   |   Version:  
SVN   
Resolution: |  Keywords:

 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

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

 We missed the chance of fixing this for 1.1, for 1.2 this has been solved
 by the model validation branch merge that also interoduced some
 refactoring on the modelform validation code.

 I'm leaving this ticket open because I'm not sure if we can change/add
 translatable literals in the 1.1.x maintenance branch. If we can't then
 please close this ticket.

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

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



Re: [Django] #9988: It's not possible to correctly translate the months

2010-01-29 Thread Django
#9988: It's not possible to correctly translate the months
-+--
  Reporter:  stephaner   | Owner:  nobody   
Status:  new | Milestone:   
 Component:  Internationalization|   Version:  SVN  
Resolution:  |  Keywords:  french i18n-nofix
 Stage:  Design decision needed  | Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Comment (by ramiro):

 [12296] is a first step in this direction.

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

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



Re: [Django] #9212: German Umlauts and possible other foreign languages special characters

2010-01-29 Thread Django
#9212: German Umlauts and possible other foreign languages special characters
---+
  Reporter:  nekron| Owner:  nobody 
Status:  closed| Milestone: 
 Component:  Internationalization  |   Version:  1.1
Resolution:  fixed |  Keywords:  Umlauts
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

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

Comment:

 More than four months have passed since Karen asked the user that reopened
 this already properly fixed ticked about the reasons for reopening it and
 additional information about what seems a uncommon working enviromnent.
 I'm closing it with status ''fixed'' because there hasn't been any answer.

 Additionally the next stable relase will have GNU gettext >= 0.15 as a
 requirement.

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

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



Re: [Django] #9333: Add Django-localeurl to the translation/i18n documentation

2010-01-29 Thread Django
#9333: Add Django-localeurl to the translation/i18n documentation
---+
  Reporter:  vizualbod | Owner:  nobody
Status:  new   | Milestone:
 Component:  Internationalization  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 So far adding a links to third party `django-*` projects that don't
 provide  core functionality  hasn't been done in the Django documentation.
 Maybe Creating an appropiate wiki page would be enough?

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

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



Re: [Django] #12377: Make the makemessages command more open

2010-01-29 Thread Django
#12377: Make the makemessages command more open
-+--
  Reporter:  Renskers| Owner:  nobody   
Status:  new | Milestone:   
 Component:  Internationalization|   Version:   
Resolution:  |  Keywords:  makemessages i18n
 Stage:  Design decision needed  | Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Comment (by ramiro):

 ''Configuring the system so it can work with diferent tags'' would mean
 that there needs to be code in Django `makemesaages` command support code
 that catters for compatibility with one templating system (and after the
 first, possibly there will be request for more). This means Django
 developers would  need to maintain and test that code.

 This would be better served by a custom template tag and/or management
 command users that need to use templating library X can write by
 themselves to cover their very specific needs. The most popular of these
 systems even have their i18n system that can be used for this.  In the
 case of Jinja2 it is own Babel-based:
 http://jinja.pocoo.org/2/documentation/integration#babel-integration

 I'd suggest to close this ticket.

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

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



Re: [Django] #12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"

2010-01-29 Thread Django
#12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"
---+
  Reporter:  ramusus   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:  invalid   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ramusus):

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

Comment:

 You are absolutely right. I remove "import deseb" from settings.py and
 everything became works ok.

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

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



Re: [Django] #12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"

2010-01-29 Thread Django
#12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"
---+
  Reporter:  ramusus   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 OK, James clued me in that deseb is this: http://code.google.com/p/deseb/

 and indeed if I get that and follow its instructions to include `import
 deseb` at the top of `settings.py` I can recreate the error.

 deseb code monkeypatches `django.core.management.get_commands` so that's
 why the odd jump into deseb `__init__.py` in the traceback.

 I'm guessing what's happening is it's forcing an import of
 `django.db.models` too early, leading to a circular import problem, but I
 don't have any more time to look at this right now.

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

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



Re: [Django] #12726: double {{ media }} in admin templates...

2010-01-29 Thread Django
#12726: double {{ media }} in admin templates...
---+
  Reporter:  jedie | Owner:  jezdez
Status:  assigned  | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:  media 
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ebart...@gmail.com):

 Is there any reason not to split it up and have a call to {{media.css}}
 inside extrastyle block, and then {{media.js}} inside extrahead?

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

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



Re: [Django] #12667: changeset:12098 introduces choice validation bug at the model level

2010-01-29 Thread Django
#12667: changeset:12098 introduces choice validation bug at the model level
-+--
  Reporter:  anonymous   | Owner:  nobody
Status:  new | Milestone:  1.2   
 Component:  Core framework  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by thiggins):

 I tested the second patch with my code and believe the problem is solved.
 Thank you, Ramiro. - Thomas B. Higgins

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

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



Re: [Django] #12727: Error while doing syncdb with a GIS app

2010-01-29 Thread Django
#12727: Error while doing syncdb with a GIS app
-+--
  Reporter:  asgrewal| Owner:  nobody   
Status:  closed  | Milestone:  1.2  
 Component:  GIS |   Version:  1.2-alpha
Resolution:  invalid |  Keywords:   
 Stage:  Unreviewed  | Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by jbronn):

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

Comment:

 Due to the multi-db merge into trunk, in order to be backwards-compatible
 with 1.1.X settings, you'll need `'django.contrib.gis'` in your
 `INSTALLED_APPS` setting to ensure that the spatial database backend
 (`django.contrib.gis.db.backends.postgis`) is used instead of the regular
 backend (`django.db.backends.postgresql_psycopg2`).  You can also just
 upgrade your settings to use the new `DATABASES` syntax for configuring
 your database and explicitly specify the spatial backend:
 {{{
 #!python
 DATABASES = {
 'default': {
 'ENGINE': 'django.contrib.gis.db.backends.postgis',
 'NAME': 'geodjango',
 'USER': 'myuser',
 }
 }
 }}}

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

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



Re: [Django] #12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"

2010-01-29 Thread Django
#12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"
---+
  Reporter:  ramusus   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kmtracey):

 I cannot recreate this.  I'm a little confused by this bit of your
 traceback:

 {{{
   File
 "/home/ram/workspace/movister/web_site/django/core/management/__init__.py",
 line 252, in fetch_command
 app_name = get_commands()[subcommand]
   File "/home/ram/workspace/movister/web_site/deseb/__init__.py", line 96,
 in inner
 add_aka_support()
   File "/home/ram/workspace/movister/web_site/deseb/__init__.py", line 29,
 in add_aka_support
 import django.db.models
 }}}

 I do not understand why `get_commands()[subcommand]` is leaping off to an
 `__init__.py` file in (apparently?) one of your apps? I can see how code
 within `get_commands` might trigger load of your app's `__init__.py` but
 if that is what's happening I don't see why the line of code within
 `get_commands` isn't included in the stack trace.

 What is this 'deseb'? Does it have management commands? Maybe try deleting
 all .pyc files and running again?

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

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



[Django] #12731: Manager.raw() doesn't work with Multi-table inheritance

2010-01-29 Thread Django
#12731: Manager.raw() doesn't work with Multi-table inheritance
--+-
 Reporter:  eric.buck...@gmail.com|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:  raw   |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 As far as I can tell the Manager.raw() function does not work with a
 subclassed model.  I believe the raw function is looking for an 'id'
 field, and this does not exist in a subclassed table (instead of id, there
 is a _ptr_id field).

 example:


 {{{
 class Parent(models.Model)
  name = models.CharField(max_length=50)

 class Child(Parent)
  favorite_toy = models.CharField(max_length=50)

 # broken code
 Child.objects.raw("SELECT * FROM child")
 }}}

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

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



Re: [Django] #12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"

2010-01-29 Thread Django
#12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"
---+
  Reporter:  ramusus   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramusus):

 settings.py:
 {{{
 DATABASES = {
 'default': {
 'NAME': '...',
 'ENGINE': 'postgresql_psycopg2',
 'USER': '...',
 '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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"

2010-01-29 Thread Django
#12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"
---+
  Reporter:  ramusus   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramusus):

 This error appears always when I start dev server. The reason is bad
 second import

 {{{
 from django.db import utils
 }}}

 inside '''django.db.backends.postgresql_psycopg2''', I don't understand
 exactly why.

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

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



Re: [Django] #12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"

2010-01-29 Thread Django
#12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"
---+
  Reporter:  ramusus   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ramusus):

 * cc: ramu...@gmail.com (added)
  * needs_better_patch:  => 0
  * component:  Uncategorized => Database layer (models, ORM)
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Django] #12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"

2010-01-29 Thread Django
#12730: "cannot import name utils" in "django.db.backends.postgresql_psycopg2"
---+
 Reporter:  ramusus|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.1   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 After revision http://code.djangoproject.com/changeset/12352 I got this
 error:

 {{{
 Traceback (most recent call last):
   File "./manage.py", line 11, in 
 execute_manager(settings)
   File
 "/home/ram/workspace/movister/web_site/django/core/management/__init__.py",
 line 438, in execute_manager
 utility.execute()
   File
 "/home/ram/workspace/movister/web_site/django/core/management/__init__.py",
 line 379, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File
 "/home/ram/workspace/movister/web_site/django/core/management/__init__.py",
 line 252, in fetch_command
 app_name = get_commands()[subcommand]
   File "/home/ram/workspace/movister/web_site/deseb/__init__.py", line 96,
 in inner
 add_aka_support()
   File "/home/ram/workspace/movister/web_site/deseb/__init__.py", line 29,
 in add_aka_support
 import django.db.models
   File "/home/ram/workspace/movister/web_site/django/db/__init__.py", line
 75, in 
 connection = connections[DEFAULT_DB_ALIAS]
   File "/home/ram/workspace/movister/web_site/django/db/utils.py", line
 91, in __getitem__
 backend = load_backend(db['ENGINE'])
   File "/home/ram/workspace/movister/web_site/django/db/utils.py", line
 49, in load_backend
 raise ImproperlyConfigured(error_msg)
 django.core.exceptions.ImproperlyConfigured:
 'django.db.backends.postgresql_psycopg2' isn't an available database
 backend.
 Try using django.db.backends.XXX, where XXX is one of:
 'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2',
 'sqlite3'
 Error was: cannot import name utils
 }}}

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

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



[Changeset] r12358 - django/trunk/tests/modeltests/validation

2010-01-29 Thread noreply
Author: kmtracey
Date: 2010-01-29 12:38:28 -0600 (Fri, 29 Jan 2010)
New Revision: 12358

Modified:
   django/trunk/tests/modeltests/validation/models.py
Log:
Tweaked the validation test models to avoid tripping over the fact that Oracle 
doesn't like columns named 'number'.


Modified: django/trunk/tests/modeltests/validation/models.py
===
--- django/trunk/tests/modeltests/validation/models.py  2010-01-29 18:07:49 UTC 
(rev 12357)
+++ django/trunk/tests/modeltests/validation/models.py  2010-01-29 18:38:28 UTC 
(rev 12358)
@@ -11,7 +11,7 @@
 class ModelToValidate(models.Model):
 name = models.CharField(max_length=100)
 created = models.DateTimeField(default=datetime.now)
-number = models.IntegerField()
+number = models.IntegerField(db_column='number_val')
 parent = models.ForeignKey('self', blank=True, null=True, 
limit_choices_to={'number': 10})
 email = models.EmailField(blank=True)
 url = models.URLField(blank=True)
@@ -47,7 +47,7 @@
 
 class CustomMessagesModel(models.Model):
 other  = models.IntegerField(blank=True, null=True)
-number = models.IntegerField(
+number = models.IntegerField(db_column='number_val',
 error_messages={'null': 'NULL', 'not42': 'AAARGH', 'not_equal': '%s != 
me'},
 validators=[validate_answer_to_universe]
 )

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



[Changeset] r12357 - django/trunk/django/contrib/gis/tests/geoapp

2010-01-29 Thread noreply
Author: jbronn
Date: 2010-01-29 12:07:49 -0600 (Fri, 29 Jan 2010)
New Revision: 12357

Modified:
   django/trunk/django/contrib/gis/tests/geoapp/test_feeds.py
Log:
Fixed geographic feed test failure due to `Rss201rev2Feed` additions in r12338.


Modified: django/trunk/django/contrib/gis/tests/geoapp/test_feeds.py
===
--- django/trunk/django/contrib/gis/tests/geoapp/test_feeds.py  2010-01-29 
18:05:58 UTC (rev 12356)
+++ django/trunk/django/contrib/gis/tests/geoapp/test_feeds.py  2010-01-29 
18:07:49 UTC (rev 12357)
@@ -18,14 +18,15 @@
 # Uses `GEOSGeometry` in `item_geometry`
 doc1 = 
minidom.parseString(self.client.get('/geoapp/feeds/rss1/').content)
 # Uses a 2-tuple in `item_geometry`
-doc2 = 
minidom.parseString(self.client.get('/geoapp/feeds/rss2/').content) 
+doc2 = 
minidom.parseString(self.client.get('/geoapp/feeds/rss2/').content)
 feed1, feed2 = doc1.firstChild, doc2.firstChild
 
 # Making sure the box got added to the second GeoRSS feed.
-self.assertChildNodes(feed2.getElementsByTagName('channel')[0], 
-  ['title', 'link', 'description', 'language', 
'lastBuildDate', 'item', 'georss:box']
+self.assertChildNodes(feed2.getElementsByTagName('channel')[0],
+  ['title', 'link', 'description', 'language',
+   'lastBuildDate', 'item', 'georss:box', 
'atom:link']
   )
-
+
 # Incrementing through the feeds.
 for feed in [feed1, feed2]:
 # Ensuring the georss namespace was added to the  element.
@@ -33,7 +34,7 @@
 chan = feed.getElementsByTagName('channel')[0]
 items = chan.getElementsByTagName('item')
 self.assertEqual(len(items), City.objects.count())
-
+
 # Ensuring the georss element was added to each item in the feed.
 for item in items:
 self.assertChildNodes(item, ['title', 'link', 'description', 
'guid', 'georss:point'])
@@ -45,14 +46,14 @@
 feed1, feed2 = doc1.firstChild, doc2.firstChild
 
 # Making sure the box got added to the second GeoRSS feed.
-self.assertChildNodes(feed2, ['title', 'link', 'id', 'updated', 
'entry', 'georss:box'])
+self.assertChildNodes(feed2, ['title', 'link', 'id', 'updated', 
'entry', 'georss:box'])
 
 for feed in [feed1, feed2]:
 # Ensuring the georsss namespace was added to the  element.
 self.assertEqual(feed.getAttribute(u'xmlns:georss'),  
u'http://www.georss.org/georss')
 entries = feed.getElementsByTagName('entry')
 self.assertEqual(len(entries), City.objects.count())
-
+
 # Ensuring the georss element was added to each entry in the feed.
 for entry in entries:
 self.assertChildNodes(entry, ['title', 'link', 'id', 
'summary', 'georss:point'])

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



[Changeset] r12356 - in django/branches/releases/1.1.X: . django/db/models/sql

2010-01-29 Thread noreply
Author: kmtracey
Date: 2010-01-29 12:05:58 -0600 (Fri, 29 Jan 2010)
New Revision: 12356

Modified:
   django/branches/releases/1.1.X/
   django/branches/releases/1.1.X/django/db/models/sql/subqueries.py
Log:
[1.1.X] Really this time -- fixed #12721: Ensured objects with generic 
relations that use non-integer object ID fields can be deleted on PostgreSQL. 
Thanks much carljm for patch and Russ for review. 

Remainder of r12353 from trunk, previous attempt only picked up the new tests.




Property changes on: django/branches/releases/1.1.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12282,12284,12293,12346
   + 
/django/trunk:1-11500,11523,11527-11528,11531-11552,11554,11577,11579-11581,11588-11589,11591-11592,11596-11599,11601-11617,11619-11626,11628-11635,11637-11638,11643-11644,11648-11653,11656,11670,11678,11681,11684,11686,11688,11691,11693,11695,11697,11699,11701,11703,11705,11707,11714,11719,11732,11734,11740,11748,11751,11753,11756,11760,11800,11802,11808,11815,11817,11820,11822,11824,11826,11828,11831,11833,11835,11837,11839,11841,11844,11857,11864,11874,11876,11878,11885,11898,11901,11905,11909,11912,11914,11917,11938,11953,11961,11977,11979,11984,11986,11988,11990,11992,11994,11996,11998,12001,12004,12006,12011,12022,12024,12044-12045,12048,12054-12056,12059,12064,12066,12068,12070,12079,12086,12088,12104,12118,12132,12137-12138,12140-12141,12144,12150-12152,12220-12221,12229,12249,12253,12282,12284,12293,12346,12353

Modified: django/branches/releases/1.1.X/django/db/models/sql/subqueries.py
===
--- django/branches/releases/1.1.X/django/db/models/sql/subqueries.py   
2010-01-29 18:02:35 UTC (rev 12355)
+++ django/branches/releases/1.1.X/django/db/models/sql/subqueries.py   
2010-01-29 18:05:58 UTC (rev 12356)
@@ -58,15 +58,19 @@
 
 for f in cls._meta.many_to_many:
 w1 = self.where_class()
+db_prep_value = None
 if isinstance(f, generic.GenericRelation):
 from django.contrib.contenttypes.models import ContentType
-field = f.rel.to._meta.get_field(f.content_type_field_name)
-w1.add((Constraint(None, field.column, field), 'exact',
+ct_field = f.rel.to._meta.get_field(f.content_type_field_name)
+w1.add((Constraint(None, ct_field.column, ct_field), 'exact',
 ContentType.objects.get_for_model(cls).id), AND)
+id_field = f.rel.to._meta.get_field(f.object_id_field_name)
+db_prep_value = id_field.get_db_prep_value
 for offset in range(0, len(pk_list), GET_ITERATOR_CHUNK_SIZE):
 where = self.where_class()
 where.add((Constraint(None, f.m2m_column_name(), f), 'in',
-pk_list[offset : offset + GET_ITERATOR_CHUNK_SIZE]),
+map(db_prep_value,
+pk_list[offset : offset + 
GET_ITERATOR_CHUNK_SIZE])),
 AND)
 if w1:
 where.add(w1, AND)

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



[Changeset] r12355 - django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress

2010-01-29 Thread noreply
Author: kmtracey
Date: 2010-01-29 12:02:35 -0600 (Fri, 29 Jan 2010)
New Revision: 12355

Modified:
   
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/models.py
   
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/tests.py
Log:
[1.1.X] Fixed #12721: Ensured objects with generic relations that use 
non-integer object ID fields can be deleted on PostgreSQL. Thanks much carljm 
for patch and Russ for review. 

r12353 from trunk.


Modified: 
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/models.py
===
--- 
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/models.py
2010-01-29 17:58:55 UTC (rev 12354)
+++ 
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/models.py
2010-01-29 18:02:35 UTC (rev 12355)
@@ -40,3 +40,22 @@
 
 def __unicode__(self):
 return self.name
+
+class CharLink(models.Model):
+content_type = models.ForeignKey(ContentType)
+object_id = models.CharField(max_length=100)
+content_object = generic.GenericForeignKey()
+
+class TextLink(models.Model):
+content_type = models.ForeignKey(ContentType)
+object_id = models.TextField()
+content_object = generic.GenericForeignKey()
+
+class OddRelation1(models.Model):
+name = models.CharField(max_length=100)
+clinks = generic.GenericRelation(CharLink)
+
+class OddRelation2(models.Model):
+name = models.CharField(max_length=100)
+tlinks = generic.GenericRelation(TextLink)
+

Modified: 
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/tests.py
===
--- 
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/tests.py
 2010-01-29 17:58:55 UTC (rev 12354)
+++ 
django/branches/releases/1.1.X/tests/regressiontests/generic_relations_regress/tests.py
 2010-01-29 18:02:35 UTC (rev 12355)
@@ -1,6 +1,6 @@
 from django.test import TestCase
 from django.contrib.contenttypes.models import ContentType
-from models import Link, Place, Restaurant, Person, Address
+from models import Link, Place, Restaurant, Person, Address, CharLink, 
TextLink, OddRelation1, OddRelation2
 
 class GenericRelationTests(TestCase):
 
@@ -30,3 +30,13 @@
 qs = Person.objects.filter(addresses__zipcode='80433')
 self.assertEqual(1, qs.count())
 self.assertEqual('Chef', qs[0].name)
+
+def test_charlink_delete(self):
+oddrel = OddRelation1.objects.create(name='clink')
+cl = CharLink.objects.create(content_object=oddrel)
+oddrel.delete()
+
+def test_textlink_delete(self):
+oddrel = OddRelation2.objects.create(name='tlink')
+tl = TextLink.objects.create(content_object=oddrel)
+oddrel.delete()

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



[Changeset] r12354 - django/trunk/django/contrib/gis/db/backends/postgis

2010-01-29 Thread noreply
Author: jbronn
Date: 2010-01-29 11:58:55 -0600 (Fri, 29 Jan 2010)
New Revision: 12354

Modified:
   django/trunk/django/contrib/gis/db/backends/postgis/operations.py
Log:
Now look for `DatabaseError` during PostGIS backend initialization, as it is 
now raised instead of a `ProgrammingError` after changes in r12352.


Modified: django/trunk/django/contrib/gis/db/backends/postgis/operations.py
===
--- django/trunk/django/contrib/gis/db/backends/postgis/operations.py   
2010-01-29 17:58:22 UTC (rev 12353)
+++ django/trunk/django/contrib/gis/db/backends/postgis/operations.py   
2010-01-29 17:58:55 UTC (rev 12354)
@@ -8,7 +8,8 @@
 from django.contrib.gis.geometry.backend import Geometry
 from django.contrib.gis.measure import Distance
 from django.core.exceptions import ImproperlyConfigured
-from django.db.backends.postgresql_psycopg2.base import Database, 
DatabaseOperations
+from django.db.backends.postgresql_psycopg2.base import DatabaseOperations
+from django.db.utils import DatabaseError
 
  Classes used in constructing PostGIS spatial SQL 
 class PostGISOperator(SpatialOperation):
@@ -99,7 +100,7 @@
 
 self.geom_func_prefix = prefix
 self.spatial_version = version
-except Database.ProgrammingError:
+except DatabaseError:
 raise ImproperlyConfigured('Cannot determine PostGIS version for 
database "%s". '
'GeoDjango requires at least PostGIS 
version 1.3. '
'Was the database created from a 
spatial 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Changeset] r12353 - in django/trunk: django/db/models/sql tests/regressiontests/generic_relations_regress

2010-01-29 Thread noreply
Author: kmtracey
Date: 2010-01-29 11:58:22 -0600 (Fri, 29 Jan 2010)
New Revision: 12353

Modified:
   django/trunk/django/db/models/sql/subqueries.py
   django/trunk/tests/regressiontests/generic_relations_regress/models.py
   django/trunk/tests/regressiontests/generic_relations_regress/tests.py
Log:
Fixed #12721: Ensured objects with generic relations that use non-integer 
object ID fields can be deleted on PostgreSQL. Thanks much carljm for patch and 
Russ for review.


Modified: django/trunk/django/db/models/sql/subqueries.py
===
--- django/trunk/django/db/models/sql/subqueries.py 2010-01-29 15:45:55 UTC 
(rev 12352)
+++ django/trunk/django/db/models/sql/subqueries.py 2010-01-29 17:58:22 UTC 
(rev 12353)
@@ -50,15 +50,19 @@
 
 for f in cls._meta.many_to_many:
 w1 = self.where_class()
+db_prep_value = None
 if isinstance(f, generic.GenericRelation):
 from django.contrib.contenttypes.models import ContentType
-field = f.rel.to._meta.get_field(f.content_type_field_name)
-w1.add((Constraint(None, field.column, field), 'exact',
+ct_field = f.rel.to._meta.get_field(f.content_type_field_name)
+w1.add((Constraint(None, ct_field.column, ct_field), 'exact',
 ContentType.objects.get_for_model(cls).id), AND)
+id_field = f.rel.to._meta.get_field(f.object_id_field_name)
+db_prep_value = id_field.get_db_prep_value
 for offset in range(0, len(pk_list), GET_ITERATOR_CHUNK_SIZE):
 where = self.where_class()
 where.add((Constraint(None, f.m2m_column_name(), f), 'in',
-pk_list[offset : offset + GET_ITERATOR_CHUNK_SIZE]),
+map(db_prep_value,
+pk_list[offset : offset + 
GET_ITERATOR_CHUNK_SIZE])),
 AND)
 if w1:
 where.add(w1, AND)

Modified: django/trunk/tests/regressiontests/generic_relations_regress/models.py
===
--- django/trunk/tests/regressiontests/generic_relations_regress/models.py  
2010-01-29 15:45:55 UTC (rev 12352)
+++ django/trunk/tests/regressiontests/generic_relations_regress/models.py  
2010-01-29 17:58:22 UTC (rev 12353)
@@ -40,3 +40,22 @@
 
 def __unicode__(self):
 return self.name
+
+class CharLink(models.Model):
+content_type = models.ForeignKey(ContentType)
+object_id = models.CharField(max_length=100)
+content_object = generic.GenericForeignKey()
+
+class TextLink(models.Model):
+content_type = models.ForeignKey(ContentType)
+object_id = models.TextField()
+content_object = generic.GenericForeignKey()
+
+class OddRelation1(models.Model):
+name = models.CharField(max_length=100)
+clinks = generic.GenericRelation(CharLink)
+
+class OddRelation2(models.Model):
+name = models.CharField(max_length=100)
+tlinks = generic.GenericRelation(TextLink)
+

Modified: django/trunk/tests/regressiontests/generic_relations_regress/tests.py
===
--- django/trunk/tests/regressiontests/generic_relations_regress/tests.py   
2010-01-29 15:45:55 UTC (rev 12352)
+++ django/trunk/tests/regressiontests/generic_relations_regress/tests.py   
2010-01-29 17:58:22 UTC (rev 12353)
@@ -1,6 +1,6 @@
 from django.test import TestCase
 from django.contrib.contenttypes.models import ContentType
-from models import Link, Place, Restaurant, Person, Address
+from models import Link, Place, Restaurant, Person, Address, CharLink, 
TextLink, OddRelation1, OddRelation2
 
 class GenericRelationTests(TestCase):
 
@@ -30,3 +30,13 @@
 qs = Person.objects.filter(addresses__zipcode='80433')
 self.assertEqual(1, qs.count())
 self.assertEqual('Chef', qs[0].name)
+
+def test_charlink_delete(self):
+oddrel = OddRelation1.objects.create(name='clink')
+cl = CharLink.objects.create(content_object=oddrel)
+oddrel.delete()
+
+def test_textlink_delete(self):
+oddrel = OddRelation2.objects.create(name='tlink')
+tl = TextLink.objects.create(content_object=oddrel)
+oddrel.delete()

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



Re: [Django] #6191: Admin delete view doesn't show all items in some circumstances

2010-01-29 Thread Django
#6191: Admin delete view doesn't show all items in some circumstances
---+
  Reporter:  nicklane  | Owner:  carljm
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by carljm):

 Oh, now I see #12025: apparently the previous code didn't notify on
 GenericRelations either. Seems like it wouldn't hurt to knock that off at
 the same time, but maybe it's better to keep the issues separate.

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

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



Re: [Django] #12728: loadata/flush issues given GenericRelation, model inheritance and postgres

2010-01-29 Thread Django
#12728: loadata/flush issues given GenericRelation, model inheritance and 
postgres
---+
  Reporter:  pragmar   | Owner:  nobody 
   
Status:  new   | Milestone: 
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:|  Keywords:  
psycopg2.ProgrammingError, GenericRelation
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * summary:  loadata/flush issues using GenericRelation, abstract base
  class and postgres database => loadata/flush
  issues given GenericRelation, model inheritance
  and postgres

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

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



Re: [Django] #12025: Show generic relation on deleted objects

2010-01-29 Thread Django
#12025: Show generic relation on deleted objects
---+
  Reporter:  rui.coe...@gmail.com  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Uncategorized |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Comment (by carljm):

 Replying to [comment:2 Alex]:
 > This patch a) still has the mutable default value, and b) includes
 django.contrib.contenttypes in the ORM, we want to work to reducing that
 dependency, not increasing it.

 Unfortunately the ORM already depends on contrib.contenttypes in at least
 one other place:
 source:/django/trunk/django/db/models/sql/subqueries.py#29 - agree that we
 should be looking to get rid of that, not add more dependency.

 This patch would be eclipsed by the patch on #6191, which replaces the
 admin's related-objects-finding with delegation to the actual ORM code.
 I'm looking at what it would take to fix this as part of #6191.

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

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



Re: [Django] #6191: Admin delete view doesn't show all items in some circumstances

2010-01-29 Thread Django
#6191: Admin delete view doesn't show all items in some circumstances
---+
  Reporter:  nicklane  | Owner:  carljm
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by carljm):

  * keywords:  nfa-someday =>

Comment:

 Just realized from working on #12721 that this patch would not notify the
 deletion of related objects via a GenericRelation. Those objects are not
 collected as part of _collect_sub_objects, they are deleted far deeper in
 the internals, in DeleteQuery.delete_batch_related. I'm not sure why that
 needs to be the case (seems a bit ugly), but haven't looked at it closely;
 in any case I guess changing that is too invasive for the scope of this
 bug? So given that, the only reasonable solution I can see is to duplicate
 the generic-related-finding code from delete_batch_related in the admin
 routine. Reintroduces a bit of duplication, but only for GenericRelation,
 so much less than was there previously.

 I'll work on that unless anyone pops up with a better 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11293: Filters on aggregates lose connector

2010-01-29 Thread Django
#11293: Filters on aggregates lose connector
+---
  Reporter:  dja...@colincross.com  | Owner:
 
Status:  new| Milestone:
 
 Component:  ORM aggregation|   Version:  SVN   
 
Resolution: |  Keywords:  having, where, 
aggregate, connector
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  1  |  
+---
Comment (by anentropic):

 with formatting:

 {{{
 qs = Book.objects.values('publisher').annotate(pub_books=Count('id'))
 qs = qs.filter(pub_books__gt=10) | qs.filter(pages=1)
 }}}

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

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



Re: [Django] #12728: loadata/flush issues using GenericRelation, abstract base class and postgres database

2010-01-29 Thread Django
#12728: loadata/flush issues using GenericRelation, abstract base class and
postgres database
---+
  Reporter:  pragmar   | Owner:  nobody 
   
Status:  new   | Milestone: 
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:|  Keywords:  
psycopg2.ProgrammingError, GenericRelation
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by pragmar):

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

Comment:

 So I don't want to pretend I have a solution, obviously sniffing for a
 class name feels very wrong - but I throw this out there as a possible
 assist to someone more familiar than myself with the database backend -
 just trying to give due diligence to the ticket and point to where I think
 it's failing. I'm able to work around the issue with a few tweaks. Given
 current trunk (r12344):

 django/db/backends/postgresql/operations.py (line 125)
 {{{if not f.rel.through:}}}
 - becomes -
 {{{if not f.rel.through and not f.__class__.__name__ ==
 'GenericRelation':}}}

 additionally to fix flush, if I manually add the postgres sequence, it
 seems to work - perhaps the above modification omitted its creation?

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

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



Re: [Django] #12729: contrib.auth on seperate db in multi-db setup fails

2010-01-29 Thread Django
#12729: contrib.auth on seperate db in multi-db setup fails
-+--
  Reporter:  dhageman| Owner:  nobody  
Status:  new | Milestone:  1.2 
 Component:  Authentication  |   Version:  SVN 
Resolution:  |  Keywords:  multi-db
 Stage:  Accepted| Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by jacob):

  * stage:  Unreviewed => Accepted
  * milestone:  => 1.2

Comment:

 We're probably not going to tackle the "django_* tables on a different db
 from the auth_* tables" this time around. That requires figuring out
 foreign keys across databases, which probably is never going to work
 (think constraints), and hence is the topic of a *much* bigger problem.

 For the purposes of this ticket, let's just tackle the fact that the
 `ModelBackend` hardcodes the default connection.

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

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



Re: [Django] #12729: contrib.auth on seperate db in multi-db setup fails

2010-01-29 Thread Django
#12729: contrib.auth on seperate db in multi-db setup fails
-+--
  Reporter:  dhageman| Owner:  nobody  
Status:  new | Milestone:  
 Component:  Authentication  |   Version:  SVN 
Resolution:  |  Keywords:  multi-db
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by dhageman):

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

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

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



[Django] #12729: contrib.auth on seperate db in multi-db setup fails

2010-01-29 Thread Django
#12729: contrib.auth on seperate db in multi-db setup fails
+---
 Reporter:  dhageman|   Owner:  nobody
   Status:  new |   Milestone:
Component:  Authentication  | Version:  1.1   
 Keywords:  multi-db|   Stage:  Unreviewed
Has_patch:  0   |  
+---
 contrib.auth will break if you put it onto a database by itself.  There is
 a hard coded SQL statement in contrib.auth.backends at line 27
 (get_group_permissions) that joins the auth tables with
 django_content_type.  This will obviously cause an error if the django_
 tables are not in the same database with the auth_ tables.

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

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



Re: [Django] #11293: Filters on aggregates lose connector

2010-01-29 Thread Django
#11293: Filters on aggregates lose connector
+---
  Reporter:  dja...@colincross.com  | Owner:
 
Status:  new| Milestone:
 
 Component:  ORM aggregation|   Version:  SVN   
 
Resolution: |  Keywords:  having, where, 
aggregate, connector
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  1  |  
+---
Changes (by anentropic):

 * cc: e...@anentropic.com (added)

Comment:

 I've just run into this bug... unfortunately I need the second case fixed
 :(

 End result in both cases is you get results of an AND query where you've
 specified an OR

 I tried doing the alternate form:
 qs = Book.objects.values('publisher').annotate(pub_books=Count('id'))
 qs = qs.filter(pub_books__gt=10) | qs.filter(pages=1)

 But this is (differently) broken too.

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

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



[Changeset] r12352 - in django/trunk/django/db: . backends/mysql backends/oracle backends/postgresql backends/postgresql_psycopg2 backends/sqlite3

2010-01-29 Thread noreply
Author: russellm
Date: 2010-01-29 09:45:55 -0600 (Fri, 29 Jan 2010)
New Revision: 12352

Modified:
   django/trunk/django/db/__init__.py
   django/trunk/django/db/backends/mysql/base.py
   django/trunk/django/db/backends/oracle/base.py
   django/trunk/django/db/backends/postgresql/base.py
   django/trunk/django/db/backends/postgresql_psycopg2/base.py
   django/trunk/django/db/backends/sqlite3/base.py
   django/trunk/django/db/utils.py
Log:
Fixed #12702 -- Introduced a common implementation of DatabaseError and 
IntegrityError, so that database backends can (re)raise common error classes. 
Thanks for Waldemar Kornewald for the report.

Modified: django/trunk/django/db/__init__.py
===
--- django/trunk/django/db/__init__.py  2010-01-29 08:10:29 UTC (rev 12351)
+++ django/trunk/django/db/__init__.py  2010-01-29 15:45:55 UTC (rev 12352)
@@ -1,7 +1,8 @@
 from django.conf import settings
 from django.core import signals
 from django.core.exceptions import ImproperlyConfigured
-from django.db.utils import ConnectionHandler, ConnectionRouter, load_backend, 
DEFAULT_DB_ALIAS
+from django.db.utils import ConnectionHandler, ConnectionRouter, load_backend, 
DEFAULT_DB_ALIAS, \
+DatabaseError, IntegrityError
 from django.utils.functional import curry
 
 __all__ = ('backend', 'connection', 'connections', 'router', 'DatabaseError',
@@ -73,8 +74,6 @@
 # connections['default'] instead.
 connection = connections[DEFAULT_DB_ALIAS]
 backend = load_backend(connection.settings_dict['ENGINE'])
-DatabaseError = backend.DatabaseError
-IntegrityError = backend.IntegrityError
 
 # Register an event that closes the database connection
 # when a Django request is finished.

Modified: django/trunk/django/db/backends/mysql/base.py
===
--- django/trunk/django/db/backends/mysql/base.py   2010-01-29 08:10:29 UTC 
(rev 12351)
+++ django/trunk/django/db/backends/mysql/base.py   2010-01-29 15:45:55 UTC 
(rev 12352)
@@ -5,6 +5,7 @@
 """
 
 import re
+import sys
 
 try:
 import MySQLdb as Database
@@ -24,6 +25,7 @@
 from MySQLdb.converters import conversions
 from MySQLdb.constants import FIELD_TYPE, FLAG, CLIENT
 
+from django.db import utils
 from django.db.backends import *
 from django.db.backends.signals import connection_created
 from django.db.backends.mysql.client import DatabaseClient
@@ -82,22 +84,30 @@
 def execute(self, query, args=None):
 try:
 return self.cursor.execute(query, args)
+except Database.IntegrityError, e:
+raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), 
sys.exc_info()[2]
 except Database.OperationalError, e:
 # Map some error codes to IntegrityError, since they seem to be
 # misclassified and Django would prefer the more logical place.
 if e[0] in self.codes_for_integrityerror:
-raise Database.IntegrityError(tuple(e))
+raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), 
sys.exc_info()[2]
 raise
+except Database.DatabaseError, e:
+raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), 
sys.exc_info()[2]
 
 def executemany(self, query, args):
 try:
 return self.cursor.executemany(query, args)
+except Database.IntegrityError, e:
+raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), 
sys.exc_info()[2]
 except Database.OperationalError, e:
 # Map some error codes to IntegrityError, since they seem to be
 # misclassified and Django would prefer the more logical place.
 if e[0] in self.codes_for_integrityerror:
-raise Database.IntegrityError(tuple(e))
+raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), 
sys.exc_info()[2]
 raise
+except Database.DatabaseError, e:
+raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), 
sys.exc_info()[2]
 
 def __getattr__(self, attr):
 if attr in self.__dict__:

Modified: django/trunk/django/db/backends/oracle/base.py
===
--- django/trunk/django/db/backends/oracle/base.py  2010-01-29 08:10:29 UTC 
(rev 12351)
+++ django/trunk/django/db/backends/oracle/base.py  2010-01-29 15:45:55 UTC 
(rev 12352)
@@ -4,8 +4,10 @@
 Requires cx_Oracle: http://cx-oracle.sourceforge.net/
 """
 
+
+import datetime
 import os
-import datetime
+import sys
 import time
 try:
 from decimal import Decimal
@@ -24,6 +26,7 @@
 from django.core.exceptions import ImproperlyConfigured
 raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e)
 
+from django.db import utils
 from django.db.backends import *
 from django.db.backends.signals import connection_created
 from django.db.backends.oracle.client import

Re: [Django] #12726: double {{ media }} in admin templates...

2010-01-29 Thread Django
#12726: double {{ media }} in admin templates...
---+
  Reporter:  jedie | Owner:  jezdez
Status:  assigned  | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:  media 
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * owner:  nobody => jezdez
  * status:  new => assigned
  * stage:  Unreviewed => Accepted

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

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



[Django] #12728: loadata/flush issues using GenericRelation, abstract base class and postgres database

2010-01-29 Thread Django
#12728: loadata/flush issues using GenericRelation, abstract base class and
postgres database
+---
 Reporter:  pragmar |   Owner:  nobody  
  
   Status:  new |   Milestone:  
  
Component:  Database layer (models, ORM)| Version:  SVN 
  
 Keywords:  psycopg2.ProgrammingError, GenericRelation  |   Stage:  
Unreviewed
Has_patch:  0   |  
+---
 This issue was encountered while porting from mysql to postgres and
 resembles #11107, but under a entirely different set of circumstances.
 There appears to be something going wrong in the database operations with
 the combination of model inheritance and generic relations. I've boiled it
 down to the following example using postgres 8.4.2 and psycopg2.

 ''models.py''
 {{{
 from django.db import models
 from django.contrib.contenttypes.models import ContentType
 from django.contrib.contenttypes import generic

 class ExampleBase(models.Model):
 title = models.CharField('title', max_length=200, blank=True,
 null=True)
 created = models.DateTimeField('created', auto_now_add=True)
 modified = models.DateTimeField('modified', auto_now=True)
 def __unicode__(self):
 return u'%s' % self.title

 class Event(ExampleBase):
 start = models.DateTimeField('start time')
 end = models.DateTimeField('end')
 content_type = models.ForeignKey(ContentType)
 object_id = models.PositiveIntegerField()
 content_object = generic.GenericForeignKey("content_type",
 "object_id")

 class Location(ExampleBase):
 address = models.CharField('address', max_length=200)
 city = models.CharField('city', max_length=50)
 state = models.CharField('state', max_length=50)
 events = generic.GenericRelation(Event)

 }}}

 Given those models the error can be created by (1) running manage.py
 syncdb and (2) then running manage.py flush:


 {{{
 W:\development\web\example.com\example>manage.py flush
 Type 'yes' to continue, or 'no' to cancel: yes
 Error: Database example couldn't be flushed. Possible reasons:
   * The database isn't running or isn't configured correctly.
   * At least one of the expected database tables doesn't exist.
   * The SQL was invalid.
 Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL
 this command wasn't able to run.
 The full error: relation "exampleapp_event_id_seq" does not exist
 LINE 1: SELECT setval('"exampleapp_event_id_seq"', 1, false);
 }}}

 An identical error can be produced by via loaddata, here is a simple
 fixture for the above models, no generic relation objects need be created
 to trigger the error so long as the relationship is defined in the models:

 {{{
 [
   {
 "pk": 1,
 "model": "exampleapp.examplebase",
 "fields": {
   "created": "2010-01-29 08:27:10",
   "modified": "2010-01-29 08:27:10",
   "title": "test"
 }
   },
   {
 "pk": 1,
 "model": "exampleapp.location",
 "fields": {
   "city": "Boston",
   "state": "MA",
   "address": "1 Main St."
 }
   }
 ]
 }}}

 {{{
 W:\development\web\example.com\example>manage.py loaddata
 test_fixture.json
 Installing json fixture 'test_fixture' from absolute path.
 Traceback (most recent call last):
   File "W:\development\web\example.com\example\manage.py", line 21, in
 
 execute_manager(settings)
   File "C:\Python26\lib\site-packages\django\core\management\__init__.py",
 line 438, in execute_manager
 utility.execute()
   File "C:\Python26\lib\site-packages\django\core\management\__init__.py",
 line 379, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "C:\Python26\lib\site-packages\django\core\management\base.py",
 line 195, in run_from_argv
 self.execute(*args, **options.__dict__)
   File "C:\Python26\lib\site-packages\django\core\management\base.py",
 line 222, in execute
 output = self.handle(*args, **options)
   File "C:\Python26\lib\site-
 packages\django\core\management\commands\loaddata.py", line 212, in handle
 cursor.execute(line)
 psycopg2.ProgrammingError: column "id" does not exist
 LINE 1: ... setval('"exampleapp_event_id_seq"', coalesce(max("id"), 1),...
 }}}

 I threw a print statement on the output of
 db.backends.postgresql.operations to see the full line (below):
 {{{
 ['SELECT setval(\'"exampleapp_examplebase_id_seq"\', coalesce(max("id"),
 1), max("id") IS NOT null) FROM "exampleapp_examplebase";',
  'SELECT setval(\'"exampleapp_event_id_seq"\', coalesce(max("id"), 1),
 max("id") IS NOT null) FROM "exampleapp_event";']
 }}}
 Let me know if there's more information I can provide. The same model
 hierarchy was working under mysql, and if I change the genericrelation to
 inherit from models.Model it works - so the issue requ

Re: [Django] #11226: Name clashes in ManyToMany

2010-01-29 Thread Django
#11226: Name clashes in ManyToMany
---+
  Reporter:  pkoch | Owner:  nobody 
  
Status:  new   | Milestone:  1.2
  
 Component:  Database layer (models, ORM)  |   Version:  SVN
  
Resolution:|  Keywords:  ManyToMany 
name clash
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * milestone:  => 1.2

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

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



Re: [Django] #12722: Models having selects with optgroups per Ticket #4412 no longer validate reliably

2010-01-29 Thread Django
#12722: Models having selects with optgroups per Ticket #4412 no longer validate
reliably
+---
  Reporter:  thiggins   | Owner:  nobody
  
Status:  closed | Milestone:  1.2   
  
 Component:  Uncategorized  |   Version:  1.2-alpha 
  
Resolution:  duplicate  |  Keywords:  model-validation, 
choices, optgroups
 Stage:  Unreviewed | Has_patch:  0 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

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

Comment:

 Duplicate of #12667.

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

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



Re: [Django] #12726: double {{ media }} in admin templates...

2010-01-29 Thread Django
#12726: double {{ media }} in admin templates...
---+
  Reporter:  jedie | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:  media 
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jedie):

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

Comment:

 I also notice, that change_list.html doesn't has a {{ block.super }} in {%
 block extrahead %}...

 I added change_list_patch.txt to change {{ medie }} with {{ block.super }}

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

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



[Django] #12727: Error while doing syncdb with a GIS app

2010-01-29 Thread Django
#12727: Error while doing syncdb with a GIS app
--+-
 Reporter:  asgrewal  |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  GIS   | Version:  1.2-alpha 
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 The following error occurs while doing syncdb when an app contains GIS
 information, in my case a simple model with a PointField member. I am
 using Postgresql with postgis. The same code works fine for django 1.1

 {{{
 (django-dev-sandbox)aj...@virtual-ubuntu:~/projects/enroute2$ python
 manage.py syncdb
 Traceback (most recent call last):
   File "manage.py", line 11, in 
 execute_manager(settings)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/core/management/__init__.py", line 438, in execute_manager
 utility.execute()
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/core/management/__init__.py", line 379, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/core/management/base.py", line 195, in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/core/management/base.py", line 222, in execute
 output = self.handle(*args, **options)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/core/management/base.py", line 351, in handle
 return self.handle_noargs(**options)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/core/management/commands/syncdb.py", line 78, in
 handle_noargs
 sql, references = connection.creation.sql_create_model(model,
 self.style, seen_models)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/db/backends/creation.py", line 50, in sql_create_model
 col_type = f.db_type(connection=self.connection)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/db/models/fields/subclassing.py", line 28, in inner
 return func(*args, **kwargs)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/db/models/fields/subclassing.py", line 28, in inner
 return func(*args, **kwargs)
   File "/home/ajeet/django-dev-sandbox/lib/python2.6/site-
 packages/django/contrib/gis/db/models/fields.py", line 200, in db_type
 return connection.ops.geo_db_type(self)
 AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'
 }}}

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

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



[Django] #12726: double {{ media }} in admin templates...

2010-01-29 Thread Django
#12726: double {{ media }} in admin templates...
--+-
 Reporter:  jedie |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:  media |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 I have double media files in some admin panel views. See:
 http://paste.pocoo.org/show/171364/

 There is two times {{ media }} in the file
 contrib/admin/templates/admin/change_list.html since
 [http://code.djangoproject.com/changeset/12298#file6 changeset 12298]
 One in {% block extrastyle %} and one in {% block extrahead %}

 This is a bug, isn't it?

 Discuss: http://groups.google.com/group/django-
 developers/browse_thread/thread/a74b50c5419b3251

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

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



Re: [Django] #12012: Integration with the Python standard library logging module

2010-01-29 Thread Django
#12012: Integration with the Python standard library logging module
-+--
  Reporter:  simon   | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  1   |   Needs_tests:  1 
Needs_better_patch:  1   |  
-+--
Changes (by anonymous):

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

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

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



[Changeset] r12351 - in django/trunk: django/contrib/auth/management/commands docs/topics

2010-01-29 Thread noreply
Author: russellm
Date: 2010-01-29 02:10:29 -0600 (Fri, 29 Jan 2010)
New Revision: 12351

Added:
   django/trunk/django/contrib/auth/management/commands/changepassword.py
Modified:
   django/trunk/docs/topics/auth.txt
Log:
Fixed #6273 -- Added a 'changepassword' management command. Thanks to Ludvig 
Ericson and Justin Lilly for their work on this patch.

Added: django/trunk/django/contrib/auth/management/commands/changepassword.py
===
--- django/trunk/django/contrib/auth/management/commands/changepassword.py  
(rev 0)
+++ django/trunk/django/contrib/auth/management/commands/changepassword.py  
2010-01-29 08:10:29 UTC (rev 12351)
@@ -0,0 +1,48 @@
+from django.core.management.base import BaseCommand, CommandError
+from django.contrib.auth.models import User
+import getpass
+
+class Command(BaseCommand):
+help = "Change a user's password for django.contrib.auth."
+
+requires_model_validation = False
+
+def _get_pass(self, prompt="Password: "):
+p = getpass.getpass(prompt=prompt)
+if not p:
+raise CommandError("aborted")
+return p
+
+def handle(self, *args, **options):
+if len(args) > 1:
+raise CommandError("need exactly one or zero arguments for 
username")
+
+if args:
+username, = args
+else:
+username = getpass.getuser()
+
+try:
+u = User.objects.get(username=username)
+except User.DoesNotExist:
+raise CommandError("user '%s' does not exist" % username)
+
+print "Changing password for user '%s'" % u.username
+
+MAX_TRIES = 3
+count = 0
+p1, p2 = 1, 2  # To make them initially mismatch.
+while p1 != p2 and count < MAX_TRIES:
+p1 = self._get_pass()
+p2 = self._get_pass("Password (again): ")
+if p1 != p2:
+print "Passwords do not match. Please try again."
+count = count + 1
+
+if count == MAX_TRIES:
+raise CommandError("Aborting password change for user '%s' after 
%s attempts" % (username, count))
+
+u.set_password(p1)
+u.save()
+
+return "Password changed successfully for user '%s'" % u.username

Modified: django/trunk/docs/topics/auth.txt
===
--- django/trunk/docs/topics/auth.txt   2010-01-29 02:46:07 UTC (rev 12350)
+++ django/trunk/docs/topics/auth.txt   2010-01-29 08:10:29 UTC (rev 12351)
@@ -25,7 +25,7 @@
 
 .. deprecated:: 1.2
The Messages component of the auth system will be removed in Django 1.4.
- 
+
 Installation
 
 
@@ -243,7 +243,7 @@
 .. method:: models.User.has_perms(perm_list, obj=None)
 
 Returns ``True`` if the user has each of the specified permissions,
-where each perm is in the format 
+where each perm is in the format
 ``"."``. If the user is inactive,
 this method will always return ``False``.
 
@@ -351,8 +351,19 @@
 Changing passwords
 ~~
 
-Change a password with :meth:`~django.contrib.auth.models.User.set_password()`:
+.. versionadded:: 1.2
+   The ``manage.py change_password`` command was added.
 
+:djadmin:`manage.py change_password ` offers a method of
+changing a User's password from the command line. It prompts you to
+change the password of a given user which you must enter twice. If
+they both match, the new password will be changed immediately. If you
+do not supply a user, the command will attempt to change the password
+whose username matches the current user.
+
+You can also change a password programmatically, using
+:meth:`~django.contrib.auth.models.User.set_password()`:
+
 .. code-block:: python
 
 >>> from django.contrib.auth.models import User

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