Re: [Django] #11931: ForeignKey documentation mentions non-existent method

2009-09-23 Thread Django
#11931: ForeignKey documentation mentions non-existent method
+---
  Reporter:  danielr| Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution:  fixed  |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by Alex):

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

Comment:

 Fixed in r11591, backported in r11592.

-- 
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] r11593 - django/trunk/django/views/decorators

2009-09-23 Thread noreply

Author: lukeplant
Date: 2009-09-23 18:47:53 -0500 (Wed, 23 Sep 2009)
New Revision: 11593

Modified:
   django/trunk/django/views/decorators/cache.py
Log:
Improved error messages when people use cache_page in undocumented and now 
unsupported ways.


Modified: django/trunk/django/views/decorators/cache.py
===
--- django/trunk/django/views/decorators/cache.py   2009-09-23 23:41:35 UTC 
(rev 11592)
+++ django/trunk/django/views/decorators/cache.py   2009-09-23 23:47:53 UTC 
(rev 11593)
@@ -20,15 +20,20 @@
 from django.utils.cache import patch_cache_control, add_never_cache_headers
 from django.middleware.cache import CacheMiddleware
 
-def cache_page(*args, **kwargs):
+def cache_page(*args):
 # We need backwards compatibility with code which spells it this way:
 #   def my_view(): pass
 #   my_view = cache_page(123, my_view)
 # and this way:
 #   my_view = cache_page(123)(my_view)
+
+# We also add some asserts to give better error messages in case people are
+# using other ways to call cache_page that no longer work.
 timeout = args[0]
 if len(args) > 1:
+assert len(args) == 2, "cache_page accepts at most 2 arguments"
 fn = args[1]
+assert callable(fn), "cache_page is expecting 2nd argument to be a 
callable"
 return 
decorator_from_middleware_with_args(CacheMiddleware)(timeout)(fn)
 else:
 return decorator_from_middleware_with_args(CacheMiddleware)(timeout)


--~--~-~--~~~---~--~~
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] #11938: `to_field` does not function as expected.

2009-09-23 Thread Django
#11938: `to_field` does not function as expected.
--+-
 Reporter:  dcramer   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:  to_field  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 In lookups involving a `ForeignKey`, or a `ManyToMany` intermediary table
 using a `to_field` they fail due to looking for the primary key, rather
 than the field specified by `to_field`.

 For example:

 {{{
 user = models.ForeignKey(User, to_field="username")
 # Fails
 SimpleModel.objects.get(user=self.user)
 }}}

-- 
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] r11592 - in django/branches/releases/1.1.X/docs: ref/models topics/db

2009-09-23 Thread noreply

Author: ubernostrum
Date: 2009-09-23 18:41:35 -0500 (Wed, 23 Sep 2009)
New Revision: 11592

Modified:
   django/branches/releases/1.1.X/docs/ref/models/fields.txt
   django/branches/releases/1.1.X/docs/topics/db/queries.txt
Log:
[1.1.X] Fixed #11931: Removed mention of nonexistent get_sql() method for 
arguments to limit_choices_to. Since the correct reference involves 
undocumented ORM internals, this simply removes the reference entirely in favor 
of publicly-documented use of Q objects. Backport of [11591] from trunk.

Modified: django/branches/releases/1.1.X/docs/ref/models/fields.txt
===
--- django/branches/releases/1.1.X/docs/ref/models/fields.txt   2009-09-23 
23:40:12 UTC (rev 11591)
+++ django/branches/releases/1.1.X/docs/ref/models/fields.txt   2009-09-23 
23:41:35 UTC (rev 11592)
@@ -844,7 +844,7 @@
 current date/time to be chosen.
 
 Instead of a dictionary this can also be a :class:`~django.db.models.Q`
-object (an object with a :meth:`get_sql` method) for more complex queries.
+object for more :ref:`complex queries `.
 
 ``limit_choices_to`` has no effect on the inline FormSets that are created
 to display related objects in the admin.

Modified: django/branches/releases/1.1.X/docs/topics/db/queries.txt
===
--- django/branches/releases/1.1.X/docs/topics/db/queries.txt   2009-09-23 
23:40:12 UTC (rev 11591)
+++ django/branches/releases/1.1.X/docs/topics/db/queries.txt   2009-09-23 
23:41:35 UTC (rev 11592)
@@ -622,6 +622,8 @@
 >>> print [p.headline for p in queryset] # Evaluate the query set.
 >>> print [p.pub_date for p in queryset] # Re-use the cache from the 
evaluation.
 
+.. _complex-lookups-with-q:
+
 Complex lookups with Q objects
 ==
 


--~--~-~--~~~---~--~~
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] r11591 - in django/trunk/docs: ref/models topics/db

2009-09-23 Thread noreply

Author: ubernostrum
Date: 2009-09-23 18:40:12 -0500 (Wed, 23 Sep 2009)
New Revision: 11591

Modified:
   django/trunk/docs/ref/models/fields.txt
   django/trunk/docs/topics/db/queries.txt
Log:
Fixed #11931: Removed mention of nonexistent get_sql() method for arguments to 
limit_choices_to. Since the correct reference involves undocumented ORM 
internals, this simply removes the reference entirely in favor of 
publicly-documented use of Q objects.

Modified: django/trunk/docs/ref/models/fields.txt
===
--- django/trunk/docs/ref/models/fields.txt 2009-09-22 21:21:51 UTC (rev 
11590)
+++ django/trunk/docs/ref/models/fields.txt 2009-09-23 23:40:12 UTC (rev 
11591)
@@ -844,7 +844,7 @@
 current date/time to be chosen.
 
 Instead of a dictionary this can also be a :class:`~django.db.models.Q`
-object (an object with a :meth:`get_sql` method) for more complex queries.
+object for more :ref:`complex queries `.
 
 ``limit_choices_to`` has no effect on the inline FormSets that are created
 to display related objects in the admin.

Modified: django/trunk/docs/topics/db/queries.txt
===
--- django/trunk/docs/topics/db/queries.txt 2009-09-22 21:21:51 UTC (rev 
11590)
+++ django/trunk/docs/topics/db/queries.txt 2009-09-23 23:40:12 UTC (rev 
11591)
@@ -622,6 +622,8 @@
 >>> print [p.headline for p in queryset] # Evaluate the query set.
 >>> print [p.pub_date for p in queryset] # Re-use the cache from the 
evaluation.
 
+.. _complex-lookups-with-q:
+
 Complex lookups with Q objects
 ==
 


--~--~-~--~~~---~--~~
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] #11928: EmailMessage.to accepts tuple or list, but EmailMessage.recipients() fails if it's a tuple

2009-09-23 Thread Django
#11928: EmailMessage.to accepts tuple or list, but EmailMessage.recipients() 
fails
if it's a tuple
---+
  Reporter:  bendavis78| Owner:  bendavis78   
Status:  assigned  | Milestone:   
 Component:  django.core.mail  |   Version:  SVN  
Resolution:|  Keywords:  mail to tuple
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  1
Needs_better_patch:  0 |  
---+
Changes (by SmileyChris):

  * needs_tests:  0 => 1
  * stage:  Unreviewed => Accepted

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



Re: [Django] #11698: Add Django Debug Toolbar to contrib

2009-09-23 Thread Django
#11698: Add Django Debug Toolbar to contrib
---+
  Reporter:  russellm  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Contrib apps  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by acdha):

 * cc: ch...@improbable.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] #11937: Django

2009-09-23 Thread Django
#11937: Django
+---
  Reporter:  hackett| Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.1   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by kmtracey):

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

Comment:

 Django's trac is for reporting bugs in Django, not asking questions like
 does this provider support Django.  For support type questions please ask
 on the IRC channel or the django-users mailing list.

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



[Django] #11937: Django

2009-09-23 Thread Django
#11937: Django
---+
 Reporter:  hackett|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.1   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 is  http://www.hosterware.com approved for your applications
 just that they have a sale on, bought a unlimited linux hosting from them

 thnakyou in anticipation

-- 
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] #11936: Proxy models' names are too long for django.contrib.auth which causes weird test failures

2009-09-23 Thread Django
#11936: Proxy models' names are too long for django.contrib.auth which causes 
weird
test failures
---+
  Reporter:  ryszard   | Owner:  nobody 

Status:  new   | Milestone: 

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

Resolution:|  Keywords:  test, 
only, deferred fields
 Stage:  Unreviewed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

 Reposting previously posted non-formatted traceback.  PLEASE use preview
 and make sure things are readable before pressing "submit changes."

 This had been posted by ryszard:

 The error that results from runnign the tests with the attached models
  (note that test_bbb fails, even though it contains only a `pass`
  statement!).

 {{{
  (ryszard hacksaw):~/setjam/setjam% ./manage.py test pathology
  Creating test database...
  Creating table pathology_pathologicallylongname
  Creating table auth_permission
  Creating table auth_group
  Creating table auth_user
  Creating table auth_message
  Creating table django_content_type
  Creating table django_session
  Creating table django_site
  Creating table django_admin_log
  Creating table django_flatpage
  Installing index for auth.Permission model
  Installing index for auth.Message model
  Installing index for admin.LogEntry model
  Installing index for flatpages.FlatPage model

  .E

   ==
  ERROR: test_bbb (pathology.tests.SimpleTest)
  --
  Traceback (most recent call last):
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
  242, in __call__
 self._pre_setup()
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
  217, in _pre_setup
 self._fixture_setup()
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
  440, in _fixture_setup
 return super(TestCase, self)._fixture_setup()
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
  222, in _fixture_setup
 call_command('flush', verbosity=0, interactive=False)
   File "/home/ryszard/setjam/site-
  python/django/core/management/__init__.py", line 166, in call_command
 return klass.execute(*args, **defaults)
   File "/home/ryszard/setjam/site-python/django/core/management/base.py",
  line 222, in execute
 output = self.handle(*args, **options)
   File "/home/ryszard/setjam/site-python/django/core/management/base.py",
  line 351, in handle
 return self.handle_noargs(**options)
   File "/home/ryszard/setjam/site-
  python/django/core/management/commands/flush.py", line 61, in
  handle_noargs
 emit_post_sync_signal(models.get_models(), verbosity, interactive)
   File "/home/ryszard/setjam/site-python/django/core/management/sql.py",
  line 205, in emit_post_sync_signal
 interactive=interactive)
   File "/home/ryszard/setjam/site-python/django/dispatch/dispatcher.py",
  line 166, in send
 response = receiver(signal=self, sender=sender, **named)
   File "/home/ryszard/setjam/site-
  python/django/contrib/auth/management/__init__.py", line 28, in
  create_permissions
 defaults={'name': name, 'content_type': ctype})
   File "/home/ryszard/setjam/site-python/django/db/models/manager.py",
  line 123, in get_or_create
 return self.get_query_set().get_or_create(**kwargs)
   File "/home/ryszard/setjam/site-python/django/db/models/query.py", line
  335, in get_or_create
 obj.save(force_insert=True)
   File "/home/ryszard/setjam/site-python/django/db/models/base.py", line
  410, in save
 self.save_base(force_insert=force_insert, force_update=force_update)
   File "/home/ryszard/setjam/site-python/django/db/models/base.py", line
  495, in save_base
 result = manager._insert(values, return_id=update_pk)
   File "/home/ryszard/setjam/site-python/django/db/models/manager.py",
  line 177, in _insert
 return insert_query(self.model, values, **kwargs)
   File "/home/ryszard/setjam/site-python/django/db/models/query.py", line
  1087, in insert_query
 return query.execute_sql(return_id)
   File "/home/ryszard/setjam/site-
  python/django/db/models/sql/subqueries.py", line 320, in execute_sql
 cursor = super(InsertQuery, self).execute_sql(None)
   File "/home/ryszard/setjam/site-python/django/db/models/sql/query.py",
  line 2369, in execute_sql
 cursor.execute(sql, params)
   File "/home/ryszard/setjam/site-
  

Re: [Django] #11863: Add a method to the orm to create Model instances from raw sql queries

2009-09-23 Thread Django
#11863: Add a method to the orm to create Model instances from raw sql queries
---+
  Reporter:  seanoc| Owner:  seanoc
Status:  assigned  | Milestone:  1.2   
 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 seanoc):

 For anybody interested you can track my progress at
 http://github.com/SeanOC/django.  Once the code reaches a more officially
 reviewable state I will post a patch here.

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



Re: [Django] #11936: Proxy models' names are too long for django.contrib.auth which causes weird test failures

2009-09-23 Thread Django
#11936: Proxy models' names are too long for django.contrib.auth which causes 
weird
test failures
---+
  Reporter:  ryszard   | Owner:  nobody 

Status:  new   | Milestone: 

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

Resolution:|  Keywords:  test, 
only, deferred fields
 Stage:  Unreviewed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

 * cc: ryszard.szopa+dja...@gmail.com (added)

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



Re: [Django] #11936: Proxy models' names are too long for django.contrib.auth which causes weird test failures

2009-09-23 Thread Django
#11936: Proxy models' names are too long for django.contrib.auth which causes 
weird
test failures
---+
  Reporter:  ryszard   | Owner:  nobody 

Status:  new   | Milestone: 

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

Resolution:|  Keywords:  test, 
only, deferred fields
 Stage:  Unreviewed| Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

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

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

Comment:

 The error that results from runnign the tests with the attached models
 (note that test_bbb fails, even though it contains only a `pass`
 statement!).


 (ryszard hacksaw):~/setjam/setjam% ./manage.py test pathology
 Creating test database...
 Creating table pathology_pathologicallylongname
 Creating table auth_permission
 Creating table auth_group
 Creating table auth_user
 Creating table auth_message
 Creating table django_content_type
 Creating table django_session
 Creating table django_site
 Creating table django_admin_log
 Creating table django_flatpage
 Installing index for auth.Permission model
 Installing index for auth.Message model
 Installing index for admin.LogEntry model
 Installing index for flatpages.FlatPage model

 .E

   ==
 ERROR: test_bbb (pathology.tests.SimpleTest)
 --
 Traceback (most recent call last):
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
 242, in __call__
 self._pre_setup()
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
 217, in _pre_setup
 self._fixture_setup()
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
 440, in _fixture_setup
 return super(TestCase, self)._fixture_setup()
   File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
 222, in _fixture_setup
 call_command('flush', verbosity=0, interactive=False)
   File "/home/ryszard/setjam/site-
 python/django/core/management/__init__.py", line 166, in call_command
 return klass.execute(*args, **defaults)
   File "/home/ryszard/setjam/site-python/django/core/management/base.py",
 line 222, in execute
 output = self.handle(*args, **options)
   File "/home/ryszard/setjam/site-python/django/core/management/base.py",
 line 351, in handle
 return self.handle_noargs(**options)
   File "/home/ryszard/setjam/site-
 python/django/core/management/commands/flush.py", line 61, in
 handle_noargs
 emit_post_sync_signal(models.get_models(), verbosity, interactive)
   File "/home/ryszard/setjam/site-python/django/core/management/sql.py",
 line 205, in emit_post_sync_signal
 interactive=interactive)
   File "/home/ryszard/setjam/site-python/django/dispatch/dispatcher.py",
 line 166, in send
 response = receiver(signal=self, sender=sender, **named)
   File "/home/ryszard/setjam/site-
 python/django/contrib/auth/management/__init__.py", line 28, in
 create_permissions
 defaults={'name': name, 'content_type': ctype})
   File "/home/ryszard/setjam/site-python/django/db/models/manager.py",
 line 123, in get_or_create
 return self.get_query_set().get_or_create(**kwargs)
   File "/home/ryszard/setjam/site-python/django/db/models/query.py", line
 335, in get_or_create
 obj.save(force_insert=True)
   File "/home/ryszard/setjam/site-python/django/db/models/base.py", line
 410, in save
 self.save_base(force_insert=force_insert, force_update=force_update)
   File "/home/ryszard/setjam/site-python/django/db/models/base.py", line
 495, in save_base
 result = manager._insert(values, return_id=update_pk)
   File "/home/ryszard/setjam/site-python/django/db/models/manager.py",
 line 177, in _insert
 return insert_query(self.model, values, **kwargs)
   File "/home/ryszard/setjam/site-python/django/db/models/query.py", line
 1087, in insert_query
 return query.execute_sql(return_id)
   File "/home/ryszard/setjam/site-
 python/django/db/models/sql/subqueries.py", line 320, in execute_sql
 cursor = super(InsertQuery, self).execute_sql(None)
   File "/home/ryszard/setjam/site-python/django/db/models/sql/query.py",
 line 2369, in execute_sql
 cursor.execute(sql, params)
   File "/home/ryszard/setjam/site-
 python/django/db/backends/mysql/base.py", line 84, in execute
 return self.cursor.execute(query, args)
   File "/home/buildbot/bbenv/lib/python2.6/site-
 

[Django] #11936: Proxy models' names are too long for django.contrib.auth which causes weird test failures

2009-09-23 Thread Django
#11936: Proxy models' names are too long for django.contrib.auth which causes 
weird
test failures
--+-
 Reporter:  ryszard   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:  test, only, deferred fields   |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 When you call `SomeModel.objects.only('somefield')`, then the generated
 deferred proxy model class name may be too long for
 django.contrib.auth.models.Permission, resulting in DB warnings which are
 raised as an exception.

 This manifests itself if you use `only` in your tests cases. The just
 created proxy model will still be floating among the normal models and
 contrib.auth.management.create_permissions will try to create Permission
 objects, resulting in queries like

 INSERT INTO `auth_permission` (`name`, `content_type_id`, `codename`)
 VALUES (Can add episode_
 
deferred_air_date_art_large_art_medium_art_small_created_description_duration_free_available_free_channel_free_video_url_info_modified_number_parental_rating_released_season_streaming_available_subscription_id,
 19,
 
add_episode_deferred_air_date_art_large_art_medium_art_small_created_description_duration_free_available_free_channel_free_video_url_info_modified_number_parental_rating_released_season_streaming_available_subscription_id)

 which will cause the NEXT test case to fail.

 I was able to reproduce this on Linux, with Python 2.6, MySQL_python
 1.2.3c1 and MySQL 5.0.51a (it may depend on how django reacts to MySQL
 warnings). I will attach a models.py and tests.py that allow to reproduce
 this bug.

 Potential solutions: django.db.models.get_models should not return proxies
 for deferred models, the deferred proxy models should have shorter names
 or their type some custom __repr__.

-- 
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] #11935: Add a get_context(self, request, step) method to FormWizard

2009-09-23 Thread Django
#11935: Add a get_context(self, request, step) method to FormWizard
-+--
 Reporter:  Rob Hudson   |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  django.contrib.formtools | Version:  1.1   
 Keywords:  formwizard   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 If you want to simply add context to a step of a FormWizard there are
 currently two documented ways, both of which have shortcomings...

 1. Override `render_template`.  The problem with this is quite a bit is
 happening in the to the variables in the context.  The user mostly has to
 copy/paste the code, get it right, and hope this method doesn't change out
 from underneath him for future releases, just to add context.

 2. Override `process_step`.  If the above turns the user's stomach, this
 seems like the next best place.  The problem, as noted in the
 documentation, is that "... this method is called every time a page is
 rendered for all submitted steps."  If you are only adding context, not
 processing anything, this can result in a pretty heavy load, for example
 if you are doing database calls to get a list of objects to display on a
 certain step.

 I'm proposing adding a method just for adding context to any given step,
 and make it called only when the step is rendered.

-- 
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] #1105: [patch] simple_tag decorator enhancement

2009-09-23 Thread Django
#1105: [patch] simple_tag decorator enhancement
---+
  Reporter:  dja...@kieranholland.com  | Owner:  julien
Status:  new   | Milestone:
 Component:  Template system   |   Version:
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by semenov):

 * cc: seme...@inetss.com (added)

Comment:

 That is just so unfair that register.inclusion_tag does accept
 takes_context=True and register.simple_tag doesn't. That leads to simple
 yet inefficient tags that render from a template just to be able to access
 the context. (The alternative is to create monstrous full-blown Node
 classes which is an overkill in most situations).

-- 
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] #11932: smart_unicode does not always return a unicode

2009-09-23 Thread Django
#11932: smart_unicode does not always return a unicode
+---
  Reporter:  rwillmer   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by kmtracey):

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

Comment:

 This looks like a problem with !BeautifulSoup, not Django.
 !BeautifulSoup's !NavigableString class inherits from unicode, so
 `isinstance(x, unicode)` where `x` is a !NavigableString returns `True`.
 Thus Django's unicode conversion functions simply return it, since it
 appears to be unicode already.  The problem shown in the traceback is that
 this !NavigableString class overrides the standard unicode `encode()`
 method, which takes 3 parameters
 (http://docs.python.org/library/stdtypes.html#str.encode) with one that
 only takes 2:
 
http://bazaar.launchpad.net/~leonardr/beautifulsoup/trunk/annotate/head%3A/src/beautifulsoup/element.py#L323.
 If it is going to inherit from unicode and override the `encode` method,
 it should support all the arguments defined for the base `encode`.

-- 
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] #5691: Add the active language to generate the cache key

2009-09-23 Thread Django
#5691: Add the active language to generate the cache key
-+--
  Reporter:  aa...@apsl.net  | Owner:  aaloy
Status:  assigned| Milestone:   
 Component:  Cache system|   Version:  SVN  
Resolution:  |  Keywords:  cache i18n jgd-blackboard
 Stage:  Accepted| Has_patch:  1
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Comment (by floledermann):

 Any progress on checking this in? This is looking good, isn't it?

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



Re: [Django] #9025: Nested Inline Support in Admin

2009-09-23 Thread Django
#9025: Nested Inline Support in Admin
-+--
  Reporter:  pixelcort   | Owner:  nobody
Status:  new | Milestone:
 Component:  django.contrib.admin|   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  1   |  
-+--
Changes (by hejsan):

 * cc: hr.bja...@gmail.com (removed)
 * cc: hr.bjarni+dja...@gmail.com (added)

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



Re: [Django] #6148: Add generic support for database schemas

2009-09-23 Thread Django
#6148: Add generic support for database schemas
---+
  Reporter:  ikelly| Owner:  kmpm   

Status:  assigned  | Milestone: 

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

Resolution:|  Keywords:  oracle 
postgresql mysql schemas
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

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

 * cc: hr.bja...@gmail.com (removed)
 * cc: hr.bjarni+dja...@gmail.com (added)

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



Re: [Django] #6148: Add generic support for database schemas

2009-09-23 Thread Django
#6148: Add generic support for database schemas
---+
  Reporter:  ikelly| Owner:  kmpm   

Status:  assigned  | Milestone: 

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

Resolution:|  Keywords:  oracle 
postgresql mysql schemas
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

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

 * cc: hr.bja...@gmail.com (added)

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



Re: [Django] #9025: Nested Inline Support in Admin

2009-09-23 Thread Django
#9025: Nested Inline Support in Admin
-+--
  Reporter:  pixelcort   | Owner:  nobody
Status:  new | Milestone:
 Component:  django.contrib.admin|   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  1   |  
-+--
Changes (by hejsan):

 * cc: hr.bja...@gmail.com (added)

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



[Django] #11934: UnicodeDecodeError while sending an e-mail

2009-09-23 Thread Django
#11934: UnicodeDecodeError while sending an e-mail
--+-
 Reporter:  Goldan|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.core.mail  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 When I'm trying to send an e-mail using django.core.mail.send_mail
 function, I get the following error:

 !DjangoUnicodeDecodeError: 'utf8' codec can't decode bytes in position
 27-28: invalid data. You passed in
 '<20090923114122.7992.11...@\xc4\xe5\xed\xe8\xf1-\xcf\x
 ca.ipib.msu.ru>' ()

 Let us consider these lines in django/core/mail.py:

 65idhost = DNS_NAME

 66msgid = '<%s.%s.%...@%s>' % (utcdate, pid, randint, idstring,
 idhost)

 When I replace line 65 with

 65idhost = 'example'

 e-mails are sent successfully.

 So the problem seems to be that my DNS_NAME contains non-ascii characters.
 Hope it will be fixed. Thanks in advance.

-- 
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] #6148: Add generic support for database schemas

2009-09-23 Thread Django
#6148: Add generic support for database schemas
---+
  Reporter:  ikelly| Owner:  kmpm   

Status:  assigned  | Milestone: 

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

Resolution:|  Keywords:  oracle 
postgresql mysql schemas
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

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

 * cc: shaun_stanwo...@wordbank.com (added)

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



Re: [Django] #11933: Missing cached_db value in SESSION_ENGINE setting docs

2009-09-23 Thread Django
#11933: Missing cached_db value in SESSION_ENGINE setting docs
+---
  Reporter:  gabrielhurley  | Owner:  gabrielhurley
Status:  assigned   | Milestone:   
 Component:  Documentation  |   Version:  1.1  
Resolution: |  Keywords:   
 Stage:  Unreviewed | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by gabrielhurley):

  * owner:  nobody => gabrielhurley
  * needs_better_patch:  => 0
  * status:  new => assigned
  * 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] #11933: Missing cached_db value in SESSION_ENGINE setting docs

2009-09-23 Thread Django
#11933: Missing cached_db value in SESSION_ENGINE setting docs
---+
 Reporter:  gabrielhurley  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.1   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 The docs don't list cached_db as a "valid value" in either ref/settings or
 topics/http/sessions.

 The submitted patch corrects both instances and updates the ..
 versionadded:: 1.0 to .. versionchanged:: 1.1 for each.

-- 
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] #11932: smart_unicode does not always return a unicode

2009-09-23 Thread Django
#11932: smart_unicode does not always return a unicode
---+
 Reporter:  rwillmer   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Django 1.0.2, python 2.6

 I'm using !BeautifulSoup to parse some XML which I then use as filter into
 the django database.

 If I extract a field from the XML, I get an object of class
 !BeautifulSoup.!NavigableString.

 If I then call smart_unicode(obj), I still have an object of class
 !BeautifulSoup.!NavigableString rather than the unicode I was expecting.

 If I then use this as a filter into django, .e.g product =
 Product.objects.get(obj=obj), I get this error:
 {{{
   File "/var/lib/python-support/python2.6/django/db/models/manager.py",
 line 93, in get
 return self.get_query_set().get(*args, **kwargs)
   File "/var/lib/python-support/python2.6/django/db/models/query.py", line
 304, in get
 num = len(clone)
   File "/var/lib/python-support/python2.6/django/db/models/query.py", line
 160, in __len__
 self._result_cache = list(self.iterator())
   File "/var/lib/python-support/python2.6/django/db/models/query.py", line
 275, in iterator
 for row in self.query.results_iter():
   File "/var/lib/python-support/python2.6/django/db/models/sql/query.py",
 line 206, in results_iter
 for rows in self.execute_sql(MULTI):
   File "/var/lib/python-support/python2.6/django/db/models/sql/query.py",
 line 1734, in execute_sql
 cursor.execute(sql, params)
   File "/var/lib/python-
 support/python2.6/django/db/backends/postgresql/base.py", line 52, in
 execute
 return self.cursor.execute(smart_str(sql, self.charset),
 self.format_params(params))
   File "/var/lib/python-
 support/python2.6/django/db/backends/postgresql/base.py", line 49, in
 format_params
 return tuple([smart_str(p, self.charset, True) for p in params])
   File "/var/lib/python-support/python2.6/django/utils/encoding.py", line
 95, in smart_str
 return s.encode(encoding, errors)
 TypeError: encode() takes at most 2 arguments (3 given)
 }}}

-- 
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] #11929: manage.py dumpdata outputs YAML in unhelpful order

2009-09-23 Thread Django
#11929: manage.py dumpdata outputs YAML in unhelpful order
+---
  Reporter:  sampablokuper  | Owner:  nobody
Status:  new| Milestone:
 Component:  Serialization  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by sampablokuper):

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

Comment:

 
[http://sourceforge.net/mailarchive/message.php?msg_name=4126b3450909220956y412264e7t54c67dd4342f8...@mail.gmail.com
 This] might be helpful for generating a patch.

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

2009-09-23 Thread Django
#11931: ForeignKey documentation mentions non-existent method
+---
  Reporter:  danielr| Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by ubernostrum):

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

Comment:

 The actual criterion is anything that's a `Q` object or has an
 `add_to_query()` method.

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