[Django] #10945: Typo in get_display() crashes runserver

2009-04-27 Thread Django
#10945: Typo in get_display() crashes runserver
---+
 Reporter:  shacker|   Owner:  nobody
   Status:  new|   Milestone:
Component:  django-admin.py runserver  | Version:  1.0   
 Keywords:  admin, runserver, get_display  |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 In 1.1 beta 1 SVN-10638, the following code, which is missing the
 parentheses in self.get_title_display() will crash runserver when an admin
 view is loaded. Mac OS raises a "Python has quit unxpectedly" dialog and a
 shell prompt is returned. This error should bubble up to where it can be
 reported in the console or browser.

 {{{
 class CommitteeJob(models.Model):
 title = models.CharField(choices=COMMITTEE_JOBS_CHOICES,max_length=12)
 reports_to = models.ForeignKey(BoardPosition)

 def __unicode__(self):
 return u'%s' % (self.get_title_display)
 }}}

-- 
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] #10838: Pass user object to CommentForm (initial data)

2009-04-27 Thread Django
#10838: Pass user object to CommentForm (initial data)
--+-
  Reporter:  pigletto | Owner:  nobody  
Status:  new  | Milestone:  
 Component:  django.contrib.comments  |   Version:  SVN 
Resolution:   |  Keywords:  comments
 Stage:  Unreviewed   | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Comment (by thejaswi_puthraya):

 Ideally, you shouldn't change the API because Django is committed to
 backwards-compatibility. The CommentForm always had access to initial
 kwarg that would display the default values.

 I have attached a patch that doesn't break compatibility but I somehow
 feel that I am violating DRY at
 
http://code.djangoproject.com/browser/django/trunk/django/contrib/comments/views/comments.py#L34

 Let's see what the core-devs have to tell.

-- 
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] #10735: Comment redirect breaks if you want to send get data

2009-04-27 Thread Django
#10735: Comment redirect breaks if you want to send get data
--+-
  Reporter:  Nate | Owner:  nobody
Status:  new  | Milestone:
 Component:  django.contrib.comments  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by thejaswi_puthraya):

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

Comment:

 Your problem seems genuine, but can you please follow the coding style
 adopted in django.

  * No imports within a function
  * I doubt if the
{{{
  'a' if something else 'b'
 }}}
works with Python-2.4 and earlier.

-- 
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] #10944: Site app should be able to make absolute URLs.

2009-04-27 Thread Django
#10944: Site app should be able to make absolute URLs.
+---
   Reporter:  jdunck|Owner:  nobody
 Status:  new   |Milestone:  1.2   
  Component:  Contrib apps  |  Version:  1.0   
   Keywords:|Stage:  Design decision needed
  Has_patch:  0 |   Needs_docs:  0 
Needs_tests:  0 |   Needs_better_patch:  0 
+---
 I wish Site instances could make (real) absolute URLs (e.g. http.../path/)
 based on a given relative path like /path/.  And a template tag to make it
 nicer from templates, too:
 {% site_url ... %} or similar.

 Can I have a pony?  I'll write the patch if I can have a pony.

-- 
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] #10942: Using `select` and `select_params` fails, but using only `select` works, and the SQL generated for both is identical.

2009-04-27 Thread Django
#10942: Using `select` and `select_params` fails, but using only `select` works,
and the SQL generated for both is identical.
---+
  Reporter:  mrmachine | Owner:  nobody 
   
Status:  reopened  | Milestone: 
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:|  Keywords:  extra 
select select_params
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by mrmachine):

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

Comment:

 After discussion on IRC with Alex, it looks like the problem is that you
 cannot pass a string of comma separated values or an iterable (list of
 PKs) as a param as neither will be properly escaped. The following works
 (using an example taken from the Django source):

 {{{
 >>> from django.contrib.auth.models import User
 >>> params = [1, 3]
 >>> q1 = User.objects.extra(
 ... select={'featured': 'auth_user.id IN (%s)' % ', '.join(['%s'] *
 len(params))},
 ... select_params=params
 ... ).values('featured', 'pk', 'username').order_by('-featured', 'pk',
 'username')
 >>> print list(q1)
 [{'username': u'admin', 'pk': 1, 'featured': 1}, {'username': u'manager',
 'pk': 2, 'featured': 0}]
 }}}

 I think that is a bit of a hack. It's not easy to read, and it requires
 the user to flatten any iterators in their list of params and to know the
 number of items in their iterator param, and add an appropriate number of
 '%s' hooks in their SQL.

 Django should know how to properly escape an iterator param, by wrapping
 it in parenthesis, escaping each value and joining with ', '. E.g. the
 following should work:

 {{{
 >>> from django.contrib.auth.models import User
 >>> q1 = User.objects.extra(
 ... select={'featured': 'auth_user.id IN %s'},
 ... select_params=[[1, 3]]
 ... ).values('featured', 'pk', 'username').order_by('-featured', 'pk',
 'username')
 >>> print list(q1)
 [{'username': u'admin', 'pk': 1, 'featured': 1}, {'username': u'manager',
 'pk': 2, 'featured': 0}]
 }}}

 But instead, I get:

 {{{
 Traceback (most recent call last):
   File "", line 1, in ?
   File "/path/to/django/db/models/query.py", line 163, in __len__
 self._result_cache.extend(list(self._iter))
   File "/path/to/django/db/models/query.py", line 740, in iterator
 for row in self.query.results_iter():
   File "/path/to/django/db/models/sql/query.py", line 244, in results_iter
 for rows in self.execute_sql(MULTI):
   File "/path/to/django/db/models/sql/query.py", line 1980, in execute_sql
 cursor.execute(sql, params)
   File "/path/to/django/db/backends/util.py", line 19, in execute
 return self.cursor.execute(sql, params)
   File "/path/to/django/db/backends/sqlite3/base.py", line 190, in execute
 return Database.Cursor.execute(self, query, params)
 OperationalError: near "?": syntax error
 }}}

 I'm re-opening this for further consideration as a feature enhancement or
 documentation change. At the very least, the documentation should mention
 that you cannot use an iterator as a param and must flatten your list of
 params and hack the SQL

-- 
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] #8264: Replace get_absolute_url with more sane alternative

2009-04-27 Thread Django
#8264: Replace get_absolute_url with more sane alternative
-+--
  Reporter:  simon   | Owner:  simon
Status:  new | Milestone:   
 Component:  Core framework  |   Version:  SVN  
Resolution:  |  Keywords:   
 Stage:  Design decision needed  | Has_patch:  0
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by jdunck):

 * cc: jdu...@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] #10943: ordinal not in range(128)

2009-04-27 Thread Django
#10943: ordinal not in range(128)
+---
  Reporter:  gulliver   | Owner:  nobody
Status:  closed | Milestone:  1.1   
 Component:  Uncategorized  |   Version:  1.1-beta-1
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

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

Comment:

 Please don't blindly open tickets in the bug tracker in search of support
 when finding a problem like this, the #django IRC channel and the django-
 users mailing list (especially searching its huge archive) are your first
 choices in these cases. Try to only open a ticket here when, after looking
 through the archives and getting other users opinions, you are pretty sure
 it's not a setup problem or a bug in your code (for example if it's a new
 use case youǘe never tested your app against).

-- 
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] #10943: ordinal not in range(128)

2009-04-27 Thread Django
#10943: ordinal not in range(128)
---+
 Reporter:  gulliver   |   Owner:  nobody
   Status:  new|   Milestone:  1.1   
Component:  Uncategorized  | Version:  1.1-beta-1
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Before Apri 24, it is worked fine that adding file whith chinese
 characters, but after Apri 27, error comes.

 I don't understand why.

 I hadn't upgraded anything.

 Help.

 {{{

 UnicodeEncodeError at /admin/articles/article/18248/

 ('ascii',
 
u'/home/httpd/html/media/doc/2009/04/28/\u90b3\u5dde\u516c\u53f8\u8df5\u884c\u79d1\u5b66\u53d1\u5c55\u89c2\u670d\u52a1\u53d1\u5c55\u5f53\u5148\u950b.jpg',
 38, 56, 'ordinal not in range(128)')

 Request Method: POST
 Request URL:http://172.30.113.203/admin/articles/article/18248/
 Exception Type: UnicodeEncodeError
 Exception Value:

 ('ascii',
 
u'/home/httpd/html/media/doc/2009/04/28/\u90b3\u5dde\u516c\u53f8\u8df5\u884c\u79d1\u5b66\u53d1\u5c55\u89c2\u670d\u52a1\u53d1\u5c55\u5f53\u5148\u950b.jpg',
 38, 56, 'ordinal not in range(128)')

 Exception Location: /usr/lib/python2.6/genericpath.py in exists, line
 18
 Python Executable:  /usr/bin/python
 Python Version: 2.6.0
 Python Path:['/home/lio/mydjango', '/usr/lib/python26.zip',
 '/usr/lib/python2.6', '/usr/lib/python2.5/site-packages',
 '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk',
 '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload',
 '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-
 packages/PIL']
 Server time:星期二, 28 四月 2009 08:54:20 +0800

 }}}


 {{{
 Unicode error hint

 The string that could not be encoded/decoded was:
 4/28/邳州公司践行科学发展观服务发展当先锋.jpg

 }}}


 {{{
 Environment:

 Request Method: POST
 Request URL: http://172.30.113.203/admin/articles/article/18248/
 Django Version: 1.1 beta 1 SVN-10638
 Python Version: 2.6.0
 Installed Applications:
 ['django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'django.contrib.admin',
  'ncdqh.articles']
 Installed Middleware:
 ('django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware')


 Traceback:
 File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
 get_response
   92. response = callback(request, *callback_args,
 **callback_kwargs)
 File "/usr/lib/python2.6/site-packages/django/contrib/admin/options.py" in
 wrapper
   226. return self.admin_site.admin_view(view)(*args,
 **kwargs)
 File "/usr/lib/python2.6/site-packages/django/contrib/admin/sites.py" in
 inner
   184. return view(request, *args, **kwargs)
 File "/usr/lib/python2.6/site-packages/django/db/transaction.py" in
 _commit_on_success
   240. res = func(*args, **kw)
 File "/usr/lib/python2.6/site-packages/django/contrib/admin/options.py" in
 change_view
   832. self.save_formset(request, form, formset,
 change=True)
 File "/usr/lib/python2.6/site-packages/django/contrib/admin/options.py" in
 save_formset
   563. formset.save()
 File "/usr/lib/python2.6/site-packages/django/forms/models.py" in save
   440. return self.save_existing_objects(commit) +
 self.save_new_objects(commit)
 File "/usr/lib/python2.6/site-packages/django/forms/models.py" in
 save_existing_objects
   467. saved_instances.append(self.save_existing(form,
 obj, commit=commit))
 File "/usr/lib/python2.6/site-packages/django/forms/models.py" in
 save_existing
   428. return form.save(commit=commit)
 File "/usr/lib/python2.6/site-packages/django/forms/models.py" in save
   338.  fail_message, commit,
 exclude=self._meta.exclude)
 File "/usr/lib/python2.6/site-packages/django/forms/models.py" in
 save_instance
   78. instance.save()
 File "/usr/lib/python2.6/site-packages/django/db/models/base.py" in save
   407. self.save_base(force_insert=force_insert,
 force_update=force_update)
 File "/usr/lib/python2.6/site-packages/django/db/models/base.py" in
 save_base
   461. values = [(f, None, (raw and getattr(self,
 f.attname) or f.pre_save(self, False))) for f in non_pks]
 File "/usr/lib/python2.6/site-packages/django/db/models/fields/files.py"
 in pre_save
   191. file.save(file.name, file, save=False)
 File "/usr/lib/python2.6/site-packages/django/db/models/fields/files.py"
 in save
   83. self._name = self.storage.save(name, content)
 File "/usr/lib/python2.6/site-packages/django/core/files/storage.py" in
 save
   46. name = self.get_available_name(name)
 File "/usr/lib/python2.6/site-packages/django/core/files/storage.py" in
 

Re: [Django] #10942: Using `select` and `select_params` fails, but using only `select` works, and the SQL generated for both is identical.

2009-04-27 Thread Django
#10942: Using `select` and `select_params` fails, but using only `select` works,
and the SQL generated for both is identical.
---+
  Reporter:  mrmachine | Owner:  nobody 
   
Status:  closed| Milestone: 
   
 Component:  Database layer (models, ORM)  |   Version:  SVN
   
Resolution:  invalid   |  Keywords:  extra 
select select_params
 Stage:  Unreviewed| Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 The issue is your passing a string in the first one, doing str(query)
 isn't guarnteed to return the exact SQL because of quoting issues.  Using
 query.as_sql() to see the difference.

-- 
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] #10942: Using `select` and `select_params` fails, but using only `select` works, and the SQL generated for both is identical.

2009-04-27 Thread Django
#10942: Using `select` and `select_params` fails, but using only `select` works,
and the SQL generated for both is identical.
--+-
 Reporter:  mrmachine |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:  extra select select_params|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 As per the [http://groups.google.com/group/django-
 users/browse_thread/thread/50c1877fe8339609 google groups discussion], I'm
 seeing inconsistent results when I use `extra()` with `select` and
 `select_params` arguments compared to injecting my params directly into
 the `select` argument.

 As per Malcolm's suggestion, I've now also tried using
 `django.db.connection` and `pysqlite2` to execute the raw SQL, as well as
 copy & pasting the generated SQL directly into the sqlite3 prompt.

 Everything works except using `extra()` with `select` and `select_params`
 arguments.

 {{{
 >>> from django.contrib.auth.models import User

 >>> # using `select_params` fails, with both the specified users being
 returned with `featured` as 0.
 >>> q1 = User.objects.extra(
 ... select={'featured': 'auth_user.id IN (%s)'},
 ... select_params=['1,2']
 ... ).values('featured', 'pk', 'username').order_by('-featured', 'pk',
 'username')
 >>> print list(q1)
 [{'username': u'admin', 'pk': 1, 'featured': 0}, {'username': u'manager',
 'pk': 2, 'featured': 0}]

 >>> # using only `select` works, with both the specified users being
 returned with `featured` as 1.
 >>> q2 = User.objects.extra(
 ... select={'featured': 'auth_user.id IN (%s)' % '1,2'}
 ... ).values('featured', 'pk', 'username').order_by('-featured', 'pk',
 'username')
 >>> print list(q2)
 [{'username': u'admin', 'pk': 1, 'featured': 1}, {'username': u'manager',
 'pk': 2, 'featured': 1}]

 >>> # the sql generated for both querysets is identical.
 >>> str(q1.query) == str(q2.query)
 True

 >>> # ths sql generated looks correct.
 >>> print q1.query
 SELECT (auth_user.id IN (1,2)) AS "featured", "auth_user"."id",
 "auth_user"."username" FROM "auth_user" ORDER BY "featured" DESC,
 "auth_user"."id" ASC, "auth_user"."username" ASC

 >>> # using django to execute raw sql works as expected.
 >>> from django.db import connection
 >>> cursor = connection.cursor()
 >>> cursor.execute(str(q1.query)).fetchall()
 [(1, 1, u'admin'), (1, 2, u'manager')]

 >>> # using pysqlite2 to execute raw sql works as expected.
 >>> from django.conf import settings
 >>> from pysqlite2 import dbapi2
 >>> connection = dbapi2.Connection(settings.DATABASE_NAME)
 >>> cursor = dbapi2.Cursor(connection)
 >>> cursor.execute(str(q1.query)).fetchall()
 [(1, 1, u'admin'), (1, 2, u'manager')]

 # using sqlite3 to execute raw sql works as expected.
 sqlite> SELECT (auth_user.id IN (1,2)) AS "featured", "auth_user"."id",
 "auth_user"."username" FROM "auth_user" ORDER BY "featured" DESC,
 "auth_user"."id" ASC, "auth_user"."username" ASC
 1|1|admin
 1|2|manager
 }}}

-- 
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] #10941: Add querystring helper methods to Page class

2009-04-27 Thread Django
#10941: Add querystring helper methods to Page class
+---
 Reporter:  benspaulding|   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  SVN   
 Keywords:  pagination  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 Working with pagination and query strings within a template can be
 painful. Personally, I have never had a situation when I was paginating
 using a GET parameter where there were not other parameters that needed to
 be preserved through out the various pages.

 Take search, for example. There may be parameters for searching within one
 or more models, for a particular author and sorting by date. Maintaining
 all of these parameters within the pagination links takes some serious
 template logic.

 {{{
 {# Linebreaks added for readability. In real life this would need to be
 one, long line. #}
 Next page
 }}}

 That kind of logic shouldn’t be in a template. I have created a patch that
 would allow for something much simpler, like so:

 {{{
 Next page
 }}}

 Though there has been much talk of creating template tags which would
 produce all-out pagination bars, I believe this particular functionality
 should be an actual method on the page object for two reasons:

  1. This is basic functionality whose end result is hard to dispute (as
 opposed to a full pagination bar where markup and features could be
 disputed eternally),
  2. This does not require the request context processor to be installed.

 Note that this patch includes documentation. Tests are still needed. I am
 not married to the exact implementation, but I and others I have discussed
 this and feel that this simplicity and fuctionality belong in Django’s
 pagination.

-- 
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] #10937: Recommendation of mod_wsgi is incompatible with apache-authentication technique described in docs

2009-04-27 Thread Django
#10937: Recommendation of mod_wsgi is incompatible with apache-authentication
technique described in docs
+---
  Reporter:  d...@fritzing.org  | Owner:  nobody 
Status:  new| Milestone: 
 Component:  Documentation  |   Version:  1.0
Resolution: |  Keywords:  mod_python mod_wsgi
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by grahamd):

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

Comment:

 See:

   http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms

 I believe there may be a separate Django ticket somewhere already about
 documenting how to do the authentication against Django when using
 mod_wsgi.

 Do note though that that access control mechanism works in embedded mode.
 If you are running Django in daemon mode it would be a bit stupid to be
 doing it that way.

-- 
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] #10940: Omission in tutorial, part 4: generic views

2009-04-27 Thread Django
#10940: Omission in tutorial, part 4: generic views
---+
 Reporter:  zpearce|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  SVN   
 Keywords:  tutorial, generic view, object_id  |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 When refactoring the poll app for generic views, no mention is made of the
 need to change one of the parameters passed into the vote() view from
 poll_id to object_id.

 Original:

 def vote(request, poll_id):
 ...snip...

 Should be:

 def vote(request, object_id):
 ...etc...

-- 
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] #10939: Allow for dynamic registration of inlines into an admin model

2009-04-27 Thread Django
#10939: Allow for dynamic registration of inlines into an admin model
--+-
 Reporter:  zbyte64   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  1.0   
 Keywords:  inlines   |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 It used to be (django 0.96) you could arbitrarily add inlines into an
 admin model:


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

 class FlatPageAttachment(models.Model):
 flatpage = models.ForeignKey(FlatPage, edit_inline=True)
 attachment = models.FileField(upload_to="flatpages")

 }}}

 Now this is not possible. You could try to import the FlatPage admin and
 attach an admin inline, but this will not work. The reason for this is
 that when the Admin model is registered into the admin site, it goes
 through and populates inline_instances. It is true you could unregister
 and re-register, but what if another app also wanted to add an inline? If
 that was the case then only one would get its inline registered.

 Perhaps a better alternative is to add a method to ModelAdmin called
 "register_inline". It would behave something like the following:

 {{{
 def register_inline(self, inline_class):
 inline_instance = inline_class(self.model, self.admin_site)
 self.inline_instances.append(inline_instance)
 }}}

-- 
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] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-27 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  assigned  | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 We really should be able to reproduce this without poking at
 internals(which is really want dupe select related is, lack of leading
 underscore be damned).

-- 
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] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-27 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  assigned  | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by zain):

 It looks like this might be caused by an ORM bug. Given two querysets q1
 and q2, with list(q1) = [foo] and list(q2) = [foo], there's a case when q1
 & q2 = [].

 I created a quick test to demonstrate the case. It's using the models from
 your example verbatim, but I'll clean it up once I've fixed the bug.

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



[Django] #10938: add inlines into fieldsets

2009-04-27 Thread Django
#10938: add inlines into fieldsets
--+-
 Reporter:  ctao  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  1.0   
 Keywords:  inlines fieldsets |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 ModelAdmin has fieldsets and inlines. e.g.
 Ref: [http://docs.djangoproject.com/en/dev/intro/tutorial02/],
 {{{
 fieldsets = [
 (None,   {'fields': ['question']}),
 ('Date information', {'fields': ['pub_date']}),
 ]

 inlines = [ChoiceInline]
 }}}

 If can put the inlines into the fieldsets, it would be great. such as:

 {{{
 fieldsets = [
 (None,   {'fields': ['question']}),
 ('inlines sample',   {inlines : [ChoiceInline]}),
 ('Date information', {'fields': ['pub_date']}),
 ('inlines sample 2', {inlines : [SomeOtherChoiceInline]}),
 ]
 }}}

-- 
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] #10918: to_field and raw_id_fields in ModelAdmin

2009-04-27 Thread Django
#10918: to_field and raw_id_fields in ModelAdmin
---+
  Reporter:  dcramer   | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by brosner):

  * 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] #10931: truncate_html_words doen't handle multi-line tags properly

2009-04-27 Thread Django
#10931: truncate_html_words doen't handle multi-line tags properly
--+-
  Reporter:  gsong| Owner:  gsong 
Status:  assigned | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:  truncatewords_html
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  0|  
--+-
Changes (by gsong):

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

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



Re: [Django] #10936: Detailed instructions for getting Django and MySQL and MySQLdb working on various OS X versions

2009-04-27 Thread Django
#10936: Detailed instructions for getting Django and MySQL and MySQLdb working 
on
various OS X versions
-+--
  Reporter:  simon   | Owner:  nobody 
Status:  new | Milestone: 
 Component:  Documentation   |   Version:  SVN
Resolution:  |  Keywords:  mysqldb
 Stage:  Design decision needed  | Has_patch:  0  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

  * stage:  Unreviewed => Design decision needed

Comment:

 We've been moving a way from keeping detailed platform specific
 installation docs in our own docs and instead moved them to the wiki.
 Perhaps the best solution is for someone to put this information on that
 wiki page and make sure the link is prominently displayed in the docs.

-- 
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] #10936: Detailed instructions for getting Django and MySQL and MySQLdb working on various OS X versions

2009-04-27 Thread Django
#10936: Detailed instructions for getting Django and MySQL and MySQLdb working 
on
various OS X versions
+---
  Reporter:  simon  | Owner:  nobody 
Status:  new| Milestone: 
 Component:  Documentation  |   Version:  SVN
Resolution: |  Keywords:  mysqldb
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by kmike):

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

Comment:

 It was quite easy for me to install python & mysqldb on OS X Leopard using
 macports, all works fine out of the box.

-- 
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] #10937: Recommendation of mod_wsgi is incompatible with apache-authentication technique described in docs

2009-04-27 Thread Django
#10937: Recommendation of mod_wsgi is incompatible with apache-authentication
technique described in docs
-+--
 Reporter:  d...@fritzing.org|   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Documentation| Version:  1.0   
 Keywords:  mod_python mod_wsgi  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 I found this documentation about authenticating in apache using Django
 http://docs.djangoproject.com/en/1.0//howto/apache-auth/#howto-apache-auth

 However, since Django is now recommending mod_wsgi in favor of mod_python,
 the techniques described here no longer work (if mod_python is not
 installed).
 I don't know enough of mod_wsgi or mod_python to have a solution – I
 suggest you ask Graham for this –, but at least change the docs to mention
 that you'll need mod_python installed instead of mod_wsgi for this to
 work.

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



[Django] #10936: Detailed instructions for getting Django and MySQL and MySQLdb working on various OS X versions

2009-04-27 Thread Django
#10936: Detailed instructions for getting Django and MySQL and MySQLdb working 
on
various OS X versions
---+
 Reporter:  simon  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  SVN   
 Keywords:  mysqldb|   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Getting MySQLdb working on OS X is an absolute nightmare, which has
 resulted in a flurry of blog posts such as the following:

 http://www.keningle.com/?p=11

 This really shouldn't be our problem since it's not a Django issue - but
 OS X / MySQL are an extremely common development platform for our user
 base and it makes a really bad impression if people can't get up and
 running with this (especially since PHP + MySQL on OS X works pretty much
 out of the box). I just had to talk someone through this over the phone
 and it was a bit embarrassing having to admit how miserable the MySQL / OS
 X installation experience for Django actually is.

 We could do this as part of a larger project to bulk out our installation
 instructions for other platforms as well.

-- 
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] #10935: forms.ImageField.clean should annotate the object returned by FileField.clean

2009-04-27 Thread Django
#10935: forms.ImageField.clean should annotate the object returned by
FileField.clean
-+--
  Reporter:  jdunck  | Owner:  nobody
Status:  new | Milestone:  1.2   
 Component:  Forms   |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  1   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by jdunck):

 Also, as long as it's opening the image, I think it should correct
 content_type based on the actual format of the image.  Most OS's will mis-
 report the content type of the upload based on its extension, so that a
 JPEG named something.gif is reported as image/gif.

-- 
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] #10809: mod_wsgi authentication handler

2009-04-27 Thread Django
#10809: mod_wsgi authentication handler
-+--
  Reporter:  baumer1122  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Authentication  |   Version:  SVN 
Resolution:  |  Keywords:  mod_wsgi
 Stage:  Unreviewed  | Has_patch:  1   
Needs_docs:  1   |   Needs_tests:  0   
Needs_better_patch:  1   |  
-+--
Comment (by baumer1122):

 #1 - sure I can add that

 #2 - I did my best to mirror the functionality provided in the
 
[http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/handlers/modpython.py
 mod_python handler] which does both authentication and authorization. If
 you think it is better to have a separate file in here that handles
 authorization for all backends, let me know and I can adjust the existing
 mod_python handler accordingly.

-- 
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] #6877: "form.label_for tag" should apply "label_suffix"

2009-04-27 Thread Django
#6877: "form.label_for tag" should apply "label_suffix"
---+
  Reporter:  David Piccione   | Owner: 
 nobody 
Status:  new   | Milestone: 

 Component:  Forms |   Version: 
 SVN
Resolution:|  Keywords: 
 label_tag, label_suffix
 Stage:  Accepted  | Has_patch: 
 0  
Needs_docs:  0 |   Needs_tests: 
 0  
Needs_better_patch:  0 |  
---+
Changes (by ssadler):

 * cc: dja...@mashi.org (added)

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



Re: [Django] #10752: Advanced Bash Completion

2009-04-27 Thread Django
#10752: Advanced Bash Completion
--+-
  Reporter:  arthurk  | Owner:  nobody 
Status:  new  | Milestone:  1.2
 Component:  django-admin.py  |   Version:  SVN
Resolution:   |  Keywords:  bash completion
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  1|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Comment (by arthurk):

 django_bash_completion.2.diff cleans up the code and resolves some
 inconsistencies with --help and runfcgi.

-- 
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] #10935: forms.ImageField.clean should annotate the object returned by FileField.clean

2009-04-27 Thread Django
#10935: forms.ImageField.clean should annotate the object returned by
FileField.clean
--+-
   Reporter:  jdunck  |Owner:  nobody
 Status:  new |Milestone:  1.2   
  Component:  Forms   |  Version:  SVN   
   Keywords:  |Stage:  Unreviewed
  Has_patch:  0   |   Needs_docs:  1 
Needs_tests:  0   |   Needs_better_patch:  0 
--+-
 ImageField.clean does some validation that the given file is, in fact, an
 image, but then just returns whatever the FileField gave it-- generally an
 UploadedFile.

 I have a later Form.clean_* method which needs to do further work with the
 image, and so uses Image.open again.

 I think it'd be good to annotate the UploadedFile with an image attribute
 to save the work of parsing the image yet again.

 {{{
 f.image = trial_image
 }}}

 Agree?

-- 
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] #6648: random seed identical among preforked FastCGI instances

2009-04-27 Thread Django
#6648: random seed identical among preforked FastCGI instances
---+
  Reporter:  nez...@gmail.com  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  Core framework|   Version:  SVN
 
Resolution:|  Keywords:  random seed fastcgi 
fcgi prefork
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by buffi):

 The current patch is broken.
 ctime() will only produce different output each second (an example output
 is 'Mon Apr 27 14:18:38 2009'), so the same process will get the same
 random seed if two requests are handed to it during the same second.

 It would be better to use something like random.seed("%d%f" % (getpid(),
 time())) , but I'm unsure if this is the correct way to fix this issue, so
 I won't submit 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
-~--~~~~--~~--~--~---



[Django] #10934: handler404 needs an example

2009-04-27 Thread Django
#10934: handler404 needs an example
---+
 Reporter:  mnieber|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords:  handler404 |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Hi,

 I'm doing the tutorial and tried to set up my own 404 handler, following
 the hints in the tutorial.
 However, here the tutorial is not clear:

 - where exactly does Django look for the handler404 name?
 - should I assign a new object to django.conf.urls.defaults.handler404, or
 create the name handler404 inside the views module?
 - I did not create a 404.html, how come Django does not complain about
 that? (quote: The default 404 view will use that template for all 404
 errors.)

 An example of setting up your own 404 handler would help a lot (I still
 have not managed, so now it feels like I missed a point somewhere).
 By the way, the tutorial is excellent in all other aspects!

-- 
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] #10931: truncate_html_words doen't handle multi-line tags properly

2009-04-27 Thread Django
#10931: truncate_html_words doen't handle multi-line tags properly
--+-
  Reporter:  gsong| Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:  truncatewords_html
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  0|  
--+-
Changes (by SmileyChris):

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

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



Re: [Django] #10906: Aggregation support absent on postgres < 8.2

2009-04-27 Thread Django
#10906: Aggregation support absent on postgres < 8.2
---+
  Reporter:  Richard Davies   |
 Owner: 
Status:  new   | 
Milestone:  1.1
 Component:  ORM aggregation   |   
Version:  SVN
Resolution:|  
Keywords: 
 Stage:  Accepted  | 
Has_patch:  1  
Needs_docs:  0 |   
Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * stage:  Unreviewed => Accepted

Comment:

 This definitely needs to be done, but I'm going to wait until resolution
 on #10842 before committing, as this will make version comparisons much
 more robust.

-- 
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] #6199: Avoid cache stampedes

2009-04-27 Thread Django
#6199: Avoid cache stampedes
---+
  Reporter:  jdunck| Owner:  nobody 
  
Status:  new   | Milestone: 
  
 Component:  Cache system  |   Version:  SVN
  
Resolution:|  Keywords:  performance scalability 
cache
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  1 |  
---+
Changes (by russellm):

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

Comment:

 I can see that there is room for a dogpiling and other cache management
 strategies. However, as jdunck notes, this can now be acheived with a
 custom cache backend. This patch would need to be recast in those terms if
 it were to be integrated into trunk.

 Regardless, this won't be happening for v1.1

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



Re: [Django] #10932: Allow Min() on CharFields on postgres

2009-04-27 Thread Django
#10932: Allow Min() on CharFields on postgres
--+-
  Reporter:  terrex   | Owner: 
Status:  new  | Milestone: 
 Component:  ORM aggregation  |   Version:  1.0
Resolution:   |  Keywords: 
 Stage:  Accepted | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  1|  
--+-
Changes (by russellm):

  * stage:  Unreviewed => Accepted

Comment:

 Looks good in principle. However, it needs tests - if only so that it is
 easy to demonstrate that this approach will work across all supported
 backends.

-- 
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] #6199: Avoid cache stampedes

2009-04-27 Thread Django
#6199: Avoid cache stampedes
-+--
  Reporter:  jdunck  | Owner:  nobody   

Status:  new | Milestone:  1.1  

 Component:  Cache system|   Version:  SVN  

Resolution:  |  Keywords:  performance 
scalability cache
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

 krystal, in fact this is an improved version of that snippet.

 However, I would be surprised if this was included in core-- it can now be
 accomplished with a custom CACHE_BACKEND.

-- 
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] #10841: Better 500 template for AJAX calls

2009-04-27 Thread Django
#10841: Better 500 template for AJAX calls
--+-
  Reporter:  Riz   | Owner:  nobody
Status:  new  | Milestone:
 Component:  Core framework   |   Version:  1.0   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by Michail Sychev ):

 New patch, some cleanups.

 I think some other templates should have ajax support, like comment's 400
 page. But I am not completly sure about it, I use mptt comments which have
 ajax posting support and having ajax 400 page is very useful. But afaik
 django default comment system don't have direct ajax support. Any
 suggestions?

-- 
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] #10933: Avoid " TypeError: Cannot convert Decimal("0.0000") to Decimal " when the decimal module has been reloaded

2009-04-27 Thread Django
#10933: Avoid " TypeError: Cannot convert Decimal("0.") to Decimal  " when 
the
decimal module has been reloaded
--+-
 Reporter:  gagravarr |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 If for some reason the decimal module gets reloaded (seems fairly easy to
 trigger when using runserver, but we've seen it once or twice wiht apache
 + mod_python too), then calling db_obj.save() on a model with a decimal
 field will blow up (see http://groups.google.com/group/django-
 users/browse_thread/thread/7da92d7f5d6e2a53 for example)

 One workaround is to have extra code in the decimal field logic in django,
 to detect when the value is no longer being recognised as a Decimal but is
 one, and port it over to the new decimal object.

 {{{
 --- django/db/models/fields/__init__.py (revision 9643)
 +++ django/db/models/fields/__init__.py (working copy)
 @@ -579,6 +579,11 @@
  def to_python(self, value):
  if value is None:
  return value
 +# Work around reload(decimal) problems
 +if not isinstance(value, decimal.Decimal) and \
 +   len(str(value.__class__).split("'")) == 3 and \
 +   str(value.__class__).split("'")[1] == 'decimal.Decimal':
 +return decimal.Decimal( value.to_eng_string() )
  try:
  return decimal.Decimal(value)
  except decimal.InvalidOperation:
 }}}

 I'm not sure if this is an ideal fix or not, but it'd be great to have
 this (or something like it) in django to help avoid the issue

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



Re: [Django] #10932: Allow Min() on CharFields on postgres

2009-04-27 Thread Django
#10932: Allow Min() on CharFields on postgres
--+-
  Reporter:  terrex   | Owner: 
Status:  new  | Milestone: 
 Component:  ORM aggregation  |   Version:  1.0
Resolution:   |  Keywords: 
 Stage:  Unreviewed   | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  1|  
--+-
Changes (by terrex):

 * cc: guillermo.gutier...@uca.es (added)
  * needs_better_patch:  => 1
  * needs_tests:  => 0
  * needs_docs:  => 0

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



[Changeset] r10638 - django/trunk/django/conf/locale/pl/LC_MESSAGES

2009-04-27 Thread noreply

Author: zgoda
Date: 2009-04-27 04:37:29 -0500 (Mon, 27 Apr 2009)
New Revision: 10638

Modified:
   django/trunk/django/conf/locale/pl/LC_MESSAGES/django.mo
   django/trunk/django/conf/locale/pl/LC_MESSAGES/django.po
Log:
Polish translation updated


Modified: django/trunk/django/conf/locale/pl/LC_MESSAGES/django.mo
===
(Binary files differ)

Modified: django/trunk/django/conf/locale/pl/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/pl/LC_MESSAGES/django.po2009-04-26 
22:58:44 UTC (rev 10637)
+++ django/trunk/django/conf/locale/pl/LC_MESSAGES/django.po2009-04-27 
09:37:29 UTC (rev 10638)
@@ -5,7 +5,7 @@
 msgstr ""
 "Project-Id-Version: Django\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-04-10 11:44+0200\n"
+"POT-Creation-Date: 2009-04-27 11:32+0200\n"
 "PO-Revision-Date: 2008-02-25 15:53+0100\n"
 "Last-Translator: Jarek Zgoda \n"
 "MIME-Version: 1.0\n"
@@ -223,7 +223,7 @@
 msgid "Successfully deleted %(count)d %(items)s."
 msgstr "Usunięto %(count)d %(items)s."
 
-#: contrib/admin/actions.py:63 contrib/admin/options.py:1023
+#: contrib/admin/actions.py:63 contrib/admin/options.py:1025
 msgid "Are you sure?"
 msgstr "Jesteś pewien?"
 
@@ -314,82 +314,82 @@
 msgid "None"
 msgstr "brak"
 
-#: contrib/admin/options.py:517
+#: contrib/admin/options.py:519
 #, python-format
 msgid "Changed %s."
 msgstr "Zmieniono %s"
 
-#: contrib/admin/options.py:517 contrib/admin/options.py:527
+#: contrib/admin/options.py:519 contrib/admin/options.py:529
 #: contrib/comments/templates/comments/preview.html:16 forms/models.py:306
 msgid "and"
 msgstr "i"
 
-#: contrib/admin/options.py:522
+#: contrib/admin/options.py:524
 #, python-format
 msgid "Added %(name)s \"%(object)s\"."
 msgstr "Dodano %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:526
+#: contrib/admin/options.py:528
 #, python-format
 msgid "Changed %(list)s for %(name)s \"%(object)s\"."
 msgstr "Zmieniono %(list)s w %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:531
+#: contrib/admin/options.py:533
 #, python-format
 msgid "Deleted %(name)s \"%(object)s\"."
 msgstr "Usunięto %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:535
+#: contrib/admin/options.py:537
 msgid "No fields changed."
 msgstr "Żadne pole nie zmienione."
 
-#: contrib/admin/options.py:596 contrib/auth/admin.py:67
+#: contrib/admin/options.py:598 contrib/auth/admin.py:67
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was added successfully."
 msgstr "%(name)s \"%(obj)s\" dodany pomyślnie."
 
-#: contrib/admin/options.py:600 contrib/admin/options.py:633
+#: contrib/admin/options.py:602 contrib/admin/options.py:635
 #: contrib/auth/admin.py:75
 msgid "You may edit it again below."
 msgstr "Możesz ponownie edytować wpis poniżej."
 
-#: contrib/admin/options.py:610 contrib/admin/options.py:643
+#: contrib/admin/options.py:612 contrib/admin/options.py:645
 #, python-format
 msgid "You may add another %s below."
 msgstr "Możesz dodać nowy wpis %s poniżej."
 
-#: contrib/admin/options.py:631
+#: contrib/admin/options.py:633
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was changed successfully."
 msgstr "%(name)s \"%(obj)s\" zostało pomyślnie zmienione."
 
-#: contrib/admin/options.py:639
+#: contrib/admin/options.py:641
 #, python-format
 msgid ""
 "The %(name)s \"%(obj)s\" was added successfully. You may edit it again below."
 msgstr ""
 "%(name)s \"%(obj)s\" dodane pomyślnie. Możesz edytować ponownie wpis poniżej."
 
-#: contrib/admin/options.py:770
+#: contrib/admin/options.py:772
 #, python-format
 msgid "Add %s"
 msgstr "Dodaj %s"
 
-#: contrib/admin/options.py:801 contrib/admin/options.py:1001
+#: contrib/admin/options.py:803 contrib/admin/options.py:1003
 #, python-format
 msgid "%(name)s object with primary key %(key)r does not exist."
 msgstr "Obiekt %(name)s o kluczu głównym %(key)r nie istnieje."
 
-#: contrib/admin/options.py:858
+#: contrib/admin/options.py:860
 #, python-format
 msgid "Change %s"
 msgstr "Zmień %s"
 
-#: contrib/admin/options.py:902
+#: contrib/admin/options.py:904
 msgid "Database error"
 msgstr "Błąd bazy danych"
 
-#: contrib/admin/options.py:938
+#: contrib/admin/options.py:940
 #, python-format
 msgid "%(count)s %(name)s was changed successfully."
 msgid_plural "%(count)s %(name)s were changed successfully."
@@ -397,12 +397,12 @@
 msgstr[1] "%(count)s %(name)s zostały pomyślnie zmienione."
 msgstr[2] "%(count)s %(name)s zostało pomyślnie zmienionych."
 
-#: contrib/admin/options.py:1016
+#: contrib/admin/options.py:1018
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was deleted successfully."
 msgstr "%(name)s \"%(obj)s\" usunięty pomyślnie."
 
-#: contrib/admin/options.py:1052
+#: contrib/admin/options.py:1054
 #, python-format
 msgid "Change history: %s"
 msgstr "Historia zmian: %s"
@@ -498,7 +498,7 @@
 
 #: 

[Django] #10932: Allow Min() on CharFields on postgres

2009-04-27 Thread Django
#10932: Allow Min() on CharFields on postgres
-+--
 Reporter:  terrex   |   Owner:
   Status:  new  |   Milestone:
Component:  ORM aggregation  | Version:  1.0   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Ticket #3566 (features aggregation for ORM) adds method convert_value
 which fall into "float(value)" and then, does not allow to apply Min, Max,
 etc, to CharFields. sqlite backend overwrites (in DatabaseOperations) this
 and returns value instead of float(value), but postgres backend does not
 overwrite this method.
 I'll attach an improvable workaround on this.

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



Re: [Django] #3872: Bug in SetRemoteAddrFromForwardedFor middleware

2009-04-27 Thread Django
#3872: Bug in SetRemoteAddrFromForwardedFor middleware
+---
  Reporter:  Simon Willison | Owner:  gregorth  
Status:  closed | Milestone:
 Component:  Core framework |   Version:  SVN   
Resolution:  fixed  |  Keywords:  middleware
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by JohnMoylan):

 Maybe the issue is a documentation problem. I had mistakenly assumed that
 this middleware was for use when you have a django app sitting behind a
 reverse proxy. In such a settup you have to use the X-Forwarded-For last
 IP that is before your own reverse proxy ip as the remote-ip.

 If you want to try and get the original Client IP -
 real_ip.split(",")[0].strip() then the current code is probably a good
 attempt but in real world situations may not be as useful as just getting
 the last proxy IP address because it will be more prone to issues with
 proxy anonomizers or caches set up to strip X-Forwarded-For .

-- 
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] #6199: Avoid cache stampedes

2009-04-27 Thread Django
#6199: Avoid cache stampedes
-+--
  Reporter:  jdunck  | Owner:  nobody   

Status:  new | Milestone:  1.1  

 Component:  Cache system|   Version:  SVN  

Resolution:  |  Keywords:  performance 
scalability cache
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

 * cc: sw+dja...@enix.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] #6199: Avoid cache stampedes

2009-04-27 Thread Django
#6199: Avoid cache stampedes
-+--
  Reporter:  jdunck  | Owner:  nobody   

Status:  new | Milestone:  1.1  

 Component:  Cache system|   Version:  SVN  

Resolution:  |  Keywords:  performance 
scalability cache
 Stage:  Design decision needed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

  * milestone:  => 1.1

Comment:

 FYI, there is an other snippets that do the same :
 http://www.djangosnippets.org/snippets/793/


 IMHO, this change should really be merged in the core ; dog-piling is a
 common and dirty problem for everyone who have a few visitors and it's not
 adressed in django.

 If the patch is not included, we should mention this effect on the
 Documentation page to help people know why their server crash under load
 :)

 (I put the milestone to 1.1 so this patch get a "design decision", sorry
 if I shouldn't)

-- 
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] #10630: [PATCH] GZipMiddleware does not handle all MSIE issues.

2009-04-27 Thread Django
#10630: [PATCH] GZipMiddleware does not handle all MSIE issues.
--+-
  Reporter:  sebastian_noack  | Owner:  nobody
Status:  closed   | Milestone:  1.1   
 Component:  HTTP handling|   Version:  1.0   
Resolution:  fixed|  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by sebastian_noack):

 I agree, but wildcards aren't handled by the GZip middleware at the moment
 anyway. The gzip middleware just looks for the string "gzip" in
 HTTP_ACCEPT_ENCODING.

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



[Django] #10931: truncate_html_words doen't handle multi-line tags properly

2009-04-27 Thread Django
#10931: truncate_html_words doen't handle multi-line tags properly
+---
 Reporter:  gsong   |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Template system | Version:  SVN   
 Keywords:  truncatewords_html  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 If you have the following in your HTML, for example:

 {{{
 http://blah.com/something/;>
 }}}

 `truncate_html_words` will include all the words in the tag, as well as
 not close the tag properly if it needs to.

 The attached patch simply adds the `re.S` flag for the two regular
 expressions used in the function.

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