[Django] #12577: New validation behaviour breaks django.contrib.contenttypes when unique_toghether is used

2010-01-10 Thread Django
#12577: New validation behaviour breaks django.contrib.contenttypes when
unique_toghether is used
+---
 Reporter:  raffaele.salm...@gmail.com  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Uncategorized   | Version:  SVN   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 The behaviour introduced with modelvalidation breaks the generic content
 type framework

 This is the simplest code used to reproduce the bug
 {{{
 # models.py
 class PhoneNumber(models.Model):
 content_type = models.ForeignKey(ContentType)
 object_id = models.PositiveIntegerField()
 content_object = generic.GenericForeignKey('content_type',
 'object_id')
 phone = models.CharField(max_length=30)

 class Meta:
 unique_together = (('content_type', 'object_id', 'phone',),)

 def __unicode__(self):
 return self.phone

 class Contact(models.Model):
 name = models.CharField(max_length=50)
 phones = generic.GenericRelation(PhoneNumber)

 def __unicode__(self):
 return self.name

 # admin.py
 class PhoneInline(GenericTabularInline):
 model = PhoneNumber
 extra = 1
 class ContactAdmin(admin.ModelAdmin):
 inlines = (PhoneInline,)
 admin.site.register(Contact, ContactAdmin)
 }}}

 Now trying to save a contact instance with a phone number via the admin
 interface, results a 404 KeyError

 {{{
 Environment:

 Request Method: POST
 Request URL: http://localhost:8000/admin/example/genericcontact/1/
 Django Version: 1.2 alpha 1
 Python Version: 2.6.4
 Installed Applications:
 ['django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'django.contrib.admin',
  'django.contrib.comments',
  'example']
 Installed Middleware:
 ('django.middleware.gzip.GZipMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.locale.LocaleMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.middleware.doc.XViewMiddleware',
  'django.middleware.transaction.TransactionMiddleware')


 Traceback:
 File "/home/raf/src/www/simple/site-
 packages/django/django/core/handlers/base.py" in get_response
   101. response = callback(request, *callback_args,
 **callback_kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/contrib/admin/options.py" in wrapper
   237. return self.admin_site.admin_view(view)(*args,
 **kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/utils/decorators.py" in __call__
   36. return self.decorator(self.func)(*args, **kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/utils/decorators.py" in _wrapped_view
   86. response = view_func(request, *args, **kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/utils/decorators.py" in __call__
   36. return self.decorator(self.func)(*args, **kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/views/decorators/cache.py" in _wrapped_view_func
   70. response = view_func(request, *args, **kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/contrib/admin/sites.py" in inner
   187. return view(request, *args, **kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/utils/decorators.py" in _wrapped_view
   86. response = view_func(request, *args, **kwargs)
 File "/home/raf/src/www/simple/site-
 packages/django/django/db/transaction.py" in _commit_on_success
   295. res = func(*args, **kw)
 File "/home/raf/src/www/simple/site-
 packages/django/django/contrib/admin/options.py" in change_view
   883. if all_valid(formsets) and form_validated:
 File "/home/raf/src/www/simple/site-
 packages/django/django/forms/formsets.py" in all_valid
   317. if not formset.is_valid():
 File "/home/raf/src/www/simple/site-
 packages/django/django/forms/formsets.py" in is_valid
   238. if bool(self.errors[i]):
 File "/home/raf/src/www/simple/site-
 packages/django/django/forms/formsets.py" in _get_errors
   212. self.full_clean()
 File "/home/raf/src/www/simple/site-
 packages/django/django/forms/formsets.py" in full_clean
   254. self.clean()
 File "/home/raf/src/www/simple/site-
 packages/django/django/forms/models.py" in clean
   412. self.validate_unique()
 File "/home/raf/src/www/simple/site-
 packages/django/django/forms/models.py" in validate_unique
   435. row_data = tuple([form.cleaned_data[field] for
 field in unique_check])

 Exception Type: KeyError at 

[Django] #12576: Polish translation update

2010-01-10 Thread Django
#12576: Polish translation update
--+-
 Reporter:  pigletto  |   Owner:  zgoda 
   Status:  new   |   Milestone:  1.2   
Component:  Translations  | Version:  1.1   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 Updated translations for GIS

-- 
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] #2594: Template system should handle whitespace better

2010-01-10 Thread Django
#2594: Template system should handle whitespace better
--+-
  Reporter:  Gary Wilson   | Owner:  
jshedd
Status:  new  | Milestone:  
  
 Component:  Template system  |   Version:  SVN 
  
Resolution:   |  Keywords:  
  
 Stage:  Unreviewed   | Has_patch:  1   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  0|  
--+-
Changes (by jshedd):

  * stage:  Someday/Maybe => 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] #12575: Create a better interface for getting/setting the effective level of contrib.messages

2010-01-10 Thread Django
#12575: Create a better interface for getting/setting the effective level of
contrib.messages
+---
  Reporter:  SmileyChris| Owner:  SmileyChris
Status:  assigned   | Milestone:  1.2
 Component:  Contrib apps   |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * has_patch:  0 => 1
  * stage:  Unreviewed => Ready for checkin

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #12575: Create a better interface for getting/setting the effective level of contrib.messages

2010-01-10 Thread Django
#12575: Create a better interface for getting/setting the effective level of
contrib.messages
---+
  Reporter:  SmileyChris   | Owner:  SmileyChris
Status:  assigned  | Milestone:  1.2
 Component:  Contrib apps  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Unreviewed| Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by SmileyChris):

 In fact, adding some tests I see that the current API is broken (since
 it's now proxied as a list, which doesn't have a `level` property)

-- 
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] #12575: Create a better interface for getting/setting the effective level of contrib.messages

2010-01-10 Thread Django
#12575: Create a better interface for getting/setting the effective level of
contrib.messages
---+
  Reporter:  SmileyChris   | Owner:  SmileyChris
Status:  assigned  | Milestone:  1.2
 Component:  Contrib apps  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Unreviewed| Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by SmileyChris):

  * owner:  nobody => SmileyChris
  * needs_better_patch:  => 0
  * status:  new => assigned
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #12575: Create a better interface for getting/setting the effective level of contrib.messages

2010-01-10 Thread Django
#12575: Create a better interface for getting/setting the effective level of
contrib.messages
--+-
 Reporter:  SmileyChris   |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Contrib apps  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 As Jeremy Dunck [http://groups.google.com/group/django-
 
developers/browse_thread/thread/cba6d6154dc38e90/78a2078cc1375231?hl=en#78a2078cc1375231
 reported], the API to set the effective messaging level is awkward:
 {{{
 # Change the messages level to ensure the debug message is added.
 messages.get_messages(request).level = messages.DEBUG
 }}}

 The general consensus seems to be having two methods called 'get_level'
 and 'set_level'.

-- 
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] #2594: Template system should handle whitespace better

2010-01-10 Thread Django
#2594: Template system should handle whitespace better
--+-
  Reporter:  Gary Wilson   | Owner:  
jshedd
Status:  new  | Milestone:  
  
 Component:  Template system  |   Version:  SVN 
  
Resolution:   |  Keywords:  
  
 Stage:  Someday/Maybe| Has_patch:  1   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  0|  
--+-
Comment (by jshedd):

 As requested by Alex_Gaynor, running Gary Wilson's benchmark:

 {{{
 python -m timeit -n 50 -s "from views import my_render" "my_render()"

 Django 1.1.1:
 50 loops, best of 3: 3.64 msec per loop
 50 loops, best of 3: 3.66 msec per loop
 50 loops, best of 3: 3.65 msec per loop

 Trunk, without patch:
 50 loops, best of 3: 4.12 msec per loop
 50 loops, best of 3: 4.11 msec per loop
 50 loops, best of 3: 4.14 msec per loop

 Trunk, with patch:
 50 loops, best of 3: 4.13 msec per loop
 50 loops, best of 3: 4.11 msec per loop
 50 loops, best of 3: 4.13 msec per loop
 }}}

 Script looked like:
 {{{
 #!python
 from django.template import Context, Template
 from django.conf import settings
 settings.configure()

 def my_render():
 s = """\
 
 
 
 {% if items %}
 
 Single item:
 
 {{ item.0.name }}
 
 {% for item in items %}

 {% if item.name %}
 {{ item.name }}
 {% endif %}
 {% if not item.name %}
 No name item
 {% endif %}
 {% for item in fooitems %}
 {{ item.name }}
 {% endfor %}
 {% if item.des %}
 {{ item.des }}
 {% endif %}
 {% endfor %}
 {% if items %}
 Spaceless items to follow:
 {% spaceless %}
 {% for item in items %}

 {{ item.name }}
 {% endfor %}
 {% endspaceless %}
 {% endif %}
 
 {% endif %}
 {% if items %}
 
 {% for item in items %}
 {{ item.name }}
 {% endfor %}
 {% for foo in foos %}

 {{ foo }}
 {% endfor %}
 {% for item in items %}
 huh{{ foo }}
 {% endfor %}
 
 {% endif %}
 {% if items %}We have items.{% endif %}
 {% if items %}
 We have items.
 {% endif %}
 {% if foo %}We have foo.{% endif %}
 {% if foo %}
 We have foo.
 {% endif %}
 
 
 
 """
 class Item:
 pass
 items = []
 for x in range(4):
 item = Item()
 item.name = 'item' + str(x)
 items.append(item)
 t = Template(s)
 c = Context({'items': items})
 return t.render(c)
 }}}

-- 
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] #2594: Template system should handle whitespace better

2010-01-10 Thread Django
#2594: Template system should handle whitespace better
--+-
  Reporter:  Gary Wilson   | Owner:  
jshedd
Status:  new  | Milestone:  
  
 Component:  Template system  |   Version:  SVN 
  
Resolution:   |  Keywords:  
  
 Stage:  Someday/Maybe| Has_patch:  1   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  0|  
--+-
Changes (by jshedd):

  * needs_better_patch:  1 => 0

Comment:

 For the patch, I ran a copy of unladen-swallow's django template
 benchmark, attached as a zip to the ticket.

 ||Run||Django 1.1.1||Django Trunk||Django Trunk with patch||
 ||1||1.0504629612||1.20866298676||1.20275402069||
 ||2||1.07058095932||1.20971012115||1.20344805717||
 ||3||1.1476020813||1.2085249424||1.20287799835||
 ||4||1.06535291672||1.21073198318||1.20276403427||
 ||5||1.05421996117||1.21186900139||1.20313000679||

 Best I can tell, my patch is actually slightly faster, so yay!

-- 
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] #11223: logout view of authentication broken

2010-01-10 Thread Django
#11223: logout view of authentication broken
-+--
  Reporter:  ttsmith | Owner:  nobody
Status:  new | Milestone:
 Component:  Authentication  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by miracle2k):

 * cc: miracle2k (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] #12558: The ENGINE setting no longer defaults to dummy if it is not defined

2010-01-10 Thread Django
#12558: The ENGINE setting no longer defaults to dummy if it is not defined
---+
  Reporter:  obeattie  | Owner:  nobody 
Status:  closed| Milestone:  1.2
 Component:  Database layer (models, ORM)  |   Version:  1.2-alpha  
Resolution:  fixed |  Keywords:  importerror
 Stage:  Unreviewed| Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by Alex):

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

Comment:

 Fixed in r12204.

-- 
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] r12204 - django/trunk/django/db

2010-01-10 Thread noreply
Author: russellm
Date: 2010-01-10 18:54:27 -0600 (Sun, 10 Jan 2010)
New Revision: 12204

Modified:
   django/trunk/django/db/utils.py
Log:
Fixed #12558 -- Improved error handling when processing DATABASES setting. 
Thanks to Oliver Beattie for the report and patch.

Modified: django/trunk/django/db/utils.py
===
--- django/trunk/django/db/utils.py 2010-01-10 21:58:01 UTC (rev 12203)
+++ django/trunk/django/db/utils.py 2010-01-11 00:54:27 UTC (rev 12204)
@@ -56,7 +56,7 @@
 except KeyError:
 raise ConnectionDoesNotExist("The connection %s doesn't exist" % 
alias)
 conn.setdefault('ENGINE', 'django.db.backends.dummy')
-if conn['ENGINE'] == 'django.db.backends.':
+if conn['ENGINE'] == 'django.db.backends.' or not conn['ENGINE']:
 conn['ENGINE'] = 'django.db.backends.dummy'
 conn.setdefault('OPTIONS', {})
 conn.setdefault('TEST_CHARSET', None)

-- 
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] #12574: all tests pass when there broken tests becase they are skipped

2010-01-10 Thread Django
#12574: all tests pass when there broken tests becase they are skipped
---+
 Reporter:  CarlFK |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Testing framework  | Version:  SVN   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 If a test is broken (like typo in models.py)
 and you run the full set of tests:

 {{{django-trunk/tests$ ./runtests.py --settings=sets_sqlite3}}}

 the broken test gets skipped
 and so you get:
 {{{
 --
 Ran 1390 tests in 243.340s
 OK
 --
 }}}
 Which makes you think "oh boy!  all my tests passed!" and go dancing in
 the street.

 But no!  the very test you were most concerned about never got run.
 If you dig around in the output, you will see the error.
 If you see OK, you really have no reason to do that.

 Here is why:
 (trimmed down version)
 {{{
 #!python
 try:
 mod = load_app(model_label)
 if mod:
 settings.INSTALLED_APPS.append(model_label)
 except Exception, e:
 sys.stderr.write("Error while importing %s:" % model_name +
 ''.join(traceback.format_exception(*sys.exc_info())[1:]))
 }}}

 Looking at the change history, it seems this is the result of some
 refactoring that resulted in this hiding place for bad tests.  The
 "continue" command is unnecessary, given it is at the end of the
 codeblock.

 Seems the fix is to remove the try/except:err.write and let the error get
 thrown.

 btw, the comment for
 {{{
 #!python
 if not test_labels or model_name in set([label.split('.')[0] for label in
 test_labels]):
 }}}
 is screwy.  so is the code.  Neither read well.  if you fully understand
 it, it would be great if it could be cleaned up so I don't get a headache.

-- 
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] #11296: Delete confirmation page in Admin displays circular references.

2010-01-10 Thread Django
#11296: Delete confirmation page in Admin displays circular references.
---+
  Reporter:  benreynwar| Owner:  carljm
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Comment (by carljm):

 I'm exploring a possible solution for this as part of the fix for #6191.

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




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

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

 The attached patch is based on nicklane's 6191.patch, updated to apply to
 trunk, and with a number of new tests. Just uploading for the tests; I
 don't think the fix is ready for trunk.

 Notably (among other things), the new tests test that:

 1. If a model has two foreign keys to it from a single related model, both
 are followed (the original issue here, passes after the patch).

 2. A given object is only displayed once in the list, even if it can be
 found through two different paths (passes before the patch, fails after
 it).

 3. A cyclic dependency still only lists each object once, not repeatedly
 until an arbitrary max recursion is hit (this is #11296, currently fails
 both before and after).

 IMO, kmtracey is right: the real fix here is to re-use the same code that
 is actually used to collect the objects for deletion (that's
 Model._collect_sub_objects). Otherwise we're likely to continue to see
 recurring problems with mismatches between the two duplicate algorithms.
 It's tricky, because get_deleted_objects generates a nested data structure
 for display, where Model._collect_sub_objects generates a flat one. I
 think it's possible by adding a callback hook to
 Model._collect_sub_objects, so get_deleted_objects can be notified each
 time _collect_sub_objects recurses. This is the route I'm planning to
 pursue, and I think I should be able to get all three of the above cases
 to pass (fixing both this and #11296), and eliminate the duplicate logic.
 Comments welcome.

-- 
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] #12453: Possible bug with multi-db changes

2010-01-10 Thread Django
#12453: Possible bug with multi-db changes
+---
  Reporter:  seanbrant  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  SVN   
Resolution:  invalid|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by russellm):

 If it makes you feel any better, I was able to verify that this problem
 did exist at the time you reported it. However, I agree that this now
 appears to be fixed.

-- 
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] #9588: provide **kwargs argument to GenericInlineModelAdmin.get_formset

2010-01-10 Thread Django
#9588: provide **kwargs argument to GenericInlineModelAdmin.get_formset
--+-
  Reporter:  la...@structuredabstraction.com  | Owner:  brosner
Status:  assigned | Milestone:  1.2
 Component:  Contrib apps |   Version:  SVN
Resolution:   |  Keywords: 
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by brosner):

  * version:  1.0 => SVN
  * milestone:  => 1.2

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




Re: [Django] #12569: GenericInlineModelAdmin's get_formset method has a non standard signature

2010-01-10 Thread Django
#12569: GenericInlineModelAdmin's get_formset method has a non standard 
signature
---+
  Reporter:  specialunderwear  | Owner:  nobody 
   
Status:  closed| Milestone:  1.2
   
 Component:  Uncategorized |   Version:  1.2-alpha  
   
Resolution:  duplicate |  Keywords:  inline get_formset 
defaults kwargs
 Stage:  Unreviewed| Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by brosner):

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

Comment:

 Duplicate of #9588

-- 
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] #12573: Eye-killing web screens

2010-01-10 Thread Django
#12573: Eye-killing web screens
-+--
  Reporter:  TimothyKendall  | Owner:  nobody
Status:  new | Milestone:
 Component:  Documentation   |   Version:  1.1   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by kmtracey):

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

Comment:

 I'm not sure what you are asking for here.  Changing the primary
 background of the docs (including the tutorial) to be not so white, or
 changing the background of the tutorial application developed to be not
 white? Is it while reading the tutorial that there's too much white or
 when interacting with the app being developed?

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




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

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

  * owner:  nobody => carljm

-- 
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] #11296: Delete confirmation page in Admin displays circular references.

2010-01-10 Thread Django
#11296: Delete confirmation page in Admin displays circular references.
---+
  Reporter:  benreynwar| Owner:  carljm
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by carljm):

  * owner:  nobody => carljm

-- 
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] #2594: Template system should handle whitespace better

2010-01-10 Thread Django
#2594: Template system should handle whitespace better
--+-
  Reporter:  Gary Wilson   | Owner:  
jshedd
Status:  new  | Milestone:  
  
 Component:  Template system  |   Version:  SVN 
  
Resolution:   |  Keywords:  
  
 Stage:  Someday/Maybe| Has_patch:  1   
  
Needs_docs:  0|   Needs_tests:  0   
  
Needs_better_patch:  1|  
--+-
Changes (by jshedd):

  * owner:  nobody => jshedd

-- 
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] #12137: Postgres 8.4 imposes strict typing on CharField and TextField

2010-01-10 Thread Django
#12137: Postgres 8.4 imposes strict typing on CharField and TextField
---+
  Reporter:  russellm  | Owner:  nobody
Status:  closed| Milestone:  1.2   
 Component:  Database layer (models, ORM)  |   Version:  1.1   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  1 
Needs_better_patch:  0 |  
---+
Changes (by carljm):

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

Comment:

 Actually a dupe of #10015, fixed in r12150.

-- 
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] #9089: urlencode should support MutliValueDict

2010-01-10 Thread Django
#9089: urlencode should support MutliValueDict
-+--
  Reporter:  guettli | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by obeattie):

 * cc: obeattie (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] #12573: Eye-killing web screens

2010-01-10 Thread Django
#12573: Eye-killing web screens
+---
 Reporter:  TimothyKendall  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Documentation   | Version:  1.1   
 Keywords:  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 Folks,

 It would be wonderful if new users could elect a background of light gray
 (or light something else) for the tutorial screens (and elsewhere, I'm
 guessing) instead of a full-force-white background.  White paper is one
 thing: it's not an active light source.  But a screen (particularly a
 large one) is quite another, and puts a LOT of light directly into the
 eyes if the background is white.

 This may seem trivial to folks with younger eyes than mine, but the
 eyestrain problems caused by black-on-white are non-trivial to many of us.
 A light-gray option would cut the problem WAY down, and would fit well
 aesthetically with the other colors used in the site.  My compliments on
 the overall appearance as a matter of aesthetics, but a lot of white is
 seriously hard on the eyes.

 Thanks for your consideration.

 Timothy Kendall

-- 
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] r12203 - django/trunk/django/contrib/auth

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 15:58:01 -0600 (Sun, 10 Jan 2010)
New Revision: 12203

Modified:
   django/trunk/django/contrib/auth/admin.py
Log:
Fixed #11409 -- Reordered the permissions checkboxes in the admin into a more 
natural progression. Thanks, benspaulding

Modified: django/trunk/django/contrib/auth/admin.py
===
--- django/trunk/django/contrib/auth/admin.py   2010-01-10 21:56:15 UTC (rev 
12202)
+++ django/trunk/django/contrib/auth/admin.py   2010-01-10 21:58:01 UTC (rev 
12203)
@@ -20,7 +20,7 @@
 fieldsets = (
 (None, {'fields': ('username', 'password')}),
 (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
-(_('Permissions'), {'fields': ('is_staff', 'is_active', 
'is_superuser', 'user_permissions')}),
+(_('Permissions'), {'fields': ('is_active', 'is_staff', 
'is_superuser', 'user_permissions')}),
 (_('Important dates'), {'fields': ('last_login', 'date_joined')}),
 (_('Groups'), {'fields': ('groups',)}),
 )

-- 
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] #11222: tutorial docs only give the relative location of the templates

2010-01-10 Thread Django
#11222: tutorial docs only give the relative location of the templates
+---
  Reporter:  cantorman  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.0   
Resolution:  fixed  |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by adrian):

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

Comment:

 (In [12202]) Fixed #11222 -- Clarified location of admin templates in
 tutorial02. Thanks, cantorman

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 15:56:15 -0600 (Sun, 10 Jan 2010)
New Revision: 12202

Modified:
   django/trunk/docs/intro/tutorial02.txt
Log:
Fixed #11222 -- Clarified location of admin templates in tutorial02. Thanks, 
cantorman

Modified: django/trunk/docs/intro/tutorial02.txt
===
--- django/trunk/docs/intro/tutorial02.txt  2010-01-10 21:51:14 UTC (rev 
12201)
+++ django/trunk/docs/intro/tutorial02.txt  2010-01-10 21:56:15 UTC (rev 
12202)
@@ -414,11 +414,11 @@
 )
 
 Now copy the template ``admin/base_site.html`` from within the default Django
-admin template directory (``django/contrib/admin/templates``) into an ``admin``
-subdirectory of whichever directory you're using in :setting:`TEMPLATE_DIRS`.
-For example, if your :setting:`TEMPLATE_DIRS` includes
-``"/home/my_username/mytemplates"``, as above, then copy
-``django/contrib/admin/templates/admin/base_site.html`` to
+admin template directory in the source code of Django itself
+(``django/contrib/admin/templates``) into an ``admin`` subdirectory of
+whichever directory you're using in :setting:`TEMPLATE_DIRS`. For example, if
+your :setting:`TEMPLATE_DIRS` includes ``"/home/my_username/mytemplates"``, as
+above, then copy ``django/contrib/admin/templates/admin/base_site.html`` to
 ``/home/my_username/mytemplates/admin/base_site.html``. Don't forget that
 ``admin`` subdirectory.
 

-- 
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] #9770: extraneous slash in search link of "Welcome to the new documentation" message

2010-01-10 Thread Django
#9770: extraneous slash in search link of "Welcome to the new documentation"
message
+---
  Reporter:  gwilson| Owner:  nobody
Status:  closed | Milestone:
 Component:  Django Web site|   Version:
Resolution:  fixed  |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by adrian):

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

Comment:

 That bunch of code must've been removed from the template for some other
 reason, because it's no longer in there.

-- 
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] #12161: Error in code example - Generic views (regular expression)

2010-01-10 Thread Django
#12161: Error in code example - Generic views (regular expression)
+---
  Reporter:  infopams   | Owner:  nobody

Status:  closed | Milestone:

 Component:  Documentation  |   Version:  1.1   

Resolution:  fixed  |  Keywords:  regular-expression 
documentation generic-views
 Stage:  Ready for checkin  | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

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

 I think second changed line is a raw string, and don't must to be escaped

-- 
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] #11109: Changeset 8224 broken in Trac

2010-01-10 Thread Django
#11109: Changeset 8224 broken in Trac
+---
  Reporter:  frasern| Owner:  jacob
Status:  closed | Milestone:   
 Component:  Django Web site|   Version:  1.0  
Resolution:  fixed  |  Keywords:   
 Stage:  Ready for checkin  | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by adrian):

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

Comment:

 Done. For future reference, this is what I did on the djangoproject.com
 server:

 {{{
 $ cd /home/trac
 $ export PYTHONPATH=/home/djangoproject.com:/home/trac
 $ python trac-admin /home/trac/django.tracenv/ resync
 }}}

 Note that it appeared that each commit was erased from Trac for a few
 minutes, which scared me, but I guess that's normal. Even after the script
 is done running, there's some process that takes a few minutes to complete
 in the background, or something.

-- 
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] r12199 - in django/trunk: django/contrib/humanize/templatetags tests/regressiontests/humanize

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 15:37:20 -0600 (Sun, 10 Jan 2010)
New Revision: 12199

Modified:
   django/trunk/django/contrib/humanize/templatetags/humanize.py
   django/trunk/tests/regressiontests/humanize/tests.py
Log:
Fixed #11783 -- ordinal template tag now catches TypeError. Thanks, realpolitik 
and punteney

Modified: django/trunk/django/contrib/humanize/templatetags/humanize.py
===
--- django/trunk/django/contrib/humanize/templatetags/humanize.py   
2010-01-10 21:36:12 UTC (rev 12198)
+++ django/trunk/django/contrib/humanize/templatetags/humanize.py   
2010-01-10 21:37:20 UTC (rev 12199)
@@ -14,7 +14,7 @@
 """
 try:
 value = int(value)
-except ValueError:
+except (TypeError, ValueError):
 return value
 t = (_('th'), _('st'), _('nd'), _('rd'), _('th'), _('th'), _('th'), 
_('th'), _('th'), _('th'))
 if value % 100 in (11, 12, 13): # special case

Modified: django/trunk/tests/regressiontests/humanize/tests.py
===
--- django/trunk/tests/regressiontests/humanize/tests.py2010-01-10 
21:36:12 UTC (rev 12198)
+++ django/trunk/tests/regressiontests/humanize/tests.py2010-01-10 
21:37:20 UTC (rev 12199)
@@ -22,10 +22,10 @@
 def test_ordinal(self):
 test_list = ('1','2','3','4','11','12',
  '13','101','102','103','111',
- 'something else')
+ 'something else', None)
 result_list = ('1st', '2nd', '3rd', '4th', '11th',
'12th', '13th', '101st', '102nd', '103rd',
-   '111th', 'something else')
+   '111th', 'something else', None)
 
 self.humanize_tester(test_list, result_list, 'ordinal')
 

-- 
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] r12198 - django/trunk/django/core/management

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 15:36:12 -0600 (Sun, 10 Jan 2010)
New Revision: 12198

Modified:
   django/trunk/django/core/management/__init__.py
Log:
Fixed #11842 -- django-admin.py now displays usage information if invoked with 
no arguments. Thanks, bitprophet

Modified: django/trunk/django/core/management/__init__.py
===
--- django/trunk/django/core/management/__init__.py 2010-01-10 21:28:37 UTC 
(rev 12197)
+++ django/trunk/django/core/management/__init__.py 2010-01-10 21:36:12 UTC 
(rev 12198)
@@ -358,8 +358,7 @@
 try:
 subcommand = self.argv[1]
 except IndexError:
-sys.stderr.write("Type '%s help' for usage.\n" % self.prog_name)
-sys.exit(1)
+subcommand = 'help' # Display help if no arguments were given.
 
 if subcommand == 'help':
 if len(args) > 2:

-- 
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] #12572: syncdb support for list of apps as command argument

2010-01-10 Thread Django
#12572: syncdb support for list of apps as command argument
+---
 Reporter:  lorochka85  |   Owner:  nobody
   Status:  new |   Milestone:
Component:  Core framework  | Version:  1.1   
 Keywords:  syncdb  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 Sometimes there is a need to do syncdb on only one or more apps from
 settings.INSTALLED_APPS rather than all of them. There is currently
 support for -e (--exclude) option, but it might be nice to be able to pass
 a list of app_labels as an argument to syncdb.

 Pls, see patch attached (sorry, it's lacking unittests.)

-- 
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] #11957: runserver must be restarted after error in admin.py

2010-01-10 Thread Django
#11957: runserver must be restarted after error in admin.py
+---
  Reporter:  carljm | Owner:  brosner
Status:  assigned   | Milestone: 
 Component:  django-admin.py runserver  |   Version:  1.1
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by brosner):

  * status:  new => assigned

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




Re: [Django] #11957: runserver must be restarted after error in admin.py

2010-01-10 Thread Django
#11957: runserver must be restarted after error in admin.py
+---
  Reporter:  carljm | Owner:  brosner
Status:  new| Milestone: 
 Component:  django-admin.py runserver  |   Version:  1.1
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by brosner):

  * owner:  nobody => brosner
  * status:  reopened => new
  * 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.




[Changeset] r12197 - django/trunk/docs/topics/db

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 15:28:37 -0600 (Sun, 10 Jan 2010)
New Revision: 12197

Modified:
   django/trunk/docs/topics/db/queries.txt
Log:
Fixed #12297 -- Fixed typo in docs/topics/db/queries.txt. Thanks, bertil and 
timo

Modified: django/trunk/docs/topics/db/queries.txt
===
--- django/trunk/docs/topics/db/queries.txt 2010-01-10 21:05:42 UTC (rev 
12196)
+++ django/trunk/docs/topics/db/queries.txt 2010-01-10 21:28:37 UTC (rev 
12197)
@@ -618,7 +618,7 @@
 
 To avoid this problem, simply save the ``QuerySet`` and reuse it::
 
->>> queryset = Poll.objects.all()
+>>> queryset = Entry.objects.all()
 >>> print [p.headline for p in queryset] # Evaluate the query set.
 >>> print [p.pub_date for p in queryset] # Re-use the cache from the 
evaluation.
 

-- 
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] #12567: Incorrect SQL being generated in certain inheritance cases.

2010-01-10 Thread Django
#12567: Incorrect SQL being generated in certain inheritance cases.
---+
  Reporter:  Alex  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 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 Alex):

  * summary:  Invalid SQL being generated in certain inheritance cases. =>
  Incorrect SQL being generated in certain
  inheritance cases.

Comment:

 Changed the summary, it wasn't totally accurate.

-- 
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] r12196 - django/trunk/django/conf/locale/pl/LC_MESSAGES

2010-01-10 Thread noreply
Author: zgoda
Date: 2010-01-10 15:05:42 -0600 (Sun, 10 Jan 2010)
New Revision: 12196

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


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

Modified: django/trunk/django/conf/locale/pl/LC_MESSAGES/django.po
===
--- django/trunk/django/conf/locale/pl/LC_MESSAGES/django.po2010-01-10 
19:52:17 UTC (rev 12195)
+++ django/trunk/django/conf/locale/pl/LC_MESSAGES/django.po2010-01-10 
21:05:42 UTC (rev 12196)
@@ -5,7 +5,7 @@
 msgstr ""
 "Project-Id-Version: Django\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-12-30 08:54+0100\n"
+"POT-Creation-Date: 2010-01-10 21:25+0100\n"
 "PO-Revision-Date: 2008-02-25 15:53+0100\n"
 "Last-Translator: Jarek Zgoda \n"
 "MIME-Version: 1.0\n"
@@ -187,34 +187,38 @@
 msgstr "serbski"
 
 #: conf/global_settings.py:87
+msgid "Serbian Latin"
+msgstr "serbski (łaciński)"
+
+#: conf/global_settings.py:88
 msgid "Swedish"
 msgstr "szwedzki"
 
-#: conf/global_settings.py:88
+#: conf/global_settings.py:89
 msgid "Tamil"
 msgstr "tamilski"
 
-#: conf/global_settings.py:89
+#: conf/global_settings.py:90
 msgid "Telugu"
 msgstr "telugu"
 
-#: conf/global_settings.py:90
+#: conf/global_settings.py:91
 msgid "Thai"
 msgstr "tajski"
 
-#: conf/global_settings.py:91
+#: conf/global_settings.py:92
 msgid "Turkish"
 msgstr "turecki"
 
-#: conf/global_settings.py:92
+#: conf/global_settings.py:93
 msgid "Ukrainian"
 msgstr "ukraiński"
 
-#: conf/global_settings.py:93
+#: conf/global_settings.py:94
 msgid "Simplified Chinese"
 msgstr "chiński uproszczony"
 
-#: conf/global_settings.py:94
+#: conf/global_settings.py:95
 msgid "Traditional Chinese"
 msgstr "chiński tradycyjny"
 
@@ -223,7 +227,7 @@
 msgid "Successfully deleted %(count)d %(items)s."
 msgstr "Usunięto %(count)d %(items)s."
 
-#: contrib/admin/actions.py:67 contrib/admin/options.py:1075
+#: contrib/admin/actions.py:67 contrib/admin/options.py:1089
 msgid "Are you sure?"
 msgstr "JesteÅ› pewien?"
 
@@ -266,15 +270,15 @@
 msgid "This year"
 msgstr "Ten rok"
 
-#: contrib/admin/filterspecs.py:147 forms/widgets.py:431
+#: contrib/admin/filterspecs.py:147 forms/widgets.py:435
 msgid "Yes"
 msgstr "Tak"
 
-#: contrib/admin/filterspecs.py:147 forms/widgets.py:431
+#: contrib/admin/filterspecs.py:147 forms/widgets.py:435
 msgid "No"
 msgstr "Nie"
 
-#: contrib/admin/filterspecs.py:154 forms/widgets.py:431
+#: contrib/admin/filterspecs.py:154 forms/widgets.py:435
 msgid "Unknown"
 msgstr "Nieznany"
 
@@ -314,94 +318,94 @@
 msgid "None"
 msgstr "brak"
 
-#: contrib/admin/options.py:554
+#: contrib/admin/options.py:555
 #, python-format
 msgid "Changed %s."
 msgstr "Zmieniono %s"
 
-#: contrib/admin/options.py:554 contrib/admin/options.py:564
-#: contrib/comments/templates/comments/preview.html:16 forms/models.py:385
-#: forms/models.py:598
+#: contrib/admin/options.py:555 contrib/admin/options.py:565
+#: contrib/comments/templates/comments/preview.html:16 db/models/base.py:776
+#: forms/models.py:487
 msgid "and"
 msgstr "i"
 
-#: contrib/admin/options.py:559
+#: contrib/admin/options.py:560
 #, python-format
 msgid "Added %(name)s \"%(object)s\"."
 msgstr "Dodano %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:563
+#: contrib/admin/options.py:564
 #, python-format
 msgid "Changed %(list)s for %(name)s \"%(object)s\"."
 msgstr "Zmieniono %(list)s w %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:568
+#: contrib/admin/options.py:569
 #, python-format
 msgid "Deleted %(name)s \"%(object)s\"."
 msgstr "Usunięto %(name)s \"%(object)s\"."
 
-#: contrib/admin/options.py:572
+#: contrib/admin/options.py:573
 msgid "No fields changed."
 msgstr "Żadne pole nie zmienione."
 
-#: contrib/admin/options.py:634 contrib/auth/admin.py:68
+#: contrib/admin/options.py:635 contrib/auth/admin.py:68
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was added successfully."
 msgstr "%(name)s \"%(obj)s\" dodany pomyślnie."
 
-#: contrib/admin/options.py:638 contrib/admin/options.py:671
+#: contrib/admin/options.py:639 contrib/admin/options.py:672
 #: contrib/auth/admin.py:77
 msgid "You may edit it again below."
 msgstr "Możesz ponownie edytować wpis poniżej."
 
-#: contrib/admin/options.py:648 contrib/admin/options.py:681
+#: contrib/admin/options.py:649 contrib/admin/options.py:682
 #, python-format
 msgid "You may add another %s below."
 msgstr "Możesz dodać nowy wpis %s poniżej."
 
-#: contrib/admin/options.py:669
+#: contrib/admin/options.py:670
 #, python-format
 msgid "The %(name)s \"%(obj)s\" was changed successfully."
 msgstr "%(name)s \"%(obj)s\" zostało pomyślnie zmienione."
 
-#: contrib/admin/options.py:677
+#: contrib/admin/options.py:678
 #, python-format
 msgid ""
 "The 

Re: [Django] #10291: Correction to QuerySet.iterator() documentation

2010-01-10 Thread Django
#10291: Correction to QuerySet.iterator() documentation
+---
  Reporter:  ikelly | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ikelly):

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

Comment:

 Reopening because I think Adrian's determination is incorrect.  If I'm
 missing something, let me know and I'll drop it.

 It's true that {{{iterator()}}} fetches the query result in chunks, but
 normal evaluation using {{{__iter__()}}} also fetches the query result in
 chunks.  Also, any function applied to the result of {{{__iter__()}}} that
 causes everything to be fetched will do the same when applied to the
 result of {{{iterator()}}}.

 In fact, {{{__iter__()}}} invokes {{{iterator()}}} behind the scenes to do
 the heavy lifting.  The only thing it does differently is that it makes
 use of and fills the !QuerySet's {{{_result_cache}}} over the course of
 iteration.  So if {{{iterator()}}} is merely meant to fetch the query
 result in chunks, why is it even included in the public API when
 {{{__iter__()}}} already accomplishes this?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #12571: Test client doesn't set WSGIRequest instance on response

2010-01-10 Thread Django
#12571: Test client doesn't set WSGIRequest instance on response
--+-
 Reporter:  rvdrijst  |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Testing framework | Version:  SVN   
 Keywords:  test client request response WSGIRequest  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 When you call {{{get()}}} or {{{post()}}} on the {{{Client}}} instance in
 a testcase, the returned response contains a {{{request}}} attribute that
 is a simple {{{dict}}} created by the client to simulate a request. This
 can be useful, but it is not the request instance that is used in views
 and middleware.

 It would be very useful to have the request instance as seen (and possibly
 modified) by the view and middleware. This is the {{{WSGIRequest}}}
 instance created in the {{{ClientHandler}}}, used by the {{{Client}}}.
 This instance is based on the simple {{{dict}}} that is currently set on
 the response as the request.

 I came across this problem before and worked around it, but now with the
 new messages framework, a clear usecase presents itself. You cannot get to
 the messages set by a tested view, simply because the
 {{{response.request}}} is not the {{{WSGIRequest}}} instance that was used
 for setting the messages.

 A (backwards compatible) solution is to let the {{{ClientHandler}}} add
 this {{{WSGIRequest}}} instance as an attribute called {{{wsgi_request}}}
 to the {{{response}}} before it returns it.

 Using this solution, you can get to the message storage by doing
 {{{messages.get_messages(response.wsgi_request)}}}. It can also be useful
 for testing middleware, decorators and other functionalities that modify
 the request in any way.

 Attached is the extremely simple patch that makes this one-line addition.

-- 
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] #12570: BaseGenericInlineFormSet has unused members

2010-01-10 Thread Django
#12570: BaseGenericInlineFormSet has unused members
---+
 Reporter:  specialunderwear   |   Owner:  
nobody
   Status:  new|   Milestone:  
1.2   
Component:  Uncategorized  | Version:  
1.2-alpha 
 Keywords:  contenttypes unused code BaseGenericInlineFormSet  |   Stage:  
Unreviewed
Has_patch:  1  |  
---+
 BaseGenericInlineFormSet has 2 members which are never changed or
 referenced by any code. This is confusing other developers. For example in
 django-reversion there used to be a bug in which the name of the content
 type foreign key, was determined by ct_fk_field_name instead of
 ct_fk_field.name. ct_fk_field_name is one of the unused members.

 Code that is never used should be removed to avoid confusion.

 Please see attached patched against current trunk.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #12569: GenericInlineModelAdmin's get_formset method has a non standard signature

2010-01-10 Thread Django
#12569: GenericInlineModelAdmin's get_formset method has a non standard 
signature
+---
 Reporter:  specialunderwear|   Owner:  nobody
   Status:  new |   Milestone:  1.2   
Component:  Uncategorized   | Version:  1.2-alpha 
 Keywords:  inline get_formset defaults kwargs  |   Stage:  Unreviewed
Has_patch:  1   |  
+---
 Unlike InlineModelAdmin GenericInlineModelAdmin does not let you override
 any values using keyword arguments.

 InlineModelAdmin's signature looks like this:


 {{{
 def get_formset(self, request, obj=None, **kwargs):
 }}}

 Any keyword arguments passed will override settings in the defaults dict
 which is constructed inside the function.
 This mechanic makes overriding the method while still using some of the
 standard functionality inside get_formset very streamlined.

 If the same is tried with GenericInlineModelAdmin you will have to copy
 paste the whole function body because this the signature of it's
 get_formset method:


 {{{
 def get_formset(self, request, obj=None):
 }}}

 The defaults object constructed inside the method can not be overriden by
 passing keyword arguments, meaning you can not reuse any of the
 functionality in the method when overriding it, using inheritance.

 Solution:

 Make GenericInlineModelAdmin use the same mechanic as InlineModelAdmin so
 you can override the defaults object using keyword arguments.

 See against current trunk.

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

2010-01-10 Thread Django
#10260: i18n documentation refactoring
+---
  Reporter:  ramiro | Owner:  ramiro
  
Status:  new| Milestone:
  
 Component:  Documentation  |   Version:  SVN   
  
Resolution: |  Keywords:  l10n i18n translation 
message files localization intrnationalization
 Stage:  Accepted   | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 Latest patch contains the following additional changes:

  * Added a note to the 1.2 release notes about the deprecation of
 ''technical message IDs'' previously used to specify date/time format
 localization.
  * Added a glossary of i18n terms plus cross links.

-- 
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] #9400: flock causes problems when writing to an NFS share

2010-01-10 Thread Django
#9400: flock causes problems when writing to an NFS share
-+--
  Reporter:  mikeh   | Owner:  nobody
Status:  new | Milestone:
 Component:  File uploads/storage|   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by kmtracey):

 Replying to [comment:5 worksology]:
 > We are experiencing this same issue on our production environment, which
 uses NFS. I believe this started once we upgraded to Django 1.1, so we
 will likely rollback to Django 1.0 to avoid these fatal errors. Is there a
 possible stop-gap (patch) that could avoid this error without reverting to
 1.0? We'll be happy to be a second test case to help design a proper
 solution to this problem.

 There is no stopgap patch since so far as I can see no one with a failing
 system has answered Malcolm's questions in
 http://code.djangoproject.com/ticket/9400#comment:1.  That comment lays
 out some stuff you could try, and things you should check (i.e., that
 locking is in fact available on this filesystem).  Without further
 information from people who actually experience this error there is not
 much that Django can do to fix it.

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

2010-01-10 Thread Django
#12568: SubFieldBase descriptor object should be accessible
---+
  Reporter:  specialunderwear  | Owner:  nobody 
 
Status:  new   | Milestone:  1.2
 
 Component:  Uncategorized |   Version:  1.2-alpha  
 
Resolution:|  Keywords:  SubFieldBase 
subclassing
 Stage:  Unreviewed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by specialunderwear):

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

Comment:

 More specific:

 SubFieldBase? will throw an AttributeError? every time inspect.getmembers
 is used on a model instance or class that has fields which use
 SubFieldBase.

-- 
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] #3274: [patch] Provide date_list to template context in archive_month view

2010-01-10 Thread Django
#3274: [patch] Provide date_list to template context in archive_month view
+---
  Reporter:  paolo   | Owner:  nobody
 
Status:  closed | Milestone:
 
 Component:  Generic views  |   Version:  SVN   
 
Resolution:  fixed  |  Keywords:  archive_month 
date_list
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  1 
 
Needs_better_patch:  0  |  
+---
Changes (by kmtracey):

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

Comment:

 In r12195, forgetting to put the correct incantation in the commit
 message:

 Fixed: 3274: Added date_list context variable to the archive_month generic
 view, consistent with archive_index and archive_year. Thanks Sean Brant

-- 
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] #12568: SubFieldBase descriptor object should be accessible

2010-01-10 Thread Django
#12568: SubFieldBase descriptor object should be accessible
--+-
 Reporter:  specialunderwear  |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Uncategorized | Version:  1.2-alpha 
 Keywords:  SubFieldBase subclassing  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 Currently any field that has SubFieldBase as a __metaclass__ will throw an
 exception if you try access the descriptor object without an instance.
 Things like the following can not be done with the current implementation:


 {{{
 def _get_members_of_type(obj, member_type):
 """
 Finds members of a certain type in obj.
 """
 def filter_member_type(member):
 try:
 return type(member) is member_type
 except AttributeError:
 return False

 # if the type of obj is the metaclass for all models, just search
 in the object
 # because it is not a model instance but a type
 if type(obj) is ModelBase:
 key_hash = inspect.getmembers(obj, filter_member_type)
 else:
 key_hash = inspect.getmembers(obj.__class__,
 filter_member_type)


 return key_hash
 }}}

 SubFieldBase will throw an AttributeError every time inspect.getmembers is
 used on a model instance or class.
 Normal behaviour would be to return the descriptor object when no instance
 is passed. All django's standard fields
 behave this way, so it would be best if SubFieldBase would do the same.

 I will attach a patch against current trunk.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r12195 - in django/trunk: django/views/generic docs/ref tests/regressiontests/views/tests/generic

2010-01-10 Thread noreply
Author: kmtracey
Date: 2010-01-10 13:52:17 -0600 (Sun, 10 Jan 2010)
New Revision: 12195

Modified:
   django/trunk/django/views/generic/date_based.py
   django/trunk/docs/ref/generic-views.txt
   django/trunk/tests/regressiontests/views/tests/generic/date_based.py
Log:
Fixed: 3274: Added date_list context variable to the archive_month generic 
view, consistent with archive_index and archive_year.  Thanks Sean Brant.


Modified: django/trunk/django/views/generic/date_based.py
===
--- django/trunk/django/views/generic/date_based.py 2010-01-10 19:23:42 UTC 
(rev 12194)
+++ django/trunk/django/views/generic/date_based.py 2010-01-10 19:52:17 UTC 
(rev 12195)
@@ -105,6 +105,8 @@
 
 Templates: ``/_archive_month.html``
 Context:
+date_list:
+List of days in this month with objects
 month:
 (date) this month
 next_month:
@@ -139,6 +141,7 @@
 if last_day >= now.date() and not allow_future:
 lookup_kwargs['%s__lte' % date_field] = now
 object_list = queryset.filter(**lookup_kwargs)
+date_list = object_list.dates(date_field, 'day')
 if not object_list and not allow_empty:
 raise Http404
 
@@ -160,6 +163,7 @@
 template_name = "%s/%s_archive_month.html" % (model._meta.app_label, 
model._meta.object_name.lower())
 t = template_loader.get_template(template_name)
 c = RequestContext(request, {
+'date_list': date_list,
 '%s_list' % template_object_name: object_list,
 'month': date,
 'next_month': next_month,

Modified: django/trunk/docs/ref/generic-views.txt
===
--- django/trunk/docs/ref/generic-views.txt 2010-01-10 19:23:42 UTC (rev 
12194)
+++ django/trunk/docs/ref/generic-views.txt 2010-01-10 19:52:17 UTC (rev 
12195)
@@ -369,8 +369,15 @@
 
 **Template context:**
 
+.. versionadded:: 1.2
+   The inclusion of ``date_list`` in the template's context is new.
+
 In addition to ``extra_context``, the template's context will be:
 
+* ``date_list``: A list of ``datetime.date`` objects representing all
+  days that have objects available in the given month, according to
+  ``queryset``, in ascending order.
+
 * ``month``: A ``datetime.date`` object representing the given month.
 
 * ``next_month``: A ``datetime.date`` object representing the first day of

Modified: django/trunk/tests/regressiontests/views/tests/generic/date_based.py
===
--- django/trunk/tests/regressiontests/views/tests/generic/date_based.py
2010-01-10 19:23:42 UTC (rev 12194)
+++ django/trunk/tests/regressiontests/views/tests/generic/date_based.py
2010-01-10 19:52:17 UTC (rev 12195)
@@ -110,6 +110,22 @@
 self.assertEqual(response.status_code, 200)
 self.assertEqual(response.context['next_month'], None)
 self.assertEqual(response.context['previous_month'], prev_month)
+
+def test_archive_month_date_list(self):
+author = Author(name="John Smith")
+author.save()
+date1 = datetime(2010, 1, 1, 0, 0, 0)
+date2 = datetime(2010, 1, 2, 0, 0, 0)
+Article.objects.create(title='example1', author=author, 
date_created=date1)
+Article.objects.create(title='example2', author=author, 
date_created=date2)
+response = self.client.get('/views/date_based/archive_month/2010/1/')
+self.assertEqual(response.status_code, 200)
+self.assertEqual(len(response.context['date_list']), 2)
+self.assertEqual(response.context['date_list'][0], date1)
+# Checks that the same date is not included more than once in the list
+Article.objects.create(title='example2', author=author, 
date_created=date2)
+response = self.client.get('/views/date_based/archive_month/2010/1/')
+self.assertEqual(len(response.context['date_list']), 2)
 
 class DayArchiveTests(TestCase):
 

-- 
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] #12539: Error while validating non required IntegerField with localflavor form field

2010-01-10 Thread Django
#12539: Error while validating non required IntegerField with localflavor form
field
-+--
  Reporter:  Bernd Schlapsi   | Owner:  nobody
Status:  new | Milestone:  1.2   
 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 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.




Re: [Django] #11794: topics/db/managers.txt typo

2010-01-10 Thread Django
#11794: topics/db/managers.txt typo
+---
  Reporter:  seemant| Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution: |  Keywords:  typo  
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by timo):

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

Comment:

 need to remove "be" in: "there are a couple of things to be remember"

-- 
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] r12194 - in django/trunk: django/forms docs/topics/forms tests/modeltests/model_forms

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 13:23:42 -0600 (Sun, 10 Jan 2010)
New Revision: 12194

Modified:
   django/trunk/django/forms/models.py
   django/trunk/docs/topics/forms/modelforms.txt
   django/trunk/tests/modeltests/model_forms/models.py
Log:
Fixed #9223 -- Added support for declarative widgets to ModelForm. I declare 
thanks to isagalaev.

Modified: django/trunk/django/forms/models.py
===
--- django/trunk/django/forms/models.py 2010-01-10 19:05:39 UTC (rev 12193)
+++ django/trunk/django/forms/models.py 2010-01-10 19:23:42 UTC (rev 12194)
@@ -159,7 +159,7 @@
 data[f.name] = f.value_from_object(instance)
 return data
 
-def fields_for_model(model, fields=None, exclude=None, 
formfield_callback=lambda f: f.formfield()):
+def fields_for_model(model, fields=None, exclude=None, widgets=None, 
formfield_callback=lambda f, **kwargs: f.formfield(**kwargs)):
 """
 Returns a ``SortedDict`` containing form fields for the given model.
 
@@ -179,7 +179,11 @@
 continue
 if exclude and f.name in exclude:
 continue
-formfield = formfield_callback(f)
+if widgets and f.name in widgets:
+kwargs = {'widget': widgets[f.name]}
+else:
+kwargs = {}
+formfield = formfield_callback(f, **kwargs)
 if formfield:
 field_list.append((f.name, formfield))
 field_dict = SortedDict(field_list)
@@ -192,12 +196,13 @@
 self.model = getattr(options, 'model', None)
 self.fields = getattr(options, 'fields', None)
 self.exclude = getattr(options, 'exclude', None)
+self.widgets = getattr(options, 'widgets', None)
 
 
 class ModelFormMetaclass(type):
 def __new__(cls, name, bases, attrs):
 formfield_callback = attrs.pop('formfield_callback',
-lambda f: f.formfield())
+lambda f, **kwargs: f.formfield(**kwargs))
 try:
 parents = [b for b in bases if issubclass(b, ModelForm)]
 except NameError:
@@ -215,7 +220,7 @@
 if opts.model:
 # If a model is defined, extract form fields from it.
 fields = fields_for_model(opts.model, opts.fields,
-  opts.exclude, formfield_callback)
+  opts.exclude, opts.widgets, 
formfield_callback)
 # Override default model fields with any custom declared ones
 # (plus, include all the other declared fields).
 fields.update(declared_fields)

Modified: django/trunk/docs/topics/forms/modelforms.txt
===
--- django/trunk/docs/topics/forms/modelforms.txt   2010-01-10 19:05:39 UTC 
(rev 12193)
+++ django/trunk/docs/topics/forms/modelforms.txt   2010-01-10 19:23:42 UTC 
(rev 12194)
@@ -146,7 +146,7 @@
   ``default`` value will be initially selected instead).
 
 Finally, note that you can override the form field used for a given model
-field. See `Overriding the default field types`_ below.
+field. See `Overriding the default field types or widgets`_ below.
 
 A full example
 --
@@ -350,31 +350,53 @@
 
 .. _section on saving forms: `The save() method`_
 
-Overriding the default field types
---
+Overriding the default field types or widgets
+-
 
 The default field types, as described in the `Field types`_ table above, are
 sensible defaults. If you have a ``DateField`` in your model, chances are you'd
 want that to be represented as a ``DateField`` in your form. But
-``ModelForm`` gives you the flexibility of changing the form field type
-for a given model field. You do this by declaratively specifying fields like
-you would in a regular ``Form``. Declared fields will override the default
-ones generated by using the ``model`` attribute.
+``ModelForm`` gives you the flexibility of changing the form field type and 
+widget for a given model field.
 
+To specify a custom widget for a field, use the ``widgets`` attribute of the
+inner ``Meta`` class. This should be a dictionary mapping field names to widget
+classes or instances.
+
+For example, if you want the a ``CharField`` to be represented by a
+ instead of its default , you can override
+the field's widget::
+
+class AuthorForm(ModelForm):
+class Meta:
+model = Author
+fields = ['name', 'title', 'birth_date']
+widgets = {
+'name': Textarea(attrs={'cols': 80, 'rows': 20}),
+}
+
+The ``widgets`` dictionary accepts either widget instances (e.g.,
+``Textarea(...)``) or classes (e.g., ``Textarea``).
+
+If you want to further customize a field -- including its type, label, etc. --
+you can do this by declaratively specifying fields like you would in a regular
+``Form``. Declared fields will override the 

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 13:05:39 -0600 (Sun, 10 Jan 2010)
New Revision: 12193

Modified:
   django/trunk/docs/topics/auth.txt
Log:
Fixed #12113 -- Clarified is_active documentation. Thanks, ejucovy and isagalaev

Modified: django/trunk/docs/topics/auth.txt
===
--- django/trunk/docs/topics/auth.txt   2010-01-10 18:56:53 UTC (rev 12192)
+++ django/trunk/docs/topics/auth.txt   2010-01-10 19:05:39 UTC (rev 12193)
@@ -97,14 +97,20 @@
 .. attribute:: models.User.is_active
 
 Boolean. Designates whether this user account should be considered
-active. Set this flag to ``False`` instead of deleting accounts.
+active. We recommend that you set this flag to ``False`` instead of
+deleting accounts; that way, if your applications have any foreign keys
+to users, the foreign keys won't break.
 
-This doesn't control whether or not the user can log in. Nothing in the
-authentication path checks the ``is_active`` flag, so if you want to
-reject a login based on ``is_active`` being ``False``, it is up to you
-to check that in your own login view. However, permission checking
-using the methods like :meth:`~models.User.has_perm` does check this
-flag and will always return ``False`` for inactive users.
+This doesn't necessarily control whether or not the user can log in.
+Authentication backends aren't required to check for the ``is_active``
+flag, so if you want to reject a login based on ``is_active`` being
+``False``, it's up to you to check that in your own login view.
+However, the :class:`~django.contrib.auth.forms.AuthenticationForm`
+used by the :func:`~django.contrib.auth.views.login` view *does*
+perform this check, as do the permission-checking methods such as
+:meth:`~models.User.has_perm` and the authentication in the Django
+admin. All of those functions/methods will return ``False`` for
+inactive users.
 
 .. attribute:: models.User.is_superuser
 

-- 
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] r12192 - django/trunk/django/contrib/admin

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:56:53 -0600 (Sun, 10 Jan 2010)
New Revision: 12192

Modified:
   django/trunk/django/contrib/admin/__init__.py
Log:
Fixed #10887 -- Fixed a possible gotcha in admin.autodiscover() by moving 
import_module() outside the try/except. Thanks, lsaffre

Modified: django/trunk/django/contrib/admin/__init__.py
===
--- django/trunk/django/contrib/admin/__init__.py   2010-01-10 18:55:04 UTC 
(rev 12191)
+++ django/trunk/django/contrib/admin/__init__.py   2010-01-10 18:56:53 UTC 
(rev 12192)
@@ -37,8 +37,9 @@
 # should) bubble up, but a missing __path__ (which is legal, but weird)
 # fails silently -- apps that do weird things with __path__ might
 # need to roll their own admin registration.
+mod = import_module(app)
 try:
-app_path = import_module(app).__path__
+app_path = mod.__path__
 except AttributeError:
 continue
 

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:55:04 -0600 (Sun, 10 Jan 2010)
New Revision: 12191

Modified:
   django/trunk/docs/intro/tutorial02.txt
Log:
Fixed #11501 -- Removed 'How meta' from tutorial 2 to appease the grammar nazis

Modified: django/trunk/docs/intro/tutorial02.txt
===
--- django/trunk/docs/intro/tutorial02.txt  2010-01-10 18:53:11 UTC (rev 
12190)
+++ django/trunk/docs/intro/tutorial02.txt  2010-01-10 18:55:04 UTC (rev 
12191)
@@ -399,7 +399,7 @@
 
 That's easy to change, though, using Django's template system. The Django admin
 is powered by Django itself, and its interfaces use Django's own template
-system. (How meta!)
+system.
 
 Open your settings file (``mysite/settings.py``, remember) and look at the
 :setting:`TEMPLATE_DIRS` setting. :setting:`TEMPLATE_DIRS` is a tuple of

-- 
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] r12190 - django/trunk/docs/ref/contrib

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:53:11 -0600 (Sun, 10 Jan 2010)
New Revision: 12190

Modified:
   django/trunk/docs/ref/contrib/sitemaps.txt
Log:
Fixed #11693 -- Added escaping for the dot in sitemap.xml in the URLpattern in 
sitemaps.txt. Thanks, timo

Modified: django/trunk/docs/ref/contrib/sitemaps.txt
===
--- django/trunk/docs/ref/contrib/sitemaps.txt  2010-01-10 18:51:32 UTC (rev 
12189)
+++ django/trunk/docs/ref/contrib/sitemaps.txt  2010-01-10 18:53:11 UTC (rev 
12190)
@@ -54,7 +54,7 @@
 To activate sitemap generation on your Django site, add this line to your
 :ref:`URLconf `::
 
-   (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': 
sitemaps})
+   (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': 
sitemaps})
 
 This tells Django to build a sitemap when a client accesses 
:file:`/sitemap.xml`.
 
@@ -261,7 +261,7 @@
 # ...
 
 # the sitemap
-(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', 
{'sitemaps': sitemaps})
+(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', 
{'sitemaps': sitemaps})
 )
 
 .. _URLconf: ../url_dispatch/
@@ -280,7 +280,7 @@
 
 Here's what the relevant URLconf lines would look like for the example above::
 
-   (r'^sitemap.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': 
sitemaps}),
+   (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': 
sitemaps}),
(r'^sitemap-(?P.+)\.xml$', 
'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
 
 This will automatically generate a :file:`sitemap.xml` file that references 
both

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:51:32 -0600 (Sun, 10 Jan 2010)
New Revision: 12189

Modified:
   django/trunk/docs/topics/db/managers.txt
Log:
Fixed #11794 -- Removed an unnecessary literary flourish in 
docs/topics/db/managers.txt

Modified: django/trunk/docs/topics/db/managers.txt
===
--- django/trunk/docs/topics/db/managers.txt2010-01-10 18:50:28 UTC (rev 
12188)
+++ django/trunk/docs/topics/db/managers.txt2010-01-10 18:51:32 UTC (rev 
12189)
@@ -333,8 +333,7 @@
 As already suggested by the `django.contrib.gis` example, above, the
 ``use_for_related_fields`` feature is primarily for managers that need to
 return a custom ``QuerySet`` subclass. In providing this functionality in your
-manager, there are a couple of things to be remember and that's the topic of
-this section.
+manager, there are a couple of things to be remember.
 
 Do not filter away any results in this type of manager subclass
 ~~~

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:50:28 -0600 (Sun, 10 Jan 2010)
New Revision: 12188

Modified:
   django/trunk/docs/topics/db/models.txt
Log:
Fixed #12345 -- Fixed bug in db/models.txt.

Modified: django/trunk/docs/topics/db/models.txt
===
--- django/trunk/docs/topics/db/models.txt  2010-01-10 18:49:04 UTC (rev 
12187)
+++ django/trunk/docs/topics/db/models.txt  2010-01-10 18:50:28 UTC (rev 
12188)
@@ -950,8 +950,8 @@
 ``Place`` object to the ``Restaurant`` object by using the lower-case version
 of the model name::
 
->>> p = Place.objects.filter(name="Bob's Cafe")
-# If Bob's Cafe is a Restaurant object, this will give the child class:
+>>> p = Place.objects.get(id=12)
+# If p is a Restaurant object, this will give the child class:
 >>> p.restaurant
 
 

-- 
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] r12187 - django/trunk/docs/ref

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:49:04 -0600 (Sun, 10 Jan 2010)
New Revision: 12187

Modified:
   django/trunk/docs/ref/request-response.txt
Log:
Fixed #11952 -- Documented HttpResponse.status_code attribute. Thanks, timo

Modified: django/trunk/docs/ref/request-response.txt
===
--- django/trunk/docs/ref/request-response.txt  2010-01-10 18:48:08 UTC (rev 
12186)
+++ django/trunk/docs/ref/request-response.txt  2010-01-10 18:49:04 UTC (rev 
12187)
@@ -462,6 +462,10 @@
 A normal Python string representing the content, encoded from a Unicode
 object if necessary.
 
+.. attribute:: HttpResponse.status_code
+
+The `HTTP Status code`_ for the response.
+
 Methods
 ---
 

-- 
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] r12186 - in django/trunk: django/core/handlers tests/regressiontests/middleware_exceptions

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:48:08 -0600 (Sun, 10 Jan 2010)
New Revision: 12186

Modified:
   django/trunk/django/core/handlers/base.py
   django/trunk/tests/regressiontests/middleware_exceptions/tests.py
Log:
Fixed #6094 again -- fixed broken unit tests. Thanks, isagalaev

Modified: django/trunk/django/core/handlers/base.py
===
--- django/trunk/django/core/handlers/base.py   2010-01-10 18:44:39 UTC (rev 
12185)
+++ django/trunk/django/core/handlers/base.py   2010-01-10 18:48:08 UTC (rev 
12186)
@@ -72,20 +72,22 @@
 try:
 # Reset the urlconf for this thread.
 urlresolvers.set_urlconf(None)
+# Obtain a default resolver. It's needed early for handling 
404's.
+resolver = urlresolvers.RegexURLResolver(r'^/', None)
 
+# Apply request middleware
+for middleware_method in self._request_middleware:
+response = middleware_method(request)
+if response:
+return response
+
 # Get urlconf from request object, if available.  Otherwise 
use default.
 urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
-
 # Set the urlconf for this thread to the one specified above.
 urlresolvers.set_urlconf(urlconf)
+# Reset the resolver with a possibly new urlconf
 resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
 
-# Apply request middleware
-for middleware_method in self._request_middleware:
-response = middleware_method(request)
-if response:
-return response
-
 callback, callback_args, callback_kwargs = resolver.resolve(
 request.path_info)
 

Modified: django/trunk/tests/regressiontests/middleware_exceptions/tests.py
===
--- django/trunk/tests/regressiontests/middleware_exceptions/tests.py   
2010-01-10 18:44:39 UTC (rev 12185)
+++ django/trunk/tests/regressiontests/middleware_exceptions/tests.py   
2010-01-10 18:48:08 UTC (rev 12186)
@@ -8,15 +8,13 @@
 raise Exception('Exception')
 
 class MiddlewareExceptionTest(TestCase):
-def __init__(self, *args, **kwargs):
-super(MiddlewareExceptionTest, self).__init__(*args, **kwargs)
+def setUp(self):
 self.exceptions = []
 got_request_exception.connect(self._on_request_exception)
-
-def setUp(self):
 self.client.handler.load_middleware()
 
 def tearDown(self):
+got_request_exception.disconnect(self._on_request_exception)
 self.exceptions = []
 
 def _on_request_exception(self, sender, request, **kwargs):

-- 
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] #12113: contrib.auth documentation is misleading re: whether User.is_active matters for login

2010-01-10 Thread Django
#12113: contrib.auth documentation is misleading re: whether User.is_active 
matters
for login
+---
  Reporter:  ejucovy| Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by isagalaev):

 I would also ditch "Nothing in the authentication path checks the
 ``is_active``" because "authentication path" is not a well-defined thing.
 I think what this line tries to say is that authentication *backends*
 might not check for is_active. And the user should check it manually.

-- 
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] r12185 - in django/trunk: django/shortcuts tests/regressiontests/urlpatterns_reverse

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:44:39 -0600 (Sun, 10 Jan 2010)
New Revision: 12185

Modified:
   django/trunk/django/shortcuts/__init__.py
   django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py
Log:
Fixed #11960 -- Improved error message for redirects. Thanks, mattmcc

Modified: django/trunk/django/shortcuts/__init__.py
===
--- django/trunk/django/shortcuts/__init__.py   2010-01-10 18:42:30 UTC (rev 
12184)
+++ django/trunk/django/shortcuts/__init__.py   2010-01-10 18:44:39 UTC (rev 
12185)
@@ -49,6 +49,9 @@
 try:
 return redirect_class(urlresolvers.reverse(to, args=args, 
kwargs=kwargs))
 except urlresolvers.NoReverseMatch:
+# If this is a callable, re-raise.
+if callable(to):
+raise
 # If this doesn't "feel" like a URL, re-raise.
 if '/' not in to and '.' not in to:
 raise

Modified: django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py
===
--- django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py 
2010-01-10 18:42:30 UTC (rev 12184)
+++ django/trunk/tests/regressiontests/urlpatterns_reverse/tests.py 
2010-01-10 18:44:39 UTC (rev 12185)
@@ -165,7 +165,13 @@
 res = redirect('http://example.com/')
 self.assertEqual(res['Location'], 'http://example.com/')
 
+def test_redirect_view_object(self):
+from views import absolute_kwargs_view
+res = redirect(absolute_kwargs_view)
+self.assertEqual(res['Location'], '/absolute_arg_view/')
+self.assertRaises(NoReverseMatch, redirect, absolute_kwargs_view, 
wrong_argument=None)
 
+
 class NamespaceTests(TestCase):
 urls = 'regressiontests.urlpatterns_reverse.namespace_urls'
 

-- 
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] r12184 - django/trunk/docs/ref/models

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:42:30 -0600 (Sun, 10 Jan 2010)
New Revision: 12184

Modified:
   django/trunk/docs/ref/models/fields.txt
Log:
Fixed #12271 -- Fixed typo in URLField docs. Thanks, a...@andyet.net

Modified: django/trunk/docs/ref/models/fields.txt
===
--- django/trunk/docs/ref/models/fields.txt 2010-01-10 18:40:24 UTC (rev 
12183)
+++ django/trunk/docs/ref/models/fields.txt 2010-01-10 18:42:30 UTC (rev 
12184)
@@ -771,10 +771,11 @@
 .. attribute:: URLField.verify_exists
 
 If ``True`` (the default), the URL given will be checked for existence
-(i.e., the URL actually loads and doesn't give a 404 response). It should
-be noted that when using the single-threaded development server, validating
-a url being serverd by the same server will hang.
-This should not be a problem for multithreaded servers.
+(i.e., the URL actually loads and doesn't give a 404 response).
+
+Note that when you're using the single-threaded development server,
+validating a URL being served by the same server will hang. This should not
+be a problem for multithreaded servers.
 
 The admin represents this as an  (a single-line input).
 

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:40:24 -0600 (Sun, 10 Jan 2010)
New Revision: 12183

Modified:
   django/trunk/docs/topics/cache.txt
Log:
Fixed #12195 -- Clarified cache documentation to rename 'timeout_seconds' to 
'timeout'. Thanks, galund and timo

Modified: django/trunk/docs/topics/cache.txt
===
--- django/trunk/docs/topics/cache.txt  2010-01-10 18:38:00 UTC (rev 12182)
+++ django/trunk/docs/topics/cache.txt  2010-01-10 18:40:24 UTC (rev 12183)
@@ -470,14 +470,15 @@
 
 >>> from django.core.cache import cache
 
-The basic interface is ``set(key, value, timeout_seconds)`` and ``get(key)``::
+The basic interface is ``set(key, value, timeout)`` and ``get(key)``::
 
 >>> cache.set('my_key', 'hello, world!', 30)
 >>> cache.get('my_key')
 'hello, world!'
 
-The ``timeout_seconds`` argument is optional and defaults to the ``timeout``
-argument in the ``CACHE_BACKEND`` setting (explained above).
+The ``timeout`` argument is optional and defaults to the ``timeout``
+argument in the ``CACHE_BACKEND`` setting (explained above). It's the number of
+seconds the value should be stored in the cache.
 
 If the object doesn't exist in the cache, ``cache.get()`` returns ``None``::
 

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:38:00 -0600 (Sun, 10 Jan 2010)
New Revision: 12182

Modified:
   django/trunk/docs/topics/generic-views.txt
Log:
Fixed #12161 -- Added escaping of a backslash in two generic-views.txt 
examples. Thanks, infopams

Modified: django/trunk/docs/topics/generic-views.txt
===
--- django/trunk/docs/topics/generic-views.txt  2010-01-10 18:36:45 UTC (rev 
12181)
+++ django/trunk/docs/topics/generic-views.txt  2010-01-10 18:38:00 UTC (rev 
12182)
@@ -80,7 +80,7 @@
 ('^about/$', direct_to_template, {
 'template': 'about.html'
 }),
-**('^about/(\w+)/$', about_pages),**
+**('^about/(\\w+)/$', about_pages),**
 )
 
 Next, we'll write the ``about_pages`` view::
@@ -382,7 +382,7 @@
 
 urlpatterns = patterns('',
 (r'^publishers/$', list_detail.object_list, publisher_info),
-**(r'^books/(\w+)/$', books_by_publisher),**
+**(r'^books/(\\w+)/$', books_by_publisher),**
 )
 
 Next, we'll write the ``books_by_publisher`` view itself::

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:36:45 -0600 (Sun, 10 Jan 2010)
New Revision: 12181

Modified:
   django/trunk/docs/topics/db/queries.txt
Log:
Fixed #12084 -- Documented the fact that QuerySet.update() returns the number 
of affected rows. Thanks, timo

Modified: django/trunk/docs/topics/db/queries.txt
===
--- django/trunk/docs/topics/db/queries.txt 2010-01-10 18:36:20 UTC (rev 
12180)
+++ django/trunk/docs/topics/db/queries.txt 2010-01-10 18:36:45 UTC (rev 
12181)
@@ -785,8 +785,8 @@
 # Change every Entry so that it belongs to this Blog.
 >>> Entry.objects.all().update(blog=b)
 
-The ``update()`` method is applied instantly and doesn't return anything
-(similar to ``delete()``). The only restriction on the ``QuerySet`` that is
+The ``update()`` method is applied instantly and returns the number of rows
+affected by the query. The only restriction on the ``QuerySet`` that is
 updated is that it can only access one database table, the model's main
 table. So don't try to filter based on related fields or anything like that;
 it won't work.

-- 
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] #9400: flock causes problems when writing to an NFS share

2010-01-10 Thread Django
#9400: flock causes problems when writing to an NFS share
-+--
  Reporter:  mikeh   | Owner:  nobody
Status:  new | Milestone:
 Component:  File uploads/storage|   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by worksology):

 We are experiencing this same issue on our production environment, which
 uses NFS. I believe this started once we upgraded to Django 1.1, so we
 will likely rollback to Django 1.0 to avoid these fatal errors. Is there a
 possible stop-gap (patch) that could avoid this error without reverting to
 1.0? We'll be happy to be a second test case to help design a proper
 solution to this problem.

-- 
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] #11006: Cannot set intiial data with inline model formset

2010-01-10 Thread Django
#11006: Cannot set intiial data with inline model formset
-+--
  Reporter:  Joshua "jag" Ginsberg   | 
Owner:  nobody
Status:  new | 
Milestone:
 Component:  Forms   |   
Version:  1.0   
Resolution:  |  
Keywords:
 Stage:  Accepted| 
Has_patch:  0 
Needs_docs:  0   |   
Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Comment (by lorochka85):

 Looks like a duplicate of [http://code.djangoproject.com/ticket/12213]

-- 
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] #11582: BaseHTTPServer has lots of special handling for admin media

2010-01-10 Thread Django
#11582: BaseHTTPServer has lots of special handling for admin media
-+--
  Reporter:  Alex| Owner:  jezdez
Status:  assigned| Milestone:
 Component:  Core framework  |   Version:  SVN   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by jezdez):

  * owner:  Alex => jezdez
  * status:  new => assigned
  * version:  1.0 => 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.




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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:09:26 -0600 (Sun, 10 Jan 2010)
New Revision: 12179

Modified:
   django/trunk/docs/topics/conditional-view-processing.txt
Log:
Fixed #11904 -- Fixed error in conditional-view-processing.txt. Thanks, bronger 
and timo

Modified: django/trunk/docs/topics/conditional-view-processing.txt
===
--- django/trunk/docs/topics/conditional-view-processing.txt2010-01-10 
18:07:46 UTC (rev 12178)
+++ django/trunk/docs/topics/conditional-view-processing.txt2010-01-10 
18:09:26 UTC (rev 12179)
@@ -21,9 +21,9 @@
 When the client next requests the same resource, it might send along a header
 such as `If-modified-since`_, containing the date of the last modification
 time it was sent, or `If-none-match`_, containing the ``ETag`` it was sent.
-If there is no match with the ETag, or if the resource has not been modified,
-a 304 status code can be sent back, instead of a full response, telling the
-client that nothing has changed.
+If the current version of the page matches the ``ETag`` sent by the client, or
+if the resource has not been modified, a 304 status code can be sent back,
+instead of a full response, telling the client that nothing has changed.
 
 .. _If-none-match: 
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26
 .. _If-modified-since: 
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:07:46 -0600 (Sun, 10 Jan 2010)
New Revision: 12178

Modified:
   django/trunk/docs/topics/templates.txt
Log:
Fixed #11884 -- Clarified documentation to explain how to activate the built-in 
admin reference. Thanks, DmitryRisenberg and timo

Modified: django/trunk/docs/topics/templates.txt
===
--- django/trunk/docs/topics/templates.txt  2010-01-10 18:03:36 UTC (rev 
12177)
+++ django/trunk/docs/topics/templates.txt  2010-01-10 18:07:46 UTC (rev 
12178)
@@ -577,9 +577,19 @@
 
 
 Django's admin interface includes a complete reference of all template tags and
-filters available for a given site. To see it, go to your admin interface and
-click the "Documentation" link in the upper right of the page.
+filters available for a given site. To activate it, follow these steps:
 
+* Add :mod:`django.contrib.admindocs` to your :setting:`INSTALLED_APPS`.
+* Add ``(r'^admin/doc/', include('django.contrib.admindocs.urls'))`` to 
your
+  :data:`urlpatterns`. Make sure it's included *before* the ``r'^admin/'``
+  entry, so that requests to ``/admin/doc/`` don't get handled by the
+  latter entry.
+* Install the docutils module (http://docutils.sf.net/).
+
+After you've followed those steps, you can start browsing the documentation by
+going to your admin interface and clicking the "Documentation" link in the
+upper right of the page.
+
 The reference is divided into 4 sections: tags, filters, models, and views.
 
 The **tags** and **filters** sections describe all the built-in tags (in fact,

-- 
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] r12177 - django/trunk/tests/regressiontests/admin_views

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:03:36 -0600 (Sun, 10 Jan 2010)
New Revision: 12177

Modified:
   django/trunk/tests/regressiontests/admin_views/tests.py
Log:
Removed unnecessary debugging statement in admin_views regression test

Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===
--- django/trunk/tests/regressiontests/admin_views/tests.py 2010-01-10 
18:01:22 UTC (rev 12176)
+++ django/trunk/tests/regressiontests/admin_views/tests.py 2010-01-10 
18:03:36 UTC (rev 12177)
@@ -613,7 +613,6 @@
 self.assertNotContains(response, 'Log out')
 
 response = self.client.get('/test_admin/admin/secure-view/')
-open('/home/maniac/Desktop/response.html', 'w').write(response.content)
 self.assertContains(response, 'id="login-form"')
 
 class AdminViewStringPrimaryKeyTest(TestCase):

-- 
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] r12176 - django/trunk/docs/ref/contrib/admin

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 12:01:22 -0600 (Sun, 10 Jan 2010)
New Revision: 12176

Modified:
   django/trunk/docs/ref/contrib/admin/index.txt
Log:
Fixed #11880 -- Changed admin URLconfs in docs to use raw strings, for 
consistency. Thanks, jb0t

Modified: django/trunk/docs/ref/contrib/admin/index.txt
===
--- django/trunk/docs/ref/contrib/admin/index.txt   2010-01-10 17:58:41 UTC 
(rev 12175)
+++ django/trunk/docs/ref/contrib/admin/index.txt   2010-01-10 18:01:22 UTC 
(rev 12176)
@@ -1395,7 +1395,7 @@
 admin.autodiscover()
 
 urlpatterns = patterns('',
-('^admin/', include(admin.site.urls)),
+(r'^admin/', include(admin.site.urls)),
 )
 
 Above we used ``admin.autodiscover()`` to automatically load the
@@ -1409,7 +1409,7 @@
 from myproject.admin import admin_site
 
 urlpatterns = patterns('',
-('^myadmin/', include(admin_site.urls)),
+(r'^myadmin/', include(admin_site.urls)),
 )
 
 There is really no need to use autodiscover when using your own ``AdminSite``
@@ -1437,8 +1437,8 @@
 from myproject.admin import basic_site, advanced_site
 
 urlpatterns = patterns('',
-('^basic-admin/', include(basic_site.urls)),
-('^advanced-admin/', include(advanced_site.urls)),
+(r'^basic-admin/', include(basic_site.urls)),
+(r'^advanced-admin/', include(advanced_site.urls)),
 )
 
 ``AdminSite`` instances take a single argument to their constructor, their

-- 
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] r12175 - django/trunk/docs/ref/contrib

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:58:41 -0600 (Sun, 10 Jan 2010)
New Revision: 12175

Modified:
   django/trunk/docs/ref/contrib/flatpages.txt
Log:
Fixed #12228 -- Updated flatpages examples. Thanks, johnthedebs

Modified: django/trunk/docs/ref/contrib/flatpages.txt
===
--- django/trunk/docs/ref/contrib/flatpages.txt 2010-01-10 17:56:52 UTC (rev 
12174)
+++ django/trunk/docs/ref/contrib/flatpages.txt 2010-01-10 17:58:41 UTC (rev 
12175)
@@ -26,8 +26,8 @@
 
 Here are some examples of flatpages on Django-powered sites:
 
-* http://www.everyblock.com/about/
 * http://www.lawrence.com/about/contact/
+* http://www2.ljworld.com/site/rules/
 
 Installation
 

-- 
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] r12174 - django/trunk/django/db/models

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:56:52 -0600 (Sun, 10 Jan 2010)
New Revision: 12174

Modified:
   django/trunk/django/db/models/base.py
Log:
Fixed #12537 -- Fixed error in Model.full_validate(). Thanks, gauss

Modified: django/trunk/django/db/models/base.py
===
--- django/trunk/django/db/models/base.py   2010-01-10 17:55:46 UTC (rev 
12173)
+++ django/trunk/django/db/models/base.py   2010-01-10 17:56:52 UTC (rev 
12174)
@@ -803,7 +803,7 @@
 if hasattr(e, 'message_dict'):
 if errors:
 for k, v in e.message_dict.items():
-errors.set_default(k, []).extend(v)
+errors.setdefault(k, []).extend(v)
 else:
 errors = e.message_dict
 else:

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:55:46 -0600 (Sun, 10 Jan 2010)
New Revision: 12173

Modified:
   django/trunk/docs/intro/tutorial04.txt
Log:
Fixed #12350 -- Fixed typo in tutorial04. Thanks, mortense

Modified: django/trunk/docs/intro/tutorial04.txt
===
--- django/trunk/docs/intro/tutorial04.txt  2010-01-10 17:54:34 UTC (rev 
12172)
+++ django/trunk/docs/intro/tutorial04.txt  2010-01-10 17:55:46 UTC (rev 
12173)
@@ -47,15 +47,15 @@
 * ``forloop.counter`` indicates how many times the :ttag:`for` tag has gone
   through its loop
 
-* Since we are creating a POST form (which can have the effect of modifying
-  data), we unfortunately need to worry about Cross Site Request Forgeries.
+* Since we're creating a POST form (which can have the effect of modifying
+  data), we need to worry about Cross Site Request Forgeries.
   Thankfully, you don't have to worry too hard, because Django comes with
-  very easy-to-use system for protecting against it.  In short, all POST
-  forms that are targetted at internal URLs need the ``{% csrf_token %}``
-  template tag adding.
+  a very easy-to-use system for protecting against it. In short, all POST
+  forms that are targeted at internal URLs should use the ``{% csrf_token 
%}``
+  template tag.
 
 The ``{% csrf_token %}`` tag requires information from the request object, 
which
-is not normally accessible from within the template context.  To fix this, a
+is not normally accessible from within the template context. To fix this, a
 small adjustment needs to be made to the ``detail`` view, so that it looks like
 the following::
 

-- 
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] #7486: IsLessThanOtherField's third argument is required, but documented as optional

2010-01-10 Thread Django
#7486: IsLessThanOtherField's third argument is required, but documented as
optional
-+--
  Reporter:  sli...@gmail.com| Owner:  nobody
Status:  closed  | Milestone:
 Component:  django.contrib.admin|   Version:  0.96  
Resolution:  invalid |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

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

Comment:

 Validators of this form no longer exist.

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:54:34 -0600 (Sun, 10 Jan 2010)
New Revision: 12172

Modified:
   django/trunk/docs/intro/tutorial04.txt
Log:
Fixed #12326 -- Fixed typo in tutorial04. Thanks, mortense

Modified: django/trunk/docs/intro/tutorial04.txt
===
--- django/trunk/docs/intro/tutorial04.txt  2010-01-10 17:53:19 UTC (rev 
12171)
+++ django/trunk/docs/intro/tutorial04.txt  2010-01-10 17:54:34 UTC (rev 
12172)
@@ -201,7 +201,7 @@
 
 2. Rename a few templates.
 
-3. Delete some the old, now unneeded views.
+3. Delete some of the old, unneeded views.
 
 4. Fix up URL handling for the new views.
 

-- 
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] #7485: OtherField validators don't work with inline child objects

2010-01-10 Thread Django
#7485: OtherField validators don't work with inline child objects
-+--
  Reporter:  sli...@gmail.com| Owner:  nobody
Status:  closed  | Milestone:
 Component:  django.contrib.admin|   Version:  0.96  
Resolution:  invalid |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

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

Comment:

 The old validator system no longer exists, therefore I'm closing this.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r12171 - in django/trunk: django/db/models tests/modeltests/lookup

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:53:19 -0600 (Sun, 10 Jan 2010)
New Revision: 12171

Modified:
   django/trunk/django/db/models/query.py
   django/trunk/tests/modeltests/lookup/models.py
Log:
Fixed #12142 -- EmptyQuerySet.update() no longer updates all rows in the 
database

Modified: django/trunk/django/db/models/query.py
===
--- django/trunk/django/db/models/query.py  2010-01-10 17:49:41 UTC (rev 
12170)
+++ django/trunk/django/db/models/query.py  2010-01-10 17:53:19 UTC (rev 
12171)
@@ -1089,6 +1089,12 @@
 """
 return self
 
+def update(self, **kwargs):
+"""
+Don't update anything.
+"""
+return 0
+
 # EmptyQuerySet is always an empty result in where-clauses (and similar
 # situations).
 value_annotation = False

Modified: django/trunk/tests/modeltests/lookup/models.py
===
--- django/trunk/tests/modeltests/lookup/models.py  2010-01-10 17:49:41 UTC 
(rev 12170)
+++ django/trunk/tests/modeltests/lookup/models.py  2010-01-10 17:53:19 UTC 
(rev 12171)
@@ -295,6 +295,8 @@
 []
 >>> Article.objects.none().count()
 0
+>>> Article.objects.none().update(headline="This should not take effect")
+0
 >>> [article for article in Article.objects.none().iterator()]
 []
 

-- 
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] #12567: Invalid SQL being generated in certain inheritance cases.

2010-01-10 Thread Django
#12567: Invalid SQL being generated in certain inheritance cases.
---+
  Reporter:  Alex  | Owner:  nobody
Status:  new   | Milestone:  1.2   
 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 Alex):

  * 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] #12213: Initial data and addition queryset_filter for formset from inlineformset_factory

2010-01-10 Thread Django
#12213: Initial data and addition queryset_filter for formset from
inlineformset_factory
-+--
  Reporter:  ramusus | Owner:  nobody
Status:  new | Milestone:
 Component:  Forms   |   Version:  1.1   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Changes (by lorochka85):

  * component:  Uncategorized => Forms

Comment:

 Queryset support was added to !BaseInlineFormSet (not initial though) in
 the development version and, imho, is better than dealing with filters.
 For initial, adding it as an extra argument to !BaseInlineFormset and then
 passing to the super's {{{ __init__ }}} does the job.

 However, it gets a little bit confusing when one tries to pass both
 initial and queryset to ether !BaseInlineFormSet or !BaseModelFormSet. For
 example, you have something like:

 {{{
 formset = BaseModelFormSet(...,
queryset=some_qs,
initial=[{'field1': 'f1value1', 'field2':
 'f2value1'},
 {'field1': 'f1value2', 'field2':
 'f2value2'}],
   )
 }}}
 then values for field1 and field2 for the first 2 items in some_qs will
 get overriden with values in initial. In order for the formset to display
 first data from the queryset and then extra forms with values from
 initial, your initial should look something like:
 {{{
 initial = [{} for i in range(0, some_qs.count())] +
   [{'field1': 'f1value1', 'field2': 'f2value1'},
{'field1': 'f1value2', 'field2': 'f2value2'}]
 }}}


 ...Having said all that, there is a nice little comment about instance and
 initial in {{{ BaseModelForm.__init__ }}}:
 
[http://code.djangoproject.com/browser/django/trunk/django/forms/models.py#L228]
 {{{
 # if initial was provided, it should override the values from instance
 }}}
 I suppose this is valid for formsets as well. Should that be documented
 somewhere?

 Now, in terms of use cases for initial on InlineFormSet, there is one by
 Nathan in this thread: [http://groups.google.ru/group/django-
 developers/browse_thread/thread/73af9e58bd7626a8/e307d4865759a26e]

-- 
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] r12170 - in django/trunk/tests/regressiontests: middleware_exceptions special_headers

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:49:41 -0600 (Sun, 10 Jan 2010)
New Revision: 12170

Added:
   django/trunk/tests/regressiontests/middleware_exceptions/__init__.py
   django/trunk/tests/regressiontests/special_headers/__init__.py
Log:
Added some missing __init__.py files to two tests

Added: django/trunk/tests/regressiontests/middleware_exceptions/__init__.py
===

Added: django/trunk/tests/regressiontests/special_headers/__init__.py
===

-- 
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] #12567: Invalid SQL being generated in certain inheritance cases.

2010-01-10 Thread Django
#12567: Invalid SQL being generated in certain inheritance cases.
--+-
 Reporter:  Alex  |   Owner:  nobody
   Status:  new   |   Milestone:  1.2   
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Given the models

 {{{
 from django.db import models

 class A(models.Model):
 pass

 class B(A):
pass

 class C(A):
pass
 }}}

 The query:
 {{{
 >>> A.objects.filter(b__isnull=False)
 }}}

 Generates bad SQL (specifically it omits the needed join).  Worth noting
 that:
 {{{
 >>> A.objects.exclude(b=None)
 }}}

 works correctly.

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:47:53 -0600 (Sun, 10 Jan 2010)
New Revision: 12169

Modified:
   django/trunk/docs/intro/install.txt
Log:
Fixed #12092 -- Fixed grammar error in install.txt. Thanks, Abizern and timo

Modified: django/trunk/docs/intro/install.txt
===
--- django/trunk/docs/intro/install.txt 2010-01-10 17:45:55 UTC (rev 12168)
+++ django/trunk/docs/intro/install.txt 2010-01-10 17:47:53 UTC (rev 12169)
@@ -71,11 +71,11 @@
   
 .. warning::
 
-If do either of the first two steps, keep an eye out for parts of the
+If you do either of the first two steps, keep an eye out for parts of the
 documentation marked **new in development version**. That phrase flags
-features that are only available in development versions of Django; if you
-try to use them with an official release they won't work.
-
+features that are only available in development versions of Django, and
+they likely won't work with an official release.
+
 That's it!
 --
 

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

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:45:55 -0600 (Sun, 10 Jan 2010)
New Revision: 12168

Modified:
   django/trunk/docs/topics/forms/formsets.txt
   django/trunk/docs/topics/forms/media.txt
Log:
Fixed #10989 -- Fixed typos in formset and widget-media docs. Thanks, 
fal...@mixworx.net and ramiro

Modified: django/trunk/docs/topics/forms/formsets.txt
===
--- django/trunk/docs/topics/forms/formsets.txt 2010-01-10 17:42:23 UTC (rev 
12167)
+++ django/trunk/docs/topics/forms/formsets.txt 2010-01-10 17:45:55 UTC (rev 
12168)
@@ -145,7 +145,7 @@
 ``total_form_count`` and ``initial_form_count``
 ~~~
 
-``BaseModelFormSet`` has a couple of methods that are closely related to the
+``BaseFormSet`` has a couple of methods that are closely related to the
 ``ManagementForm``, ``total_form_count`` and ``initial_form_count``.
 
 ``total_form_count`` returns the total number of forms in this formset.

Modified: django/trunk/docs/topics/forms/media.txt
===
--- django/trunk/docs/topics/forms/media.txt2010-01-10 17:42:23 UTC (rev 
12167)
+++ django/trunk/docs/topics/forms/media.txt2010-01-10 17:45:55 UTC (rev 
12168)
@@ -176,7 +176,7 @@
 
 If you need to perform some more sophisticated manipulation of media
 requirements, you can define the media property directly. This is done
-by defining a model property that returns an instance of ``forms.Media``.
+by defining a widget property that returns an instance of ``forms.Media``.
 The constructor for ``forms.Media`` accepts ``css`` and ``js`` keyword
 arguments in the same format as that used in a static media definition.
 

-- 
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] #12047: Copy/paste error in documentation

2010-01-10 Thread Django
#12047: Copy/paste error in documentation
+---
  Reporter:  schickler  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.1   
Resolution:  fixed  |  Keywords:  typo  
 Stage:  Ready for checkin  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by adrian):

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

Comment:

 (In [12167]) Fixed #12047 -- Fixed typo in generic views documentation.
 Thanks, schickler

-- 
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] r12167 - django/trunk/docs/ref

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:42:23 -0600 (Sun, 10 Jan 2010)
New Revision: 12167

Modified:
   django/trunk/docs/ref/generic-views.txt
Log:
Fixed #12047 -- Fixed typo in generic views documentation. Thanks, schickler

Modified: django/trunk/docs/ref/generic-views.txt
===
--- django/trunk/docs/ref/generic-views.txt 2010-01-10 17:37:48 UTC (rev 
12166)
+++ django/trunk/docs/ref/generic-views.txt 2010-01-10 17:42:23 UTC (rev 
12167)
@@ -542,7 +542,7 @@
 * ``next_day``: A ``datetime.date`` object representing the next day. If
   the next day is in the future, this will be ``None``.
 
-* ``previous_day``: A ``datetime.date`` object representing the given day.
+* ``previous_day``: A ``datetime.date`` object representing the previous 
day.
   Unlike ``next_day``, this will never be ``None``.
 
 * ``object_list``: A list of objects available for the given day. This

-- 
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] r12166 - django/trunk/django/middleware

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:37:48 -0600 (Sun, 10 Jan 2010)
New Revision: 12166

Modified:
   django/trunk/django/middleware/common.py
Log:
Removed an 'assert False' I stupidly committed in [12165]

Modified: django/trunk/django/middleware/common.py
===
--- django/trunk/django/middleware/common.py2010-01-10 17:35:01 UTC (rev 
12165)
+++ django/trunk/django/middleware/common.py2010-01-10 17:37:48 UTC (rev 
12166)
@@ -34,8 +34,6 @@
 settings.APPEND_SLASH and settings.PREPEND_WWW
 """
 
-assert False, 1
-
 # Check for denied User-Agents
 if 'HTTP_USER_AGENT' in request.META:
 for user_agent_regex in settings.DISALLOWED_USER_AGENTS:

-- 
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] r12165 - in django/trunk: django/core/handlers django/middleware tests tests/regressiontests tests/regressiontests/middleware_exceptions

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:35:01 -0600 (Sun, 10 Jan 2010)
New Revision: 12165

Added:
   django/trunk/tests/regressiontests/middleware_exceptions/
   django/trunk/tests/regressiontests/middleware_exceptions/models.py
   django/trunk/tests/regressiontests/middleware_exceptions/tests.py
   django/trunk/tests/regressiontests/middleware_exceptions/urls.py
   django/trunk/tests/regressiontests/middleware_exceptions/views.py
Modified:
   django/trunk/django/core/handlers/base.py
   django/trunk/django/middleware/common.py
   django/trunk/tests/urls.py
Log:
Fixed #6094 -- Middleware exceptions are now caught by the core handler. 
Thanks, isagalaev

Modified: django/trunk/django/core/handlers/base.py
===
--- django/trunk/django/core/handlers/base.py   2010-01-10 17:28:20 UTC (rev 
12164)
+++ django/trunk/django/core/handlers/base.py   2010-01-10 17:35:01 UTC (rev 
12165)
@@ -68,24 +68,24 @@
 from django.core import exceptions, urlresolvers
 from django.conf import settings
 
-# Reset the urlconf for this thread.
-urlresolvers.set_urlconf(None)
+try:
+try:
+# Reset the urlconf for this thread.
+urlresolvers.set_urlconf(None)
 
-# Apply request middleware
-for middleware_method in self._request_middleware:
-response = middleware_method(request)
-if response:
-return response
+# Get urlconf from request object, if available.  Otherwise 
use default.
+urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
 
-# Get urlconf from request object, if available.  Otherwise use 
default.
-urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
+# Set the urlconf for this thread to the one specified above.
+urlresolvers.set_urlconf(urlconf)
+resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
 
-# Set the urlconf for this thread to the one specified above.
-urlresolvers.set_urlconf(urlconf)
+# Apply request middleware
+for middleware_method in self._request_middleware:
+response = middleware_method(request)
+if response:
+return response
 
-resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
-try:
-try:
 callback, callback_args, callback_kwargs = resolver.resolve(
 request.path_info)
 

Modified: django/trunk/django/middleware/common.py
===
--- django/trunk/django/middleware/common.py2010-01-10 17:28:20 UTC (rev 
12164)
+++ django/trunk/django/middleware/common.py2010-01-10 17:35:01 UTC (rev 
12165)
@@ -34,6 +34,8 @@
 settings.APPEND_SLASH and settings.PREPEND_WWW
 """
 
+assert False, 1
+
 # Check for denied User-Agents
 if 'HTTP_USER_AGENT' in request.META:
 for user_agent_regex in settings.DISALLOWED_USER_AGENTS:

Added: django/trunk/tests/regressiontests/middleware_exceptions/models.py
===
--- django/trunk/tests/regressiontests/middleware_exceptions/models.py  
(rev 0)
+++ django/trunk/tests/regressiontests/middleware_exceptions/models.py  
2010-01-10 17:35:01 UTC (rev 12165)
@@ -0,0 +1 @@
+from django.db import models

Added: django/trunk/tests/regressiontests/middleware_exceptions/tests.py
===
--- django/trunk/tests/regressiontests/middleware_exceptions/tests.py   
(rev 0)
+++ django/trunk/tests/regressiontests/middleware_exceptions/tests.py   
2010-01-10 17:35:01 UTC (rev 12165)
@@ -0,0 +1,37 @@
+import sys
+
+from django.test import TestCase
+from django.core.signals import got_request_exception
+
+class RequestMiddleware(object):
+def process_request(self, request):
+raise Exception('Exception')
+
+class MiddlewareExceptionTest(TestCase):
+def __init__(self, *args, **kwargs):
+super(MiddlewareExceptionTest, self).__init__(*args, **kwargs)
+self.exceptions = []
+got_request_exception.connect(self._on_request_exception)
+
+def setUp(self):
+self.client.handler.load_middleware()
+
+def tearDown(self):
+self.exceptions = []
+
+def _on_request_exception(self, sender, request, **kwargs):
+self.exceptions.append(sys.exc_info())
+
+def test_process_request(self):
+self.client.handler._request_middleware.insert(0, 
RequestMiddleware().process_request)
+try:
+response = self.client.get('/')
+except:
+# Test client indefinitely re-raises any exceptions being raised
+# during request handling. 

Re: [Django] #2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's

2010-01-10 Thread Django
#2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in 
Doc's
+---
  Reporter:  scott.benningh...@openmercury.com  | Owner:  
nobody  
Status:  new| Milestone:
  
 Component:  Database layer (models, ORM)   |   Version:
  
Resolution: |  Keywords:  Unit 
of work, commit, rollback, transactions
 Stage:  Accepted   | Has_patch:  1 
  
Needs_docs:  0  |   Needs_tests:  1 
  
Needs_better_patch:  1  |  
+---
Changes (by kmtracey):

  * needs_better_patch:  0 => 1

Comment:

 The existing patch is not the correct solution.

 Per Jacob's response in this thread: http://groups.google.com/group
 /django-developers/browse_thread/thread/b633d56fdc7d4107/

 the problem is not that the function isn't implemented, but rather that
 that docs and code do not agree on the name for the setting that controls
 the function.  The code uses a setting named TRANSACTIONS_MANAGED (default
 value False in django/conf/global_settings.py), not a setting named
 DISABLE_TRANSACTION_MANAGEMENT. The fix, I believe, is a simple global
 replace in either the code or the doc of one for the other, depending on
 which one is chosen to keep.

 DISABLE_TRANSACTION_MANAGEMENT is the one I would keep.  It seems to more
 clearly convey that a setting of True means Django will not manage
 transactions.  I found the actual default value for TRANSACTIONS_MANAGED
 to be surprising when I checked on it, because I expected it to reflect
 whether Django code was responsible for transaction management.  In fact
 its apparently the reverse of what I expected based just on the name (I
 did not look at the code that uses it, just noted that there is in fact
 code that references its value, unlike DISABLE_TRANSACTION_MANAGEMENT).

 Note neither name is documented in the full list of settings, so it might
 be good to add doc there as well when this is done.

-- 
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] r12164 - in django/trunk: django/utils tests/regressiontests/utils

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:28:20 -0600 (Sun, 10 Jan 2010)
New Revision: 12164

Added:
   django/trunk/tests/regressiontests/utils/tzinfo.py
Modified:
   django/trunk/django/utils/tzinfo.py
   django/trunk/tests/regressiontests/utils/tests.py
Log:
Fixed #10979 -- Fixed misleading FixedOffset.__repr__(). Thanks, gsong

Modified: django/trunk/django/utils/tzinfo.py
===
--- django/trunk/django/utils/tzinfo.py 2010-01-10 17:25:44 UTC (rev 12163)
+++ django/trunk/django/utils/tzinfo.py 2010-01-10 17:28:20 UTC (rev 12164)
@@ -13,7 +13,8 @@
 else:
 self.__offset = timedelta(minutes=offset)
 
-self.__name = u"%+03d%02d" % (offset / 60, offset % 60)
+sign = offset < 0 and '-' or '+'
+self.__name = u"%s%02d%02d" % (sign, abs(offset) / 60., abs(offset) % 
60)
 
 def __repr__(self):
 return self.__name

Modified: django/trunk/tests/regressiontests/utils/tests.py
===
--- django/trunk/tests/regressiontests/utils/tests.py   2010-01-10 17:25:44 UTC 
(rev 12163)
+++ django/trunk/tests/regressiontests/utils/tests.py   2010-01-10 17:28:20 UTC 
(rev 12164)
@@ -10,6 +10,7 @@
 import timesince
 import datastructures
 import itercompat
+import tzinfo
 
 from decorators import DecoratorFromMiddlewareTests
 from functional import FunctionalTestCase
@@ -26,6 +27,7 @@
 'timesince': timesince,
 'datastructures': datastructures,
 'itercompat': itercompat,
+'tzinfo': tzinfo,
 }
 
 from dateformat import *

Added: django/trunk/tests/regressiontests/utils/tzinfo.py
===
--- django/trunk/tests/regressiontests/utils/tzinfo.py  
(rev 0)
+++ django/trunk/tests/regressiontests/utils/tzinfo.py  2010-01-10 17:28:20 UTC 
(rev 12164)
@@ -0,0 +1,30 @@
+"""
+>>> from django.utils.tzinfo import FixedOffset
+
+>>> FixedOffset(0)
++
+>>> FixedOffset(60)
++0100
+>>> FixedOffset(-60)
+-0100
+>>> FixedOffset(280)
++0440
+>>> FixedOffset(-280)
+-0440
+>>> FixedOffset(-78.4)
+-0118
+>>> FixedOffset(78.4)
++0118
+>>> FixedOffset(-5.5*60)
+-0530
+>>> FixedOffset(5.5*60)
++0530
+>>> FixedOffset(-.5*60)
+-0030
+>>> FixedOffset(.5*60)
++0030
+"""
+
+if __name__ == "__main__":
+import doctest
+doctest.testmod()

-- 
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] #12304: modelForm/unique_together error 'Foo bar with this None and None already exists.'

2010-01-10 Thread Django
#12304: modelForm/unique_together error 'Foo bar with this None and None already
exists.'
+---
  Reporter:  johnsmith  | Owner:  ramiro
 
Status:  assigned   | Milestone:
 
 Component:  Forms  |   Version:  1.1   
 
Resolution: |  Keywords:  ModelForm 
unique_together unique wwith this None already exists
 Stage:  Ready for checkin  | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Comment (by ramiro):

 Current status is:

  1. `12304-ensure-readable-label-in-unique-validation_error-
 messages.diff`-- patch applicable to the 1.1.x branch to fix this issue.
  2. `12304-only-tests-trunk-r12159.diff` -- Patch for trunk that only adds
 the regression tests because there the issue was fixed with the `model-
 validation` branch merge.

-- 
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] #6094: core handlers do not catch middleware exceptions

2010-01-10 Thread Django
#6094: core handlers do not catch middleware exceptions
+---
  Reporter:  gwilson| Owner:  gwilson
Status:  assigned   | Milestone: 
 Component:  HTTP handling  |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Comment (by isagalaev):

 I've made an alternative patch that is much less involving than the
 previous one. Basically it just shoves request middleware handling under
 `try` statements in BaseHandler.

 Refactoring of the request part is a good thing by itself but I think it
 holds this actual bug from fixing. It can be done after it's closed.

-- 
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] r12163 - django/trunk/docs/ref/models

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:25:44 -0600 (Sun, 10 Jan 2010)
New Revision: 12163

Modified:
   django/trunk/docs/ref/models/querysets.txt
Log:
Fixed #10947 -- Fixed error in __in documentation. Thanks, julianb and timo

Modified: django/trunk/docs/ref/models/querysets.txt
===
--- django/trunk/docs/ref/models/querysets.txt  2010-01-10 17:23:59 UTC (rev 
12162)
+++ django/trunk/docs/ref/models/querysets.txt  2010-01-10 17:25:44 UTC (rev 
12163)
@@ -1317,8 +1317,12 @@
 
 values = Blog.objects.filter(
 name__contains='Cheddar').values_list('pk', flat=True)
-entries = Entry.objects.filter(blog__in=values)
+entries = Entry.objects.filter(blog__in=list(values))
 
+Note the ``list()`` call around the Blog ``QuerySet`` to force execution of
+the first query. Without it, a nested query would be executed, because 
+:ref:`querysets-are-lazy`.
+
 gt
 ~~
 

-- 
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] r12162 - django/trunk/docs/ref/models

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:23:59 -0600 (Sun, 10 Jan 2010)
New Revision: 12162

Modified:
   django/trunk/docs/ref/models/fields.txt
Log:
Fixed #10862 -- Clarified confusing documentation about ImageField 
height/width. Thanks, mw and timo

Modified: django/trunk/docs/ref/models/fields.txt
===
--- django/trunk/docs/ref/models/fields.txt 2010-01-10 17:22:30 UTC (rev 
12161)
+++ django/trunk/docs/ref/models/fields.txt 2010-01-10 17:23:59 UTC (rev 
12162)
@@ -653,8 +653,8 @@
 image each time the model instance is saved.
 
 In addition to the special attributes that are available for 
:class:`FileField`,
-an :class:`ImageField` also has ``File.height`` and ``File.width`` attributes.
-See :ref:`topics-files`.
+an :class:`ImageField` also has :attr:`~django.core.files.File.height` and
+:attr:`~django.core.files.File.width` attributes.
 
 Requires the `Python Imaging Library`_.
 

-- 
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] r12161 - django/trunk/docs/ref/templates

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:22:30 -0600 (Sun, 10 Jan 2010)
New Revision: 12161

Modified:
   django/trunk/docs/ref/templates/api.txt
Log:
Fixed #10800 -- Made a small improvement to render_to_string() docs. Thanks, 
p.patr...@iperbole.bologna.it and timo

Modified: django/trunk/docs/ref/templates/api.txt
===
--- django/trunk/docs/ref/templates/api.txt 2010-01-10 17:21:52 UTC (rev 
12160)
+++ django/trunk/docs/ref/templates/api.txt 2010-01-10 17:22:30 UTC (rev 
12161)
@@ -656,7 +656,8 @@
 
 The ``render_to_string`` shortcut takes one required argument --
 ``template_name``, which should be the name of the template to load
-and render -- and two optional arguments:
+and render (or a list of template names, in which case Django will use
+the first template in the list that exists) -- and two optional arguments:
 
 dictionary
 A dictionary to be used as variables and values for the

-- 
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] r12160 - in django/trunk/tests/regressiontests: . special_headers special_headers/fixtures special_headers/templates special_headers/templates/special_headers

2010-01-10 Thread noreply
Author: adrian
Date: 2010-01-10 11:21:52 -0600 (Sun, 10 Jan 2010)
New Revision: 12160

Added:
   django/trunk/tests/regressiontests/special_headers/
   django/trunk/tests/regressiontests/special_headers/fixtures/
   django/trunk/tests/regressiontests/special_headers/fixtures/data.xml
   django/trunk/tests/regressiontests/special_headers/models.py
   django/trunk/tests/regressiontests/special_headers/templates/
   django/trunk/tests/regressiontests/special_headers/templates/special_headers/
   
django/trunk/tests/regressiontests/special_headers/templates/special_headers/article_detail.html
   django/trunk/tests/regressiontests/special_headers/tests.py
   django/trunk/tests/regressiontests/special_headers/urls.py
   django/trunk/tests/regressiontests/special_headers/views.py
Log:
Added tests that I neglected to check in for #8049 in [12159]

Added: django/trunk/tests/regressiontests/special_headers/fixtures/data.xml
===
--- django/trunk/tests/regressiontests/special_headers/fixtures/data.xml
(rev 0)
+++ django/trunk/tests/regressiontests/special_headers/fixtures/data.xml
2010-01-10 17:21:52 UTC (rev 12160)
@@ -0,0 +1,20 @@
+
+
+
+super
+Super
+User
+su...@example.com
+sha1$995a3$6011485ea3834267d719b4c801409b8b1ddd0158
+True
+True
+True
+2007-05-30 
13:20:10
+2007-05-30 
13:20:10
+
+
+
+
+text
+
+

Added: django/trunk/tests/regressiontests/special_headers/models.py
===
--- django/trunk/tests/regressiontests/special_headers/models.py
(rev 0)
+++ django/trunk/tests/regressiontests/special_headers/models.py
2010-01-10 17:21:52 UTC (rev 12160)
@@ -0,0 +1,4 @@
+from django.db import models
+
+class Article(models.Model):
+text = models.TextField()

Added: 
django/trunk/tests/regressiontests/special_headers/templates/special_headers/article_detail.html
===
--- 
django/trunk/tests/regressiontests/special_headers/templates/special_headers/article_detail.html
(rev 0)
+++ 
django/trunk/tests/regressiontests/special_headers/templates/special_headers/article_detail.html
2010-01-10 17:21:52 UTC (rev 12160)
@@ -0,0 +1 @@
+{{ object }}

Added: django/trunk/tests/regressiontests/special_headers/tests.py
===
--- django/trunk/tests/regressiontests/special_headers/tests.py 
(rev 0)
+++ django/trunk/tests/regressiontests/special_headers/tests.py 2010-01-10 
17:21:52 UTC (rev 12160)
@@ -0,0 +1,40 @@
+from django.test import TestCase
+from django.contrib.auth.models import User
+
+class SpecialHeadersTest(TestCase):
+fixtures = ['data.xml']
+
+def test_xheaders(self):
+user = User.objects.get(username='super')
+response = self.client.get('/special_headers/article/1/')
+# import pdb; pdb.set_trace()
+self.failUnless('X-Object-Type' not in response)
+self.client.login(username='super', password='secret')
+response = self.client.get('/special_headers/article/1/')
+self.failUnless('X-Object-Type' in response)
+user.is_staff = False
+user.save()
+response = self.client.get('/special_headers/article/1/')
+self.failUnless('X-Object-Type' not in response)
+user.is_staff = True
+user.is_active = False
+user.save()
+response = self.client.get('/special_headers/article/1/')
+self.failUnless('X-Object-Type' not in response)
+
+def test_xview(self):
+user = User.objects.get(username='super')
+response = self.client.head('/special_headers/xview/')
+self.failUnless('X-View' not in response)
+self.client.login(username='super', password='secret')
+response = self.client.head('/special_headers/xview/')
+self.failUnless('X-View' in response)
+user.is_staff = False
+user.save()
+response = self.client.head('/special_headers/xview/')
+self.failUnless('X-View' not in response)
+user.is_staff = True
+user.is_active = False
+user.save()
+response = self.client.head('/special_headers/xview/')
+self.failUnless('X-View' not in response)

Added: django/trunk/tests/regressiontests/special_headers/urls.py
===
--- django/trunk/tests/regressiontests/special_headers/urls.py  
(rev 0)
+++ django/trunk/tests/regressiontests/special_headers/urls.py  2010-01-10 
17:21:52 UTC (rev 12160)
@@ -0,0 +1,10 @@
+# coding: utf-8
+from django.conf.urls.defaults import *
+from django.views.generic.list_detail import 

Re: [Django] #10291: Correction to QuerySet.iterator() documentation

2010-01-10 Thread Django
#10291: Correction to QuerySet.iterator() documentation
+---
  Reporter:  ikelly | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution:  invalid|  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by adrian):

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

Comment:

 I'm not sure this documentation change is correct/appropriate. The point
 of ``iterator()`` is to do the query in chunks (as explained in the
 current document), not to avoid caching (as explained in 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] #10787: debug.py Templates: Request URLs Should Include django.root

2010-01-10 Thread Django
#10787: debug.py Templates: Request URLs Should Include django.root
+---
  Reporter:  rpwagner   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Generic views  |   Version:  SVN   
Resolution:  duplicate  |  Keywords:  debug 
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by seanbrant):

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

Comment:

 This was a dupe of #9577 and fixed by r10535.

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




  1   2   >