[Changeset] r11040 - django/branches/soc2009/http-wsgi-improvements/django/http

2009-06-17 Thread noreply

Author: ccahoon
Date: 2009-06-18 00:18:35 -0500 (Thu, 18 Jun 2009)
New Revision: 11040

Modified:
   django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py
Log:
[soc2009/http-wsgi-improvements] http.HttpResponse now initializes self._codec 
to None.

Changeset 11030 did not actually pass the regression test suite. This passes 
all except two tests, from test_client_regress. They expect old behavior (which 
is that their responses will be encoded in settings.DEFAULT_CHARSET). I am not 
yet sure if that is the correct expectation for the test to have, so I will do 
investigations into that.

Modified: django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py
===
--- django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py  
2009-06-18 05:01:23 UTC (rev 11039)
+++ django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py  
2009-06-18 05:18:35 UTC (rev 11040)
@@ -276,6 +276,7 @@
 content_type=None, request=None):
 from django.conf import settings
 self._charset = settings.DEFAULT_CHARSET
+self._codec = None
 accept_charset = None
 if mimetype:
 content_type = mimetype # Mimetype is an alias for 
content-type 


--~--~-~--~~~---~--~~
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] r11039 - django/branches/soc2009/http-wsgi-improvements/django/core/handlers

2009-06-17 Thread noreply

Author: ccahoon
Date: 2009-06-18 00:01:23 -0500 (Thu, 18 Jun 2009)
New Revision: 11039

Modified:
   django/branches/soc2009/http-wsgi-improvements/django/core/handlers/base.py
   
django/branches/soc2009/http-wsgi-improvements/django/core/handlers/modpython.py
   django/branches/soc2009/http-wsgi-improvements/django/core/handlers/wsgi.py
Log:
[soc2009/http-wsgi-improvements] Moved common code from core.handlers.modpython 
and core.handlers.wsgi into core.handlers.base.process_request.

Passes regression tests.

Modified: 
django/branches/soc2009/http-wsgi-improvements/django/core/handlers/base.py
===
--- django/branches/soc2009/http-wsgi-improvements/django/core/handlers/base.py 
2009-06-18 01:37:18 UTC (rev 11038)
+++ django/branches/soc2009/http-wsgi-improvements/django/core/handlers/base.py 
2009-06-18 05:01:23 UTC (rev 11039)
@@ -63,6 +63,26 @@
 # as a flag for initialization being complete.
 self._request_middleware = request_middleware
 
+   def process_request(self, request_env): 
+   signals.request_started.send(sender=self.__class__) 
+   try: 
+   try: 
+   request = self.request_class(request_env) 
+   except UnicodeDecodeError: 
+   response = http.HttpResponseBadRequest() 
+   else: 
+   response = self.get_response(request) 
+
+   # Apply response middleware 
+   if not isinstance(response, http.HttpResponseSendFile): 
+   for middleware_method in self._response_middleware: 
+   response = middleware_method(request, response) 
+   response = self.apply_response_fixes(request, response) 
+   finally: 
+   signals.request_finished.send(sender=self.__class__) 
+
+   return response 
+
 def get_response(self, request):
 "Returns an HttpResponse object for the given HttpRequest"
 from django.core import exceptions, urlresolvers

Modified: 
django/branches/soc2009/http-wsgi-improvements/django/core/handlers/modpython.py
===
--- 
django/branches/soc2009/http-wsgi-improvements/django/core/handlers/modpython.py
2009-06-18 01:37:18 UTC (rev 11038)
+++ 
django/branches/soc2009/http-wsgi-improvements/django/core/handlers/modpython.py
2009-06-18 05:01:23 UTC (rev 11039)
@@ -2,7 +2,6 @@
 from pprint import pformat
 
 from django import http
-from django.core import signals
 from django.core.handlers.base import BaseHandler
 from django.core.urlresolvers import set_script_prefix
 from django.utils import datastructures
@@ -191,22 +190,8 @@
 self.load_middleware()
 
 set_script_prefix(req.get_options().get('django.root', ''))
-signals.request_started.send(sender=self.__class__)
-try:
-try:
-request = self.request_class(req)
-except UnicodeDecodeError:
-response = http.HttpResponseBadRequest()
-else:
-response = self.get_response(request)
+response = self.process_request(req)
 
-# Apply response middleware
-for middleware_method in self._response_middleware:
-response = middleware_method(request, response)
-response = self.apply_response_fixes(request, response)
-finally:
-signals.request_finished.send(sender=self.__class__)
-
 # Convert our custom HttpResponse object back into the mod_python req.
 req.content_type = response['Content-Type']
 for key, value in response.items():

Modified: 
django/branches/soc2009/http-wsgi-improvements/django/core/handlers/wsgi.py
===
--- django/branches/soc2009/http-wsgi-improvements/django/core/handlers/wsgi.py 
2009-06-18 01:37:18 UTC (rev 11038)
+++ django/branches/soc2009/http-wsgi-improvements/django/core/handlers/wsgi.py 
2009-06-18 05:01:23 UTC (rev 11039)
@@ -6,7 +6,6 @@
 from StringIO import StringIO
 
 from django import http
-from django.core import signals
 from django.core.handlers import base
 from django.core.urlresolvers import set_script_prefix
 from django.utils import datastructures
@@ -231,22 +230,8 @@
 self.initLock.release()
 
 set_script_prefix(base.get_script_name(environ))
-signals.request_started.send(sender=self.__class__)
-try:
-try:
-request = self.request_class(environ)
-except UnicodeDecodeError:
-response = http.HttpResponseBadRequest()
-else:
-response = self.get_response(request)
+response = self.process_request(environ)
 
-# Apply response middleware
-for middleware_method in 

Re: [Django] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by Alex):

 Oh, I hadn't realized 2.3 didn't have it, though Django 1.1 will support
 2.3, this almost certainly won't get in until 1.2 at which point 2.3 will
 no longer be supported.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by ionut_bizau):

 It's only been deprecated since 2.6. So it's a question of whether Django
 needs to run on 2.3 or not. Also, seems cmp will be removed from 3.0. Does
 Django support 3.0 officially?

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by ionut_bizau):

 OK. I was afraid to use key for compatibility reasons (Python 2.3 doesn't
 support it). Will look into the tests.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by SmileyChris):

 Where do the Python docs say `cmp` has been deprecated? At the very least,
 they show that `key` was introduced in 2.4 so we can't rely on that.

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



Re: [Django] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by Alex):

 It should use the key argument, not the cmp one, as cmp has been
 deprecated.  It also lacks tests.

-- 
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Comment (by ionut_bizau):

 @Alex What's wrong with my 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
-~--~~~~--~~--~--~---



[Changeset] r11037 - in django/branches/soc2009/model-validation: django/db/models/fields tests/modeltests/validation

2009-06-17 Thread noreply

Author: Honza_Kral
Date: 2009-06-17 19:59:07 -0500 (Wed, 17 Jun 2009)
New Revision: 11037

Modified:
   django/branches/soc2009/model-validation/django/db/models/fields/__init__.py
   
django/branches/soc2009/model-validation/tests/modeltests/validation/models.py
   django/branches/soc2009/model-validation/tests/modeltests/validation/tests.py
Log:
[soc2009/model-validation] Added validators to DbFields

ComplexValidators are not yet run on the model and custom message
overring is still not in place

Modified: 
django/branches/soc2009/model-validation/django/db/models/fields/__init__.py
===
--- 
django/branches/soc2009/model-validation/django/db/models/fields/__init__.py
2009-06-18 00:58:39 UTC (rev 11036)
+++ 
django/branches/soc2009/model-validation/django/db/models/fields/__init__.py
2009-06-18 00:59:07 UTC (rev 11037)
@@ -58,13 +58,14 @@
 # creates, creation_counter is used for all user-specified fields.
 creation_counter = 0
 auto_creation_counter = -1
+default_validators = []
 
 def __init__(self, verbose_name=None, name=None, primary_key=False,
 max_length=None, unique=False, blank=False, null=False,
 db_index=False, rel=None, default=NOT_PROVIDED, editable=True,
 serialize=True, unique_for_date=None, unique_for_month=None,
 unique_for_year=None, choices=None, help_text='', db_column=None,
-db_tablespace=None, auto_created=False):
+db_tablespace=None, auto_created=False, validators=[]):
 self.name = name
 self.verbose_name = verbose_name
 self.primary_key = primary_key
@@ -97,6 +98,8 @@
 self.creation_counter = Field.creation_counter
 Field.creation_counter += 1
 
+self.validators = self.default_validators + validators
+
 def __cmp__(self, other):
 # This is needed because bisect does not take a comparison function.
 return cmp(self.creation_counter, other.creation_counter)
@@ -117,6 +120,22 @@
 Returns the converted value. Subclasses should override this.
 """
 return value
+
+def run_validators(self, value):
+if value in validators.EMPTY_VALUES:
+return
+
+errors = []
+for v in self.validators:
+# don't run complex validators since they need model_instance
+# and must therefore be run on the model level
+if not isinstance(v, validators.ComplexValidator):
+try:
+v(value)
+except exceptions.ValidationError, e:
+errors.extend(e.messages)
+if errors:
+raise exceptions.ValidationError(errors)
 
 def validate(self, value, model_instance):
 """
@@ -140,6 +159,7 @@
 ugettext_lazy("This field cannot be blank."))
 
 
+
 def clean(self, value, model_instance):
 """
 Convert the value's type and wun validation. Validation errors from 
to_python
@@ -148,6 +168,7 @@
 """
 value = self.to_python(value)
 self.validate(value, model_instance)
+self.run_validators(value)
 return value
 
 def db_type(self):
@@ -666,15 +687,11 @@
 return super(DecimalField, self).formfield(**defaults)
 
 class EmailField(CharField):
+default_validators = [validators.validate_email]
 def __init__(self, *args, **kwargs):
 kwargs['max_length'] = kwargs.get('max_length', 75)
 CharField.__init__(self, *args, **kwargs)
 
-def formfield(self, **kwargs):
-defaults = {'form_class': forms.EmailField}
-defaults.update(kwargs)
-return super(EmailField, self).formfield(**defaults)
-
 class FilePathField(Field):
 def __init__(self, verbose_name=None, name=None, path='', match=None, 
recursive=False, **kwargs):
 self.path, self.match, self.recursive = path, match, recursive

Modified: 
django/branches/soc2009/model-validation/tests/modeltests/validation/models.py
===
--- 
django/branches/soc2009/model-validation/tests/modeltests/validation/models.py  
2009-06-18 00:58:39 UTC (rev 11036)
+++ 
django/branches/soc2009/model-validation/tests/modeltests/validation/models.py  
2009-06-18 00:59:07 UTC (rev 11037)
@@ -4,11 +4,17 @@
 from django.db import models
 from django.test import TestCase
 
+def validate_answer_to_universe(value):
+if value != 42:
+raise ValidationError('This is not the answer to life, universe and 
everything!')
+
 class ModelToValidate(models.Model):
 name = models.CharField(max_length=100)
 created = models.DateTimeField(default=datetime.now)
 number = models.IntegerField()
 parent = models.ForeignKey('self', blank=True, null=True)
+email = models.EmailField(blank=True)
+f_with_custom_validator = models.IntegerField(blank=True, 

[Changeset] r11036 - django/branches/soc2009/model-validation/django/forms

2009-06-17 Thread noreply

Author: Honza_Kral
Date: 2009-06-17 19:58:39 -0500 (Wed, 17 Jun 2009)
New Revision: 11036

Modified:
   django/branches/soc2009/model-validation/django/forms/forms.py
Log:
[soc2009/model-validation] have complex validators also use error_messages if 
applicable

Modified: django/branches/soc2009/model-validation/django/forms/forms.py
===
--- django/branches/soc2009/model-validation/django/forms/forms.py  
2009-06-18 00:31:57 UTC (rev 11035)
+++ django/branches/soc2009/model-validation/django/forms/forms.py  
2009-06-18 00:58:39 UTC (rev 11036)
@@ -261,7 +261,11 @@
 try:
 v(self.cleaned_data[name], all_values=self.cleaned_data)
 except ValidationError, e:
-self._errors.setdefault(name, 
self.error_class()).extend(e.messages)
+error_list = self._errors.setdefault(name, 
self.error_class())
+if hasattr(e, 'code'):
+error_list.append(field.error_messages.get(e.code, 
e.messages[0]))
+else:
+error_list.extend(e.messages)
 if name in self.cleaned_data:
 del self.cleaned_data[name]
 


--~--~-~--~~~---~--~~
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] r11035 - in django/branches/soc2009/model-validation/django: core forms

2009-06-17 Thread noreply

Author: Honza_Kral
Date: 2009-06-17 19:31:57 -0500 (Wed, 17 Jun 2009)
New Revision: 11035

Modified:
   django/branches/soc2009/model-validation/django/core/exceptions.py
   django/branches/soc2009/model-validation/django/core/validators.py
   django/branches/soc2009/model-validation/django/forms/fields.py
Log:
[soc2009/model-validation] Added code param to ValidationError and use it to 
override validator's messages

Modified: django/branches/soc2009/model-validation/django/core/exceptions.py
===
--- django/branches/soc2009/model-validation/django/core/exceptions.py  
2009-06-18 00:31:37 UTC (rev 11034)
+++ django/branches/soc2009/model-validation/django/core/exceptions.py  
2009-06-18 00:31:57 UTC (rev 11035)
@@ -35,7 +35,7 @@
 NON_FIELD_ERRORS = '__all__'
 class ValidationError(Exception):
 """An error while validating data."""
-def __init__(self, message):
+def __init__(self, message, code=None):
 import operator
 from django.utils.encoding import force_unicode
 """
@@ -49,11 +49,10 @@
 if isinstance(message, list):
 self.messages = [force_unicode(msg) for msg in message]
 else:
+self.code = code
 message = force_unicode(message)
 self.messages = [message]
 
-
-
 def __str__(self):
 # This is needed because, without a __str__(), printing an exception
 # instance would result in this:

Modified: django/branches/soc2009/model-validation/django/core/validators.py
===
--- django/branches/soc2009/model-validation/django/core/validators.py  
2009-06-18 00:31:37 UTC (rev 11034)
+++ django/branches/soc2009/model-validation/django/core/validators.py  
2009-06-18 00:31:57 UTC (rev 11035)
@@ -20,7 +20,7 @@
 
 def validate_email(value):
 if not email_re.search(smart_unicode(value)):
-raise ValidationError(_(u'Enter a valid e-mail address.'))
+raise ValidationError(_(u'Enter a valid e-mail address.'), 
code='invalid')
 
 class ComplexValidator(object):
 def get_value(self, name, all_values, obj):

Modified: django/branches/soc2009/model-validation/django/forms/fields.py
===
--- django/branches/soc2009/model-validation/django/forms/fields.py 
2009-06-18 00:31:37 UTC (rev 11034)
+++ django/branches/soc2009/model-validation/django/forms/fields.py 
2009-06-18 00:31:57 UTC (rev 11035)
@@ -131,7 +131,10 @@
 try:
 v(value)
 except ValidationError, e:
-errors.extend(e.messages)
+if hasattr(e, 'code'):
+errors.append(self.error_messages.get(e.code, 
e.messages[0]))
+else:
+errors.extend(e.messages)
 if errors:
 raise ValidationError(errors)
 


--~--~-~--~~~---~--~~
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] r11034 - django/branches/soc2009/model-validation/django/forms

2009-06-17 Thread noreply

Author: Honza_Kral
Date: 2009-06-17 19:31:37 -0500 (Wed, 17 Jun 2009)
New Revision: 11034

Modified:
   django/branches/soc2009/model-validation/django/forms/fields.py
Log:
[soc2009/model-validation] Changed EmailField to use validators

Modified: django/branches/soc2009/model-validation/django/forms/fields.py
===
--- django/branches/soc2009/model-validation/django/forms/fields.py 
2009-06-18 00:31:18 UTC (rev 11033)
+++ django/branches/soc2009/model-validation/django/forms/fields.py 
2009-06-18 00:31:37 UTC (rev 11034)
@@ -451,20 +451,12 @@
 if not self.regex.search(value):
 raise ValidationError(self.error_messages['invalid'])
 
-email_re = re.compile(
-r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"  # 
dot-atom
-
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"'
 # quoted-string
-r')@(?:[A-Z0-9]+(?:-*[A-Z0-9]+)*\.)+[A-Z]{2,6}$', re.IGNORECASE)  # domain
-
-class EmailField(RegexField):
+class EmailField(CharField):
 default_error_messages = {
 'invalid': _(u'Enter a valid e-mail address.'),
 }
+default_validators = [validators.validate_email]
 
-def __init__(self, max_length=None, min_length=None, *args, **kwargs):
-RegexField.__init__(self, email_re, max_length, min_length, *args,
-**kwargs)
-
 try:
 from django.conf import settings
 URL_VALIDATOR_USER_AGENT = settings.URL_VALIDATOR_USER_AGENT


--~--~-~--~~~---~--~~
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] r11033 - django/branches/soc2009/model-validation/django/forms

2009-06-17 Thread noreply

Author: Honza_Kral
Date: 2009-06-17 19:31:18 -0500 (Wed, 17 Jun 2009)
New Revision: 11033

Modified:
   django/branches/soc2009/model-validation/django/forms/fields.py
Log:
[soc2009/model-validation] Do not run simple validators on empty values

Modified: django/branches/soc2009/model-validation/django/forms/fields.py
===
--- django/branches/soc2009/model-validation/django/forms/fields.py 
2009-06-18 00:16:48 UTC (rev 11032)
+++ django/branches/soc2009/model-validation/django/forms/fields.py 
2009-06-18 00:31:18 UTC (rev 11033)
@@ -121,6 +121,8 @@
 raise ValidationError(self.error_messages['required'])
 
 def run_validators(self, value):
+if value in validators.EMPTY_VALUES:
+return
 errors = []
 for v in self.validators:
 # don't run complex validators since they need all_values


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

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 19:16:48 -0500 (Wed, 17 Jun 2009)
New Revision: 11032

Modified:
   django/trunk/docs/ref/generic-views.txt
   django/trunk/docs/topics/index.txt
Log:
Refs #11336 -- Another dummy commit to force refresh of some index pages by 
Sphinx, caused by file ommitted from [11025] and included in [11026]. Thanks to 
Peter Landry for the report, and Ramiro for the explanation.

Modified: django/trunk/docs/ref/generic-views.txt
===
--- django/trunk/docs/ref/generic-views.txt 2009-06-17 23:57:27 UTC (rev 
11031)
+++ django/trunk/docs/ref/generic-views.txt 2009-06-18 00:16:48 UTC (rev 
11032)
@@ -1088,3 +1088,4 @@
   variable's name depends on the ``template_object_name`` parameter, which
   is ``'object'`` by default. If ``template_object_name`` is ``'foo'``,
   this variable's name will be ``foo``.
+

Modified: django/trunk/docs/topics/index.txt
===
--- django/trunk/docs/topics/index.txt  2009-06-17 23:57:27 UTC (rev 11031)
+++ django/trunk/docs/topics/index.txt  2009-06-18 00:16:48 UTC (rev 11032)
@@ -26,3 +26,4 @@
serialization
settings
signals
+


--~--~-~--~~~---~--~~
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] #11336: Warning under the "Generic Views" header in main docs page

2009-06-17 Thread Django
#11336: Warning under the "Generic Views" header in main docs page
-+--
  Reporter:  peter.lan...@gmail.com  | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Documentation   |   Version:  SVN   
Resolution:  fixed   |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

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

Comment:

 Fixed in r11031

-- 
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] r11031 - in django/trunk/docs: . ref

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 18:57:27 -0500 (Wed, 17 Jun 2009)
New Revision: 11031

Modified:
   django/trunk/docs/index.txt
   django/trunk/docs/ref/index.txt
Log:
Fixed #11336 -- Dummy commit to force refresh of some index pages by Sphinx, 
caused by file ommitted from [11025] and included in [11026]. Thanks to Peter 
Landry for the report, and Ramiro for the explanation.

Modified: django/trunk/docs/index.txt
===
--- django/trunk/docs/index.txt 2009-06-17 20:42:15 UTC (rev 11030)
+++ django/trunk/docs/index.txt 2009-06-17 23:57:27 UTC (rev 11031)
@@ -1,3 +1,4 @@
+
 .. _index:
 
 
@@ -33,70 +34,70 @@
 First steps
 ===
 
-* **From scratch:** 
+* **From scratch:**
   :ref:`Overview ` |
   :ref:`Installation `
-  
-* **Tutorial:** 
-  :ref:`Part 1 ` | 
-  :ref:`Part 2 ` | 
-  :ref:`Part 3 ` | 
+
+* **Tutorial:**
+  :ref:`Part 1 ` |
+  :ref:`Part 2 ` |
+  :ref:`Part 3 ` |
   :ref:`Part 4 `
 
 The model layer
 ===
 
-* **Models:** 
-  :ref:`Model syntax ` | 
-  :ref:`Field types ` | 
+* **Models:**
+  :ref:`Model syntax ` |
+  :ref:`Field types ` |
   :ref:`Meta options `
-  
-* **QuerySets:** 
-  :ref:`Executing queries ` | 
+
+* **QuerySets:**
+  :ref:`Executing queries ` |
   :ref:`QuerySet method reference `
-  
-* **Model instances:** 
-  :ref:`Instance methods ` | 
+
+* **Model instances:**
+  :ref:`Instance methods ` |
   :ref:`Accessing related objects `
-  
-* **Advanced:** 
-  :ref:`Managers ` | 
-  :ref:`Raw SQL ` | 
-  :ref:`Transactions ` | 
-  :ref:`Aggregation ` | 
+
+* **Advanced:**
+  :ref:`Managers ` |
+  :ref:`Raw SQL ` |
+  :ref:`Transactions ` |
+  :ref:`Aggregation ` |
   :ref:`Custom fields `
-  
-* **Other:** 
-  :ref:`Supported databases ` | 
-  :ref:`Legacy databases ` | 
+
+* **Other:**
+  :ref:`Supported databases ` |
+  :ref:`Legacy databases ` |
   :ref:`Providing initial data `
 
 The template layer
 ==
 
-* **For designers:** 
-  :ref:`Syntax overview ` | 
+* **For designers:**
+  :ref:`Syntax overview ` |
   :ref:`Built-in tags and filters `
-
-* **For programmers:** 
-  :ref:`Template API ` | 
+
+* **For programmers:**
+  :ref:`Template API ` |
   :ref:`Custom tags and filters `
 
 The view layer
 ==
 
-* **The basics:** 
-  :ref:`URLconfs ` | 
-  :ref:`View functions ` | 
+* **The basics:**
+  :ref:`URLconfs ` |
+  :ref:`View functions ` |
   :ref:`Shortcuts `
-
+
 * **Reference:**  :ref:`Request/response objects `
-
-* **File uploads:** 
-  :ref:`Overview ` | 
-  :ref:`File objects ` | 
-  :ref:`Storage API ` | 
-  :ref:`Managing files ` | 
+
+* **File uploads:**
+  :ref:`Overview ` |
+  :ref:`File objects ` |
+  :ref:`Storage API ` |
+  :ref:`Managing files ` |
   :ref:`Custom storage `
 
 * **Generic views:**
@@ -106,50 +107,50 @@
 * **Advanced:**
   :ref:`Generating CSV ` |
   :ref:`Generating PDF `
-
-* **Middleware:** 
-  :ref:`Overview ` | 
+
+* **Middleware:**
+  :ref:`Overview ` |
   :ref:`Built-in middleware classes `
 
 Forms
 =
 
-* **The basics:** 
-  :ref:`Overview ` | 
-  :ref:`Form API ` | 
-  :ref:`Built-in fields ` | 
+* **The basics:**
+  :ref:`Overview ` |
+  :ref:`Form API ` |
+  :ref:`Built-in fields ` |
   :ref:`Built-in widgets `
-
-* **Advanced:** 
-  :ref:`Forms for models ` | 
-  :ref:`Integrating media ` | 
-  :ref:`Formsets ` | 
+
+* **Advanced:**
+  :ref:`Forms for models ` |
+  :ref:`Integrating media ` |
+  :ref:`Formsets ` |
   :ref:`Customizing validation `
-
-* **Extras:** 
-  :ref:`Form preview ` | 
+
+* **Extras:**
+  :ref:`Form preview ` |
   :ref:`Form wizard `
 
 The development process
 ===
 
-* **Settings:** 
-  :ref:`Overview ` | 
+* **Settings:**
+  :ref:`Overview ` |
   :ref:`Full list of settings `
 
-* **django-admin.py and manage.py:** 
-  :ref:`Overview ` | 
+* **django-admin.py and manage.py:**
+  :ref:`Overview ` |
   :ref:`Adding custom commands `
-
+
 * **Testing:**  :ref:`Overview `
-
-* **Deployment:** 
-  :ref:`Overview ` | 
+
+* **Deployment:**
+  :ref:`Overview ` |
   :ref:`Apache/mod_wsgi ` |
   :ref:`Apache/mod_python ` |
-  :ref:`FastCGI/SCGI/AJP ` | 
-  :ref:`Apache authentication ` | 
-  :ref:`Serving static files ` | 
+  :ref:`FastCGI/SCGI/AJP ` |
+  :ref:`Apache authentication ` |
+  :ref:`Serving static files ` |
   :ref:`Tracking code errors by e-mail `
 
 Other batteries 

Re: [Django] #11331: Memcached backend closes connection after every request

2009-06-17 Thread Django
#11331: Memcached backend closes connection after every request
---+
  Reporter:  boo...@gmail.com  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Cache system  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by boo...@gmail.com):

 I've managed to trigger it on multiple systems so far - as python really
 doesn't care about where it runs, we develop on windows and test in a vm
 with ubuntu server (8.10 x64); deployment will be on ubuntu 8.04 LTS x64.
 Using Python-memcached.

 I run memcached locally with -vv, so every event is printed to console.
 When I started using it, I was already wondering about the part with "<104
 connection closed." "<104 new client connection" spam, but I didn't give
 it any thought as it was much faster than "good enough" already.

 The problem is when we added feeds, we made sure that a cache hit meant 0
 queries to the database - that, plus no template rendering
 (simplejson.dumps, pprint or xml.etree magic) meant that you get a huge
 throughput when benchmarked in a loop. It probably costs as much cpu as
 getting hello world over memcached. Example url:
 http://worldoflogs.com/feeds/guilds/7/raids/?t=plain

 I think TIME_WAIT on both the vm and windows is a minute, it takes about
 that long to recover from the out of sockets condition. When netstat -an |
 grep TIME_WAIT | wc -l reaches around 10k, connections start to fail
 increasing chance the longer I let JMeter run. Oh, and that netstat -an
 command sometimes returns 0 when there's too many of them open under
 windows, I bet they never stress tested that :P


 Finally, there was no beefy hardware involved triggering this:

 Local: manage.py runserver (/me hides), standard core 2 duo desktop, 1
 request thread in JMeter.
 VM: apache 2.2 / mod_wsgi 2.5 / python 2.5 / django 1.02, VirtualBox, 1
 cpu. 1 request thread, JMeter runs on the VM host.

 On production, we would probably run out of socket much quicker, with 2x
 quad core xeons (core2 generation) on each machine, in theory. In
 practice, our traffic isn't this high yet, during the peak, there were
 usually 3k sockets stuck in TIME_WAIT, that number is reduced by half now
 with ~1.3k in TIME_WAIT (I blame no pconnect in psycopg2 backend and port
 80), 150 ESTABLISHED and 200 FIN_WAIT1/2. (output from netstat -an --tcp |
 awk '/tcp/ {print $6}' | sort | uniq -c)

 Fun fact: during benchmarks, the python process, memcached and JMeter uses
 equal amounts of resources -- it's incredible how efficient the python
 side of the setup is, 75 requests for a single thread for the whole
 combination is just silly.


 @tuning: preferably not - it works fine without the disconnect_all() call
 after every request, I've saw a few horror story threads about how it
 messes up clients behind a NAT and break random things, I prefer not to
 find out about that on production.

-- 
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] #11337: Possible missing comma in Tutorial Part 1 (but the interpreter is the final authority)

2009-06-17 Thread Django
#11337: Possible missing comma in Tutorial Part 1 (but the interpreter is the 
final
authority)
+---
  Reporter:  thiggins   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution:  invalid|  Keywords:  missing, comma, syntax
 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:

 A trailing comma is only necessary for a single item tuple, thus the
 current code works fine.

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



[Django] #11337: Possible missing comma in Tutorial Part 1 (but the interpreter is the final authority)

2009-06-17 Thread Django
#11337: Possible missing comma in Tutorial Part 1 (but the interpreter is the 
final
authority)
+---
 Reporter:  thiggins|   Owner:  nobody
   Status:  new |   Milestone:
Component:  Documentation   | Version:  1.0   
 Keywords:  missing, comma, syntax  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 This is what we have:

 {{{

 INSTALLED_APPS = (

 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'mysite.polls'

 )

 }}}

 I'm expecting, with a trailing comma, the following:
 {{{

 INSTALLED_APPS = (

 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'mysite.polls',

 )

 }}}

-- 
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] #11010: Add a foundation for rowlevel permissions in Django

2009-06-17 Thread Django
#11010: Add a foundation for rowlevel permissions in Django
-+--
  Reporter:  apollo13| Owner:  nobody
Status:  new | Milestone:  1.2   
 Component:  Authentication  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #11109: Changeset 8224 broken in Trac

2009-06-17 Thread Django
#11109: Changeset 8224 broken in Trac
+---
  Reporter:  frasern| Owner:  nobody
Status:  new| Milestone:
 Component:  Django Web site|   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Verified. Nothing anyone outside of the core team can do to fix it, so
 I'll promote straight to checkin

-- 
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] #11158: get_image_dimensions very slow after 1 call

2009-06-17 Thread Django
#11158: get_image_dimensions very slow after 1 call
-+--
  Reporter:  kua | Owner:  nobody   
  
Status:  new | Milestone:   
  
 Component:  Core framework  |   Version:  1.0  
  
Resolution:  |  Keywords:  get_image_dimensions, 
field, save, slow
 Stage:  Accepted| Has_patch:  1
  
Needs_docs:  0   |   Needs_tests:  0
  
Needs_better_patch:  1   |  
-+--
Changes (by SmileyChris):

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

Comment:

 Patch is messy, but the ticket seems valid.

-- 
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] #11141: django.contrib.admin docs -- Error in code example

2009-06-17 Thread Django
#11141: django.contrib.admin docs -- Error in code example
+---
  Reporter:  jodal  | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I'm guessing based on the slice, that this is actually what was intended.

-- 
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] #11221: sqlsequencereset documentation refers a URL that results in a 404

2009-06-17 Thread Django
#11221: sqlsequencereset documentation refers a URL that results in a 404
--+-
  Reporter:  Rob Hudson   | Owner:  
nobody
Status:  new  | Milestone:  
  
 Component:  Documentation|   Version:  1.0 
  
Resolution:   |  Keywords:  
  
 Stage:  Ready for checkin| Has_patch:  0   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  0|  
--+-
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Something like 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] #11228: FieldFile with check if file exists.

2009-06-17 Thread Django
#11228: FieldFile with check if file exists.
---+
  Reporter:  hersonls  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  1 
Needs_better_patch:  1 |  
---+
Changes (by SmileyChris):

  * stage:  Unreviewed => Design decision needed

Comment:

 And "is_exists" seems ugly. Why not just "exists"?

 But yeah, I'm dubious as whether this functionality is important enough to
 include in the api.

-- 
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] #11229: The mod_wsgi documentation about hosting of static files wrongly refers to mod_python documentation.

2009-06-17 Thread Django
#11229: The mod_wsgi documentation about hosting of static files wrongly refers 
to
mod_python documentation.
+---
  Reporter:  grahamd| Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * component:  Uncategorized => Documentation
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #11270: Cache templatetag with memcached can't handle long tags

2009-06-17 Thread Django
#11270: Cache templatetag with memcached can't handle long tags
---+
  Reporter:  235   | Owner:  nobody
Status:  new   | Milestone:  1.1   
 Component:  Cache system  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Changes (by SmileyChris):

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

Comment:

 If Jacob thought #10016 was 1.1 worthy, this should be too.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #11273: Tutorial - Part 2 should note the first appearance of curly brackets

2009-06-17 Thread Django
#11273: Tutorial - Part 2 should note the first appearance of curly brackets
-+--
  Reporter:  thiggins| Owner:  nobody
Status:  new | Milestone:
 Component:  Documentation   |   Version:  1.0   
Resolution:  |  Keywords:  curly brackets
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by SmileyChris):

  * component:  Uncategorized => Documentation

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



Re: [Django] #11273: Tutorial - Part 2 should note the first appearance of curly brackets

2009-06-17 Thread Django
#11273: Tutorial - Part 2 should note the first appearance of curly brackets
-+--
  Reporter:  thiggins| Owner:  nobody
Status:  new | Milestone:
 Component:  Uncategorized   |   Version:  1.0   
Resolution:  |  Keywords:  curly brackets
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #11289: Name conflict in test suite

2009-06-17 Thread Django
#11289: Name conflict in test suite
+---
  Reporter:  steveire   | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #11315: add coercion to URLconf

2009-06-17 Thread Django
#11315: add coercion to URLconf
---+
  Reporter:  klr...@gmail.com  | Owner:  nobody
Status:  closed| Milestone:
 Component:  HTTP handling |   Version:  1.0   
Resolution:  wontfix   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by SmileyChris):

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

Comment:

 I don't see the necessity.

 Coerce it in your view, or if it's a common case, use a decorator to do
 the coercion (you can even use this decorator directly in the url conf).

-- 
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] #11299: Pluggable cache key algorithm

2009-06-17 Thread Django
#11299: Pluggable cache key algorithm
-+--
  Reporter:  ludo| Owner:  nobody
Status:  new | Milestone:
 Component:  Cache system|   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Design decision needed
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #11334: Django fails to show non-latin exception messages from PostgreSQL running on FastCGI

2009-06-17 Thread Django
#11334: Django fails to show non-latin exception messages from PostgreSQL 
running
on FastCGI
+---
  Reporter:  Loststylus | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by anonymous):

  * needs_better_patch:  => 0
  * summary:  Django fails to show non-latin exception messages from
  PosgreSQL running on FastCGI => Django fails to
  show non-latin exception messages from
  PostgreSQL running on FastCGI
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #10378: authenticate() method should not continue on built-in or generic exceptions

2009-06-17 Thread Django
#10378: authenticate() method should not continue on built-in or generic 
exceptions
-+--
  Reporter:  bendavis78  | Owner:  nobody   
 
Status:  new | Milestone:   
 
 Component:  Authentication  |   Version:  1.0  
 
Resolution:  |  Keywords:  authenticate 
TypeError
 Stage:  Design decision needed  | Has_patch:  0
 
Needs_docs:  0   |   Needs_tests:  0
 
Needs_better_patch:  0   |  
-+--
Comment (by bendavis78):

 If anyone's curious about a workaround for this,  you can wrap your
 authenticate to catch the !TypeError.  I created a custom exception called
 "!NextBackend" that I throw if I want the authentication backend to
 continue,  then in the wrapper if a !TypeError is caught, throw it as a
 "_TypeError" exception so that a real !TypeError is not caught by the core
 auth code.

 {{{
 #!python
 class NextBackend(Exception): pass
 class _TypeError(Exception): pass

 class MyCustomBackend(ModelBackend):
 """
 Wrapper method for _authenticate(). See
 http://code.djangoproject.com/ticket/10378
 """
 def authenticate(self, **kwargs):
 try:
 return self._authenticate(**kwargs)
 except TypeError:
 e, args, tb = sys.exc_info()
 raise _TypeError, args, tb
 except NextBackend:
 raise TypeError

 def _authenticate(self, **kwargs):
 # Your auth code here...
 if authentication_fails():
 raise NextBackend

 }}}

 It's fugly but it works :-P

-- 
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] #10594: distance(geom) results ambiguous when the PointField can be null

2009-06-17 Thread Django
#10594: distance(geom) results ambiguous when the PointField can be null
-+--
  Reporter:  whiteinge   | Owner:  nobody   
Status:  new | Milestone:   
 Component:  GIS |   Version:  SVN  
Resolution:  |  Keywords:  distance queryset
 Stage:  Unreviewed  | Has_patch:  1
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by yourcelf):

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

Comment:

 The problem seems to arise from line 49 in django/contrib/gis/measure.py
 {{{
 if not isinstance(value, float): value = float(value)
 }}}

 Where "value" is the value of the geometry field.  If the field is null,
 this becomes None, and propagates a ValueError up the stack resulting in
 an empty queryset.

 I'm attaching a patch which fixes this by altering the method which
 constructs geometry objects out of the measurement attributes to instead
 keep the attribute as "None" if the value is None.

-- 
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] #11336: Warning under the "Generic Views" header in main docs page

2009-06-17 Thread Django
#11336: Warning under the "Generic Views" header in main docs page
-+--
  Reporter:  peter.lan...@gmail.com  | Owner:  nobody
Status:  new | Milestone:
 Component:  Documentation   |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

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

Comment:

 Yes, the references were added in `index.txt` and `topics/index.txt` but
 the target file `topics/generic-views.txt` wasn't added until r11026.
 Sphinx doesn't to know it needs to re-process the other files to
 regenerate the xrefs, so these two links are broken until the next commit
 that touches them and so forces the re-generation of the HTML copies.

-- 
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] r11030 - in django/branches/soc2009/http-wsgi-improvements: django/http tests/regressiontests/charsets

2009-06-17 Thread noreply

Author: ccahoon
Date: 2009-06-17 15:42:15 -0500 (Wed, 17 Jun 2009)
New Revision: 11030

Modified:
   django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py
   django/branches/soc2009/http-wsgi-improvements/django/http/charsets.py
   
django/branches/soc2009/http-wsgi-improvements/tests/regressiontests/charsets/models.py
   
django/branches/soc2009/http-wsgi-improvements/tests/regressiontests/charsets/tests.py
   
django/branches/soc2009/http-wsgi-improvements/tests/regressiontests/charsets/urls.py
   
django/branches/soc2009/http-wsgi-improvements/tests/regressiontests/charsets/views.py
Log:
[soc2009/http-wsgi-improvements] Added more tests for #10190, changed logic to 
pass them. http.charsets.determine_charset now takes the accept_charset header 
instead of the request.

Passes the test suite, including the extensive tests on HttpResponse's 
detection of Accept-Charset and finding the codec from content_type. However, 
it does not test that the codec encodes properly.

Modified: django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py
===
--- django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py  
2009-06-17 20:02:17 UTC (rev 11029)
+++ django/branches/soc2009/http-wsgi-improvements/django/http/__init__.py  
2009-06-17 20:42:15 UTC (rev 11030)
@@ -13,7 +13,7 @@
 from django.utils.datastructures import MultiValueDict, ImmutableList
 from django.utils.encoding import smart_str, iri_to_uri, force_unicode
 from django.http.multipartparser import MultiPartParser
-from django.http.charsets import determine_charset
+from django.http.charsets import determine_charset, get_codec
 from django.conf import settings
 from django.core.files import uploadhandler
 from utils import *
@@ -273,13 +273,20 @@
 status_code = 200
 
 def __init__(self, content='', mimetype=None, status=None,
-content_type=None, origin_request=None):
+content_type=None, request=None):
 from django.conf import settings
 self._charset = settings.DEFAULT_CHARSET
+accept_charset = None
 if mimetype:
 content_type = mimetype # Mimetype is an alias for 
content-type 
-if origin_request or content_type:
-   self._charset, self._codec = determine_charset(content_type, 
origin_request)
+if request:
+accept_charset = request.META.get("ACCEPT_CHARSET")
+if accept_charset or content_type:
+charset, codec = determine_charset(content_type, accept_charset)
+if charset:
+self._charset = charset
+if codec:
+self._codec = codec
 if not content_type:
 content_type = "%s; charset=%s" % (settings.DEFAULT_CONTENT_TYPE,
 self._charset)
@@ -365,7 +372,10 @@
 def _get_content(self):
 if self.has_header('Content-Encoding'):
 return ''.join(self._container)
-return smart_str(''.join(self._container), self._charset)
+
+if not self._codec:
+self._codec = get_codec(self._charset)
+return smart_str(''.join(self._container), self._codec.name)
 
 def _set_content(self, value):
 self._container = [value]
@@ -379,8 +389,10 @@
 
 def next(self):
 chunk = self._iterator.next()
+if not self._codec:
+self._codec = get_codec(self._charset)
 if isinstance(chunk, unicode):
-chunk = chunk.encode(self._charset)
+chunk = chunk.encode(self._codec.name)
 return str(chunk)
 
 def close(self):

Modified: django/branches/soc2009/http-wsgi-improvements/django/http/charsets.py
===
--- django/branches/soc2009/http-wsgi-improvements/django/http/charsets.py  
2009-06-17 20:02:17 UTC (rev 11029)
+++ django/branches/soc2009/http-wsgi-improvements/django/http/charsets.py  
2009-06-17 20:42:15 UTC (rev 11030)
@@ -252,7 +252,7 @@
 
 CONTENT_TYPE_RE = re.compile('.*; charset=([\w\d-]+);?')
 ACCEPT_CHARSET_RE = 
re.compile('(?P([\w\d-]+)|(\*))(;q=(?P[01](\.\d{1,3})?))?,?')
-def determine_charset(content_type, request):
+def determine_charset(content_type, accept_charset_header):
 """
 Searches request headers from clients and mimetype settings (which may be 
set 
 by users) for indicators of which charset and encoding the response should 
use.
@@ -270,7 +270,6 @@
 """
 codec = None
 charset = None
-
 # Attempt to get the codec from a content-type, and verify that the 
charset is valid.
 if content_type:
 match = CONTENT_TYPE_RE.match(content_type)
@@ -279,14 +278,19 @@
 codec = get_codec(charset)
 if not codec:   # Unsupported charset
 # we should throw an exception here
-print "No CODEC ON MIMETYPE"
+# print "No CODEC ON 

[Django] #11336: Warning under the "Generic Views" header in main docs page

2009-06-17 Thread Django
#11336: Warning under the "Generic Views" header in main docs page
+---
 Reporter:  peter.lan...@gmail.com  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Documentation   | Version:  SVN   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 http://docs.djangoproject.com/en/dev/

 Under generic views, the following error message is displayed:

 {{{
 System Message: WARNING/2 (/home/djangodocs/en/dev/index.txt)

 undefined label: topics-generic-views
 }}}


 Possibly related to [http://code.djangoproject.com/changeset/11025]?

-- 
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] r11029 - in django/branches/releases/1.0.X: . docs/topics

2009-06-17 Thread noreply

Author: kmtracey
Date: 2009-06-17 15:02:17 -0500 (Wed, 17 Jun 2009)
New Revision: 11029

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/docs/topics/generic-views.txt
Log:
[1.0.X] Fixed #11335 -- Corrected model reference in generic views doc. Thanks 
oyvind. 

r11028 from trunk.



Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009,11019,11021-11022,11025-11026
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009,11019,11021-11022,11025-11026,11028

Modified: django/branches/releases/1.0.X/docs/topics/generic-views.txt
===
--- django/branches/releases/1.0.X/docs/topics/generic-views.txt
2009-06-17 19:59:50 UTC (rev 11028)
+++ 

[Changeset] r11028 - django/trunk/docs/topics

2009-06-17 Thread noreply

Author: kmtracey
Date: 2009-06-17 14:59:50 -0500 (Wed, 17 Jun 2009)
New Revision: 11028

Modified:
   django/trunk/docs/topics/generic-views.txt
Log:
Fixed #11335 -- Corrected model reference in generic views doc.  Thanks oyvind.


Modified: django/trunk/docs/topics/generic-views.txt
===
--- django/trunk/docs/topics/generic-views.txt  2009-06-17 14:19:54 UTC (rev 
11027)
+++ django/trunk/docs/topics/generic-views.txt  2009-06-17 19:59:50 UTC (rev 
11028)
@@ -297,7 +297,7 @@
 }
 
 or you could use a less obvious but shorter version that relies on the fact 
that
-``Publisher.objects.all`` is itself a callable:
+``Book.objects.all`` is itself a callable:
 
 .. parsed-literal::
 


--~--~-~--~~~---~--~~
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] #11234: BlockNode unsafely manages context

2009-06-17 Thread Django
#11234: BlockNode unsafely manages context
-+--
  Reporter:  brutimus| Owner:  brutimus
Status:  assigned| Milestone:  
 Component:  Template system |   Version:  SVN 
Resolution:  |  Keywords:  
 Stage:  Design decision needed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Comment (by SmileyChris):

 Well I'm glad we got to the same page :)

 Yeah, I had that issue with using context.update() too when I started -
 could you open another ticket for the doc clarification please?

-- 
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] #11335: Error in docs, Publisher should be Book

2009-06-17 Thread Django
#11335: Error in docs, Publisher should be Book
+---
  Reporter:  oyvind | Owner:  nobody
Status:  new| Milestone:  1.1   
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Alex):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * 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] #11335: Error in docs, Publisher should be Book

2009-06-17 Thread Django
#11335: Error in docs, Publisher should be Book
---+
 Reporter:  oyvind |   Owner:  nobody
   Status:  new|   Milestone:  1.1   
Component:  Documentation  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 http://code.djangoproject.com/browser/django/trunk/docs/topics/generic-
 views.txt#L300

-- 
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] #11331: Memcached backend closes connection after every request

2009-06-17 Thread Django
#11331: Memcached backend closes connection after every request
---+
  Reporter:  boo...@gmail.com  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Cache system  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mmalone):

 * cc: mjmal...@gmail.com (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Unfortunately this is the way TCP works. There are, however, a number of
 ways to address this problem without changing anything in Django. In any
 case, the dangling connection problem (#5133) is substantially worse since
 the sockets in TIME_WAIT will eventually become usable again.

 It would be helpful if you could provide some version information for the
 libraries, servers, and environment you're using. In particular, what is
 your MSL and how long are your sockets left in TIME_WAIT. Also, what
 version of memcached/cmemcached/python-memcache are you using (I'm just
 speculating, but it's possible that sockets aren't being closed properly).
 A typical linux install has a 30s MSL and 60s TIME_WAIT. With this
 configuration you'd need to be handling hundreds of requests per second on
 a single server for this to be an issue. Django is fast, but to handle
 that volume of requests either your app is trivial or your hardware is a
 lot more powerful than mine ;). Is this an issue you've seen in
 production?

 It would also be useful if you could provide a short script that will
 reproduce this problem.

 Another option would be to send a quit message to the server instead of
 closing the socket. This would cause the server to initiate the close.
 Since the server isn't using an ephemeral port for each socket it should
 be able to manage lots of sockets in TIME_WAIT without suffering socket
 exhaustion.

 If you're running linux here are some tuning parameters that may be
 helpful:
 {{{
 net.ipv4.ip_local_port_range = 1024 65535
 net.ipv4.tcp_tw_recycle = 1
 net.ipv4.tcp_tw_reuse = 1
 }}}
 (See also, http://www.ietf.org/rfc/rfc1337.txt)

 Finally, I think newer versions of memcached support UDP, which would also
 provide a solution to this problem (although I'm not sure what support is
 like in the python libraries).

-- 
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] #11305: Support for "Conditional Aggregates"

2009-06-17 Thread Django
#11305: Support for "Conditional Aggregates"
--+-
  Reporter:  bendavis78   | Owner: 
Status:  new  | Milestone: 
 Component:  ORM aggregation  |   Version:  1.0
Resolution:   |  Keywords: 
 Stage:  Someday/Maybe| Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Comment (by Alex):

 I've implemented something similar to this this way:
 http://paste.pocoo.org/show/123690/

-- 
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] #11334: Django fails to show non-latin exception messages from PosgreSQL running on FastCGI

2009-06-17 Thread Django
#11334: Django fails to show non-latin exception messages from PosgreSQL 
running on
FastCGI
---+
 Reporter:  Loststylus |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Run django via FastCGI (used nginx 0.6.x to deploy) with PosgreSQL. Try to
 execute some query, that will produce an error. If the error returned by
 PosgreSQL is not latin (Russian in my case), django tries to render an
 error page, but fails. nginx return a page with "Unhandled exception"

 If you turn on debug in flup, you will see the traceback, that shows that
 django tries to force_unicode the error message and fails with
 UnicodeDecodeError, so the user cannot determine the problem.

 I'll attach a flup error page with stack trace.

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

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 09:16:27 -0500 (Wed, 17 Jun 2009)
New Revision: 11026

Added:
   django/trunk/docs/topics/generic-views.txt
Log:
Update to [11025]. This time, actually include the new generic views 
documentation.

Added: django/trunk/docs/topics/generic-views.txt
===
--- django/trunk/docs/topics/generic-views.txt  (rev 0)
+++ django/trunk/docs/topics/generic-views.txt  2009-06-17 14:16:27 UTC (rev 
11026)
@@ -0,0 +1,503 @@
+.. _topics-generic-views:
+
+=
+Generic views
+=
+
+Writing Web applications can be monotonous, because we repeat certain patterns
+again and again. Django tries to take away some of that monotony at the model
+and template layers, but Web developers also experience this boredom at the 
view
+level.
+
+Django's *generic views* were developed to ease that pain. They take certain
+common idioms and patterns found in view development and abstract them so that
+you can quickly write common views of data without having to write too much
+code.
+
+We can recognize certain common tasks, like displaying a list of objects, and
+write code that displays a list of *any* object. Then the model in question can
+be passed as an extra argument to the URLconf.
+
+Django ships with generic views to do the following:
+
+* Perform common "simple" tasks: redirect to a different page and
+  render a given template.
+
+* Display list and detail pages for a single object. If we were creating an
+  application to manage conferences then a ``talk_list`` view and a
+  ``registered_user_list`` view would be examples of list views. A single
+  talk page is an example of what we call a "detail" view.
+
+* Present date-based objects in year/month/day archive pages,
+  associated detail, and "latest" pages. The Django Weblog's
+  (http://www.djangoproject.com/weblog/) year, month, and
+  day archives are built with these, as would be a typical
+  newspaper's archives.
+
+* Allow users to create, update, and delete objects -- with or
+  without authorization.
+
+Taken together, these views provide easy interfaces to perform the most common
+tasks developers encounter.
+
+Using generic views
+===
+
+All of these views are used by creating configuration dictionaries in
+your URLconf files and passing those dictionaries as the third member of the
+URLconf tuple for a given pattern.
+
+For example, here's a simple URLconf you could use to present a static "about"
+page::
+
+from django.conf.urls.defaults import *
+from django.views.generic.simple import direct_to_template
+
+urlpatterns = patterns('',
+('^about/$', direct_to_template, {
+'template': 'about.html'
+})
+)
+
+Though this might seem a bit "magical" at first glance  -- look, a view with no
+code! --, actually the ``direct_to_template`` view simply grabs information 
from
+the extra-parameters dictionary and uses that information when rendering the
+view.
+
+Because this generic view -- and all the others -- is a regular view functions
+like any other, we can reuse it inside our own views. As an example, let's
+extend our "about" example to map URLs of the form ``/about//`` to
+statically rendered ``about/.html``. We'll do this by first modifying
+the URLconf to point to a view function:
+
+.. parsed-literal::
+
+from django.conf.urls.defaults import *
+from django.views.generic.simple import direct_to_template
+**from mysite.books.views import about_pages**
+
+urlpatterns = patterns('',
+('^about/$', direct_to_template, {
+'template': 'about.html'
+}),
+**('^about/(\w+)/$', about_pages),**
+)
+
+Next, we'll write the ``about_pages`` view::
+
+from django.http import Http404
+from django.template import TemplateDoesNotExist
+from django.views.generic.simple import direct_to_template
+
+def about_pages(request, page):
+try:
+return direct_to_template(request, template="about/%s.html" % page)
+except TemplateDoesNotExist:
+raise Http404()
+
+Here we're treating ``direct_to_template`` like any other function. Since it
+returns an ``HttpResponse``, we can simply return it as-is. The only slightly
+tricky business here is dealing with missing templates. We don't want a
+nonexistent template to cause a server error, so we catch
+``TemplateDoesNotExist`` exceptions and return 404 errors instead.
+
+.. admonition:: Is there a security vulnerability here?
+
+Sharp-eyed readers may have noticed a possible security hole: we're
+constructing the template name using interpolated content from the browser
+(``template="about/%s.html" % page``). At first glance, this looks like a
+classic *directory traversal* vulnerability. But is it really?
+
+Not exactly. Yes, a maliciously crafted value of ``page`` could 

[Changeset] r11025 - in django/trunk/docs: . internals ref topics

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 09:09:56 -0500 (Wed, 17 Jun 2009)
New Revision: 11025

Modified:
   django/trunk/docs/index.txt
   django/trunk/docs/internals/documentation.txt
   django/trunk/docs/ref/generic-views.txt
   django/trunk/docs/topics/index.txt
Log:
Fixed #10336 -- Added improved documentation of generic views. Thanks to Jacob 
and Adrian for the original text (from the DjangoBook), and Ramiro for doing 
the work of porting the docs.

Modified: django/trunk/docs/index.txt
===
--- django/trunk/docs/index.txt 2009-06-17 13:54:43 UTC (rev 11024)
+++ django/trunk/docs/index.txt 2009-06-17 14:09:56 UTC (rev 11025)
@@ -98,10 +98,13 @@
   :ref:`Storage API ` | 
   :ref:`Managing files ` | 
   :ref:`Custom storage `
-  
-* **Advanced:** 
-  :ref:`Generic views ` | 
-  :ref:`Generating CSV ` | 
+
+* **Generic views:**
+  :ref:`Overview` |
+  :ref:`Built-in generic views`
+
+* **Advanced:**
+  :ref:`Generating CSV ` |
   :ref:`Generating PDF `
 
 * **Middleware:** 

Modified: django/trunk/docs/internals/documentation.txt
===
--- django/trunk/docs/internals/documentation.txt   2009-06-17 13:54:43 UTC 
(rev 11024)
+++ django/trunk/docs/internals/documentation.txt   2009-06-17 14:09:56 UTC 
(rev 11025)
@@ -130,11 +130,6 @@
 
 The work is mostly done, but here's what's left, in rough order of priority.
 
-* Fix up generic view docs: adapt Chapter 9 of the Django Book (consider
-  this TODO item my permission and license) into
-  ``topics/generic-views.txt``; remove the intro material from
-  ``ref/generic-views.txt`` and just leave the function reference.
-
 * Change the "Added/changed in development version" callouts to proper
   Sphinx ``.. versionadded::`` or ``.. versionchanged::`` directives.
 

Modified: django/trunk/docs/ref/generic-views.txt
===
--- django/trunk/docs/ref/generic-views.txt 2009-06-17 13:54:43 UTC (rev 
11024)
+++ django/trunk/docs/ref/generic-views.txt 2009-06-17 14:09:56 UTC (rev 
11025)
@@ -9,67 +9,18 @@
 abstracted into "generic views" that let you quickly provide common views of
 an object without actually needing to write any Python code.
 
-Django's generic views contain the following:
+A general introduction to generic views can be found in the :ref:`topic guide
+`.
 
-* A set of views for doing list/detail interfaces.
+This reference contains details of Django's built-in generic views, along with
+a list of all keyword arguments that a generic view expects. Remember that
+arguments may either come from the URL pattern or from the ``extra_context``
+additional-information dictionary.
 
-* A set of views for year/month/day archive pages and associated
-  detail and "latest" pages (for example, the Django weblog's year_,
-  month_, day_, detail_, and latest_ pages).
-
-* A set of views for creating, editing, and deleting objects.
-
-.. _year: http://www.djangoproject.com/weblog/2005/
-.. _month: http://www.djangoproject.com/weblog/2005/jul/
-.. _day: http://www.djangoproject.com/weblog/2005/jul/20/
-.. _detail: http://www.djangoproject.com/weblog/2005/jul/20/autoreload/
-.. _latest: http://www.djangoproject.com/weblog/
-
-All of these views are used by creating configuration dictionaries in
-your URLconf files and passing those dictionaries as the third member of the
-URLconf tuple for a given pattern. For example, here's the URLconf for the
-simple weblog app that drives the blog on djangoproject.com::
-
-from django.conf.urls.defaults import *
-from django_website.apps.blog.models import Entry
-
-info_dict = {
-'queryset': Entry.objects.all(),
-'date_field': 'pub_date',
-}
-
-urlpatterns = patterns('django.views.generic.date_based',
-   
(r'^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/(?P[-\w]+)/$', 
'object_detail', info_dict),
-   (r'^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/$',
   'archive_day',   info_dict),
-   (r'^(?P\d{4})/(?P[a-z]{3})/$', 
   'archive_month', info_dict),
-   (r'^(?P\d{4})/$', 
   'archive_year',  info_dict),
-   (r'^$', 
   'archive_index', info_dict),
-)
-
-As you can see, this URLconf defines a few options in ``info_dict``.
-``'queryset'`` gives the generic view a ``QuerySet`` of objects to use (in this
-case, all of the ``Entry`` objects) and tells the generic view which model is
-being used.
-
-Documentation of each generic view follows, along with a list of all keyword
-arguments that a generic view expects. Remember that as in the example above,
-arguments may either come from the URL pattern (as ``month``, ``day``,
-``year``, etc. do 

Re: [Django] #9919: Raw SQL documentation doesn't mention transaction management

2009-06-17 Thread Django
#9919: Raw SQL documentation doesn't mention transaction management
+---
  Reporter:  Leo| Owner:  nobody
Status:  closed | Milestone:  1.1   
 Component:  Documentation  |   Version:  SVN   
Resolution:  fixed  |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Comment (by russellm):

 (In [11022]) Fixed #9919 -- Added note on the need to mark transactions as
 dirty when using raw 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
-~--~~~~--~~--~--~---



[Changeset] r11024 - in django/branches/releases/1.0.X: . docs/ref/models docs/topics/db

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 08:54:43 -0500 (Wed, 17 Jun 2009)
New Revision: 11024

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/docs/ref/models/querysets.txt
   django/branches/releases/1.0.X/docs/topics/db/sql.txt
Log:
[1.0.X] Fixed #9919 -- Added note on the need to mark transactions as dirty 
when using raw SQL.

Merge of r11022 from trunk.



Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009,11019,11021
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009,11019,11021-11022

Modified: django/branches/releases/1.0.X/docs/ref/models/querysets.txt
===
--- django/branches/releases/1.0.X/docs/ref/models/querysets.txt
2009-06-17 13:52:05 UTC (rev 11023)
+++ 

[Changeset] r11023 - in django/branches/releases/1.0.X: . docs/intro

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 08:52:05 -0500 (Wed, 17 Jun 2009)
New Revision: 11023

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/docs/intro/tutorial03.txt
Log:
[1.0.X] Fixed #11328 -- Added missing imports in the sample urls.py from 
Tutorial 3. Thanks to marcalj for the report.

Merge of r11021 from trunk.



Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009,11019
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009,11019,11021

Modified: django/branches/releases/1.0.X/docs/intro/tutorial03.txt
===
--- django/branches/releases/1.0.X/docs/intro/tutorial03.txt2009-06-17 
13:47:39 UTC (rev 11022)
+++ django/branches/releases/1.0.X/docs/intro/tutorial03.txt

[Changeset] r11022 - in django/trunk/docs: ref/models topics/db

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 08:47:39 -0500 (Wed, 17 Jun 2009)
New Revision: 11022

Modified:
   django/trunk/docs/ref/models/querysets.txt
   django/trunk/docs/topics/db/sql.txt
Log:
Fixed #9919 -- Added note on the need to mark transactions as dirty when using 
raw SQL.

Modified: django/trunk/docs/ref/models/querysets.txt
===
--- django/trunk/docs/ref/models/querysets.txt  2009-06-17 13:46:52 UTC (rev 
11021)
+++ django/trunk/docs/ref/models/querysets.txt  2009-06-17 13:47:39 UTC (rev 
11022)
@@ -616,6 +616,8 @@
 Both the ``depth`` argument and the ability to specify field names in the call
 to ``select_related()`` are new in Django version 1.0.
 
+.. _extra:
+
 ``extra(select=None, where=None, params=None, tables=None, order_by=None, 
select_params=None)``
 
~~~
 

Modified: django/trunk/docs/topics/db/sql.txt
===
--- django/trunk/docs/topics/db/sql.txt 2009-06-17 13:46:52 UTC (rev 11021)
+++ django/trunk/docs/topics/db/sql.txt 2009-06-17 13:47:39 UTC (rev 11022)
@@ -29,6 +29,45 @@
 
 return row
 
+.. _transactions-and-raw-sql:
+
+Transactions and raw SQL
+
+If you are using transaction decorators (such as ``commit_on_success``) to
+wrap your views and provide transaction control, you don't have to make a
+manual call to ``transaction.commit_unless_managed()`` -- you can manually
+commit if you want to, but you aren't required to, since the decorator will
+commit for you. However, if you don't manually commit your changes, you will
+need to manually mark the transaction as dirty, using
+``transaction.set_dirty()``::
+
+@commit_on_success
+def my_custom_sql_view(request, value):
+from django.db import connection, transaction
+cursor = connection.cursor()
+
+# Data modifying operation
+cursor.execute("UPDATE bar SET foo = 1 WHERE baz = %s", [value])
+
+# Since we modified data, mark the transaction as dirty
+transaction.set_dirty()
+
+# Data retrieval operation. This doesn't dirty the transaction,
+# so no call to set_dirty() is required.
+cursor.execute("SELECT foo FROM bar WHERE baz = %s", [value])
+row = cursor.fetchone()
+
+return render_to_response('template.html', {'row': row})
+
+The call to ``set_dirty()`` is made automatically when you use the Django ORM
+to make data modifying database calls. However, when you use raw SQL, Django
+has no way of knowing if your SQL modifies data or not. The manual call to
+``set_dirty()`` ensures that Django knows that there are modifications that
+must be committed.
+
+Connections and cursors
+---
+
 ``connection`` and ``cursor`` mostly implement the standard `Python DB-API`_
 (except when it comes to :ref:`transaction handling `).
 If you're not familiar with the Python DB-API, note that the SQL statement in
@@ -39,9 +78,12 @@
 ``"?"`` placeholder, which is used by the SQLite Python bindings. This is for
 the sake of consistency and sanity.)
 
+An easier option?
+-
+
 A final note: If all you want to do is a custom ``WHERE`` clause, you can just
-use the ``where``, ``tables`` and ``params`` arguments to the standard lookup
-API.
+use the ``where``, ``tables`` and ``params`` arguments to the
+:ref:`extra clause ` in the standard queryset API.
 
 .. _Python DB-API: http://www.python.org/peps/pep-0249.html
 


--~--~-~--~~~---~--~~
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] r11021 - django/trunk/docs/intro

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 08:46:52 -0500 (Wed, 17 Jun 2009)
New Revision: 11021

Modified:
   django/trunk/docs/intro/tutorial03.txt
Log:
Fixed #11328 -- Added missing imports in the sample urls.py from Tutorial 3. 
Thanks to marcalj for the report.

Modified: django/trunk/docs/intro/tutorial03.txt
===
--- django/trunk/docs/intro/tutorial03.txt  2009-06-17 13:12:28 UTC (rev 
11020)
+++ django/trunk/docs/intro/tutorial03.txt  2009-06-17 13:46:52 UTC (rev 
11021)
@@ -16,28 +16,28 @@
 application, you might have the following views:
 
 * Blog homepage -- displays the latest few entries.
-
+
 * Entry "detail" page -- permalink page for a single entry.
-
+
 * Year-based archive page -- displays all months with entries in the
   given year.
-  
+
 * Month-based archive page -- displays all days with entries in the
   given month.
-  
+
 * Day-based archive page -- displays all entries in the given day.
-
+
 * Comment action -- handles posting comments to a given entry.
 
 In our poll application, we'll have the following four views:
 
 * Poll "archive" page -- displays the latest few polls.
-
+
 * Poll "detail" page -- displays a poll question, with no results but
   with a form to vote.
-
+
 * Poll "results" page -- displays results for a particular poll.
-
+
 * Vote action -- handles voting for a particular choice in a particular
   poll.
 
@@ -82,6 +82,9 @@
 
 from django.conf.urls.defaults import *
 
+from django.contrib import admin
+admin.autodiscover()
+
 urlpatterns = patterns('',
 (r'^polls/$', 'mysite.polls.views.index'),
 (r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'),
@@ -307,7 +310,7 @@
 later, but if you'd like to quickly get the above example working, just::
 
 {{ poll }}
-
+
 will get you started for now.
 
 A shortcut: get_object_or_404()
@@ -371,12 +374,12 @@
 
 * The 404 view is also called if Django doesn't find a match after checking
   every regular expression in the URLconf.
-  
+
 * If you don't define your own 404 view -- and simply use the default, 
which
   is recommended -- you still have one obligation: To create a ``404.html``
   template in the root of your template directory. The default 404 view 
will
   use that template for all 404 errors.
-  
+
 * If :setting:`DEBUG` is set to ``False`` (in your settings module) and if
   you didn't create a ``404.html`` file, an ``Http500`` is raised instead.
   So remember to create a ``404.html``.


--~--~-~--~~~---~--~~
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] #9268: Pass custom form values from post-comment to preview-comment

2009-06-17 Thread Django
#9268: Pass custom form values from post-comment to preview-comment
--+-
  Reporter:  taojian  | Owner:  stuartk
Status:  closed   | Milestone:  1.1
 Component:  django.contrib.comments  |   Version:  SVN
Resolution:  fixed|  Keywords:  comment preview
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Comment (by russellm):

 (In [11020]) [1.0.X] Fixed #9268 -- Ensured that the next argument is
 passed on when previewing comments. Thanks to leanmeandonothingmachine for
 the patch.

 Merge of r11019 from trunk.

-- 
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] r11020 - in django/branches/releases/1.0.X: . django/contrib/comments/views

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 08:12:28 -0500 (Wed, 17 Jun 2009)
New Revision: 11020

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/django/contrib/comments/views/comments.py
Log:
[1.0.X] Fixed #9268 -- Ensured that the next argument is passed on when 
previewing comments. Thanks to leanmeandonothingmachine for the patch.

Merge of r11019 from trunk.



Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9813,9821-9837,9842-9843,9847-9859,9861,9863-9875,9877-9881,9883-9887,9899-9903,9906-9909,9912,9914,9916-9917,9919-9920,9922-9927,9929,9931-9937,9939,9942-9943,9945-9950,9953-9954,9956-9962,9966-9977,9979-9984,9986-9988,9990-10001,10003-10004,10007,10009-10010,10013-10017,10019-10020,10022-10025,10031,10036-10041,10049-10052,10054-10061,10066-10069,10071-10076,10078-10079,10085-10087,10104,10106,10125-10127,10136,10138-10140,10143,10145-10147,10149-10160,10163-10167,10170,10173,10175-10176,10180,10185,10189,10192-10196,10198-10221,10223-10228,10230-10234,10236-10247,10250-10257,10259-10270,10273-10274,10276-10280,10282-10314,10316,10319-10322,10324-10325,10328-10329,10333-10344,10348-10351,10353-10356,10358-10363,10365-10368,10371-10380,10386-10407,10411,10413-10427,10429-10437,10440-10442,10444-10445,10447-10450,10452-10453,10457-10464,10466-10467,10469-10480,10482-10485,10489-10492,10495-10497,10499-10505,10508-10509,10511-10514,10517-10520,10524-10525,10528,10530-10537,10539-10548,10550-10557,10561,10563-10564,10567-10571,10573-10574,10576-10578,10580-10589,10591-10592,10595-10596,10599-10601,10603-10620,10624-10626,10631,10639-10641,10643,10646,10652-10655,10659-10660,10666-10669,10675,10682-10690,10693,10697-10704,10707,10713-10714,10723,10725,10727,10729,10732,10743-10750,10752-10760,10768,10770,10772,10774,10777,10782,10787,10789,10791,10795,10797,10799,10801,10805,10808,10810,10812,10814,10816,10819,10822,10828,10831,10833,10835,10837,10841,10843,10845,10847,10849,10913-10914,10952,10970-10973,10983,11007,11009,11019

Modified: 
django/branches/releases/1.0.X/django/contrib/comments/views/comments.py
===
--- django/branches/releases/1.0.X/django/contrib/comments/views/comments.py
2009-06-17 13:01:40 UTC (rev 11019)
+++ 

[Changeset] r11019 - django/trunk/django/contrib/comments/views

2009-06-17 Thread noreply

Author: russellm
Date: 2009-06-17 08:01:40 -0500 (Wed, 17 Jun 2009)
New Revision: 11019

Modified:
   django/trunk/django/contrib/comments/views/comments.py
Log:
Fixed #9268 -- Ensured that the next argument is passed on when previewing 
comments. Thanks to leanmeandonothingmachine for the patch.

Modified: django/trunk/django/contrib/comments/views/comments.py
===
--- django/trunk/django/contrib/comments/views/comments.py  2009-06-17 
09:28:49 UTC (rev 11018)
+++ django/trunk/django/contrib/comments/views/comments.py  2009-06-17 
13:01:40 UTC (rev 11019)
@@ -37,6 +37,9 @@
 if not data.get('email', ''):
 data["email"] = request.user.email
 
+# Check to see if the POST data overrides the view's next argument.
+next = data.get("next", next)
+
 # Look up the object we're trying to comment about
 ctype = data.get("content_type")
 object_pk = data.get("object_pk")


--~--~-~--~~~---~--~~
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] #11008: dictsort and dictsortreversed template filters broken

2009-06-17 Thread Django
#11008: dictsort and dictsortreversed template filters broken
--+-
  Reporter:  ionut_bizau  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Template system  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  1|  
--+-
Changes (by Alex):

  * needs_better_patch:  0 => 1

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



[Django] #11333: ORA-01830 date format picture ends before converting entire input

2009-06-17 Thread Django
#11333: ORA-01830 date format picture ends before converting entire input
-+--
 Reporter:  jtiai|   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Uncategorized| Version:  SVN   
 Keywords:  oracle date formats  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 I've legacy database that uses 'DATE' field and I'm using DateTimeField.
 Getting error: ORA-01830 date format picture ends before converting entire
 input if I'm using auto_now_add fields for fields that contain no
 fractions.

 If I do following:

 {{{
 from models import MyModel

 e = MyModel.objects.all()[0]
 e.save()
 }}}

 Symptoms are exactly as in #9275, but even I'm using SVN it doesn't work.

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



Re: [Django] #11332: Group by doesn't work properly with PosgreSQL

2009-06-17 Thread Django
#11332: Group by doesn't work properly with PosgreSQL
+---
  Reporter:  Loststylus | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 Please don't re-open a ticket that has been closed. This ticket was closed
 because what was reported wasn't a bug. If you have a "how do I do this"
 question, it should be asked on the mailing list, not in the ticket
 tracker.

-- 
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] #11332: Group by doesn't work properly with PosgreSQL

2009-06-17 Thread Django
#11332: Group by doesn't work properly with PosgreSQL
+---
  Reporter:  Loststylus | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Loststylus):

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

-- 
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] #11332: Group by doesn't work properly with PostgreSQL

2009-06-17 Thread Django
#11332: Group by doesn't work properly with PostgreSQL
---+
 Reporter:  Loststylus |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I am trying to execute a query running Django 1.0.2 with PostgreSQL 8.3:

 >>> from accounts import models as m
 >>> from django.contrib.auth.models import User
 >>> me = User.objects.get(pk=1)
 >>> me
 
 >>> messages_from_me = m.PersonalMessage.objects.filter(from_id = me,
 hide_from = False).order_by('-time','-pk')
 >>> messages_from_me.query.group_by=['-to_id_id']

 I get the following error:

 Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 147, in __repr__
 data = list(self[:REPR_OUTPUT_SIZE + 1])
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 162, in __len__
 self._result_cache.extend(list(self._iter))
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 275, in iterator
 for row in self.query.results_iter():
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/query.py", line 206, in results_iter
 for rows in self.execute_sql(MULTI):
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/query.py", line 1734, in execute_sql
 cursor.execute(sql, params)
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/backends/util.py", line 19, in execute
 return self.cursor.execute(sql, params)
 ProgrammingError: колонка "accounts_personalmessage.id" должна
 фигурировать в выражении GROUP BY или использоваться в агрегатной функции

 The last line is in Russian, it says something like column
 "accounts_personalmessage.id" should be in GROUP BY expression or should
 be used in aggregation function.


 The same code works normally for sqlite.

-- 
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] #11332: Group by doesn't work properly with PosgreSQL

2009-06-17 Thread Django
#11332: Group by doesn't work properly with PosgreSQL
+---
  Reporter:  Loststylus | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 query.group_by is an undocumented, unsupported internal attribute. It is
 not intended for use by end users. If you use it, you do so at your own
 peril.

 Formal support for aggregation functions isn't available in Django v1.0.
 Aggregation has been added in trunk, and will be available in Django v1.1.
 [http://docs.djangoproject.com/en/dev/topics/db/aggregation/ See the
 documentation for more details].

-- 
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] #11332: Group by doesn't work properly with PosgreSQL

2009-06-17 Thread Django
#11332: Group by doesn't work properly with PosgreSQL
+---
  Reporter:  Loststylus | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by Loststylus):

 Sorry, missed the  tag. Here it goes with the normal formatting:


 {{{
 >>>from accounts import models as m
 >>>from django.contrib.auth.models import User me = User.objects.get(pk=1)
 me
 
 >>>messages_from_me = m.PersonalMessage.objects.filter(from_id = me,
 hide_from = False).order_by('-time','-pk')
 >>>messages_from_me.query.group_by=['-to_id_id']

 Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 147, in __repr__
 data = list(self[:REPR_OUTPUT_SIZE + 1])
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 162, in __len__
 self._result_cache.extend(list(self._iter))
   File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py",
 line 275, in iterator
 for row in self.query.results_iter():
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/query.py", line 206, in results_iter
 for rows in self.execute_sql(MULTI):
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/models/sql/query.py", line 1734, in execute_sql
 cursor.execute(sql, params)
   File "/usr/local/lib/python2.6/dist-
 packages/django/db/backends/util.py", line 19, in execute
 return self.cursor.execute(sql, params)
 ProgrammingError: колонка "accounts_personalmessage.id" должна
 фигурировать в выражении GROUP BY или использоваться в агрегатной функции

 }}}


 I get the following error:

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



Re: [Django] #11332: Group by doesn't work properly with PosgreSQL

2009-06-17 Thread Django
#11332: Group by doesn't work properly with PosgreSQL
+---
  Reporter:  Loststylus | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Loststylus):

  * needs_better_patch:  => 0
  * summary:  Group by doesn't work properly with PostgreSQL => Group by
  doesn't work properly with PosgreSQL
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #552: [patch] SOAP support for django

2009-06-17 Thread Django
#552: [patch] SOAP support for django
-+--
  Reporter:  upadh...@gmail.com  | Owner:  adrian
Status:  closed  | Milestone:
 Component:  Tools   |   Version:
Resolution:  duplicate   |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by bethmcnany):

 Added the second soap.py attachment.  I know the ticket is closed, but if
 you search for "Django SOAP server" this is one of the oft-mentioned
 links.  I am using this file, and the WSDL generator was not working (at
 least for Python 2.6).  So I figured if anyone else comes across this in
 the future this may be helpful.
 You have to read the comments though, or it won't work!  I'm sure I coded
 inefficiently so feel free to fix that, also.

-- 
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] #11331: Memcached backend closes connection after every request

2009-06-17 Thread Django
#11331: Memcached backend closes connection after every request
--+-
 Reporter:  boo...@gmail.com  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Cache system  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Fix for http://code.djangoproject.com/ticket/5133 kills servers in
 production.

 --

 Copy of http://code.djangoproject.com/ticket/5133#comment:16

 The patch takes care of connections kept open, but it introduces another
 problem - the need to open one or more tcp connections every single
 request.

 With a simple loop, you can make a system run out of sockets easily -
 after a socket is closed, that port cannot be reused for an eternity,
 ranging from 1 minute to 4 depending on OS. If enough sockets get stuck in
 TIME_WAIT state, the server simply fails to connect to memcached and start
 serving everything from db again - that's not something you want to see on
 a site with sufficient traffic to need a memcached installation.

 In my opinion, the cure is worse than the disease. There's an easy
 workaround available for the original problem: restart workers after a
 certain amount of requests. With max-request=500 on a 5 threads deamon
 process (mod_wsgi, times 20 processes), we never go over 100 connections
 on our memcached server, started with the default cap of 1024 connections.
 If you run mod_python, use MaxRequestsPerChild?.

 My current solution is to just noop the whole fix with one line in any
 .py: django.core.cache.backends.memcached.CacheClass?.close = lambda x:
 None. It might be an idea to make it configurable so people can choose
 between disconnect after every request and keep it open until process
 restart.

-- 
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] r11018 - django/branches/soc2009/test-improvements

2009-06-17 Thread noreply

Author: kkubasik
Date: 2009-06-17 04:28:49 -0500 (Wed, 17 Jun 2009)
New Revision: 11018

Modified:
   django/branches/soc2009/test-improvements/
Log:
[gsoc2009-testing] svnmerge.py properties update


Property changes on: django/branches/soc2009/test-improvements
___
Name: svnmerge-integrated
   - /django/branches/newforms-admin:1-4314 /django/trunk:1-5600
   + /django/branches/newforms-admin:1-4314 /django/trunk:1-5600 
/django/trunk:1-10853


--~--~-~--~~~---~--~~
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] #11330: djangoproject.com mailservers misconfigured

2009-06-17 Thread Django
#11330: djangoproject.com mailservers misconfigured
-+--
 Reporter:  bacs |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Django Web site  | Version:  1.0   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Email from djangoproject.com (when registering for an account) comes from
 servers with mismatched PTR records.  This caused email to be rejected by
 many systems performing standard anti-spam checks.

 The reverse DNS for the IP should resolve to an hostname that resolves
 back to the same IP.  It doesn't.
 {{{
 # dig -x 64.207.133.30

 ; <<>> DiG 9.5.1-P1 <<>> -x 64.207.133.30
 ;; global options:  printcmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18668
 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

 ;; QUESTION SECTION:
 ;30.133.207.64.in-addr.arpa.IN  PTR

 ;; ANSWER SECTION:
 30.133.207.64.in-addr.arpa. 39355 INPTR djangoproject.com.

 ;; AUTHORITY SECTION:
 133.207.64.in-addr.arpa. 82555  IN  NS  ns1.mediatemple.net.
 133.207.64.in-addr.arpa. 82555  IN  NS  ns2.mediatemple.net.

 ;; ADDITIONAL SECTION:
 ns1.mediatemple.net.160386  IN  A   64.207.129.18
 ns2.mediatemple.net.160386  IN  A   64.207.128.18

 ;; Query time: 25 msec
 ;; SERVER: 212.110.164.222#53(212.110.164.222)
 ;; WHEN: Wed Jun 17 09:53:29 2009
 ;; MSG SIZE  rcvd: 158

 # dig djangoproject.com

 ; <<>> DiG 9.5.1-P1 <<>> djangoproject.com
 ;; global options:  printcmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22654
 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

 ;; QUESTION SECTION:
 ;djangoproject.com. IN  A

 ;; ANSWER SECTION:
 djangoproject.com.  600 IN  A   64.207.133.18

 ;; AUTHORITY SECTION:
 djangoproject.com.  168943  IN  NS  ns1.mediatemple.net.
 djangoproject.com.  168943  IN  NS  ns2.mediatemple.net.

 ;; ADDITIONAL SECTION:
 ns1.mediatemple.net.160374  IN  A   64.207.129.18
 ns2.mediatemple.net.160374  IN  A   64.207.128.18

 ;; Query time: 155 msec
 ;; SERVER: 212.110.164.222#53(212.110.164.222)
 ;; WHEN: Wed Jun 17 09:53:42 2009
 ;; MSG SIZE  rcvd: 134
 }}}

-- 
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] #11311: Deleting model instance with a string id and m2m relation fails

2009-06-17 Thread Django
#11311: Deleting model instance with a string id and m2m relation fails
---+
  Reporter:  ronny | Owner:  nobody 
 
Status:  closed| Milestone:  1.1
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:  fixed |  Keywords:  delete 
string pk m2m
 Stage:  Accepted  | Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Comment (by ronny):

 Thanks, Russell. It's working again now.

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

2009-06-17 Thread Django
#11234: BlockNode unsafely manages context
-+--
  Reporter:  brutimus| Owner:  brutimus
Status:  assigned| Milestone:  
 Component:  Template system |   Version:  SVN 
Resolution:  |  Keywords:  
 Stage:  Design decision needed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Comment (by SmileyChris):

 I think you're misinterpreting what `context.pop()` actually does - it
 doesn't pop the most recent element entered (`'block'`), it pops off the
 whole context layer it created when `context.push()` was run.

 Setting a variable in the context (refering to the documentation link you
 provided) doesn't create a new context layer, it just adds to the current
 context layer.

 So if your really point of concern is that the lifespan of context
 attributes created inside of a block tag only have the lifespan of that
 block, then that is a different issue (it's not "unsafely managing"
 anything at least). And perhaps there should be a public method for adding
 to the base context layer - your tags can technically do it already by
 adding the "global" variable to `context.dicts[len(context.dicts)-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] #11159: Test client encode_file doesn't set content-type properly

2009-06-17 Thread Django
#11159: Test client encode_file doesn't set content-type properly
+---
  Reporter:  notanumber | Owner:  nobody
  
Status:  new| Milestone:
  
 Component:  Testing framework  |   Version:  1.0   
  
Resolution: |  Keywords:  encode_file 
content-type
 Stage:  Ready for checkin  | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Ready for checkin
  * needs_tests:  => 0
  * needs_docs:  => 0

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



Re: [Django] #11234: BlockNode unsafely manages context

2009-06-17 Thread Django
#11234: BlockNode unsafely manages context
-+--
  Reporter:  brutimus| Owner:  brutimus
Status:  assigned| Milestone:  
 Component:  Template system |   Version:  SVN 
Resolution:  |  Keywords:  
 Stage:  Design decision needed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Comment (by brutimus):

 I figure since the official documentation demonstrates how to update the
 context, then django should do it's best to not break that functionality.
 I've seen no mention anywhere saying that tags should clean up after
 themselves.

 http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#setting-a
 -variable-in-the-context

 I personally view this as more of a bugfix than an enhancement.  I find it
 rather silly that the block node blindly removes position 0 in the first
 place.

 One scenario I find it almost vital that variables can be set in one block
 node, and carry across to others, is on a query-heavy page (with template
 tags doing the heavy querying).  I don't want to have to repeat the same
 tag call in every block node that needs the results; I'd like to just run
 it once and roll with it.  We (my dev team) have many hundred templates
 dependent on this patch and have seen no ill effects.  Though I do agree,
 proper testing should still be written if this bugfix/enhancement is
 deemed necessary.

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