[Django] #14457: Possible error in settings.py description

2010-10-12 Thread Django
#14457: Possible error in settings.py description
---+
 Reporter:  zsoltbot   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 On this page
 http://docs.djangoproject.com/en/1.2/intro/tutorial01/

 I'm pretty sure:

 INSTALLED_APPS = (
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'polls'
 )

 should really be

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



[Changeset] r14199 - in django/trunk: django/forms tests/regressiontests/model_forms_regress tests/regressiontests/model_formsets_regress

2010-10-12 Thread noreply
Author: Honza_Kral
Date: 2010-10-12 23:46:33 -0500 (Tue, 12 Oct 2010)
New Revision: 14199

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/regressiontests/model_forms_regress/tests.py
   django/trunk/tests/regressiontests/model_formsets_regress/tests.py
Log:
Fixed #14119 -- fields_for_model no longer returns all fields when fields 
parameter is the empty tuple. Thanks alexdutton!

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2010-10-13 04:36:51 UTC (rev 14198)
+++ django/trunk/django/forms/models.py 2010-10-13 04:46:33 UTC (rev 14199)
@@ -40,7 +40,7 @@
 if not f.editable or isinstance(f, models.AutoField) \
 or not f.name in cleaned_data:
 continue
-if fields and f.name not in fields:
+if fields is not None and f.name not in fields:
 continue
 if exclude and f.name in exclude:
 continue
@@ -168,7 +168,7 @@
 for f in opts.fields + opts.many_to_many:
 if not f.editable:
 continue
-if fields and not f.name in fields:
+if fields is not None and not f.name in fields:
 continue
 if exclude and f.name in exclude:
 continue

Modified: django/trunk/tests/regressiontests/model_forms_regress/tests.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-10-13 04:36:51 UTC (rev 14198)
+++ django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-10-13 04:46:33 UTC (rev 14199)
@@ -2,7 +2,7 @@
 from datetime import date
 
 from django import forms
-from django.forms.models import modelform_factory, ModelChoiceField
+from django.forms.models import modelform_factory, ModelChoiceField, 
fields_for_model, construct_instance
 from django.test import TestCase
 from django.core.exceptions import FieldError, ValidationError
 from django.core.files.uploadedfile import SimpleUploadedFile
@@ -417,3 +417,28 @@
 self.assertEquals(form.errors, {'__all__': [u'Edition with this Author 
and Publication already exists.']})
 form = EditionForm(data={'author': self.author2.pk, 'publication': 
self.pub1.pk, 'edition': 1, 'isbn': '978316148'})
 self.assertEquals(form.errors, {'__all__': [u'Edition with this 
Publication and Edition already exists.']})
+
+
+class EmptyFieldsTestCase(TestCase):
+"Tests for fields=() cases as reported in #14119"
+class EmptyPersonForm(forms.ModelForm):
+class Meta:
+model = Person
+fields = ()
+
+def test_empty_fields_to_fields_for_model(self):
+"An argument of fields=() to fields_for_model should return an empty 
dictionary"
+field_dict = fields_for_model(Person, fields=())
+self.assertEqual(len(field_dict), 0)
+
+def test_empty_fields_on_modelform(self):
+"No fields on a ModelForm should actually result in no fields"
+form = self.EmptyPersonForm()
+self.assertEqual(len(form.fields), 0)
+
+def test_empty_fields_to_construct_instance(self):
+"No fields should be set on a model instance if construct_instance 
receives fields=()"
+form = modelform_factory(Person)({'name': 'John Doe'})
+self.assertTrue(form.is_valid())
+instance = construct_instance(form, Person(), fields=())
+self.assertEqual(instance.name, '')

Modified: django/trunk/tests/regressiontests/model_formsets_regress/tests.py
===
--- django/trunk/tests/regressiontests/model_formsets_regress/tests.py  
2010-10-13 04:36:51 UTC (rev 14198)
+++ django/trunk/tests/regressiontests/model_formsets_regress/tests.py  
2010-10-13 04:46:33 UTC (rev 14199)
@@ -159,7 +159,15 @@
 form = Form(instance=None)
 formset = FormSet(instance=None)
 
+def test_empty_fields_on_modelformset(self):
+"No fields passed to modelformset_factory should result in no fields 
on returned forms except for the id. See #14119."
+UserFormSet = modelformset_factory(User, fields=())
+formset = UserFormSet()
+for form in formset.forms:
+self.assertTrue('id' in form.fields)
+self.assertEqual(len(form.fields), 1)
 
+
 class CustomWidget(forms.CharField):
 pass
 

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



[Django] #14456: Convert inline_formsets doctests to unit tests

2010-10-12 Thread Django
#14456: Convert inline_formsets doctests to unit tests
---+
 Reporter:  prestontimmons |   Owner:  nobody
   Status:  new|   Milestone:  1.3   
Component:  Testing framework  | Version:  SVN   
 Keywords:  tests  |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 Attached is a patch that converts the inline_formsets doctests to unit
 tests. These changes were tested against trunk 14196 using the sqlite test
 settings.

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

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



[Changeset] r14198 - django/trunk/tests/regressiontests/model_forms_regress

2010-10-12 Thread noreply
Author: Honza_Kral
Date: 2010-10-12 23:36:51 -0500 (Tue, 12 Oct 2010)
New Revision: 14198

Modified:
   django/trunk/tests/regressiontests/model_forms_regress/models.py
   django/trunk/tests/regressiontests/model_forms_regress/tests.py
Log:
Fixed #12304 -- regression tests to make sure the validation messages for 
unique violations are sane, Thanks ramiro!

Modified: django/trunk/tests/regressiontests/model_forms_regress/models.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/models.py
2010-10-13 04:16:31 UTC (rev 14197)
+++ django/trunk/tests/regressiontests/model_forms_regress/models.py
2010-10-13 04:36:51 UTC (rev 14198)
@@ -60,3 +60,12 @@
 
 class Document(models.Model):
 myfile = models.FileField(upload_to='unused', blank=True)
+
+class Edition(models.Model):
+author = models.ForeignKey(Person)
+publication = models.ForeignKey(Publication)
+edition = models.IntegerField()
+isbn = models.CharField(max_length=13, unique=True)
+
+class Meta:
+unique_together = (('author', 'publication'), ('publication', 
'edition'),)

Modified: django/trunk/tests/regressiontests/model_forms_regress/tests.py
===
--- django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-10-13 04:16:31 UTC (rev 14197)
+++ django/trunk/tests/regressiontests/model_forms_regress/tests.py 
2010-10-13 04:36:51 UTC (rev 14198)
@@ -8,7 +8,7 @@
 from django.core.files.uploadedfile import SimpleUploadedFile
 
 from models import Person, RealPerson, Triple, FilePathModel, Article, \
-Publication, CustomFF, Author, Author1, Homepage, Document
+Publication, CustomFF, Author, Author1, Homepage, Document, Edition
 
 
 class ModelMultipleChoiceFieldTests(TestCase):
@@ -389,3 +389,31 @@
 rendered = unicode(form)
 self.assert_('something.txt' in rendered)
 self.assert_('myfile-clear' in rendered)
+
+class EditionForm(forms.ModelForm):
+author = forms.ModelChoiceField(queryset=Person.objects.all())
+publication = forms.ModelChoiceField(queryset=Publication.objects.all())
+edition = forms.IntegerField()
+isbn = forms.CharField(max_length=13)
+
+class Meta:
+model = Edition
+
+class UniqueErrorsTests(TestCase):
+def setUp(self):
+self.author1 = Person.objects.create(name=u'Author #1')
+self.author2 = Person.objects.create(name=u'Author #2')
+self.pub1 = Publication.objects.create(title='Pub #1', 
date_published=date(2000, 10, 31))
+self.pub2 = Publication.objects.create(title='Pub #2', 
date_published=date(2004, 1, 5))
+form = EditionForm(data={'author': self.author1.pk, 'publication': 
self.pub1.pk, 'edition': 1, 'isbn': '9783161484100'})
+form.save()
+
+def test_unique_error_message(self):
+form = EditionForm(data={'author': self.author1.pk, 'publication': 
self.pub2.pk, 'edition': 1, 'isbn': '9783161484100'})
+self.assertEquals(form.errors, {'isbn': [u'Edition with this Isbn 
already exists.']})
+
+def test_unique_together_error_message(self):
+form = EditionForm(data={'author': self.author1.pk, 'publication': 
self.pub1.pk, 'edition': 2, 'isbn': '978316148'})
+self.assertEquals(form.errors, {'__all__': [u'Edition with this Author 
and Publication already exists.']})
+form = EditionForm(data={'author': self.author2.pk, 'publication': 
self.pub1.pk, 'edition': 1, 'isbn': '978316148'})
+self.assertEquals(form.errors, {'__all__': [u'Edition with this 
Publication and Edition already exists.']})

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



Re: [Django] #14455: [patch] Minor regression test fix

2010-10-12 Thread Django
#14455: [patch] Minor regression test fix
-+--
  Reporter:  kylefox | Owner:  nobody   

Status:  new | Milestone:   

 Component:  django.contrib.localflavor  |   Version:  SVN  

Resolution:  |  Keywords:  localflavor, 
regression, test
 Stage:  Unreviewed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

  * version:  1.2 => SVN

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

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



Re: [Django] #14455: [patch] Minor regression test fix

2010-10-12 Thread Django
#14455: [patch] Minor regression test fix
-+--
  Reporter:  kylefox | Owner:  nobody   

Status:  new | Milestone:   

 Component:  django.contrib.localflavor  |   Version:  1.2  

Resolution:  |  Keywords:  localflavor, 
regression, test
 Stage:  Unreviewed  | Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

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

 * cc: jbronn, kylefox (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Django] #14455: [patch] Minor regression test fix

2010-10-12 Thread Django
#14455: [patch] Minor regression test fix
---+
 Reporter:  kylefox|   Owner:  nobody
   Status:  new|   Milestone:
Component:  django.contrib.localflavor | Version:  1.2   
 Keywords:  localflavor, regression, test  |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 It appears the regression tests were not updated as part of
 [http://code.djangoproject.com/changeset/14195 changeset 14195]

 This patch changes the regression test to use the new provinces in the ID
 localflavor.

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

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



[Changeset] r14197 - django/trunk/django/contrib/admin

2010-10-12 Thread noreply
Author: Honza_Kral
Date: 2010-10-12 23:16:31 -0500 (Tue, 12 Oct 2010)
New Revision: 14197

Modified:
   django/trunk/django/contrib/admin/options.py
Log:
Fixed #14017 -- wrong comment on log_deletion method of ModelAdmin

Also added a transaction around the deletion view to preserve DB state (and 
rollback the creation of LogEntry object in case the deletion fails)

Modified: django/trunk/django/contrib/admin/options.py
===
--- django/trunk/django/contrib/admin/options.py2010-10-13 01:25:04 UTC 
(rev 14196)
+++ django/trunk/django/contrib/admin/options.py2010-10-13 04:16:31 UTC 
(rev 14197)
@@ -453,9 +453,8 @@
 
 def log_deletion(self, request, object, object_repr):
 """
-Log that an object has been successfully deleted. Note that since the
-object is deleted, it might no longer be safe to call *any* methods
-on the object, hence this method getting object_repr.
+Log that an object will be deleted. Note that this method is called
+before the deletion.
 
 The default implementation creates an admin LogEntry object.
 """
@@ -1097,6 +1096,7 @@
 ], context, context_instance=context_instance)
 
 @csrf_protect_m
+@transaction.commit_on_success
 def delete_view(self, request, object_id, extra_context=None):
 "The 'delete' admin view for this model."
 opts = self.model._meta

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



Re: [Django] #14454: Convert admin_widgets doctest to unit tests

2010-10-12 Thread Django
#14454: Convert admin_widgets doctest to unit tests
+---
  Reporter:  prestontimmons | Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  Testing framework  |   Version:  SVN   
Resolution: |  Keywords:  admin test
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by Alex):

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

Comment:

 The patch doesn't apply cleanly for me at HEAD.  Looks like it hasn't been
 properly updated since unittest2 landed.  If you could update it I'll look
 at merging it pronto.

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

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



Re: [Django] #13693: error_messages for fields in Model don't carry over to ModelForm

2010-10-12 Thread Django
#13693: error_messages for fields in Model don't carry over to ModelForm
-+--
  Reporter:  Aleks   | Owner:  anonymous
Status:  closed  | Milestone:   
 Component:  Forms   |   Version:  1.2  
Resolution:  wontfix |  Keywords:  error_messages, forms, models
 Stage:  Unreviewed  | Has_patch:  1
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Comment (by Honza_Kral):

 Replying to [comment:3 carljm]:
 > > Marking this as wontfix since I don't believe this is an issue.
 >
 > Honza, you certainly know a lot more than I do about model-validation,
 but I don't think I agree with the wontfix here. In general my mental
 model of ModelForms is that they pull as much information as possible from
 the model definition for the form default, to minimize the boilerplate
 needed to make a form for that model. Personally, I'd be surprised if I
 defined a custom validation error message on a model field and found that
 it didn't propagate to the ModelForm by default. It's possible that I'm
 missing something important, but I can't think of a case where I wouldn't
 want that as the default behavior. Maybe you can explain in a bit more
 detail why that's a bad idea? Or else reopen, and I'm willing to put in
 some time to work out the test-suite issues and any other problems with
 the patch.

 My first issue is that it is mildly backwards incompatible (hence the
 broken tests) - nothing big but still. The other is that form validation
 and model validation serve different purposes and may work differently,
 requiring differently phrased error messages, for example the model
 DateTimeField accepts different date formats than the same field on the
 form level and the error message is worded differently because of that.

 For me it's the question of locality - I define some validation on the
 model level and expect to use the model's error messages and similarly
 with forms. Otherwise I think it cold be confusing and we would need to
 keep the logic and message formats synchronized.

 Another thing is the codes of the messages - half of them are called
 'invalid' which is very generic and thus have a high probability of name
 clashes - I could define my validation on the model level, use 'invalid'
 for a code and then try to override the message only to see the message on
 completely unrelated validation result.

 I completely agree that the idea is good and these are minor issues that
 can be fixed (although by introducing minor backwards incompatibilities)
 but until they are, this ticket doesn't bring enough positive to ignore
 them. So I am -1 on this until these issues are addressed and resolved
 which I don't think is the priority ATM.

 Sorry for not providing more detailed explanation earlier, hope this
 helps.

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

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



[Django] #14454: Convert admin_widgets doctest to unit tests

2010-10-12 Thread Django
#14454: Convert admin_widgets doctest to unit tests
---+
 Reporter:  prestontimmons |   Owner:  nobody
   Status:  new|   Milestone:  1.3   
Component:  Testing framework  | Version:  SVN   
 Keywords:  admin test |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 Attached is a patch that converts the admin_widgets doctests to unit
 tests. These changes were tested against trunk 14196 using the sqlite test
 settings.

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

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



Re: [Django] #14442: During tests parse fixtures using setUpClass

2010-10-12 Thread Django
#14442: During tests parse fixtures using setUpClass
+---
  Reporter:  Alex   | Owner:  Alex
Status:  closed | Milestone:  
 Component:  Testing framework  |   Version:  SVN 
Resolution:  wontfix|  Keywords:  
 Stage:  Accepted   | Has_patch:  0   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by Alex):

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

Comment:

 Wontfixing on the grounds that it's non-trivial and the observed gain is
 tiny.

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

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



Re: [Django] #13693: error_messages for fields in Model don't carry over to ModelForm

2010-10-12 Thread Django
#13693: error_messages for fields in Model don't carry over to ModelForm
-+--
  Reporter:  Aleks   | Owner:  anonymous
Status:  closed  | Milestone:   
 Component:  Forms   |   Version:  1.2  
Resolution:  wontfix |  Keywords:  error_messages, forms, models
 Stage:  Unreviewed  | Has_patch:  1
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Comment (by carljm):

 > Marking this as wontfix since I don't believe this is an issue.

 Honza, you certainly know a lot more than I do about model-validation, but
 I don't think I agree with the wontfix here. In general my mental model of
 ModelForms is that they pull as much information as possible from the
 model definition for the form default, to minimize the boilerplate needed
 to make a form for that model. Personally, I'd be surprised if I defined a
 custom validation error message on a model field and found that it didn't
 propagate to the ModelForm by default. It's possible that I'm missing
 something important, but I can't think of a case where I wouldn't want
 that as the default behavior. Maybe you can explain in a bit more detail
 why that's a bad idea? Or else reopen, and I'm willing to put in some time
 to work out the test-suite issues and any other problems with the 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-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #9321: When overriding the widget for a manytomany field default help_text stays

2010-10-12 Thread Django
#9321: When overriding the widget for a manytomany field default help_text stays
---+
  Reporter:  mrcai | Owner:  nobody 

Status:  reopened  | Milestone: 

 Component:  Forms |   Version:  1.2

Resolution:|  Keywords:  manytomanyfield, widget, 
related.py
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  1 |   Needs_tests:  0  

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

 Is there update for this issue? The workarounds are all pretty annoying

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

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



Re: [Django] #14452: Need help understanding why the below is happening.

2010-10-12 Thread Django
#14452: Need help understanding why the below is happening.
+---
  Reporter:  dan...@danols.com  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Forms  |   Version:  1.2   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by dan...@danols.com):

 Thank you for the clarification - it is so obvious now and I got it to
 work. I will use the django-users mailing list in the future.

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

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



[Changeset] r14196 - django/branches/releases/1.2.X/django/contrib/localflavor/id

2010-10-12 Thread noreply
Author: jbronn
Date: 2010-10-12 20:25:04 -0500 (Tue, 12 Oct 2010)
New Revision: 14196

Modified:
   django/branches/releases/1.2.X/django/contrib/localflavor/id/id_choices.py
Log:
[1.2.X] Fixed #13830 -- Updated province name in Indonesian localflavor.  
Thanks, rodin.

Backport of r14195 from trunk.

Modified: 
django/branches/releases/1.2.X/django/contrib/localflavor/id/id_choices.py
===
--- django/branches/releases/1.2.X/django/contrib/localflavor/id/id_choices.py  
2010-10-13 01:23:07 UTC (rev 14195)
+++ django/branches/releases/1.2.X/django/contrib/localflavor/id/id_choices.py  
2010-10-13 01:25:04 UTC (rev 14196)
@@ -6,6 +6,7 @@
 # I decided to use unambiguous and consistent (some are common) 3-letter codes.
 
 PROVINCE_CHOICES = (
+('ACE', _('Aceh')),
 ('BLI', _('Bali')),
 ('BTN', _('Banten')),
 ('BKL', _('Bengkulu')),
@@ -25,7 +26,6 @@
 ('LPG', _('Lampung')),
 ('MLK', _('Maluku')),
 ('MUT', _('Maluku Utara')),
-('NAD', _('Nanggroe Aceh Darussalam')),
 ('NTB', _('Nusa Tenggara Barat')),
 ('NTT', _('Nusa Tenggara Timur')),
 ('PPA', _('Papua')),

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



[Changeset] r14195 - django/trunk/django/contrib/localflavor/id

2010-10-12 Thread noreply
Author: jbronn
Date: 2010-10-12 20:23:07 -0500 (Tue, 12 Oct 2010)
New Revision: 14195

Modified:
   django/trunk/django/contrib/localflavor/id/id_choices.py
Log:
Fixed #13830 -- Updated province name in Indonesian localflavor.  Thanks, rodin.

Modified: django/trunk/django/contrib/localflavor/id/id_choices.py
===
--- django/trunk/django/contrib/localflavor/id/id_choices.py2010-10-13 
00:33:10 UTC (rev 14194)
+++ django/trunk/django/contrib/localflavor/id/id_choices.py2010-10-13 
01:23:07 UTC (rev 14195)
@@ -6,6 +6,7 @@
 # I decided to use unambiguous and consistent (some are common) 3-letter codes.
 
 PROVINCE_CHOICES = (
+('ACE', _('Aceh')),
 ('BLI', _('Bali')),
 ('BTN', _('Banten')),
 ('BKL', _('Bengkulu')),
@@ -25,7 +26,6 @@
 ('LPG', _('Lampung')),
 ('MLK', _('Maluku')),
 ('MUT', _('Maluku Utara')),
-('NAD', _('Nanggroe Aceh Darussalam')),
 ('NTB', _('Nusa Tenggara Barat')),
 ('NTT', _('Nusa Tenggara Timur')),
 ('PPA', _('Papua')),

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



[Changeset] r14194 - in django/branches/releases/1.2.X: django/forms tests/modeltests/model_formsets

2010-10-12 Thread noreply
Author: Honza_Kral
Date: 2010-10-12 19:33:10 -0500 (Tue, 12 Oct 2010)
New Revision: 14194

Modified:
   django/branches/releases/1.2.X/django/forms/models.py
   django/branches/releases/1.2.X/tests/modeltests/model_formsets/models.py
Log:
[1.2.X] Changed unique validation in model formsets to ignore None values, not 
just omit them. Thanks claudep!

Backport of r14193 from trunk.

Modified: django/branches/releases/1.2.X/django/forms/models.py
===
--- django/branches/releases/1.2.X/django/forms/models.py   2010-10-13 
00:30:02 UTC (rev 14193)
+++ django/branches/releases/1.2.X/django/forms/models.py   2010-10-13 
00:33:10 UTC (rev 14194)
@@ -516,10 +516,9 @@
 # it's already invalid
 if not hasattr(form, "cleaned_data"):
 continue
-# get each of the fields for which we have data on this form
-if [f for f in unique_check if f in form.cleaned_data and 
form.cleaned_data[f] is not None]:
-# get the data itself
-row_data = tuple([form.cleaned_data[field] for field in 
unique_check])
+# get data for each field of each of unique_check
+row_data = tuple([form.cleaned_data[field] for field in 
unique_check if field in form.cleaned_data])
+if row_data and not None in row_data:
 # if we've aready seen it then we have a uniqueness failure
 if row_data in seen_data:
 # poke error messages into the right places and mark

Modified: 
django/branches/releases/1.2.X/tests/modeltests/model_formsets/models.py
===
--- django/branches/releases/1.2.X/tests/modeltests/model_formsets/models.py
2010-10-13 00:30:02 UTC (rev 14193)
+++ django/branches/releases/1.2.X/tests/modeltests/model_formsets/models.py
2010-10-13 00:33:10 UTC (rev 14194)
@@ -35,6 +35,23 @@
 def __unicode__(self):
 return u'%s: %s' % (self.my_pk, self.title)
 
+class Editor(models.Model):
+name = models.CharField(max_length=100)
+
+class BookWithOptionalAltEditor(models.Model):
+author = models.ForeignKey(Author)
+# Optional secondary author
+alt_editor = models.ForeignKey(Editor, blank=True, null=True)
+title = models.CharField(max_length=100)
+
+class Meta:
+unique_together = (
+('author', 'title', 'alt_editor'),
+)
+
+def __unicode__(self):
+return self.title
+
 class AlternateBook(Book):
 notes = models.CharField(max_length=100)
 
@@ -648,7 +665,27 @@
 >>> formset.save()
 []
 
+Test inline formsets where the inline-edited object has a unique_together 
constraint with a nullable member
 
+>>> AuthorBooksFormSet4 = inlineformset_factory(Author, 
BookWithOptionalAltEditor, can_delete=False, extra=2)
+
+>>> data = {
+... 'bookwithoptionalalteditor_set-TOTAL_FORMS': '2', # the number of 
forms rendered
+... 'bookwithoptionalalteditor_set-INITIAL_FORMS': '0', # the number of 
forms with initial data
+... 'bookwithoptionalalteditor_set-MAX_NUM_FORMS': '', # the max number of 
forms
+... 'bookwithoptionalalteditor_set-0-author': '1',
+... 'bookwithoptionalalteditor_set-0-title': 'Les Fleurs du Mal',
+... 'bookwithoptionalalteditor_set-1-author': '1',
+... 'bookwithoptionalalteditor_set-1-title': 'Les Fleurs du Mal',
+... }
+>>> formset = AuthorBooksFormSet4(data, instance=author)
+>>> formset.is_valid()
+True
+
+>>> formset.save()
+[, ]
+
+
 # ModelForm with a custom save method in an inline formset ###
 
 >>> class PoemForm(forms.ModelForm):

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



[Changeset] r14193 - in django/trunk: django/forms tests/modeltests/model_formsets

2010-10-12 Thread noreply
Author: Honza_Kral
Date: 2010-10-12 19:30:02 -0500 (Tue, 12 Oct 2010)
New Revision: 14193

Modified:
   django/trunk/django/forms/models.py
   django/trunk/tests/modeltests/model_formsets/models.py
Log:
Fixed #13811 -- Changed unique validation in model formsets to ignore None 
values, not just omit them

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2010-10-12 23:55:38 UTC (rev 14192)
+++ django/trunk/django/forms/models.py 2010-10-13 00:30:02 UTC (rev 14193)
@@ -526,10 +526,9 @@
 # it's already invalid
 if not hasattr(form, "cleaned_data"):
 continue
-# get each of the fields for which we have data on this form
-if [f for f in unique_check if f in form.cleaned_data and 
form.cleaned_data[f] is not None]:
-# get the data itself
-row_data = tuple([form.cleaned_data[field] for field in 
unique_check])
+# get data for each field of each of unique_check
+row_data = tuple([form.cleaned_data[field] for field in 
unique_check if field in form.cleaned_data])
+if row_data and not None in row_data:
 # if we've aready seen it then we have a uniqueness failure
 if row_data in seen_data:
 # poke error messages into the right places and mark

Modified: django/trunk/tests/modeltests/model_formsets/models.py
===
--- django/trunk/tests/modeltests/model_formsets/models.py  2010-10-12 
23:55:38 UTC (rev 14192)
+++ django/trunk/tests/modeltests/model_formsets/models.py  2010-10-13 
00:30:02 UTC (rev 14193)
@@ -35,6 +35,23 @@
 def __unicode__(self):
 return u'%s: %s' % (self.my_pk, self.title)
 
+class Editor(models.Model):
+name = models.CharField(max_length=100)
+
+class BookWithOptionalAltEditor(models.Model):
+author = models.ForeignKey(Author)
+# Optional secondary author
+alt_editor = models.ForeignKey(Editor, blank=True, null=True)
+title = models.CharField(max_length=100)
+
+class Meta:
+unique_together = (
+('author', 'title', 'alt_editor'),
+)
+
+def __unicode__(self):
+return self.title
+
 class AlternateBook(Book):
 notes = models.CharField(max_length=100)
 
@@ -648,7 +665,27 @@
 >>> formset.save()
 []
 
+Test inline formsets where the inline-edited object has a unique_together 
constraint with a nullable member
 
+>>> AuthorBooksFormSet4 = inlineformset_factory(Author, 
BookWithOptionalAltEditor, can_delete=False, extra=2)
+
+>>> data = {
+... 'bookwithoptionalalteditor_set-TOTAL_FORMS': '2', # the number of 
forms rendered
+... 'bookwithoptionalalteditor_set-INITIAL_FORMS': '0', # the number of 
forms with initial data
+... 'bookwithoptionalalteditor_set-MAX_NUM_FORMS': '', # the max number of 
forms
+... 'bookwithoptionalalteditor_set-0-author': '1',
+... 'bookwithoptionalalteditor_set-0-title': 'Les Fleurs du Mal',
+... 'bookwithoptionalalteditor_set-1-author': '1',
+... 'bookwithoptionalalteditor_set-1-title': 'Les Fleurs du Mal',
+... }
+>>> formset = AuthorBooksFormSet4(data, instance=author)
+>>> formset.is_valid()
+True
+
+>>> formset.save()
+[, ]
+
+
 # ModelForm with a custom save method in an inline formset ###
 
 >>> class PoemForm(forms.ModelForm):

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



Re: [Django] #13693: error_messages for fields in Model don't carry over to ModelForm

2010-10-12 Thread Django
#13693: error_messages for fields in Model don't carry over to ModelForm
-+--
  Reporter:  Aleks   | Owner:  anonymous
Status:  closed  | Milestone:   
 Component:  Forms   |   Version:  1.2  
Resolution:  wontfix |  Keywords:  error_messages, forms, models
 Stage:  Unreviewed  | Has_patch:  1
Needs_docs:  0   |   Needs_tests:  0
Needs_better_patch:  0   |  
-+--
Changes (by Honza_Kral):

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

Comment:

 This is not a straightforward issue as just this patch (which also breaks
 the test suite). The messages on model fields are meant to be used there
 and doesn't necessarily have to (and sometimes don't) coincide with the
 messages on form fields.

 Marking this as wontfix since I don't believe this is an issue.

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

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



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

2010-10-12 Thread noreply
Author: russellm
Date: 2010-10-12 18:55:38 -0500 (Tue, 12 Oct 2010)
New Revision: 14192

Modified:
   django/trunk/docs/topics/testing.txt
Log:
Clarified the text and example describing the RequestFactory. Thanks to Alex 
for the feedback.

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-10-12 23:37:47 UTC (rev 
14191)
+++ django/trunk/docs/topics/testing.txt2010-10-12 23:55:38 UTC (rev 
14192)
@@ -1019,13 +1019,15 @@
 
 .. Class:: RequestFactory
 
-The :class:`~django.test.client.RequestFactory` is a simplified
-version of the test client that provides a way to generate a request
-instance that can be used as the first argument to any view. This
-means you can test a view function the same way as you would test any
-other function -- as a black box, with exactly known inputs, testing
-for specific outputs.
+.. versionadded:: 1.3
 
+The :class:`~django.test.client.RequestFactory` shares the same API as
+the test client. However, instead of behaving like a browser, the
+RequestFactory provides a way to generate a request instance that can
+be used as the first argument to any view. This means you can test a
+view function the same way as you would test any other function -- as
+a black box, with exactly known inputs, testing for specific outputs.
+
 The API for the :class:`~django.test.client.RequestFactory` is a slightly
 restricted subset of the test client API:
 
@@ -1052,7 +1054,7 @@
 self.factory = RequestFactory()
 
 def test_details(self):
-# Issue a GET request.
+# Create a in instance of a GET request.
 request = self.factory.get('/customer/details')
 
 # Test my_view() as if it were deployed at /customer/details

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



[Changeset] r14191 - in django/trunk: django/test docs/topics tests/modeltests/test_client

2010-10-12 Thread noreply
Author: russellm
Date: 2010-10-12 18:37:47 -0500 (Tue, 12 Oct 2010)
New Revision: 14191

Modified:
   django/trunk/django/test/__init__.py
   django/trunk/django/test/client.py
   django/trunk/docs/topics/testing.txt
   django/trunk/tests/modeltests/test_client/models.py
Log:
Fixed #9002 -- Added a RequestFactory. This allows you to create request 
instances so you can unit test views as standalone functions. Thanks to Simon 
Willison for the suggestion and snippet on which this patch was originally 
based.

Modified: django/trunk/django/test/__init__.py
===
--- django/trunk/django/test/__init__.py2010-10-12 17:27:07 UTC (rev 
14190)
+++ django/trunk/django/test/__init__.py2010-10-12 23:37:47 UTC (rev 
14191)
@@ -2,6 +2,6 @@
 Django Unit Test and Doctest framework.
 """
 
-from django.test.client import Client
+from django.test.client import Client, RequestFactory
 from django.test.testcases import TestCase, TransactionTestCase, 
skipIfDBFeature, skipUnlessDBFeature
 from django.test.utils import Approximate

Modified: django/trunk/django/test/client.py
===
--- django/trunk/django/test/client.py  2010-10-12 17:27:07 UTC (rev 14190)
+++ django/trunk/django/test/client.py  2010-10-12 23:37:47 UTC (rev 14191)
@@ -156,8 +156,166 @@
 file.read()
 ]
 
-class Client(object):
+
+
+class RequestFactory(object):
 """
+Class that lets you create mock Request objects for use in testing.
+
+Usage:
+
+rf = RequestFactory()
+get_request = rf.get('/hello/')
+post_request = rf.post('/submit/', {'foo': 'bar'})
+
+Once you have a request object you can pass it to any view function,
+just as if that view had been hooked up using a URLconf.
+"""
+def __init__(self, **defaults):
+self.defaults = defaults
+self.cookies = SimpleCookie()
+self.errors = StringIO()
+
+def _base_environ(self, **request):
+"""
+The base environment for a request.
+"""
+environ = {
+'HTTP_COOKIE':   self.cookies.output(header='', sep='; '),
+'PATH_INFO': '/',
+'QUERY_STRING':  '',
+'REMOTE_ADDR':   '127.0.0.1',
+'REQUEST_METHOD':'GET',
+'SCRIPT_NAME':   '',
+'SERVER_NAME':   'testserver',
+'SERVER_PORT':   '80',
+'SERVER_PROTOCOL':   'HTTP/1.1',
+'wsgi.version':  (1,0),
+'wsgi.url_scheme':   'http',
+'wsgi.errors':   self.errors,
+'wsgi.multiprocess': True,
+'wsgi.multithread':  False,
+'wsgi.run_once': False,
+}
+environ.update(self.defaults)
+environ.update(request)
+return environ
+
+def request(self, **request):
+"Construct a generic request object."
+return WSGIRequest(self._base_environ(**request))
+
+def get(self, path, data={}, **extra):
+"Construct a GET request"
+
+parsed = urlparse(path)
+r = {
+'CONTENT_TYPE':'text/html; charset=utf-8',
+'PATH_INFO':   urllib.unquote(parsed[2]),
+'QUERY_STRING':urlencode(data, doseq=True) or parsed[4],
+'REQUEST_METHOD': 'GET',
+'wsgi.input':  FakePayload('')
+}
+r.update(extra)
+return self.request(**r)
+
+def post(self, path, data={}, content_type=MULTIPART_CONTENT,
+ **extra):
+"Construct a POST request."
+
+if content_type is MULTIPART_CONTENT:
+post_data = encode_multipart(BOUNDARY, data)
+else:
+# Encode the content so that the byte representation is correct.
+match = CONTENT_TYPE_RE.match(content_type)
+if match:
+charset = match.group(1)
+else:
+charset = settings.DEFAULT_CHARSET
+post_data = smart_str(data, encoding=charset)
+
+parsed = urlparse(path)
+r = {
+'CONTENT_LENGTH': len(post_data),
+'CONTENT_TYPE':   content_type,
+'PATH_INFO':  urllib.unquote(parsed[2]),
+'QUERY_STRING':   parsed[4],
+'REQUEST_METHOD': 'POST',
+'wsgi.input': FakePayload(post_data),
+}
+r.update(extra)
+return self.request(**r)
+
+def head(self, path, data={}, **extra):
+"Construct a HEAD request."
+
+parsed = urlparse(path)
+r = {
+'CONTENT_TYPE':'text/html; charset=utf-8',
+'PATH_INFO':   urllib.unquote(parsed[2]),
+'QUERY_STRING':urlencode(data, doseq=True) or parsed[4],
+'REQUEST_METHOD': 'HEAD',
+'wsgi.input':  FakePayload('')
+}
+r.update(extra)
+return self.request(**r)
+
+

Re: [Django] #14403: Missing/incomplete documentation for FloatField?

2010-10-12 Thread Django
#14403: Missing/incomplete documentation for FloatField?
--+-
  Reporter:  typeshige   | Owner:  nobody
Status:  reopened | Milestone:  1.3   
 Component:  Documentation|   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by typeshige ):

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

Comment:

 This makes sense.  Thank you.

 Actually, after writing this ticket, I found out that I was thinking of
 DecimalField which has documented options.  I got it confused with
 FloatField.

 Since these are somewhat similar, perhaps they can refer to each other
 since they don't appear closely together in the docs.  Kind of like how
 BigIntegerField refers to IntegerField.

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

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



[Django] #14453: typecast_timestamp in db.backends.util gives incorrect behavior

2010-10-12 Thread Django
#14453: typecast_timestamp in db.backends.util gives incorrect behavior
--+-
 Reporter:  philipn   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 {{{
 In [9]: typecast_timestamp('2010-10-12 15:29:22.063202')
 Out[9]: datetime.datetime(2010, 10, 12, 15, 29, 22, 63201)

 In [8]: typecast_timestamp('2010-10-12 15:29:22.063201')
 Out[8]: datetime.datetime(2010, 10, 12, 15, 29, 22, 63200)

 In [10]: typecast_timestamp('2010-10-12 15:29:22.063205')
 Out[10]: datetime.datetime(2010, 10, 12, 15, 29, 22, 63205)
 }}}

 This causes sqlite to give occasional incorrect results when dealing with
 datetimes.

 Suggested patch attached.  Issue is with the cast to float.

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

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



Re: [Django] #1282: archive_today generic view should accept a month_format parameter instead of hardcoding '%b'

2010-10-12 Thread Django
#1282: archive_today generic view should accept a month_format parameter instead
of hardcoding '%b'
+---
  Reporter:  anonymous  | Owner:  nickefford
Status:  new| Milestone:
 Component:  Generic views  |   Version:  SVN   
Resolution: |  Keywords:  sprintsept14 easy-pickings
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by jezdez):

 This is probably going to be fixed by the latest proposed patch for #6735.

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

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



Re: [Django] #14403: Missing/incomplete documentation for FloatField?

2010-10-12 Thread Django
#14403: Missing/incomplete documentation for FloatField?
--+-
  Reporter:  typeshige   | Owner:  nobody
Status:  closed   | Milestone:  1.3   
 Component:  Documentation|   Version:  1.2   
Resolution:  invalid  |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by gabrielhurley):

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

Comment:

 The "Changed in version 1.0" marker is going to be removed in 1.3 (ticket
 #14000). Otherwise, what would you have the documentation say? If you look
 at the
 
[http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py#L838
 code for a FloatField] there's almost nothing happening. It's nearly as
 close to a vanilla Field subclass as you can get.

 There are several other field classes that have very short descriptions in
 that document (BooleanField, for example). It's a conscious decision not
 to list all valid options for every field, and instead to only list the
 common options once at the top of the page.

 If there is specific info you feel needs to be added, please re-open the
 ticket with more specifics (and ideally a patch). Thanks!

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

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



Re: [Django] #14452: Need help understanding why the below is happening.

2010-10-12 Thread Django
#14452: Need help understanding why the below is happening.
+---
  Reporter:  dan...@danols.com  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Forms  |   Version:  1.2   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by lukeplant):

 mattmcc is exactly right, but here is the answer to your question, since
 you did actually ask on IRC: the reason your list keeps growing is because
 you keep appending to it.  `AD_TARGETS` is a '''class''' attribute i.e. it
 is attached to the class `AdTargetForm`, not to instances of the class.
 Since the class `AdTargetForm` is a global object, so is `AD_TARGETS`. The
 class `AdTargetForm` is created when you first access that module, and it
 is not destroyed until you stop the server. So, every time you append to
 that variable, it keeps getting longer.

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

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



Re: [Django] #14301: django crashes on email address that passed validate_email() (utf8-tld)

2010-10-12 Thread Django
#14301: django crashes on email address that passed validate_email()  (utf8-tld)
---+
  Reporter:  harm  | Owner:  nobody
Status:  new   | Milestone:  1.3   
 Component:  django.core.mail  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by jezdez):

 Hm, I can't seem to reproduce the error, tbh. Can someone confirm the test
 breakage?

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

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



Re: [Django] #14452: Need help understanding why the below is happening.

2010-10-12 Thread Django
#14452: Need help understanding why the below is happening.
+---
  Reporter:  dan...@danols.com  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Forms  |   Version:  1.2   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by mattmcc):

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

Comment:

 Hello, Trac is designed for filing bugs about Django itself, not for
 questions on how to use Django.  For those you can use either the
 [http://groups.google.com/group/django-users django-users] mailing list,
 or the #django channel on [http://webchat.freenode.net/ irc.freenode.net].

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

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



[Django] #14452: Need help understanding why the below is happening.

2010-10-12 Thread Django
#14452: Need help understanding why the below is happening.
---+
 Reporter:  dan...@danols.com  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Forms  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I've attempted to get help in the #django IRC but with no luck. I hope you
 can assist.

 {{{
 """
 How is this possible ???

 Every time I refresh the page more 'same' choices get added to the fields
 choice options. That is:

 First time I will get:
 a
 b

 Second refresh
 a
 b
 a
 b

 and so on ??? I don't get how this is happening.
 """

 ### in view
 form = AdForm(instance=ad)
 AdTargetFormSet = modelformset_factory(AdTarget, form=AdTargetForm,
 can_delete=True)
 AdTargetFormSet.form = staticmethod(curry(AdTargetForm,
 objects=[Competition.objects.all()]))
 adtarget_formset =
 AdTargetFormSet(queryset=AdTarget.objects.filter(ad=ad))

 ### my form
 class AdTargetForm(ModelForm):
 '''
 Creates and AdTargetForm

 Takes an argument that is a list of objects
 to generate the url pattern - the object
 must have a valid get_absolute_url defined.

 for example AdTargetForm(objects=[Competition.objects.all(),
 Team.objects.all()]
 '''
 # create the ad tragets lists
 AD_TARGETS = [
   ('', '...'),
   ('.*', 'The Entire Site'),
   ('^/$', 'Home Landing Page'),
   ]

 def __init__(self, objects=None, *args, **kwargs):
 super(AdTargetForm, self).__init__(*args, **kwargs)

 if (objects):
 for object_list in objects:
 # @TODO: add the object landing page
 for obj in object_list:
 self.AD_TARGETS.append(('^%s$' %
 obj.get_absolute_url(), str(obj)))
 self.fields['url_pattern'].choices = self.AD_TARGETS

 url_pattern = forms.ChoiceField(label='Target', choices = AD_TARGETS)
 class Meta:
 model = AdTarget
 fields = () # show these fields from model
 exclude = ('ad') # exclude these fields from model
 }}}

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

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



Re: [Django] #8054: Move method properties for admin list customisation to ModelAdmin

2010-10-12 Thread Django
#8054: Move method properties for admin list customisation to ModelAdmin
+---
  Reporter:  Daniel Pope   | Owner:  
brosner
Status:  assigned   | Milestone:
 
 Component:  django.contrib.admin   |   Version:  
SVN
Resolution: |  Keywords:
 
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  1  |   Needs_tests:  1 
 
Needs_better_patch:  1  |  
+---
Changes (by renatopedigoni):

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

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

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



Re: [Django] #14298: maximum open cursors exceeded on Jython and Oracle

2010-10-12 Thread Django
#14298: maximum open cursors exceeded on Jython and Oracle
---+
  Reporter:  stephanekonstantaropoulos | Owner:  nobody 
  
Status:  reopened  | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  1.1
  
Resolution:|  Keywords:  Oracle 
Jython
 Stage:  Accepted  | Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by PaulM):

  * stage:  Unreviewed => Accepted

Comment:

 I'll go ahead and mark this as accepted then.

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

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



Re: [Django] #13795: Add CACHE_KEY_PREFIX setting that prefixes the low-level cache API

2010-10-12 Thread Django
#13795: Add CACHE_KEY_PREFIX setting that prefixes the low-level cache API
+---
  Reporter:  bruth  | Owner:  bruth
Status:  assigned   | Milestone:  1.3  
 Component:  Cache system   |   Version:  SVN  
Resolution: |  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  1
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by bruth):

  * stage:  Accepted => Ready for checkin

Comment:

 I implemented cache versioning and added the appropriate unit tests.
 Please provide feedback.

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

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



Re: [Django] #14451: add related_name to contrib.auth.models.User for 'groups'

2010-10-12 Thread Django
#14451: add related_name to contrib.auth.models.User for 'groups'
+---
  Reporter:  tvon   | Owner:  nobody
Status:  new| Milestone:  2.0   
 Component:  Uncategorized  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Someday/Maybe  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by lukeplant):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Someday/Maybe
  * needs_tests:  => 0
  * needs_docs:  => 0

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

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



[Changeset] r14190 - in django/branches/releases/1.2.X: django/contrib/gis/db/models django/contrib/gis/tests/geogapp docs/ref/contrib/gis

2010-10-12 Thread noreply
Author: jbronn
Date: 2010-10-12 12:27:07 -0500 (Tue, 12 Oct 2010)
New Revision: 14190

Modified:
   django/branches/releases/1.2.X/django/contrib/gis/db/models/query.py
   django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/models.py
   django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py
   django/branches/releases/1.2.X/docs/ref/contrib/gis/model-api.txt
Log:
[1.2.X] Enabled area calculations for geography columns.

Backport of r14189 from trunk.

Modified: django/branches/releases/1.2.X/django/contrib/gis/db/models/query.py
===
--- django/branches/releases/1.2.X/django/contrib/gis/db/models/query.py
2010-10-12 17:13:27 UTC (rev 14189)
+++ django/branches/releases/1.2.X/django/contrib/gis/db/models/query.py
2010-10-12 17:27:07 UTC (rev 14190)
@@ -48,7 +48,10 @@
 s['procedure_args']['tolerance'] = tolerance
 s['select_field'] = AreaField('sq_m') # Oracle returns area in 
units of meters.
 elif backend.postgis or backend.spatialite:
-if not geo_field.geodetic(connection):
+if backend.geography:
+# Geography fields support area calculation, returns square 
meters.
+s['select_field'] = AreaField('sq_m')
+elif not geo_field.geodetic(connection):
 # Getting the area units of the geographic field.
 s['select_field'] = 
AreaField(Area.unit_attname(geo_field.units_name(connection)))
 else:

Modified: 
django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/models.py
===
--- django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/models.py   
2010-10-12 17:13:27 UTC (rev 14189)
+++ django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/models.py   
2010-10-12 17:27:07 UTC (rev 14190)
@@ -10,7 +10,7 @@
 code = models.CharField(max_length=10)
 poly = models.PolygonField(geography=True)
 objects = models.GeoManager()
-def __unicode__(self): return self.name
+def __unicode__(self): return self.code
 
 class County(models.Model):
 name = models.CharField(max_length=25)

Modified: 
django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py
===
--- django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py
2010-10-12 17:13:27 UTC (rev 14189)
+++ django/branches/releases/1.2.X/django/contrib/gis/tests/geogapp/tests.py
2010-10-12 17:27:07 UTC (rev 14190)
@@ -76,3 +76,12 @@
 self.assertEqual(num_poly, len(c.mpoly))
 self.assertEqual(name, c.name)
 self.assertEqual(state, c.state)
+
+def test06_geography_area(self):
+"Testing that Area calculations work on geography columns."
+from django.contrib.gis.measure import A
+# SELECT ST_Area(poly) FROM geogapp_zipcode WHERE code='77002';
+ref_area = 5439084.70637573
+tol = 5
+z = Zipcode.objects.area().get(code='77002')
+self.assertAlmostEqual(z.area.sq_m, ref_area, tol)

Modified: django/branches/releases/1.2.X/docs/ref/contrib/gis/model-api.txt
===
--- django/branches/releases/1.2.X/docs/ref/contrib/gis/model-api.txt   
2010-10-12 17:13:27 UTC (rev 14189)
+++ django/branches/releases/1.2.X/docs/ref/contrib/gis/model-api.txt   
2010-10-12 17:27:07 UTC (rev 14190)
@@ -216,7 +216,6 @@
 available for geography columns:
 
 * :lookup:`bboverlaps`
-* :lookup:`exact`, and :lookup:`same_as`
 * :lookup:`coveredby`
 * :lookup:`covers`
 * :lookup:`intersects`

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



[Changeset] r14189 - in django/trunk: django/contrib/gis/db/models django/contrib/gis/tests/geogapp docs/ref/contrib/gis

2010-10-12 Thread noreply
Author: jbronn
Date: 2010-10-12 12:13:27 -0500 (Tue, 12 Oct 2010)
New Revision: 14189

Modified:
   django/trunk/django/contrib/gis/db/models/query.py
   django/trunk/django/contrib/gis/tests/geogapp/models.py
   django/trunk/django/contrib/gis/tests/geogapp/tests.py
   django/trunk/docs/ref/contrib/gis/model-api.txt
Log:
Enabled area calculations for geography columns.

Modified: django/trunk/django/contrib/gis/db/models/query.py
===
--- django/trunk/django/contrib/gis/db/models/query.py  2010-10-12 14:09:02 UTC 
(rev 14188)
+++ django/trunk/django/contrib/gis/db/models/query.py  2010-10-12 17:13:27 UTC 
(rev 14189)
@@ -48,7 +48,10 @@
 s['procedure_args']['tolerance'] = tolerance
 s['select_field'] = AreaField('sq_m') # Oracle returns area in 
units of meters.
 elif backend.postgis or backend.spatialite:
-if not geo_field.geodetic(connection):
+if backend.geography:
+# Geography fields support area calculation, returns square 
meters.
+s['select_field'] = AreaField('sq_m')
+elif not geo_field.geodetic(connection):
 # Getting the area units of the geographic field.
 s['select_field'] = 
AreaField(Area.unit_attname(geo_field.units_name(connection)))
 else:

Modified: django/trunk/django/contrib/gis/tests/geogapp/models.py
===
--- django/trunk/django/contrib/gis/tests/geogapp/models.py 2010-10-12 
14:09:02 UTC (rev 14188)
+++ django/trunk/django/contrib/gis/tests/geogapp/models.py 2010-10-12 
17:13:27 UTC (rev 14189)
@@ -10,7 +10,7 @@
 code = models.CharField(max_length=10)
 poly = models.PolygonField(geography=True)
 objects = models.GeoManager()
-def __unicode__(self): return self.name
+def __unicode__(self): return self.code
 
 class County(models.Model):
 name = models.CharField(max_length=25)

Modified: django/trunk/django/contrib/gis/tests/geogapp/tests.py
===
--- django/trunk/django/contrib/gis/tests/geogapp/tests.py  2010-10-12 
14:09:02 UTC (rev 14188)
+++ django/trunk/django/contrib/gis/tests/geogapp/tests.py  2010-10-12 
17:13:27 UTC (rev 14189)
@@ -76,3 +76,12 @@
 self.assertEqual(num_poly, len(c.mpoly))
 self.assertEqual(name, c.name)
 self.assertEqual(state, c.state)
+
+def test06_geography_area(self):
+"Testing that Area calculations work on geography columns."
+from django.contrib.gis.measure import A
+# SELECT ST_Area(poly) FROM geogapp_zipcode WHERE code='77002';
+ref_area = 5439084.70637573
+tol = 5
+z = Zipcode.objects.area().get(code='77002')
+self.assertAlmostEqual(z.area.sq_m, ref_area, tol)

Modified: django/trunk/docs/ref/contrib/gis/model-api.txt
===
--- django/trunk/docs/ref/contrib/gis/model-api.txt 2010-10-12 14:09:02 UTC 
(rev 14188)
+++ django/trunk/docs/ref/contrib/gis/model-api.txt 2010-10-12 17:13:27 UTC 
(rev 14189)
@@ -216,7 +216,6 @@
 available for geography columns:
 
 * :lookup:`bboverlaps`
-* :lookup:`exact`, and :lookup:`same_as`
 * :lookup:`coveredby`
 * :lookup:`covers`
 * :lookup:`intersects`

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



Re: [Django] #12233: Redirect logged in user

2010-10-12 Thread Django
#12233: Redirect logged in user
+---
  Reporter:  dmathieu   | Owner:  nobody  
Status:  new| Milestone:  
 Component:  Authentication |   Version:  1.1 
Resolution: |  Keywords:  authentication,login
 Stage:  Ready for checkin  | Has_patch:  1   
Needs_docs:  0  |   Needs_tests:  0   
Needs_better_patch:  0  |  
+---
Changes (by anonymous):

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

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

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



[Django] #14451: add related_name to contrib.auth.models.User for 'groups'

2010-10-12 Thread Django
#14451: add related_name to contrib.auth.models.User for 'groups'
---+
 Reporter:  tvon   |   Owner:  nobody
   Status:  new|   Milestone:  2.0   
Component:  Uncategorized  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Would allow for
 {{{
 from django.contrib.auth.models import Group
 group = Group.objects.all()[0]
 group.members.all()
 }}}

 instead of the current

 {{{
 group.users_set.all()
 }}}


 You know, nexttime someone feels like kicking backwards compatibility in
 the groin...

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

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



Re: [Django] #13161: Ticked 2514 and 5171, solution for using Django with other psycopg2 applications.

2010-10-12 Thread Django
#13161: Ticked 2514 and 5171, solution for using Django with other psycopg2
applications.
---+
  Reporter:  spoksss   | Owner:  nobody 
  
Status:  new   | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  1.2-beta   
  
Resolution:|  Keywords:  psycopg2, 
unicode
 Stage:  Accepted  | Has_patch:  1  
  
Needs_docs:  0 |   Needs_tests:  1  
  
Needs_better_patch:  0 |  
---+
Changes (by carljm):

 * cc: carljm (added)

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

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



Re: [Django] #14450: Simple but powerfull patch to make application name localizable

2010-10-12 Thread Django
#14450: Simple but powerfull patch to make application name localizable
---+
  Reporter:  nnseva| Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by nnseva):

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

Comment:

 Note that the web interface doesn't show all patched files in the
 templates.admin.patch for unknown reason - __download__ the patch file
 instead to see __all__ changes

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

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



Re: [Django] #5171: postgresql_psycopg2 backend registers psycopg2's UNICODE extension, which can cause interference if Django is not the only component using psycopg2

2010-10-12 Thread Django
#5171: postgresql_psycopg2 backend registers psycopg2's UNICODE extension, which
can cause interference if Django is not the only component using psycopg2
---+
  Reporter:  Chris Wagner   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:  wontfix   |  Keywords:
 Stage:  Design decision needed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mhart):

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

Comment:

 My apologies, until now I had not seen bug:13161 which proposes this exact
 change. Reverting to earlier state.

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

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



Re: [Django] #5171: postgresql_psycopg2 backend registers psycopg2's UNICODE extension, which can cause interference if Django is not the only component using psycopg2

2010-10-12 Thread Django
#5171: postgresql_psycopg2 backend registers psycopg2's UNICODE extension, which
can cause interference if Django is not the only component using psycopg2
---+
  Reporter:  Chris Wagner   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mhart):

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

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

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



Re: [Django] #5171: postgresql_psycopg2 backend registers psycopg2's UNICODE extension, which can cause interference if Django is not the only component using psycopg2

2010-10-12 Thread Django
#5171: postgresql_psycopg2 backend registers psycopg2's UNICODE extension, which
can cause interference if Django is not the only component using psycopg2
---+
  Reporter:  Chris Wagner   | Owner:  nobody
Status:  closed| Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:  wontfix   |  Keywords:
 Stage:  Design decision needed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by mhart):

 My apologies for raising a zombie of a bug, this issue has recently bitten
 us and I was hoping it could be revisited since psycopg2's register_type
 function can register a type globally (as has been done earlier) or at the
 connection or cursor level by passing a second argument for scope. Perhaps
 this is a change to psycopg2 since this bug was closed.

 http://initd.org/psycopg/docs/extensions.html#database-types-casting-
 functions

 """psycopg2.extensions.register_type(obj[, scope])

 Register a type caster created using new_type().

 If scope is specified, it should be a connection or a cursor: the type
 caster will be effective only limited to the specified object. Otherwise
 it will be globally registered."""

 I believe this would appease all parties concerned.

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

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



[Changeset] r14188 - django/branches/releases/1.2.X/tests/modeltests/test_client

2010-10-12 Thread noreply
Author: russellm
Date: 2010-10-12 09:09:02 -0500 (Tue, 12 Oct 2010)
New Revision: 14188

Modified:
   django/branches/releases/1.2.X/tests/modeltests/test_client/views.py
Log:
[1.2.X] Modified the test_client tests to use the non-deprecated mail API.
Backport of r14187 from trunk.

Modified: django/branches/releases/1.2.X/tests/modeltests/test_client/views.py
===
--- django/branches/releases/1.2.X/tests/modeltests/test_client/views.py
2010-10-12 14:06:11 UTC (rev 14187)
+++ django/branches/releases/1.2.X/tests/modeltests/test_client/views.py
2010-10-12 14:09:02 UTC (rev 14188)
@@ -1,6 +1,6 @@
 from xml.dom.minidom import parseString
 
-from django.core.mail import EmailMessage, SMTPConnection
+from django.core import mail
 from django.template import Context, Template
 from django.http import HttpResponse, HttpResponseRedirect, 
HttpResponseNotFound
 from django.contrib.auth.decorators import login_required, permission_required
@@ -38,7 +38,7 @@
 response = HttpResponse()
 response['X-DJANGO-TEST'] = 'Slartibartfast'
 return response
-
+
 def raw_post_view(request):
 """A view which expects raw XML to be posted and returns content extracted
 from the XML"""
@@ -139,7 +139,7 @@
 "A simple view that is login protected with a custom redirect field set"
 t = Template('This is a login protected test. Username is {{ user.username 
}}.', name='Login Template')
 c = Context({'user': request.user})
-
+
 return HttpResponse(t.render(c))
 login_protected_view_changed_redirect = 
login_required(redirect_field_name="redirect_to")(login_protected_view_changed_redirect)
 
@@ -189,7 +189,7 @@
 raise KeyError("Oops! Looks like you wrote some bad code.")
 
 def mail_sending_view(request):
-EmailMessage(
+mail.EmailMessage(
 "Test message",
 "This is a test email",
 "f...@example.com",
@@ -197,18 +197,18 @@
 return HttpResponse("Mail sent")
 
 def mass_mail_sending_view(request):
-m1 = EmailMessage(
+m1 = mail.EmailMessage(
 'First Test message',
 'This is the first test email',
 'f...@example.com',
 ['fi...@example.com', 'sec...@example.com'])
-m2 = EmailMessage(
+m2 = mail.EmailMessage(
 'Second Test message',
 'This is the second test email',
 'f...@example.com',
 ['sec...@example.com', 'th...@example.com'])
 
-c = SMTPConnection()
+c = mail.get_connection()
 c.send_messages([m1,m2])
 
 return HttpResponse("Mail sent")

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



[Changeset] r14187 - django/trunk/tests/modeltests/test_client

2010-10-12 Thread noreply
Author: russellm
Date: 2010-10-12 09:06:11 -0500 (Tue, 12 Oct 2010)
New Revision: 14187

Modified:
   django/trunk/tests/modeltests/test_client/views.py
Log:
Modified the test_client tests to use the non-deprecated mail API.

Modified: django/trunk/tests/modeltests/test_client/views.py
===
--- django/trunk/tests/modeltests/test_client/views.py  2010-10-12 07:53:37 UTC 
(rev 14186)
+++ django/trunk/tests/modeltests/test_client/views.py  2010-10-12 14:06:11 UTC 
(rev 14187)
@@ -1,6 +1,6 @@
 from xml.dom.minidom import parseString
 
-from django.core.mail import EmailMessage, SMTPConnection
+from django.core import mail
 from django.template import Context, Template
 from django.http import HttpResponse, HttpResponseRedirect, 
HttpResponseNotFound
 from django.contrib.auth.decorators import login_required, permission_required
@@ -38,7 +38,7 @@
 response = HttpResponse()
 response['X-DJANGO-TEST'] = 'Slartibartfast'
 return response
-
+
 def raw_post_view(request):
 """A view which expects raw XML to be posted and returns content extracted
 from the XML"""
@@ -139,7 +139,7 @@
 "A simple view that is login protected with a custom redirect field set"
 t = Template('This is a login protected test. Username is {{ user.username 
}}.', name='Login Template')
 c = Context({'user': request.user})
-
+
 return HttpResponse(t.render(c))
 login_protected_view_changed_redirect = 
login_required(redirect_field_name="redirect_to")(login_protected_view_changed_redirect)
 
@@ -189,7 +189,7 @@
 raise KeyError("Oops! Looks like you wrote some bad code.")
 
 def mail_sending_view(request):
-EmailMessage(
+mail.EmailMessage(
 "Test message",
 "This is a test email",
 "f...@example.com",
@@ -197,18 +197,18 @@
 return HttpResponse("Mail sent")
 
 def mass_mail_sending_view(request):
-m1 = EmailMessage(
+m1 = mail.EmailMessage(
 'First Test message',
 'This is the first test email',
 'f...@example.com',
 ['fi...@example.com', 'sec...@example.com'])
-m2 = EmailMessage(
+m2 = mail.EmailMessage(
 'Second Test message',
 'This is the second test email',
 'f...@example.com',
 ['sec...@example.com', 'th...@example.com'])
 
-c = SMTPConnection()
+c = mail.get_connection()
 c.send_messages([m1,m2])
 
 return HttpResponse("Mail sent")

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



Re: [Django] #14298: maximum open cursors exceeded on Jython and Oracle

2010-10-12 Thread Django
#14298: maximum open cursors exceeded on Jython and Oracle
---+
  Reporter:  stephanekonstantaropoulos | Owner:  nobody 
  
Status:  reopened  | Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  1.1
  
Resolution:|  Keywords:  Oracle 
Jython
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 Sorry I'm going to disagree here, properly closing our cursors would be
 the right way to go.  This can be sanely implemented, but it does require
 some thinking.

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

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



[Django] #14450: Simple but powerfull patch to make application name localizable

2010-10-12 Thread Django
#14450: Simple but powerfull patch to make application name localizable
--+-
 Reporter:  nnseva|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 The applied patch is used to make application names localizable for admin
 interface and also for other purposes.

 This patch is applied to django v. 1.2.3 (django.VERSION = (1, 2, 3,
 'final', 0))

 It uses a new APP_NAMES variable from the user-provided settings.py which
 should be a dictionary having application label (model._meta.app_label) as
 a key, and application verbose name as a value. If the APP_NAMES is absent
 or doesn't contain a label of the application, the old schema
 (app_label.Title()) is used.

 This way allows to localize application names exactly as other things in
 the project:

 settings.py:
 {{{
 ...
 from django.utils.translation import ugettext_lazy as _
 ...
 INSTALLED_APPS = (
 ...
 'myapp.service',
 ...
 )

 APP_NAMES = {
 'service':_('Service')
 }

 }}}

 Now the "Service" string will appear in the django.po files for the whole
 project, so you can localize application names as you wish.

 This patch is a minimalistic way to make a part of the job made by the
 patch published in the ticket #3591. Reasons why I've published the patch
 is - "simpler means more stable", and "One patch - one job".

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

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



Re: [Django] #14449: restructuredtext filter does not return the correct content

2010-10-12 Thread Django
#14449: restructuredtext filter does not return the correct content
---+
  Reporter:  feuervogel| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  Contrib apps  |   Version:  1.2 
Resolution:|  Keywords:  markup, restructuredtext
 Stage:  Unreviewed| Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Comment (by feuervogel):

 check.

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

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



Re: [Django] #14449: restructuredtext filter does not return the correct content

2010-10-12 Thread Django
#14449: restructuredtext filter does not return the correct content
---+
  Reporter:  feuervogel| Owner:  nobody  
Status:  new   | Milestone:  
 Component:  Contrib apps  |   Version:  1.2 
Resolution:|  Keywords:  markup, restructuredtext
 Stage:  Unreviewed| Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by feuervogel):

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

Comment:

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



Re: [Django] #12241: Admin forgets URL used for prefilling forms when hitting Save and add another

2010-10-12 Thread Django
#12241: Admin forgets URL used for prefilling forms when hitting Save and add
another
---+
  Reporter:  velmont   | Owner:  batiste
Status:  new   | Milestone: 
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  1  
Needs_better_patch:  1 |  
---+
Comment (by anonymous):

 This looks like an unfinished comment. The test being exactly the same as
 the one above, I think it should be removed.

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

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



[Django] #14449: restructuredtext filter does not return the correct content

2010-10-12 Thread Django
#14449: restructuredtext filter does not return the correct content
--+-
 Reporter:  feuervogel|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Contrib apps  | Version:  1.2   
 Keywords:  markup, restructuredtext  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 I'm using the django.contrib.flatpages with restructuredtext markup. I've
 tested it with a small

 {{{
 Disclaimer
 ==

 This is a *test*.
 }}}

 After all, the ''disclaimer'' part is not rendered. This happens because
 the renderer returns a ''parts'' and its ''fragment'' key is used. The
 [http://docutils.sourceforge.net/docs/api/publisher.html#fragment docutils
 doc] reads that the fragment does not contain the document title. I've
 added a patch which makes use of the ''html_body'' key.

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

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



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

2010-10-12 Thread Django
#12012: Integration with the Python standard library logging module
-+--
  Reporter:  simon   | Owner:  nobody
Status:  closed  | Milestone:  1.3   
 Component:  Core framework  |   Version:  SVN   
Resolution:  fixed   |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by intgr):

 @anonymous: Did you consider database transactions?

 If you're using database transactions in your app, the logging will seem
 to be working fine, until you actually reach an error... The errors will
 be successfully written out to your log table, but then comes along your
 transaction manager and rolls everything back due to the failed
 transaction. ;)

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

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



Re: [Django] #12241: Admin forgets URL used for prefilling forms when hitting Save and add another

2010-10-12 Thread Django
#12241: Admin forgets URL used for prefilling forms when hitting Save and add
another
---+
  Reporter:  velmont   | Owner:  batiste
Status:  new   | Milestone: 
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  1  
Needs_better_patch:  1 |  
---+
Comment (by lukeplant):

 Looks good to me.  There seems to be a stray comment in one of the tests —
 "Technically, only the response_change" — that I can't make sense of.

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

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



Re: [Django] #14269: It is impossible to run full Django test suite on Oracle because there is 100m maxsize limit for test tablespace

2010-10-12 Thread Django
#14269: It is impossible to run full Django test suite on Oracle because there 
is
100m maxsize limit  for test tablespace
---+
  Reporter:  andrewsk  | Owner:  andrewsk
Status:  new   | Milestone:  
 Component:  Database layer (models, ORM)  |   Version:  SVN 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by PaulM):

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

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

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



Re: [Django] #14448: Docs for brazilian local flavor are outdated

2010-10-12 Thread Django
#14448: Docs for brazilian local flavor are outdated
+---
  Reporter:  italomaia  | Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by jezdez):

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

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

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



[Django] #14448: Docs for brazilian local flavor are outdated

2010-10-12 Thread Django
#14448: Docs for brazilian local flavor are outdated
---+
 Reporter:  italomaia  |   Owner:  nobody
   Status:  new|   Milestone:  1.3   
Component:  Documentation  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 BRCNPJField and BRCPFField are not mentioned in docs but, here they are:
 
http://code.djangoproject.com/browser/django/trunk/django/contrib/localflavor/br/forms.py
 http://docs.djangoproject.com/en/1.2/ref/contrib/localflavor/#brazil-br

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

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



[Changeset] r14186 - django/trunk/docs/releases

2010-10-12 Thread noreply
Author: russellm
Date: 2010-10-12 02:53:37 -0500 (Tue, 12 Oct 2010)
New Revision: 14186

Modified:
   django/trunk/docs/releases/1.3.txt
Log:
Refs #12991 -- Added release note about deprecation of DjangoTestRunner.

Modified: django/trunk/docs/releases/1.3.txt
===
--- django/trunk/docs/releases/1.3.txt  2010-10-12 07:27:49 UTC (rev 14185)
+++ django/trunk/docs/releases/1.3.txt  2010-10-12 07:53:37 UTC (rev 14186)
@@ -167,3 +167,13 @@
 deprecated in favor of a new :attr:`~django.test.client.Response.templates`
 attribute, which is always a list, even if it has only a single element or no
 elements.
+
+``DjangoTestRunner``
+
+
+As a result of the introduction of support for unittest2, the features
+of :class:`django.test.simple.DjangoTestRunner` (including fail-fast
+and Ctrl-C test termination) have been made redundant. In view of this
+redundancy, :class:`~django.test.simple.DjangoTestRunner` has been
+turned into an empty placeholder class, and will be removed entirely
+in Django 1.5.

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



Re: [Django] #14284: Support for Google Maps version 3

2010-10-12 Thread Django
#14284: Support for Google Maps version 3
+---
  Reporter:  DaveWP196  | Owner:  nobody 
Status:  new| Milestone: 
 Component:  GIS|   Version:  1.2
Resolution: |  Keywords:  Google Maps
 Stage:  Accepted   | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by PaulM):

  * stage:  Unreviewed => Accepted

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

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



Re: [Django] #14298: maximum open cursors exceeded on Jython and Oracle

2010-10-12 Thread Django
#14298: maximum open cursors exceeded on Jython and Oracle
---+
  Reporter:  stephanekonstantaropoulos | Owner:  nobody 
  
Status:  closed| Milestone: 
  
 Component:  Database layer (models, ORM)  |   Version:  1.1
  
Resolution:  wontfix   |  Keywords:  Oracle 
Jython
 Stage:  Unreviewed| Has_patch:  0  
  
Needs_docs:  0 |   Needs_tests:  0  
  
Needs_better_patch:  0 |  
---+
Changes (by PaulM):

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

Comment:

 I'm tentatively closing this as wontfix. I think jbaker's explanation is
 likely correct, and fixing problems with an implementation's GC behavior
 is really not something that Django should be handling. If you disagree
 strongly, or know of a way to fix this that doesn't involve major
 modifications to the general code for this one corner case, please do re-
 open this and/or post on django-dev.

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

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



[Changeset] r14185 - django/branches/releases/1.2.X/django/contrib/sitemaps/tests

2010-10-12 Thread noreply
Author: russellm
Date: 2010-10-12 02:27:49 -0500 (Tue, 12 Oct 2010)
New Revision: 14185

Modified:
   django/branches/releases/1.2.X/django/contrib/sitemaps/tests/basic.py
Log:
[1.2.X] Modified the sitemaps tests to remove an assumption about the 
environment in which the tests are run. Thanks to Gabriel Hurley for the report 
and patch.

Backport of r14184 from trunk.

Modified: django/branches/releases/1.2.X/django/contrib/sitemaps/tests/basic.py
===
--- django/branches/releases/1.2.X/django/contrib/sitemaps/tests/basic.py   
2010-10-12 07:15:47 UTC (rev 14184)
+++ django/branches/releases/1.2.X/django/contrib/sitemaps/tests/basic.py   
2010-10-12 07:27:49 UTC (rev 14185)
@@ -1,7 +1,6 @@
 from datetime import date
 from django.conf import settings
 from django.contrib.auth.models import User
-from django.contrib.flatpages.models import FlatPage
 from django.contrib.sitemaps import Sitemap
 from django.contrib.sites.models import Site
 from django.core.exceptions import ImproperlyConfigured
@@ -52,40 +51,51 @@
 "A minimal generic sitemap can be rendered"
 # Retrieve the sitemap.
 response = self.client.get('/generic/sitemap.xml')
+
+expected = ''
+for username in User.objects.values_list("username", flat=True):
+expected += "http://example.com/users/%s/" 
%username
 # Check for all the important bits:
 self.assertEquals(response.content, """
 http://www.sitemaps.org/schemas/sitemap/0.9;>
-http://example.com/users/testuser/
+%s
 
-""")
+""" %expected)
 
-def test_flatpage_sitemap(self):
-"Basic FlatPage sitemap test"
-public = FlatPage.objects.create(
-url=u'/public/',
-title=u'Public Page',
-enable_comments=True,
-registration_required=False,
-)
-public.sites.add(settings.SITE_ID)
-private = FlatPage.objects.create(
-url=u'/private/',
-title=u'Private Page',
-enable_comments=True,
-registration_required=True
-)
-private.sites.add(settings.SITE_ID)
-response = self.client.get('/flatpages/sitemap.xml')
-# Public flatpage should be in the sitemap
-self.assertContains(response, 'http://example.com%s' % 
public.url)
-# Private flatpage should not be in the sitemap
-self.assertNotContains(response, 'http://example.com%s' % 
private.url)
+if "django.contrib.flatpages" in settings.INSTALLED_APPS:
+def test_flatpage_sitemap(self):
+"Basic FlatPage sitemap test"
 
+# Import FlatPage inside the test so that when 
django.contrib.flatpages
+# is not installed we don't get problems trying to delete Site
+# objects (FlatPage has an M2M to Site, Site.delete() tries to
+# delete related objects, but the M2M table doesn't exist.
+from django.contrib.flatpages.models import FlatPage
+
+public = FlatPage.objects.create(
+url=u'/public/',
+title=u'Public Page',
+enable_comments=True,
+registration_required=False,
+)
+public.sites.add(settings.SITE_ID)
+private = FlatPage.objects.create(
+url=u'/private/',
+title=u'Private Page',
+enable_comments=True,
+registration_required=True
+)
+private.sites.add(settings.SITE_ID)
+response = self.client.get('/flatpages/sitemap.xml')
+# Public flatpage should be in the sitemap
+self.assertContains(response, 'http://example.com%s' % 
public.url)
+# Private flatpage should not be in the sitemap
+self.assertNotContains(response, 'http://example.com%s' 
% private.url)
+
 def test_requestsite_sitemap(self):
 # Make sure hitting the flatpages sitemap without the sites framework
 # installed doesn't raise an exception
 Site._meta.installed = False
-response = self.client.get('/flatpages/sitemap.xml')
 # Retrieve the sitemap.
 response = self.client.get('/simple/sitemap.xml')
 # Check for all the important bits:

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



Re: [Django] #14394: Assigning bad data to an m2m attribute should not clear existing data

2010-10-12 Thread Django
#14394: Assigning bad data to an m2m attribute should not clear existing data
---+
  Reporter:  carljm| Owner:  nobody
Status:  new   | Milestone:  1.3   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by PaulM):

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

Comment:

 This seems like reasonable behavior.

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

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



[Changeset] r14184 - in django/trunk/django/contrib: auth/tests sitemaps/tests

2010-10-12 Thread noreply
Author: russellm
Date: 2010-10-12 02:15:47 -0500 (Tue, 12 Oct 2010)
New Revision: 14184

Modified:
   django/trunk/django/contrib/auth/tests/decorators.py
   django/trunk/django/contrib/sitemaps/tests/basic.py
Log:
Fixed #14447 -- Modified the auth and sitemaps tests to remove some assumptions 
about the environment in which the tests are run. Thanks to Gabriel Hurley for 
the report and patch.

Modified: django/trunk/django/contrib/auth/tests/decorators.py
===
--- django/trunk/django/contrib/auth/tests/decorators.py2010-10-12 
03:33:19 UTC (rev 14183)
+++ django/trunk/django/contrib/auth/tests/decorators.py2010-10-12 
07:15:47 UTC (rev 14184)
@@ -1,3 +1,4 @@
+from django.conf import settings
 from django.contrib.auth.decorators import login_required
 from django.contrib.auth.tests.views import AuthViewsTestCase
 
@@ -15,7 +16,7 @@
 def __call__(self, *args, **kwargs):
 pass
 login_required(CallableView())
-
+
 def testView(self):
 """
 Check that login_required is assignable to normal views.
@@ -24,7 +25,7 @@
 pass
 login_required(normal_view)
 
-def testLoginRequired(self, view_url='/login_required/', 
login_url='/login/'):
+def testLoginRequired(self, view_url='/login_required/', 
login_url=settings.LOGIN_URL):
 """
 Check that login_required works on a simple view wrapped in a
 login_required decorator.
@@ -42,4 +43,4 @@
 login_required decorator with a login_url set.
 """
 self.testLoginRequired(view_url='/login_required_login_url/',
-login_url='/somewhere/')
\ No newline at end of file
+login_url='/somewhere/')

Modified: django/trunk/django/contrib/sitemaps/tests/basic.py
===
--- django/trunk/django/contrib/sitemaps/tests/basic.py 2010-10-12 03:33:19 UTC 
(rev 14183)
+++ django/trunk/django/contrib/sitemaps/tests/basic.py 2010-10-12 07:15:47 UTC 
(rev 14184)
@@ -1,11 +1,11 @@
 from datetime import date
 from django.conf import settings
 from django.contrib.auth.models import User
-from django.contrib.flatpages.models import FlatPage
 from django.contrib.sitemaps import Sitemap
 from django.contrib.sites.models import Site
 from django.core.exceptions import ImproperlyConfigured
 from django.test import TestCase
+from django.utils.unittest import skipUnless
 from django.utils.formats import localize
 from django.utils.translation import activate, deactivate
 
@@ -52,15 +52,27 @@
 "A minimal generic sitemap can be rendered"
 # Retrieve the sitemap.
 response = self.client.get('/generic/sitemap.xml')
+
+expected = ''
+for username in User.objects.values_list("username", flat=True):
+expected += "http://example.com/users/%s/" 
%username
 # Check for all the important bits:
 self.assertEquals(response.content, """
 http://www.sitemaps.org/schemas/sitemap/0.9;>
-http://example.com/users/testuser/
+%s
 
-""")
+""" %expected)
 
+@skipUnless("django.contrib.flatpages" in settings.INSTALLED_APPS, 
"django.contrib.flatpages app not installed.")
 def test_flatpage_sitemap(self):
 "Basic FlatPage sitemap test"
+
+# Import FlatPage inside the test so that when django.contrib.flatpages
+# is not installed we don't get problems trying to delete Site
+# objects (FlatPage has an M2M to Site, Site.delete() tries to
+# delete related objects, but the M2M table doesn't exist.
+from django.contrib.flatpages.models import FlatPage
+
 public = FlatPage.objects.create(
 url=u'/public/',
 title=u'Public Page',
@@ -85,7 +97,6 @@
 # Make sure hitting the flatpages sitemap without the sites framework
 # installed doesn't raise an exception
 Site._meta.installed = False
-response = self.client.get('/flatpages/sitemap.xml')
 # Retrieve the sitemap.
 response = self.client.get('/simple/sitemap.xml')
 # Check for all the important bits:

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



Re: [Django] #14283: AttributeError on admin detail page after r13708

2010-10-12 Thread Django
#14283: AttributeError on admin detail page after r13708
--+-
  Reporter:  rene.p...@repro-mayr.de  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Contrib apps |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  1|  
--+-
Changes (by gabrielhurley):

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

Comment:

 @simon29: there was no need to reset the status to "Unreviewed". The
 ticket is still accepted. Also, there is still a patch, even if it needs
 improvement, so unchecking the "has patch" box is also unnecessary.

 If you're still seeing failures after applying the latest patch, the best
 thing to do is to provide a failing unit test. Thanks!

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

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



Re: [Django] #14283: AttributeError on admin detail page after r13708

2010-10-12 Thread Django
#14283: AttributeError on admin detail page after r13708
--+-
  Reporter:  rene.p...@repro-mayr.de  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Contrib apps |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  1|  
--+-
Changes (by simon29):

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

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

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



Re: [Django] #14283: AttributeError on admin detail page after r13708

2010-10-12 Thread Django
#14283: AttributeError on admin detail page after r13708
--+-
  Reporter:  rene.p...@repro-mayr.de  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Contrib apps |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by simon29):

 * cc: simon29 (added)

Comment:

 Same error, same stacktrace exactly.

 This time with an inline that has two keys back to the "parent" model and
 uses "fk_name" to select which one to link by.

 So, this isn't just a GenericForeignKey issue. Somehow,
 formfield_for_dbfield() is getting a None request object in other
 instances also (haven't dug any deeper just yet).

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

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



Re: [Django] #12241: Admin forgets URL used for prefilling forms when hitting Save and add another

2010-10-12 Thread Django
#12241: Admin forgets URL used for prefilling forms when hitting Save and add
another
---+
  Reporter:  velmont   | Owner:  batiste
Status:  new   | Milestone: 
 Component:  django.contrib.admin  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  1  
Needs_better_patch:  1 |  
---+
Comment (by batiste):

 The commit looks good to me. Did you commit in the trunk already?

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

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