Re: [Django] #14338: Search bar on the docs should include 1.2, & 1.1

2010-10-08 Thread Django
#14338: Search bar on the docs should include 1.2, & 1.1
--+-
  Reporter:  varikin  | Owner:  nobody
Status:  new  | Milestone:  1.3   
 Component:  Django Web site  |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by ericholscher):

  * stage:  Unreviewed => Accepted
  * milestone:  => 1.3

-- 
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] #3400: Support for lookup separator with list_filter admin option

2010-10-08 Thread Django
#3400: Support for lookup separator with list_filter admin option
---+
  Reporter:  n...@intv.com.au  | Owner:  DrMeers
 
Status:  assigned  | Milestone:  1.3
 
 Component:  django.contrib.admin  |   Version:  newforms-admin 
 
Resolution:|  Keywords:  edc nfa-someday 
list_filter FilterSpec nfa-changelist ep2008
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by alexkoshelev):

 * cc: alexkoshelev (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.



[Changeset] r14060 - django/branches/releases/1.2.X/docs/howto/deployment

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-09 00:10:32 -0500 (Sat, 09 Oct 2010)
New Revision: 14060

Modified:
   django/branches/releases/1.2.X/docs/howto/deployment/modpython.txt
Log:
[1.2.X] Fixed #5677 -- update modpython stdout documentation. Thanks to Manfred 
Wassmann for the report, nickefford for the initial patch and Graham Dumpleton 
for the expert advice.

Backported of r14059 from trunk.


Modified: django/branches/releases/1.2.X/docs/howto/deployment/modpython.txt
===
--- django/branches/releases/1.2.X/docs/howto/deployment/modpython.txt  
2010-10-09 05:08:42 UTC (rev 14059)
+++ django/branches/releases/1.2.X/docs/howto/deployment/modpython.txt  
2010-10-09 05:10:32 UTC (rev 14060)
@@ -2,6 +2,13 @@
 How to use Django with Apache and mod_python
 
 
+.. warning::
+
+Support for mod_python will be deprecated in a future release of Django. If
+you are configuring a new deployment, you are strongly encouraged to
+consider using :doc:`mod_wsgi ` or any of the
+other :doc:`supported backends `.
+
 .. highlight:: apache
 
 The `mod_python`_ module for Apache_ can be used to deploy Django to a
@@ -151,6 +158,8 @@
 When deploying Django sites on mod_python, you'll need to restart Apache each
 time you make changes to your Python code.
 
+.. _mod_python documentation: 
http://modpython.org/live/current/doc-html/directives.html
+
 Multiple Django installations on the same Apache
 
 
@@ -204,17 +213,25 @@
 revoke your Django privileges.
 
 If you're the type of programmer who debugs using scattered ``print``
-statements, note that ``print`` statements have no effect in mod_python; they
-don't appear in the Apache log, as one might expect. If you have the need to
-print debugging information in a mod_python setup, either do this::
+statements, note that output to ``stdout`` will not appear in the Apache
+log and can even `cause response errors`_.
 
-assert False, the_value_i_want_to_see
+.. _cause response errors: 
http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html
 
-Or add the debugging information to the template of your page.
+If you have the need to print debugging information in a mod_python setup, you 
+have a few options. You can print to ``stderr`` explicitly, like so::
+ 
+print >> sys.stderr, 'debug text'
+sys.stderr.flush()
+ 
+(note that ``stderr`` is buffered, so calling ``flush`` is necessary if you 
wish
+debugging information to be displayed promptly.)
+ 
+A more compact approach is to use an assertion::
 
-.. _mod_python documentation: 
http://modpython.org/live/current/doc-html/directives.html
+assert False, 'debug text'
 
-.. _serving-media-files:
+Another alternative is to add debugging information to the template of your 
page.
 
 Serving media files
 ===
@@ -267,10 +284,6 @@
 .. _Apache: http://httpd.apache.org/
 .. _Cherokee: http://www.cherokee-project.com/
 
-.. _howto-deployment-modpython-serving-the-admin-files:
-
-.. _serving-the-admin-files:
-
 Serving the admin files
 ===
 

-- 
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] r14059 - django/trunk/docs/howto/deployment

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-09 00:08:42 -0500 (Sat, 09 Oct 2010)
New Revision: 14059

Modified:
   django/trunk/docs/howto/deployment/modpython.txt
Log:
Fixed #5677 -- update modpython stdout documentation. Thanks to Manfred 
Wassmann for the report, nickefford for the initial patch and Graham Dumpleton 
for the expert advice.


Modified: django/trunk/docs/howto/deployment/modpython.txt
===
--- django/trunk/docs/howto/deployment/modpython.txt2010-10-09 04:50:47 UTC 
(rev 14058)
+++ django/trunk/docs/howto/deployment/modpython.txt2010-10-09 05:08:42 UTC 
(rev 14059)
@@ -158,6 +158,8 @@
 When deploying Django sites on mod_python, you'll need to restart Apache each
 time you make changes to your Python code.
 
+.. _mod_python documentation: 
http://modpython.org/live/current/doc-html/directives.html
+
 Multiple Django installations on the same Apache
 
 
@@ -211,16 +213,26 @@
 revoke your Django privileges.
 
 If you're the type of programmer who debugs using scattered ``print``
-statements, note that ``print`` statements have no effect in mod_python; they
-don't appear in the Apache log, as one might expect. If you have the need to
-print debugging information in a mod_python setup, either do this::
+statements, note that output to ``stdout`` will not appear in the Apache
+log and can even `cause response errors`_.
 
-assert False, the_value_i_want_to_see
+.. _cause response errors: 
http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html
 
-Or add the debugging information to the template of your page.
+If you have the need to print debugging information in a mod_python setup, you 
+have a few options. You can print to ``stderr`` explicitly, like so::
+ 
+print >> sys.stderr, 'debug text'
+sys.stderr.flush()
+ 
+(note that ``stderr`` is buffered, so calling ``flush`` is necessary if you 
wish
+debugging information to be displayed promptly.)
+ 
+A more compact approach is to use an assertion::
 
-.. _mod_python documentation: 
http://modpython.org/live/current/doc-html/directives.html
+assert False, 'debug text'
 
+Another alternative is to add debugging information to the template of your 
page.
+
 Serving media files
 ===
 

-- 
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] #14039: FileField special-casing breaks MultiValueField including a FileField

2010-10-08 Thread Django
#14039: FileField special-casing breaks MultiValueField including a FileField
---+
  Reporter:  carljm| Owner:  carljm   
Status:  new   | Milestone:   
 Component:  Forms |   Version:  SVN  
Resolution:|  Keywords:  sprintSep2010
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  1 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 MultiValueField [http://docs.djangoproject.com/en/dev/ref/forms/fields/ is
 documented].

 (and even if it wasn't... wouldn't this be a grand opportunity to fix the
 situation :-)

-- 
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] r14058 - in django/trunk: django/test docs/topics tests/modeltests/test_client

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 23:50:47 -0500 (Fri, 08 Oct 2010)
New Revision: 14058

Modified:
   django/trunk/django/test/testcases.py
   django/trunk/docs/topics/testing.txt
   django/trunk/tests/modeltests/test_client/models.py
Log:
Fixed #14378 -- Made the test client class customizable. Thanks to Ned 
Batchelder for the patch.

Modified: django/trunk/django/test/testcases.py
===
--- django/trunk/django/test/testcases.py   2010-10-09 04:10:39 UTC (rev 
14057)
+++ django/trunk/django/test/testcases.py   2010-10-09 04:50:47 UTC (rev 
14058)
@@ -210,6 +210,10 @@
 transaction.rollback_unless_managed(using=conn)
 
 class TransactionTestCase(unittest.TestCase):
+# The class we'll use for the test client self.client.
+# Can be overridden in derived classes.
+client_class = Client
+
 def _pre_setup(self):
 """Performs any pre-test setup. This includes:
 
@@ -251,7 +255,7 @@
 set up. This means that user-defined Test Cases aren't required to
 include a call to super().setUp().
 """
-self.client = Client()
+self.client = self.client_class()
 try:
 self._pre_setup()
 except (KeyboardInterrupt, SystemExit):

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-10-09 04:10:39 UTC (rev 
14057)
+++ django/trunk/docs/topics/testing.txt2010-10-09 04:50:47 UTC (rev 
14058)
@@ -1086,6 +1086,30 @@
 response = self.client.get('/customer/index/')
 self.failUnlessEqual(response.status_code, 200)
 
+Customizing the test client
+~~~
+
+.. versionadded:: 1.3
+
+.. attribute:: TestCase.client_class
+
+If you want to use a different Client class (for example, a subclass
+with customized behavior), you can use the
+:attr:`~TestCase.client_class` class attribute to specify a custom
+``Client`` class in your test case::
+
+from django.test import TestCase
+from django.test.client import Client
+
+class MyTestClient(Client):
+# .. specialized methods for your environment ..
+
+class MyTest(TestCase):
+client_class = MyTestClient
+
+def test_my_stuff(self):
+# .. Here self.client is an instance of MyTestClient ..
+
 .. _topics-testing-fixtures:
 
 Fixture loading

Modified: django/trunk/tests/modeltests/test_client/models.py
===
--- django/trunk/tests/modeltests/test_client/models.py 2010-10-09 04:10:39 UTC 
(rev 14057)
+++ django/trunk/tests/modeltests/test_client/models.py 2010-10-09 04:50:47 UTC 
(rev 14058)
@@ -457,3 +457,15 @@
 # The CSRF-enabled client rejects it
 response = csrf_client.post('/test_client/post_view/', {})
 self.assertEqual(response.status_code, 403)
+
+
+class CustomTestClient(Client):
+i_am_customized = "Yes"
+
+class CustomTestClientTest(TestCase):
+client_class = CustomTestClient
+
+def test_custom_test_client(self):
+"""A test case can specify a custom class for self.client."""
+self.assertEqual(hasattr(self.client, "i_am_customized"), True)
+

-- 
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] #12088: Make the test Client class variable in TransactionTestCase

2010-10-08 Thread Django
#12088: Make the test Client class variable in TransactionTestCase
+---
  Reporter:  obeattie   | Owner:  nobody  
Status:  closed | Milestone:  
 Component:  Testing framework  |   Version:  1.1 
Resolution:  duplicate  |  Keywords:  test, client
 Stage:  Accepted   | Has_patch:  1   
Needs_docs:  1  |   Needs_tests:  1   
Needs_better_patch:  1  |  
+---
Changes (by russellm):

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

Comment:

 Marking as a duplicate of #14378 due to the availability of a full patch
 with tests and docs.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #14366: Model.objects.none().values(...).anything() is broken

2010-10-08 Thread Django
#14366: Model.objects.none().values(...).anything() is broken
---+
  Reporter:  carljm| Owner:  nobody
Status:  new   | Milestone:  1.3   
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Ready for checkin | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by russellm):

 Looks good to me.

 See #14011 for what looks like a closely related ticket.

-- 
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] #14365: Make template-rendering signals available also in DEBUG mode

2010-10-08 Thread Django
#14365: Make template-rendering signals available also in DEBUG mode
+---
  Reporter:  carljm | Owner:  carljm
Status:  new| Milestone:
 Component:  Testing framework  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * needs_docs:  0 => 1

Comment:

 Patch looks good, except for the absence of docs. We're adding a new
 public signal, and an API that would allow people to subclass (or
 monkeypatch) Template to turn on that signal.

 Actually, that makes me wonder if Template should maybe take a 'enable
 signals' argument so you can turn on signals on a per-instance basis,
 rather than needing to subclass or monkeypatch...

-- 
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] #12226: Test HttpResponse template attribute needlessly hard to use

2010-10-08 Thread Django
#12226: Test HttpResponse template attribute needlessly hard to use
+---
  Reporter:  carljm | Owner:  carljm   
Status:  new| Milestone:  1.3  
 Component:  Testing framework  |   Version:  SVN  
Resolution: |  Keywords:  sprintSep2010
 Stage:  Accepted   | Has_patch:  1
Needs_docs:  1  |   Needs_tests:  0
Needs_better_patch:  1  |  
+---
Changes (by russellm):

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

Comment:

 Me likey.

 However, this patch needs docs. We're deprecating a feature, so:
  * We need to put an entry in the release notes.
  * We need to put an entry in internals/deprecation.

-- 
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] #11256: Fail loudly and clearly when an Annotation alias matches a field name.

2010-10-08 Thread Django
#11256: Fail loudly and clearly when an Annotation alias matches a field name.
+---
  Reporter:  donspaulding   | Owner: 
Status:  new| Milestone:  1.3
 Component:  ORM aggregation|   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * stage:  Accepted => Ready for checkin

Comment:

 Looks good to me.

-- 
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] #14425: Unused imports in contrib.admin

2010-10-08 Thread Django
#14425: Unused imports in contrib.admin
---+
 Reporter:  robhudson  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 Attached is a patch which removes unused imports in all contrib.admin
 files.  The tests continue to pass.

-- 
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] r14057 - in django/branches/releases/1.2.X/django/contrib/admin: templates/admin views

2010-10-08 Thread noreply
Author: ramiro
Date: 2010-10-08 23:10:39 -0500 (Fri, 08 Oct 2010)
New Revision: 14057

Removed:
   
django/branches/releases/1.2.X/django/contrib/admin/templates/admin/template_validator.html
   django/branches/releases/1.2.X/django/contrib/admin/views/template.py
Log:
[1.2.X] Fixed #12872 -- Removed vestiges of mythic old template validation 
admin app functionality.

Backport of [14055] from trunk

Deleted: 
django/branches/releases/1.2.X/django/contrib/admin/templates/admin/template_validator.html
===
--- 
django/branches/releases/1.2.X/django/contrib/admin/templates/admin/template_validator.html
 2010-10-09 04:01:37 UTC (rev 14056)
+++ 
django/branches/releases/1.2.X/django/contrib/admin/templates/admin/template_validator.html
 2010-10-09 04:10:39 UTC (rev 14057)
@@ -1,31 +0,0 @@
-{% extends "admin/base_site.html" %}
-
-{% block content %}
-
-
-
-{% csrf_token %}
-
-{% if form.errors %}
-Your template had {{ form.errors|length }} error{{ 
form.errors|pluralize }}:
-{% endif %}
-
-
-
-{{ form.errors.site }}
-{{ form.site.label }}: {{ form.site 
}}
-
-
-{{ form.errors.template }}
-{{ form.template.label }}: {{ 
form.template }}
-
-
-
-
-
-
-
-
-
-
-{% endblock %}

Deleted: django/branches/releases/1.2.X/django/contrib/admin/views/template.py
===
--- django/branches/releases/1.2.X/django/contrib/admin/views/template.py   
2010-10-09 04:01:37 UTC (rev 14056)
+++ django/branches/releases/1.2.X/django/contrib/admin/views/template.py   
2010-10-09 04:10:39 UTC (rev 14057)
@@ -1,79 +0,0 @@
-from django import template, forms
-from django.contrib.admin.views.decorators import staff_member_required
-from django.template import loader
-from django.shortcuts import render_to_response
-from django.contrib.sites.models import Site
-from django.conf import settings
-from django.utils.importlib import import_module
-from django.utils.translation import ugettext_lazy as _
-from django.contrib import messages
-
-
-def template_validator(request):
-"""
-Displays the template validator form, which finds and displays template
-syntax errors.
-"""
-# get a dict of {site_id : settings_module} for the validator
-settings_modules = {}
-for mod in settings.ADMIN_FOR:
-settings_module = import_module(mod)
-settings_modules[settings_module.SITE_ID] = settings_module
-site_list = Site.objects.in_bulk(settings_modules.keys()).values()
-if request.POST:
-form = TemplateValidatorForm(settings_modules, site_list,
- data=request.POST)
-if form.is_valid():
-messages.info(request, 'The template is valid.')
-else:
-form = TemplateValidatorForm(settings_modules, site_list)
-return render_to_response('admin/template_validator.html', {
-'title': 'Template validator',
-'form': form,
-}, context_instance=template.RequestContext(request))
-template_validator = staff_member_required(template_validator)
-
-
-class TemplateValidatorForm(forms.Form):
-site = forms.ChoiceField(_('site'))
-template = forms.CharField(
-_('template'), widget=forms.Textarea({'rows': 25, 'cols': 80}))
-
-def __init__(self, settings_modules, site_list, *args, **kwargs):
-self.settings_modules = settings_modules
-super(TemplateValidatorForm, self).__init__(*args, **kwargs)
-self.fields['site'].choices = [(s.id, s.name) for s in site_list]
-
-def clean_template(self):
-# Get the settings module. If the site isn't set, we don't raise an
-# error since the site field will.
-try:
-site_id = int(self.cleaned_data.get('site', None))
-except (ValueError, TypeError):
-return
-settings_module = self.settings_modules.get(site_id, None)
-if settings_module is None:
-return
-
-# So that inheritance works in the site's context, register a new
-# function for "extends" that uses the site's TEMPLATE_DIRS instead.
-def new_do_extends(parser, token):
-node = loader.do_extends(parser, token)
-node.template_dirs = settings_module.TEMPLATE_DIRS
-return node
-register = template.Library()
-register.tag('extends', new_do_extends)
-template.builtins.append(register)
-
-# Now validate the template using the new TEMPLATE_DIRS, making sure to
-# reset the extends function in any case.
-error = None
-template_string = self.cleaned_data['template']
-try:
-tmpl = loader.get_template_from_string(template_string)
-tmpl.render(template.Context({}))
-except template.TemplateSyntaxError, e:
-error = e
-template.builtins.remove(register)
-if error:
-raise 

Re: [Django] #9995: Mention 'easy_install Django' as an alternative installation method.

2010-10-08 Thread Django
#9995: Mention 'easy_install Django' as an alternative installation method.
+---
  Reporter:  daveyjoe   | Owner:  nobody
 
Status:  new| Milestone:
 
 Component:  Documentation  |   Version:  1.0   
 
Resolution: |  Keywords:  easy_install, docs, 
documentation, install, installation, setup
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  1  |  
+---
Changes (by DrMeers):

  * needs_better_patch:  0 => 1
  * stage:  Ready for checkin => Accepted

Comment:

 I think at least one BDFL would argue that pip is a more important
 (perhaps exclusively so) inclusion --
 "Really, you shouldn’t be using easy_install any more — please switch to
 pip." [1]

 I suggest amending this to include both, or pip only.

 [1] http://jacobian.org/writing/when-pypi-goes-down/

-- 
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] #14354: Check password is not None in User.check_password

2010-10-08 Thread Django
#14354: Check password is not None in User.check_password
-+--
  Reporter:  berryp  | Owner:  laurentluce
Status:  closed  | Milestone:  1.3
 Component:  Authentication  |   Version:  1.2
Resolution:  fixed   |  Keywords: 
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by russellm):

 Laurent - thanks for the revised patch. For your benefit next time, I made
 a couple of minor tweaks before pushing to trunk:
  * Line length in the unit tests. Where practical and legible, keep lines
 under 80 chars
  * A trailing newline on the 'superuser created' message
  * A couple of explanatory comments and newline breaks in the tests so
 it's easy to follow what's going on.

 Other than that, thanks for the contribution!

-- 
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] r14056 - django/trunk/docs/internals

2010-10-08 Thread noreply
Author: gabrielhurley
Date: 2010-10-08 23:01:37 -0500 (Fri, 08 Oct 2010)
New Revision: 14056

Modified:
   django/trunk/docs/internals/committers.txt
Log:
Adding myself to the specialists section (and fixing a typo in Jeremy's bio).

Modified: django/trunk/docs/internals/committers.txt
===
--- django/trunk/docs/internals/committers.txt  2010-10-09 03:58:32 UTC (rev 
14055)
+++ django/trunk/docs/internals/committers.txt  2010-10-09 04:01:37 UTC (rev 
14056)
@@ -280,7 +280,7 @@
 Matt is also responsible for Django's Oracle support.
 
 Jeremy Dunck
-Jeremy the lead developer of Pegasus News, a personalized local site based
+Jeremy is the lead developer of Pegasus News, a personalized local site 
based
 in Dallas, Texas. An early contributor to Greasemonkey and Django, he sees
 technology as a tool for communication and access to knowledge.
 
@@ -299,6 +299,18 @@
 
 .. _simon meers: http://simonmeers.com/
 
+`Gabriel Hurley`_
+Gabriel has been working with Django since 2008, shortly after the 1.0
+release. Convinced by his business partner that Python and Django were the
+right direction for the company, he couldn't have been more happy with the
+decision. His contributions range across many areas in Django, but years of
+copy-editing and an eye for detail lead him to be particularly at home
+while working on Django's documentation.
+
+Gabriel works as a web developer in Berkeley, CA, USA.
+
+.. _gabriel hurley: http://strikeawe.com/
+
 Developers Emeritus
 ===
 

-- 
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] r14055 - in django/trunk/django/contrib/admin: templates/admin views

2010-10-08 Thread noreply
Author: ramiro
Date: 2010-10-08 22:58:32 -0500 (Fri, 08 Oct 2010)
New Revision: 14055

Removed:
   django/trunk/django/contrib/admin/templates/admin/template_validator.html
   django/trunk/django/contrib/admin/views/template.py
Log:
Fixed #12872 -- Removed vestiges of mythic old template validation admin app 
functionality.

Deleted: 
django/trunk/django/contrib/admin/templates/admin/template_validator.html
===
--- django/trunk/django/contrib/admin/templates/admin/template_validator.html   
2010-10-09 03:36:46 UTC (rev 14054)
+++ django/trunk/django/contrib/admin/templates/admin/template_validator.html   
2010-10-09 03:58:32 UTC (rev 14055)
@@ -1,31 +0,0 @@
-{% extends "admin/base_site.html" %}
-
-{% block content %}
-
-
-
-{% csrf_token %}
-
-{% if form.errors %}
-Your template had {{ form.errors|length }} error{{ 
form.errors|pluralize }}:
-{% endif %}
-
-
-
-{{ form.errors.site }}
-{{ form.site.label }}: {{ form.site 
}}
-
-
-{{ form.errors.template }}
-{{ form.template.label }}: {{ 
form.template }}
-
-
-
-
-
-
-
-
-
-
-{% endblock %}

Deleted: django/trunk/django/contrib/admin/views/template.py
===
--- django/trunk/django/contrib/admin/views/template.py 2010-10-09 03:36:46 UTC 
(rev 14054)
+++ django/trunk/django/contrib/admin/views/template.py 2010-10-09 03:58:32 UTC 
(rev 14055)
@@ -1,79 +0,0 @@
-from django import template, forms
-from django.contrib.admin.views.decorators import staff_member_required
-from django.template import loader
-from django.shortcuts import render_to_response
-from django.contrib.sites.models import Site
-from django.conf import settings
-from django.utils.importlib import import_module
-from django.utils.translation import ugettext_lazy as _
-from django.contrib import messages
-
-
-def template_validator(request):
-"""
-Displays the template validator form, which finds and displays template
-syntax errors.
-"""
-# get a dict of {site_id : settings_module} for the validator
-settings_modules = {}
-for mod in settings.ADMIN_FOR:
-settings_module = import_module(mod)
-settings_modules[settings_module.SITE_ID] = settings_module
-site_list = Site.objects.in_bulk(settings_modules.keys()).values()
-if request.POST:
-form = TemplateValidatorForm(settings_modules, site_list,
- data=request.POST)
-if form.is_valid():
-messages.info(request, 'The template is valid.')
-else:
-form = TemplateValidatorForm(settings_modules, site_list)
-return render_to_response('admin/template_validator.html', {
-'title': 'Template validator',
-'form': form,
-}, context_instance=template.RequestContext(request))
-template_validator = staff_member_required(template_validator)
-
-
-class TemplateValidatorForm(forms.Form):
-site = forms.ChoiceField(_('site'))
-template = forms.CharField(
-_('template'), widget=forms.Textarea({'rows': 25, 'cols': 80}))
-
-def __init__(self, settings_modules, site_list, *args, **kwargs):
-self.settings_modules = settings_modules
-super(TemplateValidatorForm, self).__init__(*args, **kwargs)
-self.fields['site'].choices = [(s.id, s.name) for s in site_list]
-
-def clean_template(self):
-# Get the settings module. If the site isn't set, we don't raise an
-# error since the site field will.
-try:
-site_id = int(self.cleaned_data.get('site', None))
-except (ValueError, TypeError):
-return
-settings_module = self.settings_modules.get(site_id, None)
-if settings_module is None:
-return
-
-# So that inheritance works in the site's context, register a new
-# function for "extends" that uses the site's TEMPLATE_DIRS instead.
-def new_do_extends(parser, token):
-node = loader.do_extends(parser, token)
-node.template_dirs = settings_module.TEMPLATE_DIRS
-return node
-register = template.Library()
-register.tag('extends', new_do_extends)
-template.builtins.append(register)
-
-# Now validate the template using the new TEMPLATE_DIRS, making sure to
-# reset the extends function in any case.
-error = None
-template_string = self.cleaned_data['template']
-try:
-tmpl = loader.get_template_from_string(template_string)
-tmpl.render(template.Context({}))
-except template.TemplateSyntaxError, e:
-error = e
-template.builtins.remove(register)
-if error:
-raise forms.ValidationError(e.args)

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

[Changeset] r14054 - in django/branches/releases/1.2.X: . django/contrib/auth django/contrib/auth/management/commands django/contrib/auth/tests

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 22:36:46 -0500 (Fri, 08 Oct 2010)
New Revision: 14054

Modified:
   django/branches/releases/1.2.X/AUTHORS
   
django/branches/releases/1.2.X/django/contrib/auth/management/commands/createsuperuser.py
   django/branches/releases/1.2.X/django/contrib/auth/models.py
   django/branches/releases/1.2.X/django/contrib/auth/tests/__init__.py
   django/branches/releases/1.2.X/django/contrib/auth/tests/basic.py
Log:
[1.2.X] Fixed #14354 -- Normalized the handling of empty/null passwords in 
contrib.auth. This also updates the createsuperuser command to be more 
testable, and migrates some auth doctests. Thanks to berryp for the report, and 
Laurent Luce for the patch.

Backport of r14053 from trunk.

Modified: django/branches/releases/1.2.X/AUTHORS
===
--- django/branches/releases/1.2.X/AUTHORS  2010-10-09 03:34:08 UTC (rev 
14053)
+++ django/branches/releases/1.2.X/AUTHORS  2010-10-09 03:36:46 UTC (rev 
14054)
@@ -307,6 +307,7 @@
 Simon Litchfield 
 Daniel Lindsley 
 Trey Long 
+Laurent Luce 
 Martin Mahner 
 Matt McClanahan 
 Stanislaus Madueke

Modified: 
django/branches/releases/1.2.X/django/contrib/auth/management/commands/createsuperuser.py
===
--- 
django/branches/releases/1.2.X/django/contrib/auth/management/commands/createsuperuser.py
   2010-10-09 03:34:08 UTC (rev 14053)
+++ 
django/branches/releases/1.2.X/django/contrib/auth/management/commands/createsuperuser.py
   2010-10-09 03:36:46 UTC (rev 14054)
@@ -41,7 +41,8 @@
 username = options.get('username', None)
 email = options.get('email', None)
 interactive = options.get('interactive')
-
+verbosity = int(options.get('verbosity', 1))
+
 # Do quick and dirty validation if --noinput
 if not interactive:
 if not username or not email:
@@ -79,7 +80,7 @@
 # try/except to trap for a keyboard interrupt and exit gracefully.
 if interactive:
 try:
-
+
 # Get a username
 while 1:
 if not username:
@@ -100,7 +101,7 @@
 else:
 sys.stderr.write("Error: That username is already 
taken.\n")
 username = None
-
+
 # Get an email
 while 1:
 if not email:
@@ -112,7 +113,7 @@
 email = None
 else:
 break
-
+
 # Get a password
 while 1:
 if not password:
@@ -130,6 +131,8 @@
 except KeyboardInterrupt:
 sys.stderr.write("\nOperation cancelled.\n")
 sys.exit(1)
-
+
 User.objects.create_superuser(username, email, password)
-print "Superuser created successfully."
+if verbosity >= 1:
+  self.stdout.write("Superuser created successfully.\n")
+

Modified: django/branches/releases/1.2.X/django/contrib/auth/models.py
===
--- django/branches/releases/1.2.X/django/contrib/auth/models.py
2010-10-09 03:34:08 UTC (rev 14053)
+++ django/branches/releases/1.2.X/django/contrib/auth/models.py
2010-10-09 03:36:46 UTC (rev 14054)
@@ -106,7 +106,6 @@
 """
 Creates and saves a User with the given username, e-mail and password.
 """
-
 now = datetime.datetime.now()
 
 # Normalize the address by lowercasing the domain part of the email
@@ -122,10 +121,7 @@
  is_active=True, is_superuser=False, last_login=now,
  date_joined=now)
 
-if password:
-user.set_password(password)
-else:
-user.set_unusable_password()
+user.set_password(password)
 user.save(using=self._db)
 return user
 
@@ -238,11 +234,14 @@
 return full_name.strip()
 
 def set_password(self, raw_password):
-import random
-algo = 'sha1'
-salt = get_hexdigest(algo, str(random.random()), 
str(random.random()))[:5]
-hsh = get_hexdigest(algo, salt, raw_password)
-self.password = '%s$%s$%s' % (algo, salt, hsh)
+if raw_password is None:
+self.set_unusable_password()
+else:
+import random
+algo = 'sha1'
+salt = get_hexdigest(algo, str(random.random()), 
str(random.random()))[:5]
+hsh = get_hexdigest(algo, salt, raw_password)
+self.password = '%s$%s$%s' % (algo, salt, hsh)
 
 def check_password(self, raw_password):
 """
@@ -265,7 +264,11 @@
 

[Changeset] r14053 - in django/trunk: . django/contrib/auth django/contrib/auth/management/commands django/contrib/auth/tests

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 22:34:08 -0500 (Fri, 08 Oct 2010)
New Revision: 14053

Modified:
   django/trunk/AUTHORS
   django/trunk/django/contrib/auth/management/commands/createsuperuser.py
   django/trunk/django/contrib/auth/models.py
   django/trunk/django/contrib/auth/tests/__init__.py
   django/trunk/django/contrib/auth/tests/basic.py
Log:
Fixed #14354 -- Normalized the handling of empty/null passwords in 
contrib.auth. This also updates the createsuperuser command to be more 
testable, and migrates some auth doctests. Thanks to berryp for the report, and 
Laurent Luce for the patch.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-10-09 03:23:01 UTC (rev 14052)
+++ django/trunk/AUTHORS2010-10-09 03:34:08 UTC (rev 14053)
@@ -310,6 +310,7 @@
 Simon Litchfield 
 Daniel Lindsley 
 Trey Long 
+Laurent Luce 
 Martin Mahner 
 Matt McClanahan 
 Stanislaus Madueke

Modified: 
django/trunk/django/contrib/auth/management/commands/createsuperuser.py
===
--- django/trunk/django/contrib/auth/management/commands/createsuperuser.py 
2010-10-09 03:23:01 UTC (rev 14052)
+++ django/trunk/django/contrib/auth/management/commands/createsuperuser.py 
2010-10-09 03:34:08 UTC (rev 14053)
@@ -41,7 +41,8 @@
 username = options.get('username', None)
 email = options.get('email', None)
 interactive = options.get('interactive')
-
+verbosity = int(options.get('verbosity', 1))
+
 # Do quick and dirty validation if --noinput
 if not interactive:
 if not username or not email:
@@ -79,7 +80,7 @@
 # try/except to trap for a keyboard interrupt and exit gracefully.
 if interactive:
 try:
-
+
 # Get a username
 while 1:
 if not username:
@@ -100,7 +101,7 @@
 else:
 sys.stderr.write("Error: That username is already 
taken.\n")
 username = None
-
+
 # Get an email
 while 1:
 if not email:
@@ -112,7 +113,7 @@
 email = None
 else:
 break
-
+
 # Get a password
 while 1:
 if not password:
@@ -130,6 +131,8 @@
 except KeyboardInterrupt:
 sys.stderr.write("\nOperation cancelled.\n")
 sys.exit(1)
-
+
 User.objects.create_superuser(username, email, password)
-print "Superuser created successfully."
+if verbosity >= 1:
+  self.stdout.write("Superuser created successfully.\n")
+

Modified: django/trunk/django/contrib/auth/models.py
===
--- django/trunk/django/contrib/auth/models.py  2010-10-09 03:23:01 UTC (rev 
14052)
+++ django/trunk/django/contrib/auth/models.py  2010-10-09 03:34:08 UTC (rev 
14053)
@@ -106,7 +106,6 @@
 """
 Creates and saves a User with the given username, e-mail and password.
 """
-
 now = datetime.datetime.now()
 
 # Normalize the address by lowercasing the domain part of the email
@@ -122,10 +121,7 @@
  is_active=True, is_superuser=False, last_login=now,
  date_joined=now)
 
-if password:
-user.set_password(password)
-else:
-user.set_unusable_password()
+user.set_password(password)
 user.save(using=self._db)
 return user
 
@@ -238,11 +234,14 @@
 return full_name.strip()
 
 def set_password(self, raw_password):
-import random
-algo = 'sha1'
-salt = get_hexdigest(algo, str(random.random()), 
str(random.random()))[:5]
-hsh = get_hexdigest(algo, salt, raw_password)
-self.password = '%s$%s$%s' % (algo, salt, hsh)
+if raw_password is None:
+self.set_unusable_password()
+else:
+import random
+algo = 'sha1'
+salt = get_hexdigest(algo, str(random.random()), 
str(random.random()))[:5]
+hsh = get_hexdigest(algo, salt, raw_password)
+self.password = '%s$%s$%s' % (algo, salt, hsh)
 
 def check_password(self, raw_password):
 """
@@ -265,7 +264,11 @@
 self.password = UNUSABLE_PASSWORD
 
 def has_usable_password(self):
-return self.password != UNUSABLE_PASSWORD
+if self.password is None \
+or self.password == UNUSABLE_PASSWORD:
+return False
+else:
+return True
 
 def 

[Changeset] r14052 - in django/branches/releases/1.2.X: . docs/internals

2010-10-08 Thread noreply
Author: ramiro
Date: 2010-10-08 22:23:01 -0500 (Fri, 08 Oct 2010)
New Revision: 14052

Modified:
   django/branches/releases/1.2.X/AUTHORS
   django/branches/releases/1.2.X/docs/internals/committers.txt
Log:
[1.2.X] Added myself to the committers list.

Backport of [14051] from trunk

Modified: django/branches/releases/1.2.X/AUTHORS
===
--- django/branches/releases/1.2.X/AUTHORS  2010-10-09 03:16:22 UTC (rev 
14051)
+++ django/branches/releases/1.2.X/AUTHORS  2010-10-09 03:23:01 UTC (rev 
14052)
@@ -21,6 +21,7 @@
 * Alex Gaynor
 * Andrew Godwin
 * Carl Meyer
+* Ramiro Morales
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -339,7 +340,6 @@
 Andreas Mock 
 Reza Mohammadi 
 Aljosa Mohorovic 
-Ramiro Morales 
 Eric Moritz 
 msaelices 
 Gregor Müllegger 

Modified: django/branches/releases/1.2.X/docs/internals/committers.txt
===
--- django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-09 03:16:22 UTC (rev 14051)
+++ django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-09 03:23:01 UTC (rev 14052)
@@ -137,7 +137,7 @@
 Django / Pinax_ based websites. He enjoys learning more about programming
 languages and system architectures and contributing to open source
 projects. Brian is the host of the `Django Dose`_ podcasts.
-
+
 Brian helped immensely in getting Django's "newforms-admin" branch finished
 in time for Django 1.0; he's now a full committer, continuing to improve on
 the admin and forms system.
@@ -204,9 +204,9 @@
 since 1998 and Django since 2006. He serves on the board of the Python
 Software Foundation and is currently on a leave of absence from a PhD in
 linguistics.
-
-James currently lives in Boston, MA, USA but originally hails from 
-Perth, Western Australia where he attended the same high school as 
+
+James currently lives in Boston, MA, USA but originally hails from
+Perth, Western Australia where he attended the same high school as
 Russell Keith-Magee.
 
 .. _James Tauber: http://jtauber.com/
@@ -217,7 +217,7 @@
 since he found out you don't need to write out your forms by hand.  He has
 a small obsession with compilers.  He's contributed to the ORM, forms,
 admin, and other components of Django.
-
+
 Alex lives in Chicago, IL, but spends most of his time in Troy, NY.
 
 .. _Alex Gaynor: http://alexgaynor.net
@@ -245,6 +245,17 @@
 .. _Carl Meyer: http://www.oddbird.net/about/#hcard-carl
 .. _OddBird: http://www.oddbird.net/
 
+Ramiro Morales
+Ramiro has been reading Django source code and submitting patches since
+mid-2006 after researching for a Python Web tool with matching awesomeness
+and being pointed to it by an old ninja.
+
+A software developer in the electronic transactions industry, he is a
+living proof of the fact that anyone with enough enthusiasm can contribute
+to Django, learning a lot and having fun in the process.
+
+Ramiro lives in Córdoba, Argentina.
+
 Specialists
 ---
 
@@ -279,9 +290,9 @@
 Jeremy lives in Dallas, Texas, USA.
 
 `Simon Meers`_
-Simon discovered Django 0.96 during his Computer Science PhD research and 
-has been developing with it full-time ever since. His core code 
-contributions are mostly in Django's admin application. He is also helping 
+Simon discovered Django 0.96 during his Computer Science PhD research and
+has been developing with it full-time ever since. His core code
+contributions are mostly in Django's admin application. He is also helping
 to improve Django's documentation.
 
 Simon works as a freelance developer based in Wollongong, Australia.

-- 
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] #14424: rel_to undefined in init scope of RelatedFieldWidgetWrapper

2010-10-08 Thread Django
#14424: rel_to undefined in init scope of RelatedFieldWidgetWrapper
--+-
 Reporter:  robhudson |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  1.2   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 While perusing code in the admin I noticed that this variable is undefined
 in the RelatedFieldWidgetWrapper.__init__.  I was on the hunt for
 something else but thought I'd log this as a bug since it'll likely always
 be false...

 {{{

 if can_add_related is None:
 can_add_related = rel_to in self.admin_site._registry
 }}}

 I believe, on cursory glance, that this should be `rel.to` instead.

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

2010-10-08 Thread noreply
Author: ramiro
Date: 2010-10-08 22:16:22 -0500 (Fri, 08 Oct 2010)
New Revision: 14051

Modified:
   django/trunk/AUTHORS
   django/trunk/docs/internals/committers.txt
Log:
Added myself to the committers list.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-10-09 02:57:11 UTC (rev 14050)
+++ django/trunk/AUTHORS2010-10-09 03:16:22 UTC (rev 14051)
@@ -21,6 +21,7 @@
 * Alex Gaynor
 * Andrew Godwin
 * Carl Meyer
+* Ramiro Morales
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -342,7 +343,6 @@
 Andreas Mock 
 Reza Mohammadi 
 Aljosa Mohorovic 
-Ramiro Morales 
 Eric Moritz 
 msaelices 
 Gregor Müllegger 

Modified: django/trunk/docs/internals/committers.txt
===
--- django/trunk/docs/internals/committers.txt  2010-10-09 02:57:11 UTC (rev 
14050)
+++ django/trunk/docs/internals/committers.txt  2010-10-09 03:16:22 UTC (rev 
14051)
@@ -137,7 +137,7 @@
 Django / Pinax_ based websites. He enjoys learning more about programming
 languages and system architectures and contributing to open source
 projects. Brian is the host of the `Django Dose`_ podcasts.
-
+
 Brian helped immensely in getting Django's "newforms-admin" branch finished
 in time for Django 1.0; he's now a full committer, continuing to improve on
 the admin and forms system.
@@ -204,9 +204,9 @@
 since 1998 and Django since 2006. He serves on the board of the Python
 Software Foundation and is currently on a leave of absence from a PhD in
 linguistics.
-
-James currently lives in Boston, MA, USA but originally hails from 
-Perth, Western Australia where he attended the same high school as 
+
+James currently lives in Boston, MA, USA but originally hails from
+Perth, Western Australia where he attended the same high school as
 Russell Keith-Magee.
 
 .. _James Tauber: http://jtauber.com/
@@ -217,7 +217,7 @@
 since he found out you don't need to write out your forms by hand.  He has
 a small obsession with compilers.  He's contributed to the ORM, forms,
 admin, and other components of Django.
-
+
 Alex lives in Chicago, IL, but spends most of his time in Troy, NY.
 
 .. _Alex Gaynor: http://alexgaynor.net
@@ -245,6 +245,17 @@
 .. _Carl Meyer: http://www.oddbird.net/about/#hcard-carl
 .. _OddBird: http://www.oddbird.net/
 
+Ramiro Morales
+Ramiro has been reading Django source code and submitting patches since
+mid-2006 after researching for a Python Web tool with matching awesomeness
+and being pointed to it by an old ninja.
+
+A software developer in the electronic transactions industry, he is a
+living proof of the fact that anyone with enough enthusiasm can contribute
+to Django, learning a lot and having fun in the process.
+
+Ramiro lives in Córdoba, Argentina.
+
 Specialists
 ---
 
@@ -279,9 +290,9 @@
 Jeremy lives in Dallas, Texas, USA.
 
 `Simon Meers`_
-Simon discovered Django 0.96 during his Computer Science PhD research and 
-has been developing with it full-time ever since. His core code 
-contributions are mostly in Django's admin application. He is also helping 
+Simon discovered Django 0.96 during his Computer Science PhD research and
+has been developing with it full-time ever since. His core code
+contributions are mostly in Django's admin application. He is also helping
 to improve Django's documentation.
 
 Simon works as a freelance developer based in Wollongong, Australia.

-- 
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] r14050 - django/branches/releases/1.2.X/docs/ref/models

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-08 21:57:11 -0500 (Fri, 08 Oct 2010)
New Revision: 14050

Modified:
   django/branches/releases/1.2.X/docs/ref/models/fields.txt
Log:
[1.2.X] Fixed #5537 -- document trailing '+' on related_name for supressing 
backward relation.

Thanks to dcramer for the report, and Russ for pointing out the workaround.

Backport of r14049 from trunk.


Modified: django/branches/releases/1.2.X/docs/ref/models/fields.txt
===
--- django/branches/releases/1.2.X/docs/ref/models/fields.txt   2010-10-09 
02:54:48 UTC (rev 14049)
+++ django/branches/releases/1.2.X/docs/ref/models/fields.txt   2010-10-09 
02:57:11 UTC (rev 14050)
@@ -925,6 +925,15 @@
 `; and when you do so
 :ref:`some special syntax ` is available.
 
+If you wish to supress the provision of a backwards relation, you may
+simply provide a ``related_name`` which ends with a '+' character.
+For example::
+   
+user = models.ForeignKey(User, related_name='+')
+
+will ensure that no backwards relation to this model is provided on the 
+``User`` model.
+
 .. attribute:: ForeignKey.to_field
 
 The field on the related object that the relation is to. By default, Django

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

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-08 21:54:48 -0500 (Fri, 08 Oct 2010)
New Revision: 14049

Modified:
   django/trunk/docs/ref/models/fields.txt
Log:
Fixed #5537 -- document trailing '+' on related_name for supressing backward 
relation.

Thanks to dcramer for the report, and Russ for pointing out the workaround.


Modified: django/trunk/docs/ref/models/fields.txt
===
--- django/trunk/docs/ref/models/fields.txt 2010-10-09 02:11:18 UTC (rev 
14048)
+++ django/trunk/docs/ref/models/fields.txt 2010-10-09 02:54:48 UTC (rev 
14049)
@@ -925,6 +925,15 @@
 `; and when you do so
 :ref:`some special syntax ` is available.
 
+If you wish to supress the provision of a backwards relation, you may
+simply provide a ``related_name`` which ends with a '+' character.
+For example::
+   
+user = models.ForeignKey(User, related_name='+')
+
+will ensure that no backwards relation to this model is provided on the 
+``User`` model.
+
 .. attribute:: ForeignKey.to_field
 
 The field on the related object that the relation is to. By default, Django

-- 
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] #5537: Remove Reverse Lookups on ForeignKeys/ManyToMany

2010-10-08 Thread Django
#5537: Remove Reverse Lookups on ForeignKeys/ManyToMany
+---
  Reporter:  dcramer| Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by DrMeers):

 I think you mean '''end''' {{{related_name}}} with a '+'

-- 
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] r14048 - in django/branches/releases/1.2.X: . docs/internals

2010-10-08 Thread noreply
Author: carljm
Date: 2010-10-08 21:11:18 -0500 (Fri, 08 Oct 2010)
New Revision: 14048

Modified:
   django/branches/releases/1.2.X/AUTHORS
   django/branches/releases/1.2.X/docs/internals/committers.txt
Log:
[1.2.X] Added myself to committers. Backport of [14047].

Modified: django/branches/releases/1.2.X/AUTHORS
===
--- django/branches/releases/1.2.X/AUTHORS  2010-10-09 01:47:42 UTC (rev 
14047)
+++ django/branches/releases/1.2.X/AUTHORS  2010-10-09 02:11:18 UTC (rev 
14048)
@@ -20,6 +20,7 @@
 * James Tauber
 * Alex Gaynor
 * Andrew Godwin
+* Carl Meyer
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -331,7 +332,6 @@
 Tobias McNulty 
 Zain Memon
 Christian Metts
-Carl Meyer 
 mic...@plovarna.cz
 Slawek Mikula 
 mitakum...@gmail.com

Modified: django/branches/releases/1.2.X/docs/internals/committers.txt
===
--- django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-09 01:47:42 UTC (rev 14047)
+++ django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-09 02:11:18 UTC (rev 14048)
@@ -233,6 +233,18 @@
 
 .. _Andrew Godwin: http://www.aeracode.org/
 
+`Carl Meyer`_
+Carl has been working with Django since 2007 (long enough to remember
+queryset-refactor, but not magic-removal), and works as a freelance
+developer with OddBird_ and Eldarion_. He became a Django contributor by
+accident, because fixing bugs is more interesting than working around
+them.
+
+Carl lives in Elkhart, IN, USA.
+
+.. _Carl Meyer: http://www.oddbird.net/about/#hcard-carl
+.. _OddBird: http://www.oddbird.net/
+
 Specialists
 ---
 

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

2010-10-08 Thread noreply
Author: carljm
Date: 2010-10-08 20:47:42 -0500 (Fri, 08 Oct 2010)
New Revision: 14047

Modified:
   django/trunk/AUTHORS
   django/trunk/docs/internals/committers.txt
Log:
Added myself to contributors.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-10-08 23:55:38 UTC (rev 14046)
+++ django/trunk/AUTHORS2010-10-09 01:47:42 UTC (rev 14047)
@@ -20,6 +20,7 @@
 * James Tauber
 * Alex Gaynor
 * Andrew Godwin
+* Carl Meyer
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -334,7 +335,6 @@
 Tobias McNulty 
 Zain Memon
 Christian Metts
-Carl Meyer 
 mic...@plovarna.cz
 Slawek Mikula 
 mitakum...@gmail.com

Modified: django/trunk/docs/internals/committers.txt
===
--- django/trunk/docs/internals/committers.txt  2010-10-08 23:55:38 UTC (rev 
14046)
+++ django/trunk/docs/internals/committers.txt  2010-10-09 01:47:42 UTC (rev 
14047)
@@ -233,6 +233,18 @@
 
 .. _Andrew Godwin: http://www.aeracode.org/
 
+`Carl Meyer`_
+Carl has been working with Django since 2007 (long enough to remember
+queryset-refactor, but not magic-removal), and works as a freelance
+developer with OddBird_ and Eldarion_. He became a Django contributor by
+accident, because fixing bugs is more interesting than working around
+them.
+
+Carl lives in Elkhart, IN, USA.
+
+.. _Carl Meyer: http://www.oddbird.net/about/#hcard-carl
+.. _OddBird: http://www.oddbird.net/
+
 Specialists
 ---
 

-- 
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] #14416: ImageField forms require an enctype, not documented

2010-10-08 Thread Django
#14416: ImageField forms require an enctype, not documented
+---
  Reporter:  airstrike  | Owner:  nobody
  
Status:  closed | Milestone:
  
 Component:  Documentation  |   Version:
  
Resolution:  worksforme |  Keywords:  ImageField enctype form 
HTML
 Stage:  Unreviewed | Has_patch:  0 
  
Needs_docs:  0  |   Needs_tests:  0 
  
Needs_better_patch:  0  |  
+---
Changes (by gremmie):

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

-- 
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] #13812: [patch] Change the way BaseContext maintains the dicts

2010-10-08 Thread Django
#13812: [patch] Change the way BaseContext maintains the dicts
--+-
  Reporter:  suzaku   | Owner:  suzaku  
Status:  closed   | Milestone:  1.3 
 Component:  Template system  |   Version:  1.2 
Resolution:  fixed|  Keywords:  template context
 Stage:  Unreviewed   | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by Alex):

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

Comment:

 This was fixed as a result of the work that brought us template
 compilation.

-- 
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] r14046 - in django/branches/releases/1.2.X: . django/db/models tests/modeltests/order_with_respect_to

2010-10-08 Thread noreply
Author: Alex
Date: 2010-10-08 18:55:38 -0500 (Fri, 08 Oct 2010)
New Revision: 14046

Modified:
   django/branches/releases/1.2.X/AUTHORS
   django/branches/releases/1.2.X/django/db/models/base.py
   
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py
   
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py
Log:
[1.2.X] Fixed #13241.  order_with_respect_to now works with ForeignKeys who 
refer to their model lazily (i.e. with a string).  Thanks to Gabriel Grant for 
the patch.  This is a backport of [14045].

Modified: django/branches/releases/1.2.X/AUTHORS
===
--- django/branches/releases/1.2.X/AUTHORS  2010-10-08 23:54:43 UTC (rev 
14045)
+++ django/branches/releases/1.2.X/AUTHORS  2010-10-08 23:55:38 UTC (rev 
14046)
@@ -197,6 +197,7 @@
 David Gouldin 
 pradeep.go...@gmail.com
 Collin Grady 
+Gabriel Grant 
 Simon Greenhill 
 Owen Griffiths
 Espen Grindhaug 

Modified: django/branches/releases/1.2.X/django/db/models/base.py
===
--- django/branches/releases/1.2.X/django/db/models/base.py 2010-10-08 
23:54:43 UTC (rev 14045)
+++ django/branches/releases/1.2.X/django/db/models/base.py 2010-10-08 
23:55:38 UTC (rev 14046)
@@ -5,7 +5,8 @@
 from django.core.exceptions import ObjectDoesNotExist, 
MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS
 from django.core import validators
 from django.db.models.fields import AutoField, FieldDoesNotExist
-from django.db.models.fields.related import OneToOneRel, ManyToOneRel, 
OneToOneField
+from django.db.models.fields.related import (OneToOneRel, ManyToOneRel,
+OneToOneField, add_lazy_relation)
 from django.db.models.query import delete_objects, Q
 from django.db.models.query_utils import CollectedObjects, DeferredAttribute
 from django.db.models.options import Options
@@ -223,8 +224,25 @@
 if opts.order_with_respect_to:
 cls.get_next_in_order = curry(cls._get_next_or_previous_in_order, 
is_next=True)
 cls.get_previous_in_order = 
curry(cls._get_next_or_previous_in_order, is_next=False)
-setattr(opts.order_with_respect_to.rel.to, 'get_%s_order' % 
cls.__name__.lower(), curry(method_get_order, cls))
-setattr(opts.order_with_respect_to.rel.to, 'set_%s_order' % 
cls.__name__.lower(), curry(method_set_order, cls))
+# defer creating accessors on the foreign class until we are
+# certain it has been created
+def make_foreign_order_accessors(field, model, cls):
+setattr(
+field.rel.to,
+'get_%s_order' % cls.__name__.lower(),
+curry(method_get_order, cls)
+)
+setattr(
+field.rel.to,
+'set_%s_order' % cls.__name__.lower(),
+curry(method_set_order, cls)
+)
+add_lazy_relation(
+cls,
+opts.order_with_respect_to,
+opts.order_with_respect_to.rel.to,
+make_foreign_order_accessors
+)
 
 # Give the class a docstring -- its definition.
 if cls.__doc__ is None:

Modified: 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py
===
--- 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py 
2010-10-08 23:54:43 UTC (rev 14045)
+++ 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py 
2010-10-08 23:55:38 UTC (rev 14046)
@@ -17,3 +17,13 @@
 
 def __unicode__(self):
 return unicode(self.text)
+
+class Post(models.Model):
+title = models.CharField(max_length=200)
+parent = models.ForeignKey("self", related_name="children", null=True)
+
+class Meta:
+order_with_respect_to = "parent"
+
+def __unicode__(self):
+return self.title

Modified: 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py
===
--- 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py  
2010-10-08 23:54:43 UTC (rev 14045)
+++ 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py  
2010-10-08 23:55:38 UTC (rev 14046)
@@ -2,7 +2,7 @@
 
 from django.test import TestCase
 
-from models import Question, Answer
+from models import Post, Question, Answer
 
 
 class OrderWithRespectToTests(TestCase):
@@ -60,3 +60,12 @@
 ],
 attrgetter("text")
 )
+
+def test_recursive_ordering(self):
+p1 = Post.objects.create(title='1')
+p2 = 

[Changeset] r14045 - in django/trunk: . django/db/models tests/modeltests/order_with_respect_to

2010-10-08 Thread noreply
Author: Alex
Date: 2010-10-08 18:54:43 -0500 (Fri, 08 Oct 2010)
New Revision: 14045

Modified:
   django/trunk/AUTHORS
   django/trunk/django/db/models/base.py
   django/trunk/tests/modeltests/order_with_respect_to/models.py
   django/trunk/tests/modeltests/order_with_respect_to/tests.py
Log:
Fixed #13241.  order_with_respect_to now works with ForeignKeys who refer to 
their model lazily (i.e. with a string).  Thanks to Gabriel Grant for the patch.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-10-08 23:48:07 UTC (rev 14044)
+++ django/trunk/AUTHORS2010-10-08 23:54:43 UTC (rev 14045)
@@ -198,6 +198,7 @@
 David Gouldin 
 pradeep.go...@gmail.com
 Collin Grady 
+Gabriel Grant 
 Simon Greenhill 
 Owen Griffiths
 Espen Grindhaug 

Modified: django/trunk/django/db/models/base.py
===
--- django/trunk/django/db/models/base.py   2010-10-08 23:48:07 UTC (rev 
14044)
+++ django/trunk/django/db/models/base.py   2010-10-08 23:54:43 UTC (rev 
14045)
@@ -5,7 +5,8 @@
 from django.core.exceptions import ObjectDoesNotExist, 
MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS
 from django.core import validators
 from django.db.models.fields import AutoField, FieldDoesNotExist
-from django.db.models.fields.related import OneToOneRel, ManyToOneRel, 
OneToOneField
+from django.db.models.fields.related import (OneToOneRel, ManyToOneRel,
+OneToOneField, add_lazy_relation)
 from django.db.models.query import delete_objects, Q
 from django.db.models.query_utils import CollectedObjects, DeferredAttribute
 from django.db.models.options import Options
@@ -223,8 +224,25 @@
 if opts.order_with_respect_to:
 cls.get_next_in_order = curry(cls._get_next_or_previous_in_order, 
is_next=True)
 cls.get_previous_in_order = 
curry(cls._get_next_or_previous_in_order, is_next=False)
-setattr(opts.order_with_respect_to.rel.to, 'get_%s_order' % 
cls.__name__.lower(), curry(method_get_order, cls))
-setattr(opts.order_with_respect_to.rel.to, 'set_%s_order' % 
cls.__name__.lower(), curry(method_set_order, cls))
+# defer creating accessors on the foreign class until we are
+# certain it has been created
+def make_foreign_order_accessors(field, model, cls):
+setattr(
+field.rel.to,
+'get_%s_order' % cls.__name__.lower(),
+curry(method_get_order, cls)
+)
+setattr(
+field.rel.to,
+'set_%s_order' % cls.__name__.lower(),
+curry(method_set_order, cls)
+)
+add_lazy_relation(
+cls,
+opts.order_with_respect_to,
+opts.order_with_respect_to.rel.to,
+make_foreign_order_accessors
+)
 
 # Give the class a docstring -- its definition.
 if cls.__doc__ is None:

Modified: django/trunk/tests/modeltests/order_with_respect_to/models.py
===
--- django/trunk/tests/modeltests/order_with_respect_to/models.py   
2010-10-08 23:48:07 UTC (rev 14044)
+++ django/trunk/tests/modeltests/order_with_respect_to/models.py   
2010-10-08 23:54:43 UTC (rev 14045)
@@ -17,3 +17,13 @@
 
 def __unicode__(self):
 return unicode(self.text)
+
+class Post(models.Model):
+title = models.CharField(max_length=200)
+parent = models.ForeignKey("self", related_name="children", null=True)
+
+class Meta:
+order_with_respect_to = "parent"
+
+def __unicode__(self):
+return self.title

Modified: django/trunk/tests/modeltests/order_with_respect_to/tests.py
===
--- django/trunk/tests/modeltests/order_with_respect_to/tests.py
2010-10-08 23:48:07 UTC (rev 14044)
+++ django/trunk/tests/modeltests/order_with_respect_to/tests.py
2010-10-08 23:54:43 UTC (rev 14045)
@@ -2,7 +2,7 @@
 
 from django.test import TestCase
 
-from models import Question, Answer
+from models import Post, Question, Answer
 
 
 class OrderWithRespectToTests(TestCase):
@@ -60,3 +60,12 @@
 ],
 attrgetter("text")
 )
+
+def test_recursive_ordering(self):
+p1 = Post.objects.create(title='1')
+p2 = Post.objects.create(title='2')
+p1_1 = Post.objects.create(title="1.1", parent=p1)
+p1_2 = Post.objects.create(title="1.2", parent=p1)
+p2_1 = Post.objects.create(title="2.1", parent=p2)
+p1_3 = Post.objects.create(title="1.3", parent=p1)
+self.assertEqual(p1.get_post_order(), 

[Changeset] r14044 - django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to

2010-10-08 Thread noreply
Author: Alex
Date: 2010-10-08 18:48:07 -0500 (Fri, 08 Oct 2010)
New Revision: 14044

Added:
   
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py
Modified:
   
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py
Log:
[1.2.X] Converted order_with_respect_to to unittests.  We have always been at 
war with doctests.  Backport of [14043].

Modified: 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py
===
--- 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py 
2010-10-08 23:47:11 UTC (rev 14043)
+++ 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/models.py 
2010-10-08 23:48:07 UTC (rev 14044)
@@ -4,6 +4,7 @@
 
 from django.db import models
 
+
 class Question(models.Model):
 text = models.CharField(max_length=200)
 
@@ -16,63 +17,3 @@
 
 def __unicode__(self):
 return unicode(self.text)
-
-__test__ = {'API_TESTS': """
->>> q1 = Question(text="Which Beatle starts with the letter 'R'?")
->>> q1.save()
->>> q2 = Question(text="What is your name?")
->>> q2.save()
->>> Answer(text="John", question=q1).save()
->>> Answer(text="Jonno",question=q2).save()
->>> Answer(text="Paul", question=q1).save()
->>> Answer(text="Paulo", question=q2).save()
->>> Answer(text="George", question=q1).save()
->>> Answer(text="Ringo", question=q1).save()
-
-The answers will always be ordered in the order they were inserted.
-
->>> q1.answer_set.all()
-[, , , ]
-
-We can retrieve the answers related to a particular object, in the order
-they were created, once we have a particular object.
-
->>> a1 = Answer.objects.filter(question=q1)[0]
->>> a1
-
->>> a2 = a1.get_next_in_order()
->>> a2
-
->>> a4 = list(Answer.objects.filter(question=q1))[-1]
->>> a4
-
->>> a4.get_previous_in_order()
-
-
-Determining (and setting) the ordering for a particular item is also possible.
-
->>> id_list = [o.pk for o in q1.answer_set.all()]
->>> a2.question.get_answer_order() == id_list
-True
-
->>> a5 = Answer(text="Number five", question=q1)
->>> a5.save()
-
-It doesn't matter which answer we use to check the order, it will always be 
the same.
-
->>> a2.question.get_answer_order() == a5.question.get_answer_order()
-True
-
-The ordering can be altered:
-
->>> id_list = [o.pk for o in q1.answer_set.all()]
->>> x = id_list.pop()
->>> id_list.insert(-1, x)
->>> a5.question.get_answer_order() == id_list
-False
->>> a5.question.set_answer_order(id_list)
->>> q1.answer_set.all()
-[, , , , 
]
-
-"""
-}

Added: 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py
===
--- 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py  
(rev 0)
+++ 
django/branches/releases/1.2.X/tests/modeltests/order_with_respect_to/tests.py  
2010-10-08 23:48:07 UTC (rev 14044)
@@ -0,0 +1,62 @@
+from operator import attrgetter
+
+from django.test import TestCase
+
+from models import Question, Answer
+
+
+class OrderWithRespectToTests(TestCase):
+def test_basic(self):
+q1 = Question.objects.create(text="Which Beatle starts with the letter 
'R'?")
+q2 = Question.objects.create(text="What is your name?")
+
+Answer.objects.create(text="John", question=q1)
+Answer.objects.create(text="Jonno", question=q2)
+Answer.objects.create(text="Paul", question=q1)
+Answer.objects.create(text="Paulo", question=q2)
+Answer.objects.create(text="George", question=q1)
+Answer.objects.create(text="Ringo", question=q1)
+
+# The answers will always be ordered in the order they were inserted.
+self.assertQuerysetEqual(
+q1.answer_set.all(), [
+"John", "Paul", "George", "Ringo",
+],
+attrgetter("text"),
+)
+
+# We can retrieve the answers related to a particular object, in the
+# order they were created, once we have a particular object.
+a1 = Answer.objects.filter(question=q1)[0]
+self.assertEqual(a1.text, "John")
+a2 = a1.get_next_in_order()
+self.assertEqual(a2.text, "Paul")
+a4 = list(Answer.objects.filter(question=q1))[-1]
+self.assertEqual(a4.text, "Ringo")
+self.assertEqual(a4.get_previous_in_order().text, "George")
+
+# Determining (and setting) the ordering for a particular item is also
+# possible.
+id_list = [o.pk for o in q1.answer_set.all()]
+self.assertEqual(a2.question.get_answer_order(), id_list)
+
+a5 = Answer.objects.create(text="Number five", question=q1)
+
+# It doesn't matter which answer we use to check the order, it will
+# always be the same.
+self.assertEqual(
+

[Changeset] r14043 - django/trunk/tests/modeltests/order_with_respect_to

2010-10-08 Thread noreply
Author: Alex
Date: 2010-10-08 18:47:11 -0500 (Fri, 08 Oct 2010)
New Revision: 14043

Added:
   django/trunk/tests/modeltests/order_with_respect_to/tests.py
Modified:
   django/trunk/tests/modeltests/order_with_respect_to/models.py
Log:
Converted order_with_respect_to to unittests.  We have always been at war with 
doctests.

Modified: django/trunk/tests/modeltests/order_with_respect_to/models.py
===
--- django/trunk/tests/modeltests/order_with_respect_to/models.py   
2010-10-08 23:37:48 UTC (rev 14042)
+++ django/trunk/tests/modeltests/order_with_respect_to/models.py   
2010-10-08 23:47:11 UTC (rev 14043)
@@ -4,6 +4,7 @@
 
 from django.db import models
 
+
 class Question(models.Model):
 text = models.CharField(max_length=200)
 
@@ -16,63 +17,3 @@
 
 def __unicode__(self):
 return unicode(self.text)
-
-__test__ = {'API_TESTS': """
->>> q1 = Question(text="Which Beatle starts with the letter 'R'?")
->>> q1.save()
->>> q2 = Question(text="What is your name?")
->>> q2.save()
->>> Answer(text="John", question=q1).save()
->>> Answer(text="Jonno",question=q2).save()
->>> Answer(text="Paul", question=q1).save()
->>> Answer(text="Paulo", question=q2).save()
->>> Answer(text="George", question=q1).save()
->>> Answer(text="Ringo", question=q1).save()
-
-The answers will always be ordered in the order they were inserted.
-
->>> q1.answer_set.all()
-[, , , ]
-
-We can retrieve the answers related to a particular object, in the order
-they were created, once we have a particular object.
-
->>> a1 = Answer.objects.filter(question=q1)[0]
->>> a1
-
->>> a2 = a1.get_next_in_order()
->>> a2
-
->>> a4 = list(Answer.objects.filter(question=q1))[-1]
->>> a4
-
->>> a4.get_previous_in_order()
-
-
-Determining (and setting) the ordering for a particular item is also possible.
-
->>> id_list = [o.pk for o in q1.answer_set.all()]
->>> a2.question.get_answer_order() == id_list
-True
-
->>> a5 = Answer(text="Number five", question=q1)
->>> a5.save()
-
-It doesn't matter which answer we use to check the order, it will always be 
the same.
-
->>> a2.question.get_answer_order() == a5.question.get_answer_order()
-True
-
-The ordering can be altered:
-
->>> id_list = [o.pk for o in q1.answer_set.all()]
->>> x = id_list.pop()
->>> id_list.insert(-1, x)
->>> a5.question.get_answer_order() == id_list
-False
->>> a5.question.set_answer_order(id_list)
->>> q1.answer_set.all()
-[, , , , 
]
-
-"""
-}

Added: django/trunk/tests/modeltests/order_with_respect_to/tests.py
===
--- django/trunk/tests/modeltests/order_with_respect_to/tests.py
(rev 0)
+++ django/trunk/tests/modeltests/order_with_respect_to/tests.py
2010-10-08 23:47:11 UTC (rev 14043)
@@ -0,0 +1,62 @@
+from operator import attrgetter
+
+from django.test import TestCase
+
+from models import Question, Answer
+
+
+class OrderWithRespectToTests(TestCase):
+def test_basic(self):
+q1 = Question.objects.create(text="Which Beatle starts with the letter 
'R'?")
+q2 = Question.objects.create(text="What is your name?")
+
+Answer.objects.create(text="John", question=q1)
+Answer.objects.create(text="Jonno", question=q2)
+Answer.objects.create(text="Paul", question=q1)
+Answer.objects.create(text="Paulo", question=q2)
+Answer.objects.create(text="George", question=q1)
+Answer.objects.create(text="Ringo", question=q1)
+
+# The answers will always be ordered in the order they were inserted.
+self.assertQuerysetEqual(
+q1.answer_set.all(), [
+"John", "Paul", "George", "Ringo",
+],
+attrgetter("text"),
+)
+
+# We can retrieve the answers related to a particular object, in the
+# order they were created, once we have a particular object.
+a1 = Answer.objects.filter(question=q1)[0]
+self.assertEqual(a1.text, "John")
+a2 = a1.get_next_in_order()
+self.assertEqual(a2.text, "Paul")
+a4 = list(Answer.objects.filter(question=q1))[-1]
+self.assertEqual(a4.text, "Ringo")
+self.assertEqual(a4.get_previous_in_order().text, "George")
+
+# Determining (and setting) the ordering for a particular item is also
+# possible.
+id_list = [o.pk for o in q1.answer_set.all()]
+self.assertEqual(a2.question.get_answer_order(), id_list)
+
+a5 = Answer.objects.create(text="Number five", question=q1)
+
+# It doesn't matter which answer we use to check the order, it will
+# always be the same.
+self.assertEqual(
+a2.question.get_answer_order(), a5.question.get_answer_order()
+)
+
+# The ordering can be altered:
+id_list = [o.pk for o in q1.answer_set.all()]
+x = 

Re: [Django] #14354: Check password is not None in User.check_password

2010-10-08 Thread Django
#14354: Check password is not None in User.check_password
-+--
  Reporter:  berryp  | Owner:  laurentluce
Status:  assigned| Milestone:  1.3
 Component:  Authentication  |   Version:  1.2
Resolution:  |  Keywords: 
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by laurentluce):

  * needs_better_patch:  1 => 0

Comment:

 New patch attached:[[BR]]
  * allow empty string in set_password()
  * has_usable_password() returns false if password is '!' or None
  * add unit test set_password(None)
  * add verbosity option to createsuperuser command + unit test
  * output msg to stdout in createsuperuser command + update unit tests

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r14042 - django/branches/releases/1.2.X/docs/topics/forms

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-08 18:37:48 -0500 (Fri, 08 Oct 2010)
New Revision: 14042

Modified:
   django/branches/releases/1.2.X/docs/topics/forms/index.txt
Log:
[1.2.X] Fixed #14023 -- include non_field_errors in example. Thanks to konryd 
for the report and patch.

Backport of r14041 from trunk.


Modified: django/branches/releases/1.2.X/docs/topics/forms/index.txt
===
--- django/branches/releases/1.2.X/docs/topics/forms/index.txt  2010-10-08 
23:32:46 UTC (rev 14041)
+++ django/branches/releases/1.2.X/docs/topics/forms/index.txt  2010-10-08 
23:37:48 UTC (rev 14042)
@@ -210,6 +210,7 @@
 above example::
 
 
+{{ form.non_field_errors }}
 
 {{ form.subject.errors }}
 E-mail subject:

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

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-08 18:32:46 -0500 (Fri, 08 Oct 2010)
New Revision: 14041

Modified:
   django/trunk/docs/topics/forms/index.txt
Log:
Fixed #14023 -- include non_field_errors in example. Thanks to konryd for the 
report and patch.


Modified: django/trunk/docs/topics/forms/index.txt
===
--- django/trunk/docs/topics/forms/index.txt2010-10-08 23:17:14 UTC (rev 
14040)
+++ django/trunk/docs/topics/forms/index.txt2010-10-08 23:32:46 UTC (rev 
14041)
@@ -210,6 +210,7 @@
 above example::
 
 
+{{ form.non_field_errors }}
 
 {{ form.subject.errors }}
 E-mail subject:

-- 
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] r14040 - in django/branches/releases/1.2.X: . docs/internals

2010-10-08 Thread noreply
Author: andrewgodwin
Date: 2010-10-08 18:17:14 -0500 (Fri, 08 Oct 2010)
New Revision: 14040

Modified:
   django/branches/releases/1.2.X/AUTHORS
   django/branches/releases/1.2.X/docs/internals/committers.txt
Log:
[1.2.X] Adding my bio. This is a backport of [14309].


Modified: django/branches/releases/1.2.X/AUTHORS
===
--- django/branches/releases/1.2.X/AUTHORS  2010-10-08 22:55:46 UTC (rev 
14039)
+++ django/branches/releases/1.2.X/AUTHORS  2010-10-08 23:17:14 UTC (rev 
14040)
@@ -19,6 +19,7 @@
 * Jannis Leidel
 * James Tauber
 * Alex Gaynor
+* Andrew Godwin
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.

Modified: django/branches/releases/1.2.X/docs/internals/committers.txt
===
--- django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-08 22:55:46 UTC (rev 14039)
+++ django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-08 23:17:14 UTC (rev 14040)
@@ -222,6 +222,17 @@
 
 .. _Alex Gaynor: http://alexgaynor.net
 
+`Andrew Godwin`_
+Andrew is a freelance Python developer and tinkerer, and has been
+developing against Django since 2007. He graduated from Oxford University
+with a degree in Computer Science, and has become most well known
+in the Django community for his work on South, the schema migrations
+library.
+
+Andrew lives in London, UK.
+
+.. _Andrew Godwin: http://www.aeracode.org/
+
 Specialists
 ---
 

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

2010-10-08 Thread noreply
Author: andrewgodwin
Date: 2010-10-08 17:55:46 -0500 (Fri, 08 Oct 2010)
New Revision: 14039

Modified:
   django/trunk/AUTHORS
   django/trunk/docs/internals/committers.txt
Log:
Adding my bio. Andrew enjoys writing about himself in the third person.


Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-10-08 22:52:41 UTC (rev 14038)
+++ django/trunk/AUTHORS2010-10-08 22:55:46 UTC (rev 14039)
@@ -19,6 +19,7 @@
 * Jannis Leidel
 * James Tauber
 * Alex Gaynor
+* Andrew Godwin
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -191,7 +192,6 @@
 martin.glu...@gmail.com
 Artyom Gnilov 
 Ben Godfrey 
-Andrew Godwin 
 GomoX 
 Guilherme Mesquita Gondim 
 Mario Gonzalez 

Modified: django/trunk/docs/internals/committers.txt
===
--- django/trunk/docs/internals/committers.txt  2010-10-08 22:52:41 UTC (rev 
14038)
+++ django/trunk/docs/internals/committers.txt  2010-10-08 22:55:46 UTC (rev 
14039)
@@ -222,6 +222,17 @@
 
 .. _Alex Gaynor: http://alexgaynor.net
 
+`Andrew Godwin`_
+Andrew is a freelance Python developer and tinkerer, and has been
+developing against Django since 2007. He graduated from Oxford University
+with a degree in Computer Science, and has become most well known
+in the Django community for his work on South, the schema migrations
+library.
+
+Andrew lives in London, UK.
+
+.. _Andrew Godwin: http://www.aeracode.org/
+
 Specialists
 ---
 

-- 
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] r14038 - django/branches/releases/1.2.X/docs/internals

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-08 17:52:41 -0500 (Fri, 08 Oct 2010)
New Revision: 14038

Modified:
   django/branches/releases/1.2.X/docs/internals/committers.txt
Log:
[1.2.X] Added my bio to committers.txt. Backport of [14037]


Modified: django/branches/releases/1.2.X/docs/internals/committers.txt
===
--- django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-08 22:49:46 UTC (rev 14037)
+++ django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-08 22:52:41 UTC (rev 14038)
@@ -255,6 +255,16 @@
 
 Jeremy lives in Dallas, Texas, USA.
 
+`Simon Meers`_
+Simon discovered Django 0.96 during his Computer Science PhD research and 
+has been developing with it full-time ever since. His core code 
+contributions are mostly in Django's admin application. He is also helping 
+to improve Django's documentation.
+
+Simon works as a freelance developer based in Wollongong, Australia.
+
+.. _simon meers: http://simonmeers.com/
+
 Developers Emeritus
 ===
 

-- 
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] r14037 - django/trunk/docs/internals

2010-10-08 Thread noreply
Author: DrMeers
Date: 2010-10-08 17:49:46 -0500 (Fri, 08 Oct 2010)
New Revision: 14037

Modified:
   django/trunk/docs/internals/committers.txt
Log:
Added my bio to committers.txt


Modified: django/trunk/docs/internals/committers.txt
===
--- django/trunk/docs/internals/committers.txt  2010-10-08 21:12:55 UTC (rev 
14036)
+++ django/trunk/docs/internals/committers.txt  2010-10-08 22:49:46 UTC (rev 
14037)
@@ -255,6 +255,16 @@
 
 Jeremy lives in Dallas, Texas, USA.
 
+`Simon Meers`_
+Simon discovered Django 0.96 during his Computer Science PhD research and 
+has been developing with it full-time ever since. His core code 
+contributions are mostly in Django's admin application. He is also helping 
+to improve Django's documentation.
+
+Simon works as a freelance developer based in Wollongong, Australia.
+
+.. _simon meers: http://simonmeers.com/
+
 Developers Emeritus
 ===
 

-- 
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] #14390: set_password functionality outside of the User model

2010-10-08 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  lrekucki
Status:  new  | Milestone:  
 Component:  Authentication   |   Version:  1.2 
Resolution:   |  Keywords:  
 Stage:  Accepted | Has_patch:  0   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by druidjai...@gmail.com):

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

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

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



Re: [Django] #14368: Reverse relation attribute for OneToOneField fails when set to None

2010-10-08 Thread Django
#14368: Reverse relation attribute for OneToOneField fails when set to None
---+
  Reporter:  gsakkis   | Owner:  nobody 
   
Status:  new   | Milestone:  1.3
   
 Component:  Database layer (models, ORM)  |   Version:  1.2
   
Resolution:|  Keywords:  
OneToOneField, bug
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by gruszczy):

 * cc: gruszczy (added)

Comment:

 I have created a unit test for this and a patch, but I don't know, if it
 is any good. I have several concerns. The test looks like this:

 {{{
 first = First.objects.create()
 second = Second.objects.create()
 first.second = second
 first.second = None
 self.assertRaises(Second.DoesNotExist, getattr, first, 'second')
 self.assert_(second.first is None)
 }}}

 and I believe this is an expected behaviour.

 However, if we take the snippet from this ticket:


 {{{
 In [6]: bob = Person.objects.create(age=34)
 In [7]: bobs_soul = Soul.objects.create(person=bob)
 In [8]: bob.soul == bobs_soul
 Out[8]: True
 In [9]: bob.soul = None
 }}}

 then setting bob.soul to None doesn't have any effect, because bob.soul is
 created by a Query, so without changing data in the database you can't
 really affect it. I will post my patch and if someone could point me, how
 it should work, I will be glad to change it the way it should work.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #4976: The contrib.humanize templatetags fail when given None.

2010-10-08 Thread Django
#4976: The contrib.humanize templatetags fail when given None.
---+
  Reporter:  anonymous | Owner: 
Status:  new   | Milestone: 
 Component:  Contrib apps  |   Version:  SVN
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  1 |  
---+
Changes (by alexr):

  * owner:  alexr =>

-- 
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] r14036 - in django/branches/releases/1.2.X: . docs/internals

2010-10-08 Thread noreply
Author: Alex
Date: 2010-10-08 16:12:55 -0500 (Fri, 08 Oct 2010)
New Revision: 14036

Modified:
   django/branches/releases/1.2.X/AUTHORS
   django/branches/releases/1.2.X/docs/internals/committers.txt
Log:
[1.2.X] Added myself to the committers docs.  This is a backport of [14034] and 
[14035].

Modified: django/branches/releases/1.2.X/AUTHORS
===
--- django/branches/releases/1.2.X/AUTHORS  2010-10-08 21:10:57 UTC (rev 
14035)
+++ django/branches/releases/1.2.X/AUTHORS  2010-10-08 21:12:55 UTC (rev 
14036)
@@ -18,6 +18,7 @@
 * Karen Tracey
 * Jannis Leidel
 * James Tauber
+* Alex Gaynor
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -180,7 +181,6 @@
 Jorge Gajon 
 gand...@owca.info
 Marc Garcia 
-Alex Gaynor 
 Andy Gayton 
 Idan Gazit
 ge...@datacollect.com

Modified: django/branches/releases/1.2.X/docs/internals/committers.txt
===
--- django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-08 21:10:57 UTC (rev 14035)
+++ django/branches/releases/1.2.X/docs/internals/committers.txt
2010-10-08 21:12:55 UTC (rev 14036)
@@ -211,6 +211,17 @@
 
 .. _James Tauber: http://jtauber.com/
 
+`Alex Gaynor`_
+Alex is a student at Rensselaer Polytechnic Institute, and is also an
+independent contractor.  He found Django in 2007 and has been addicted ever
+since he found out you don't need to write out your forms by hand.  He has
+a small obsession with compilers.  He's contributed to the ORM, forms,
+admin, and other components of Django.
+
+Alex lives in Chicago, IL, but spends most of his time in Troy, NY.
+
+.. _Alex Gaynor: http://alexgaynor.net
+
 Specialists
 ---
 

-- 
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] r14035 - django/trunk/docs/internals

2010-10-08 Thread noreply
Author: Alex
Date: 2010-10-08 16:10:57 -0500 (Fri, 08 Oct 2010)
New Revision: 14035

Modified:
   django/trunk/docs/internals/committers.txt
Log:
Correct a rather embarrassing typo in my bio.

Modified: django/trunk/docs/internals/committers.txt
===
--- django/trunk/docs/internals/committers.txt  2010-10-08 21:05:39 UTC (rev 
14034)
+++ django/trunk/docs/internals/committers.txt  2010-10-08 21:10:57 UTC (rev 
14035)
@@ -213,10 +213,10 @@
 
 `Alex Gaynor`_
 Alex is a student at Rensselaer Polytechnic Institute, and is also an
-independent contractor.  He found Django in 2007 and has been ever since he
-found out you don't need to write out your forms by hand.  He has a small
-obsession with compilers.  He's contributed to the ORM, forms, admin, and
-other components of Django.
+independent contractor.  He found Django in 2007 and has been addicted ever
+since he found out you don't need to write out your forms by hand.  He has
+a small obsession with compilers.  He's contributed to the ORM, forms,
+admin, and other components of Django.
 
 Alex lives in Chicago, IL, but spends most of his time in Troy, NY.
 

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

2010-10-08 Thread noreply
Author: Alex
Date: 2010-10-08 16:05:39 -0500 (Fri, 08 Oct 2010)
New Revision: 14034

Modified:
   django/trunk/AUTHORS
   django/trunk/docs/internals/committers.txt
Log:
Added myself to the committers docs.

Modified: django/trunk/AUTHORS
===
--- django/trunk/AUTHORS2010-10-08 20:30:02 UTC (rev 14033)
+++ django/trunk/AUTHORS2010-10-08 21:05:39 UTC (rev 14034)
@@ -18,6 +18,7 @@
 * Karen Tracey
 * Jannis Leidel
 * James Tauber
+* Alex Gaynor
 
 More information on the main contributors to Django can be found in
 docs/internals/committers.txt.
@@ -180,7 +181,6 @@
 Jorge Gajon 
 gand...@owca.info
 Marc Garcia 
-Alex Gaynor 
 Andy Gayton 
 Idan Gazit
 ge...@datacollect.com

Modified: django/trunk/docs/internals/committers.txt
===
--- django/trunk/docs/internals/committers.txt  2010-10-08 20:30:02 UTC (rev 
14033)
+++ django/trunk/docs/internals/committers.txt  2010-10-08 21:05:39 UTC (rev 
14034)
@@ -211,6 +211,17 @@
 
 .. _James Tauber: http://jtauber.com/
 
+`Alex Gaynor`_
+Alex is a student at Rensselaer Polytechnic Institute, and is also an
+independent contractor.  He found Django in 2007 and has been ever since he
+found out you don't need to write out your forms by hand.  He has a small
+obsession with compilers.  He's contributed to the ORM, forms, admin, and
+other components of Django.
+
+Alex lives in Chicago, IL, but spends most of his time in Troy, NY.
+
+.. _Alex Gaynor: http://alexgaynor.net
+
 Specialists
 ---
 

-- 
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] #14423: Wrong SQL on exclude with inheritance

2010-10-08 Thread Django
#14423: Wrong SQL on exclude with inheritance
--+-
 Reporter:  PhiR_42   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:  orm exclude inheritance   |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 I came across this on my inherited models. When I exclude using the base
 model qs, I get the expected results but when I do it from the derived
 model the null clause is left out. See below.

 {{{
 class TestBase(models.Model):
 test_field = models.DateField(null = True)

 class TestDerived(TestBase):
 pass
 }}}


 {{{
 >>> TestDerived.objects.create()
 
 >>> TestDerived.objects.create(test_field=datetime.date.today())
 
 >>> TestDerived.objects.exclude(test_field__lt = datetime.date.today())
 []
 >>> TestBase.objects.exclude(test_field__lt = datetime.date.today())
 [, ]
 }}}

 {{{
 >>> TestBase.objects.exclude(test_field__lt =
 datetime.date.today()).query.as_sql()
 ('SELECT `signets_testbase`.`id`, `signets_testbase`.`test_field` FROM
 `signets_testbase` WHERE NOT ((`signets_testbase`.`test_field` < %s  AND
 NOT (`signets_testbase`.`test_field` IS NULL)))', ('2010-10-08',))
 >>> TestDerived.objects.exclude(test_field__lt =
 datetime.date.today()).query.as_sql()
 ('SELECT `signets_testbase`.`id`, `signets_testbase`.`test_field`,
 `signets_testderived`.`testbase_ptr_id` FROM `signets_testderived` INNER
 JOIN `signets_testbase` ON (`signets_testderived`.`testbase_ptr_id` =
 `signets_testbase`.`id`) WHERE NOT (`signets_testbase`.`test_field` < %s
 )', ('2010-10-08',))
 }}}

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

2010-10-08 Thread noreply
Author: adrian
Date: 2010-10-08 15:30:02 -0500 (Fri, 08 Oct 2010)
New Revision: 14033

Modified:
   django/trunk/docs/topics/testing.txt
Log:
Rewrote 'Test with warnings enabled' section of docs/topics/testing.txt from 
[14019] to be clearer

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-10-08 18:26:12 UTC (rev 
14032)
+++ django/trunk/docs/topics/testing.txt2010-10-08 20:30:02 UTC (rev 
14033)
@@ -311,11 +311,11 @@
 
 .. admonition:: Test with warnings enabled
 
-It is a good idea to run your tests with ``python -Wall manage.py
-test``. This will allow you to catch any deprecation warnings that
-might be in your code. Django (as well as many other libraries) use
-warnings to flag when features are deprecated. It can also flag
-areas in your code that are not strictly wrong, but may benefit
+It's a good idea to run your tests with Python warnings enabled:
+``python -Wall manage.py test``. The ``-Wall`` flag tells Python to
+display deprecation warnings. Django, like many other Python libraries,
+uses these warnings to flag when features are going away. It also might
+flag areas in your code that aren't strictly wrong but could benefit
 from a better implementation.
 
 Running tests outside the test runner

-- 
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] #4102: Allow UPDATE of only specific fields in model.save()

2010-10-08 Thread Django
#4102: Allow UPDATE of only specific fields in model.save()
+---
  Reporter:  Collin Grady   | Owner:  cgrady
Status:  new| Milestone:
 Component:  Database layer (models, ORM)   |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by cgrebs):

 * cc: c...@webshox.org (added)

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #4976: The contrib.humanize templatetags fail when given None.

2010-10-08 Thread Django
#4976: The contrib.humanize templatetags fail when given None.
---+
  Reporter:  anonymous | Owner:  alexr
Status:  new   | Milestone:   
 Component:  Contrib apps  |   Version:  SVN  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  1
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  1 |  
---+
Changes (by adamnelson):

  * needs_better_patch:  0 => 1

Comment:

 Some of these changes are already in 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] #3583: cookie-based modpython / apache authentication

2010-10-08 Thread Django
#3583: cookie-based modpython / apache authentication
+---
  Reporter:  midfield   | Owner:
 
Status:  closed | Milestone:
 
 Component:  Contrib apps   |   Version:  SVN   
 
Resolution:  wontfix|  Keywords:  
authentication modpython apache
 Stage:  Accepted   | Has_patch:  1 
 
Needs_docs:  0  |   Needs_tests:  0 
 
Needs_better_patch:  0  |  
+---
Changes (by adamnelson):

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

Comment:

 No activity on this, no champion, and mod_python is deprecated.  Seems
 like there's no point in keeping this ticket open.

-- 
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] #14405: problem in login view

2010-10-08 Thread Django
#14405: problem in login view
-+--
  Reporter:  bayazee | Owner:  nobody
Status:  new | Milestone:  1.3   
 Component:  Authentication  |   Version:  1.2   
Resolution:  |  Keywords:  login 
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Comment (by christandiono):

 I'm not sure what you're saying. What, exactly, is the problem with using
 more than one IF statement? Due to short circuit evaluation no code will
 be evaluated that doesn't need to be, unless someone decides to try
 something funny and POSTs as an authenticated user or something else
 weird.

-- 
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] #1919: filter truncatewords wipes newlines from string, so not chainable with markup filters

2010-10-08 Thread Django
#1919: filter truncatewords wipes newlines from string, so not chainable with
markup filters
--+-
  Reporter:  derelm   | Owner:  nobody  
Status:  reopened | Milestone:  
 Component:  Template system  |   Version:  SVN 
Resolution:   |  Keywords:  sprintsept14
 Stage:  Accepted | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  1|  
--+-
Changes (by adamnelson):

  * needs_better_patch:  0 => 1

Comment:

 Trunk has changed since patch was uploaded.

-- 
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] r14032 - django/trunk/django/conf

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 13:26:12 -0500 (Fri, 08 Oct 2010)
New Revision: 14032

Modified:
   django/trunk/django/conf/global_settings.py
Log:
Fixed links to the date formats choices in the global settings. Thanks, Russell.

Modified: django/trunk/django/conf/global_settings.py
===
--- django/trunk/django/conf/global_settings.py 2010-10-08 17:54:40 UTC (rev 
14031)
+++ django/trunk/django/conf/global_settings.py 2010-10-08 18:26:12 UTC (rev 
14032)
@@ -292,34 +292,34 @@
 FORMAT_MODULE_PATH = None
 
 # Default formatting for date objects. See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 DATE_FORMAT = 'N j, Y'
 
 # Default formatting for datetime objects. See all available format strings 
here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 DATETIME_FORMAT = 'N j, Y, P'
 
 # Default formatting for time objects. See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 TIME_FORMAT = 'P'
 
 # Default formatting for date objects when only the year and month are 
relevant.
 # See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 YEAR_MONTH_FORMAT = 'F Y'
 
 # Default formatting for date objects when only the month and day are relevant.
 # See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 MONTH_DAY_FORMAT = 'F j'
 
 # Default short formatting for date objects. See all available format strings 
here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 SHORT_DATE_FORMAT = 'm/d/Y'
 
 # Default short formatting for datetime objects.
 # See all available format strings here:
-# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
 SHORT_DATETIME_FORMAT = 'm/d/Y P'
 
 # Default formats to be used when parsing dates from input boxes, in order

-- 
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] #14101: Localized DecimalField doesn't accept localized input

2010-10-08 Thread Django
#14101: Localized DecimalField doesn't accept localized input
---+
  Reporter:  dfoerster | Owner:  nobody  
Status:  new   | Milestone:  
 Component:  Internationalization  |   Version:  1.2 
Resolution:|  Keywords:  localize
 Stage:  Unreviewed| Has_patch:  0   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by michelts):

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

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

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



Re: [Django] #14405: problem in login view

2010-10-08 Thread Django
#14405: problem in login view
-+--
  Reporter:  bayazee | Owner:  nobody
Status:  new | Milestone:  1.3   
 Component:  Authentication  |   Version:  1.2   
Resolution:  |  Keywords:  login 
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Comment (by bayazee):

 Huum. But i think exclusive ORs is not good idea here.
 If you trace possible states you see if a user already authenticated more
 than one IF will be run, and if a user not authenticated we run some IFs
 with exclusive ORs that in some cases 2nd part will be executed too.
 so i think using one IF check is not bad and is inevitable

-- 
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] r14031 - in django/branches/releases/1.2.X/tests: modeltests/model_package regressiontests/urlpatterns_reverse

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 12:54:40 -0500 (Fri, 08 Oct 2010)
New Revision: 14031

Modified:
   django/branches/releases/1.2.X/tests/modeltests/model_package/tests.py
   
django/branches/releases/1.2.X/tests/regressiontests/urlpatterns_reverse/tests.py
Log:
[1.2.X] Fixed a few minor backporting oversights that prevented the tests to 
pass.

Modified: django/branches/releases/1.2.X/tests/modeltests/model_package/tests.py
===
--- django/branches/releases/1.2.X/tests/modeltests/model_package/tests.py  
2010-10-08 17:54:11 UTC (rev 14030)
+++ django/branches/releases/1.2.X/tests/modeltests/model_package/tests.py  
2010-10-08 17:54:40 UTC (rev 14031)
@@ -10,7 +10,6 @@
 __test__ = {'API_TESTS': """
 >>> from models.publication import Publication
 >>> from models.article import Article
->>> from django.contrib.auth.views import Site
 
 >>> p = Publication(title="FooBar")
 >>> p.save()

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/urlpatterns_reverse/tests.py
===
--- 
django/branches/releases/1.2.X/tests/regressiontests/urlpatterns_reverse/tests.py
   2010-10-08 17:54:11 UTC (rev 14030)
+++ 
django/branches/releases/1.2.X/tests/regressiontests/urlpatterns_reverse/tests.py
   2010-10-08 17:54:40 UTC (rev 14031)
@@ -5,7 +5,7 @@
 
 from django.conf import settings
 from django.core.exceptions import ImproperlyConfigured
-from django.core.urlresolvers import reverse, resolve, NoReverseMatch, 
Resolver404
+from django.core.urlresolvers import reverse, resolve, NoReverseMatch, 
Resolver404, RegexURLResolver
 from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect
 from django.shortcuts import redirect
 from django.test import TestCase
@@ -305,7 +305,6 @@
 """Tests for handler404 and handler500"""
 
 def setUp(self):
-from django.core.urlresolvers import RegexURLResolver
 urlconf = 'regressiontests.urlpatterns_reverse.urls_error_handlers'
 urlconf_callables = 
'regressiontests.urlpatterns_reverse.urls_error_handlers_callables'
 self.resolver = RegexURLResolver(r'^$', urlconf)

-- 
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] r14030 - in django/branches/releases/1.2.X: django/db/models/fields tests/regressiontests/datatypes

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 12:54:11 -0500 (Fri, 08 Oct 2010)
New Revision: 14030

Modified:
   django/branches/releases/1.2.X/django/db/models/fields/__init__.py
   django/branches/releases/1.2.X/tests/regressiontests/datatypes/models.py
   django/branches/releases/1.2.X/tests/regressiontests/datatypes/tests.py
Log:
[1.2.X] Fixed #10970 -- Initialize DateFields with datetime.date objects, not 
datetime.datetime. Thanks, summerisgone, Cyberj and Ramiro Morales.

Backport from trunk (r14029).

Modified: django/branches/releases/1.2.X/django/db/models/fields/__init__.py
===
--- django/branches/releases/1.2.X/django/db/models/fields/__init__.py  
2010-10-08 16:14:10 UTC (rev 14029)
+++ django/branches/releases/1.2.X/django/db/models/fields/__init__.py  
2010-10-08 17:54:11 UTC (rev 14030)
@@ -622,7 +622,7 @@
 
 def pre_save(self, model_instance, add):
 if self.auto_now or (self.auto_now_add and add):
-value = datetime.datetime.now()
+value = datetime.date.today()
 setattr(model_instance, self.attname, value)
 return value
 else:
@@ -709,6 +709,14 @@
 except ValueError:
 raise 
exceptions.ValidationError(self.error_messages['invalid'])
 
+def pre_save(self, model_instance, add):
+if self.auto_now or (self.auto_now_add and add):
+value = datetime.datetime.now()
+setattr(model_instance, self.attname, value)
+return value
+else:
+return super(DateTimeField, self).pre_save(model_instance, add)
+
 def get_prep_value(self, value):
 return self.to_python(value)
 

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/datatypes/models.py
===
--- django/branches/releases/1.2.X/tests/regressiontests/datatypes/models.py
2010-10-08 16:14:10 UTC (rev 14029)
+++ django/branches/releases/1.2.X/tests/regressiontests/datatypes/models.py
2010-10-08 17:54:11 UTC (rev 14030)
@@ -19,3 +19,7 @@
 
 def __str__(self):
 return self.name
+
+class RumBaba(models.Model):
+baked_date = models.DateField(auto_now_add=True)
+baked_timestamp = models.DateTimeField(auto_now_add=True)

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/datatypes/tests.py
===
--- django/branches/releases/1.2.X/tests/regressiontests/datatypes/tests.py 
2010-10-08 16:14:10 UTC (rev 14029)
+++ django/branches/releases/1.2.X/tests/regressiontests/datatypes/tests.py 
2010-10-08 17:54:11 UTC (rev 14030)
@@ -3,7 +3,7 @@
 from django.test import TestCase
 from django.utils import tzinfo
 
-from models import Donut
+from models import Donut, RumBaba
 from django.conf import settings
 
 class DataTypesTestCase(TestCase):
@@ -43,7 +43,7 @@
 self.assertEqual(d2.baked_time, datetime.time(16, 19, 59))
 
 def test_year_boundaries(self):
-# Year boundary tests (ticket #3689)
+"""Year boundary tests (ticket #3689)"""
 d = Donut.objects.create(name='Date Test 2007',
  baked_date=datetime.datetime(year=2007, month=12, day=31),
  consumed_at=datetime.datetime(year=2007, month=12, day=31, 
hour=23, minute=59, second=59))
@@ -67,17 +67,27 @@
 self.assertEqual(0, 
Donut.objects.filter(consumed_at__year=2008).count())
 
 def test_textfields_unicode(self):
-# Regression test for #10238: TextField values returned from the 
database
-# should be unicode.
+"""Regression test for #10238: TextField values returned from the
+database should be unicode."""
 d = Donut.objects.create(name=u'Jelly Donut', review=u'Outstanding')
 newd = Donut.objects.get(id=d.id)
 self.assert_(isinstance(newd.review, unicode))
 
 def test_tz_awareness_mysql(self):
-# Regression test for #8354: the MySQL backend should raise an error 
if given
-# a timezone-aware datetime object.
+"""Regression test for #8354: the MySQL backend should raise an error
+if given a timezone-aware datetime object."""
 if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] == 
'django.db.backends.mysql':
 dt = datetime.datetime(2008, 8, 31, 16, 20, 
tzinfo=tzinfo.FixedOffset(0))
 d = Donut(name='Bear claw', consumed_at=dt)
 self.assertRaises(ValueError, d.save)
 # ValueError: MySQL backend does not support timezone-aware 
datetimes.
+
+def test_datefield_auto_now_add(self):
+"""Regression test for #10970, auto_now_add for DateField should store
+a Python datetime.date, not a datetime.datetime"""
+b = RumBaba.objects.create()
+# Verify we didn't break DateTimeField behavior
+self.assert_(isinstance(b.baked_timestamp, datetime.datetime))
+# We 

Re: [Django] #14101: Localized DecimalField doesn't accept localized input

2010-10-08 Thread Django
#14101: Localized DecimalField doesn't accept localized input
---+
  Reporter:  dfoerster | Owner:  nobody  
Status:  new   | Milestone:  
 Component:  Internationalization  |   Version:  1.2 
Resolution:|  Keywords:  localize
 Stage:  Unreviewed| Has_patch:  0   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Comment (by michelts):

 I'm having similar problems. I'm using the pt_BR language code.

 First I tested with django.1.2.3 and trunk version. I make a model form
 with datetime fields and decimal fields. The tests run as follow:

 == Django 1.2.3 ==

   * datetime fields input: ok
   * datetime fields output: ok
   * decimal fields input: ok
   * decimal fields output: not ok

 When using a form for an instance, the original values are not filled
 properly according the locale set. It can be fixed by adding a
 "prepare_value" method on the DecimalField class to convert the original
 output.

 Anyway, even making this change, the correct value will only be picked if
 the Field instance has the localize attribute set to true. I think it
 should localize it always if the USE_L10N is set to true. This way, the
 Field should call the number_format and sanitize_separators methods
 always, these methods can decide is they will convert (USE_L10N is on) or
 not convert (USE_L10N is off) the value.


 ==  Django trunk ==

   * datetime fields input: ok
   * datetime fields output: not ok
   * decimal fields input: ok
   * decimal fields output: not ok

 In the trunk, even the datetime output is not correct. The problem is
 another one.

 There was a fix on the way the formats modules was get, it is now cached.
 Some code was broken during the cache implementation and this way, a
 generic language is used in prior of a specific one when the oppose is
 expected (e. g. pt is used in prior of pt_BR).

 This way, I think there is 3 bugs on this topic:

  1. the DecimalField class should have a prepare_value method to localize
 the number if needed;
  2. the DecimalField to_python method should call sanitize_separators
 always, this method will act only if the USE_L10N is on;
  3. the order of the language picked by the get_format /
 get_format_modules should be fixed to priorize specific languages;

 I can do the work if you agree with my proposes.

 Best regards!

-- 
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] r14029 - in django/trunk: django/db/models/fields tests/regressiontests/datatypes

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 11:14:10 -0500 (Fri, 08 Oct 2010)
New Revision: 14029

Modified:
   django/trunk/django/db/models/fields/__init__.py
   django/trunk/tests/regressiontests/datatypes/models.py
   django/trunk/tests/regressiontests/datatypes/tests.py
Log:
Fixed #10970 -- Initialize DateFields with datetime.date objects, not 
datetime.datetime. Thanks, summerisgone, Cyberj and Ramiro Morales.

Modified: django/trunk/django/db/models/fields/__init__.py
===
--- django/trunk/django/db/models/fields/__init__.py2010-10-08 15:47:09 UTC 
(rev 14028)
+++ django/trunk/django/db/models/fields/__init__.py2010-10-08 16:14:10 UTC 
(rev 14029)
@@ -622,7 +622,7 @@
 
 def pre_save(self, model_instance, add):
 if self.auto_now or (self.auto_now_add and add):
-value = datetime.datetime.now()
+value = datetime.date.today()
 setattr(model_instance, self.attname, value)
 return value
 else:
@@ -709,6 +709,14 @@
 except ValueError:
 raise 
exceptions.ValidationError(self.error_messages['invalid'])
 
+def pre_save(self, model_instance, add):
+if self.auto_now or (self.auto_now_add and add):
+value = datetime.datetime.now()
+setattr(model_instance, self.attname, value)
+return value
+else:
+return super(DateTimeField, self).pre_save(model_instance, add)
+
 def get_prep_value(self, value):
 return self.to_python(value)
 

Modified: django/trunk/tests/regressiontests/datatypes/models.py
===
--- django/trunk/tests/regressiontests/datatypes/models.py  2010-10-08 
15:47:09 UTC (rev 14028)
+++ django/trunk/tests/regressiontests/datatypes/models.py  2010-10-08 
16:14:10 UTC (rev 14029)
@@ -19,3 +19,7 @@
 
 def __str__(self):
 return self.name
+
+class RumBaba(models.Model):
+baked_date = models.DateField(auto_now_add=True)
+baked_timestamp = models.DateTimeField(auto_now_add=True)

Modified: django/trunk/tests/regressiontests/datatypes/tests.py
===
--- django/trunk/tests/regressiontests/datatypes/tests.py   2010-10-08 
15:47:09 UTC (rev 14028)
+++ django/trunk/tests/regressiontests/datatypes/tests.py   2010-10-08 
16:14:10 UTC (rev 14029)
@@ -3,7 +3,7 @@
 from django.test import TestCase
 from django.utils import tzinfo
 
-from models import Donut
+from models import Donut, RumBaba
 from django.conf import settings
 
 class DataTypesTestCase(TestCase):
@@ -43,7 +43,7 @@
 self.assertEqual(d2.baked_time, datetime.time(16, 19, 59))
 
 def test_year_boundaries(self):
-# Year boundary tests (ticket #3689)
+"""Year boundary tests (ticket #3689)"""
 d = Donut.objects.create(name='Date Test 2007',
  baked_date=datetime.datetime(year=2007, month=12, day=31),
  consumed_at=datetime.datetime(year=2007, month=12, day=31, 
hour=23, minute=59, second=59))
@@ -67,17 +67,27 @@
 self.assertEqual(0, 
Donut.objects.filter(consumed_at__year=2008).count())
 
 def test_textfields_unicode(self):
-# Regression test for #10238: TextField values returned from the 
database
-# should be unicode.
+"""Regression test for #10238: TextField values returned from the
+database should be unicode."""
 d = Donut.objects.create(name=u'Jelly Donut', review=u'Outstanding')
 newd = Donut.objects.get(id=d.id)
 self.assert_(isinstance(newd.review, unicode))
 
 def test_tz_awareness_mysql(self):
-# Regression test for #8354: the MySQL backend should raise an error 
if given
-# a timezone-aware datetime object.
+"""Regression test for #8354: the MySQL backend should raise an error
+if given a timezone-aware datetime object."""
 if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] == 
'django.db.backends.mysql':
 dt = datetime.datetime(2008, 8, 31, 16, 20, 
tzinfo=tzinfo.FixedOffset(0))
 d = Donut(name='Bear claw', consumed_at=dt)
 self.assertRaises(ValueError, d.save)
 # ValueError: MySQL backend does not support timezone-aware 
datetimes.
+
+def test_datefield_auto_now_add(self):
+"""Regression test for #10970, auto_now_add for DateField should store
+a Python datetime.date, not a datetime.datetime"""
+b = RumBaba.objects.create()
+# Verify we didn't break DateTimeField behavior
+self.assert_(isinstance(b.baked_timestamp, datetime.datetime))
+# We need to test this this way because datetime.datetime inherits
+# from datetime.date:
+self.assert_(isinstance(b.baked_date, datetime.date) and not 
isinstance(b.baked_date, datetime.datetime))

-- 
You received this message because 

[Changeset] r14028 - django/branches/releases/1.2.X/docs/ref

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:47:09 -0500 (Fri, 08 Oct 2010)
New Revision: 14028

Modified:
   django/branches/releases/1.2.X/docs/ref/generic-views.txt
Log:
[1.2.X] Fixed #14232 -- Clarified the data type of date_list in date-based 
generic views. Thanks to clelland for the report and patch.

Backport of r14020 from trunk.

Modified: django/branches/releases/1.2.X/docs/ref/generic-views.txt
===
--- django/branches/releases/1.2.X/docs/ref/generic-views.txt   2010-10-08 
15:46:49 UTC (rev 14027)
+++ django/branches/releases/1.2.X/docs/ref/generic-views.txt   2010-10-08 
15:47:09 UTC (rev 14028)
@@ -197,10 +197,10 @@
 
 In addition to ``extra_context``, the template's context will be:
 
-* ``date_list``: A list of ``datetime.date`` objects representing all
-  years that have objects available according to ``queryset``. These are
-  ordered in reverse. This is equivalent to
-  ``queryset.dates(date_field, 'year')[::-1]``.
+* ``date_list``: A ``DateQuerySet`` object containing all years that have
+  have objects available according to ``queryset``, represented as
+  ``datetime.datetime`` objects. These are ordered in reverse. This is
+  equivalent to ``queryset.dates(date_field, 'year')[::-1]``.
 
 .. versionchanged:: 1.0
The behaviour depending on ``template_object_name`` is new in this 
version.
@@ -282,9 +282,9 @@
 
 In addition to ``extra_context``, the template's context will be:
 
-* ``date_list``: A list of ``datetime.date`` objects representing all
-  months that have objects available in the given year, according to
-  ``queryset``, in ascending order.
+* ``date_list``: A ``DateQuerySet`` object containing all months that have
+  have objects available according to ``queryset``, represented as
+  ``datetime.datetime`` objects, in ascending order.
 
 * ``year``: The given year, as a four-character string.
 
@@ -372,9 +372,9 @@
 
 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.
+* ``date_list``: A ``DateQuerySet`` object containing all days that have
+  have objects available in the given month, according to ``queryset``,
+  represented as ``datetime.datetime`` objects, in ascending order.
 
 * ``month``: A ``datetime.date`` object representing the given month.
 

-- 
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] r14027 - django/branches/releases/1.2.X/docs/topics

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:46:49 -0500 (Fri, 08 Oct 2010)
New Revision: 14027

Modified:
   django/branches/releases/1.2.X/docs/topics/testing.txt
Log:
[1.2.X] Fixed #14274 -- Added admonition about using -Wall when you run tests. 
Thanks to Eric Holscher for the suggestion and draft, and to timo for 
contributions to the patch.

Backport of r14019 from trunk.

Modified: django/branches/releases/1.2.X/docs/topics/testing.txt
===
--- django/branches/releases/1.2.X/docs/topics/testing.txt  2010-10-08 
15:46:27 UTC (rev 14026)
+++ django/branches/releases/1.2.X/docs/topics/testing.txt  2010-10-08 
15:46:49 UTC (rev 14027)
@@ -309,6 +309,15 @@
 but not gracefully. No details of the tests run before the interruption will
 be reported, and any test databases created by the run will not be destroyed.
 
+.. admonition:: Test with warnings enabled
+
+It is a good idea to run your tests with ``python -Wall manage.py
+test``. This will allow you to catch any deprecation warnings that
+might be in your code. Django (as well as many other libraries) use
+warnings to flag when features are deprecated. It can also flag
+areas in your code that are not strictly wrong, but may benefit
+from a better implementation.
+
 Running tests outside the test runner
 -
 

-- 
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] r14026 - django/branches/releases/1.2.X/docs/ref/forms

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:46:27 -0500 (Fri, 08 Oct 2010)
New Revision: 14026

Modified:
   django/branches/releases/1.2.X/docs/ref/forms/fields.txt
Log:
[1.2.X] Fixed #14375 -- Corrected the capitalization of MultiValueField. Thanks 
to Blue for the report.

Backport of r14018 from trunk.

Modified: django/branches/releases/1.2.X/docs/ref/forms/fields.txt
===
--- django/branches/releases/1.2.X/docs/ref/forms/fields.txt2010-10-08 
15:46:03 UTC (rev 14025)
+++ django/branches/releases/1.2.X/docs/ref/forms/fields.txt2010-10-08 
15:46:27 UTC (rev 14026)
@@ -775,7 +775,7 @@
 ...
 ValidationError: [u'Ensure this value has at most 20 characters (it 
has 28).']
 
-``MultiValuefield``
+``MultiValueField``
 ~~~
 
 .. class:: MultiValueField(**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.



[Changeset] r14025 - in django/branches/releases/1.2.X: django/contrib/markup/templatetags docs/faq docs/internals docs/ref/contrib docs/ref/templates

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:46:03 -0500 (Fri, 08 Oct 2010)
New Revision: 14025

Modified:
   django/branches/releases/1.2.X/django/contrib/markup/templatetags/markup.py
   django/branches/releases/1.2.X/docs/faq/general.txt
   django/branches/releases/1.2.X/docs/internals/contributing.txt
   django/branches/releases/1.2.X/docs/internals/documentation.txt
   django/branches/releases/1.2.X/docs/ref/contrib/markup.txt
   django/branches/releases/1.2.X/docs/ref/templates/builtins.txt
Log:
[1.2.X] Fixed #14383 -- Corrected the capitalization of reStructuredText. 
Thanks to timo for the patch.

Backport of r14017 from trunk.

Modified: 
django/branches/releases/1.2.X/django/contrib/markup/templatetags/markup.py
===
--- django/branches/releases/1.2.X/django/contrib/markup/templatetags/markup.py 
2010-10-08 15:45:33 UTC (rev 14024)
+++ django/branches/releases/1.2.X/django/contrib/markup/templatetags/markup.py 
2010-10-08 15:46:03 UTC (rev 14025)
@@ -8,7 +8,7 @@
 * Markdown, which requires the Python-markdown library from
   http://www.freewisdom.org/projects/python-markdown
 
-* ReStructuredText, which requires docutils from http://docutils.sf.net/
+* reStructuredText, which requires docutils from http://docutils.sf.net/
 """
 
 from django import template

Modified: django/branches/releases/1.2.X/docs/faq/general.txt
===
--- django/branches/releases/1.2.X/docs/faq/general.txt 2010-10-08 15:45:33 UTC 
(rev 14024)
+++ django/branches/releases/1.2.X/docs/faq/general.txt 2010-10-08 15:46:03 UTC 
(rev 14025)
@@ -167,14 +167,14 @@
 ---
 
 The Django docs are available in the ``docs`` directory of each Django tarball
-release. These docs are in ReST (ReStructured Text) format, and each text file
+release. These docs are in reST (reStructuredText) format, and each text file
 corresponds to a Web page on the official Django site.
 
 Because the documentation is `stored in revision control`_, you can browse
 documentation changes just like you can browse code changes.
 
 Technically, the docs on Django's site are generated from the latest 
development
-versions of those ReST documents, so the docs on the Django site may offer more
+versions of those reST documents, so the docs on the Django site may offer more
 information than the docs that come with the latest Django release.
 
 .. _stored in revision control: 
http://code.djangoproject.com/browser/django/trunk/docs

Modified: django/branches/releases/1.2.X/docs/internals/contributing.txt
===
--- django/branches/releases/1.2.X/docs/internals/contributing.txt  
2010-10-08 15:45:33 UTC (rev 14024)
+++ django/branches/releases/1.2.X/docs/internals/contributing.txt  
2010-10-08 15:46:03 UTC (rev 14025)
@@ -700,10 +700,10 @@
 system ` that you should read prior to working on the
 documentation.
 
-Guidelines for ReST files
+Guidelines for reST files
 -
 
-These guidelines regulate the format of our ReST documentation:
+These guidelines regulate the format of our reST documentation:
 
 * In section titles, capitalize only initial words and proper nouns.
 

Modified: django/branches/releases/1.2.X/docs/internals/documentation.txt
===
--- django/branches/releases/1.2.X/docs/internals/documentation.txt 
2010-10-08 15:45:33 UTC (rev 14024)
+++ django/branches/releases/1.2.X/docs/internals/documentation.txt 
2010-10-08 15:46:03 UTC (rev 14025)
@@ -20,7 +20,7 @@
 
 Then, building the html is easy; just ``make html`` from the ``docs`` 
directory.
 
-To get started contributing, you'll want to read the `ReStructuredText
+To get started contributing, you'll want to read the `reStructuredText
 Primer`__. After that, you'll want to read about the `Sphinx-specific markup`__
 that's used to manage metadata, indexing, and cross-references.
 

Modified: django/branches/releases/1.2.X/docs/ref/contrib/markup.txt
===
--- django/branches/releases/1.2.X/docs/ref/contrib/markup.txt  2010-10-08 
15:45:33 UTC (rev 14024)
+++ django/branches/releases/1.2.X/docs/ref/contrib/markup.txt  2010-10-08 
15:46:03 UTC (rev 14025)
@@ -10,7 +10,7 @@
 
 * ``textile`` -- implements `Textile`_ -- requires `PyTextile`_
 * ``markdown`` -- implements `Markdown`_ -- requires `Python-markdown`_
-* ``restructuredtext`` -- implements `ReST (ReStructured Text)`_
+* ``restructuredtext`` -- implements `reST (reStructured Text)`_
   -- requires `doc-utils`_
 
 In each case, the filter expects formatted markup as a string and
@@ -26,12 +26,12 @@
 
 .. _Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29
 .. _Markdown: 

[Changeset] r14024 - django/branches/releases/1.2.X/docs/howto/deployment

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:45:33 -0500 (Fri, 08 Oct 2010)
New Revision: 14024

Modified:
   django/branches/releases/1.2.X/docs/howto/deployment/modwsgi.txt
Log:
[1.2.X] Fixed #14384 -- Updated mod_wsgi docs to match documented best 
practice. Thanks to monokrome for the report and wogan for the patch.

Backport of r14016 from trunk.

Modified: django/branches/releases/1.2.X/docs/howto/deployment/modwsgi.txt
===
--- django/branches/releases/1.2.X/docs/howto/deployment/modwsgi.txt
2010-10-08 15:45:07 UTC (rev 14023)
+++ django/branches/releases/1.2.X/docs/howto/deployment/modwsgi.txt
2010-10-08 15:45:33 UTC (rev 14024)
@@ -47,7 +47,9 @@
 
 If your project is not on your ``PYTHONPATH`` by default you can add::
 
-sys.path.append('/usr/local/django')
+path = '/usr/local/django'
+if path not in sys.path:
+sys.path.append(path)
 
 just above the final ``import`` line to place your project on the path. 
Remember to
 replace 'mysite.settings' with your correct settings file, and 
'/usr/local/django'

-- 
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] r14023 - django/branches/releases/1.2.X/docs/topics/i18n

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:45:07 -0500 (Fri, 08 Oct 2010)
New Revision: 14023

Modified:
   django/branches/releases/1.2.X/docs/topics/i18n/internationalization.txt
Log:
[1.2.X] Fixed #14421 -- Clarified the english in the i18n documentation. Thanks 
to Ned Batchelder for the report and patch.

Backport of r14015 from trunk.

Modified: 
django/branches/releases/1.2.X/docs/topics/i18n/internationalization.txt
===
--- django/branches/releases/1.2.X/docs/topics/i18n/internationalization.txt
2010-10-08 15:44:28 UTC (rev 14022)
+++ django/branches/releases/1.2.X/docs/topics/i18n/internationalization.txt
2010-10-08 15:45:07 UTC (rev 14023)
@@ -387,15 +387,14 @@
 This is {{ book_t }} by {{ author_t }}
 {% endblocktrans %}
 
-This tag is also in charge of handling another functionality: Pluralization.
-To make use of it you should:
+This tag also provides for pluralization. To use it:
 
-* Designate and bind a counter value by using ``count``, such value will
+* Designate and bind a counter value with the name ``count``. This value 
will
   be the one used to select the right plural form.
 
 * Specify both the singular and plural forms separating them with the
-  ``{% plural %}`` tag, which appears within ``{% blocktrans %}`` and
-  ``{% endblocktrans %}``.
+  ``{% plural %}`` tag within the ``{% blocktrans %}`` and
+  ``{% endblocktrans %}`` tags.
 
 An example::
 
@@ -414,7 +413,7 @@
 {% endblocktrans %}
 
 When you both use the pluralization feature and bind values to local variables
-in addition to the counter value, have in mind that the ``blocktrans``
+in addition to the counter value, keep in mind that the ``blocktrans``
 construct is internally converted to an ``ungettext`` call. This means the
 same :ref:`notes regarding ungettext variables `
 apply.

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

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:44:28 -0500 (Fri, 08 Oct 2010)
New Revision: 14022

Added:
   django/branches/releases/1.2.X/docs/releases/1.2.2.txt
Modified:
   django/branches/releases/1.2.X/docs/releases/index.txt
   django/branches/releases/1.2.X/docs/topics/testing.txt
Log:
[1.2.X] Fixed #14225 -- Added a documentation marker (and a 1.2.2 release notes 
file, required to satisfy Sphinx) for the enable_csrf_checks flag on the test 
client. Thanks to pub...@grep.ro for the report.

Backport of r14011 from trunk.

Added: django/branches/releases/1.2.X/docs/releases/1.2.2.txt
===
--- django/branches/releases/1.2.X/docs/releases/1.2.2.txt  
(rev 0)
+++ django/branches/releases/1.2.X/docs/releases/1.2.2.txt  2010-10-08 
15:44:28 UTC (rev 14022)
@@ -0,0 +1,29 @@
+==
+Django 1.2.2 release notes
+==
+
+Welcome to Django 1.2.2!
+
+This is the second "bugfix" release in the Django 1.2 series,
+improving the stability and performance of the Django 1.2 codebase.
+
+Django 1.2.2 maintains backwards compatibility with Django
+1.2.1, but contain a number of fixes and other
+improvements. Django 1.2.2 is a recommended upgrade for any
+development or deployment currently using or targeting Django 1.2.
+
+For full details on the new features, backwards incompatibilities, and
+deprecated features in the 1.2 branch, see the :doc:`/releases/1.2`.
+
+One new feature
+===
+
+Ordinarily, a point release would not include new features, but in the
+case of Django 1.2.2, we have made an exception to this rule.
+
+In order to test a bug fix that forms part of the 1.2.2 release, it
+was necessary to add a feature -- the ``enforce_csrf_checks`` flag --
+to the :mod:`test client `. This flag forces
+the test client to perform full CSRF checks on forms. The default
+behavior of the test client hasn't changed, but if you want to do
+CSRF checks with the test client, it is now possible to do so.

Modified: django/branches/releases/1.2.X/docs/releases/index.txt
===
--- django/branches/releases/1.2.X/docs/releases/index.txt  2010-10-08 
15:43:20 UTC (rev 14021)
+++ django/branches/releases/1.2.X/docs/releases/index.txt  2010-10-08 
15:44:28 UTC (rev 14022)
@@ -19,6 +19,7 @@
 .. toctree::
:maxdepth: 1
 
+   1.2.2
1.2
 
 1.1 release

Modified: django/branches/releases/1.2.X/docs/topics/testing.txt
===
--- django/branches/releases/1.2.X/docs/topics/testing.txt  2010-10-08 
15:43:20 UTC (rev 14021)
+++ django/branches/releases/1.2.X/docs/topics/testing.txt  2010-10-08 
15:44:28 UTC (rev 14022)
@@ -575,6 +575,8 @@
 * By default, the test client will disable any CSRF checks
   performed by your site.
 
+  .. versionadded:: 1.2.2
+
   If, for some reason, you *want* the test client to perform CSRF
   checks, you can create an instance of the test client that
   enforces CSRF checks. To do this, pass in 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] r14021 - django/branches/releases/1.2.X/docs/ref/templates

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 10:43:20 -0500 (Fri, 08 Oct 2010)
New Revision: 14021

Modified:
   django/branches/releases/1.2.X/docs/ref/templates/builtins.txt
Log:
Fixed #13188 -- Moved date format documentation from the now template tag to 
the date filter. Thanks, dwillis and timo.

Backport from trunk (r14013).

Modified: django/branches/releases/1.2.X/docs/ref/templates/builtins.txt
===
--- django/branches/releases/1.2.X/docs/ref/templates/builtins.txt  
2010-10-08 15:38:21 UTC (rev 14020)
+++ django/branches/releases/1.2.X/docs/ref/templates/builtins.txt  
2010-10-08 15:43:20 UTC (rev 14021)
@@ -644,76 +644,13 @@
 now
 ~~~
 
-Display the date, formatted according to the given string.
+Display the current date and/or time, according to the given string.
 
-Uses the same format as PHP's ``date()`` function (http://php.net/date)
-with some custom extensions.
+Given format can be one of the predefined ones ``DATE_FORMAT``,
+``DATETIME_FORMAT``, ``SHORT_DATE_FORMAT`` or ``SHORT_DATETIME_FORMAT``,
+or a custom format, same as the :tfilter:`date` filter. Note that predefined
+formats may vary depending on the current locale.
 
-Available format strings:
-
-    
=
-Format character  Description   Example output
-    
=
-a ``'a.m.'`` or ``'p.m.'`` (Note that   ``'a.m.'``
-  this is slightly different than PHP's
-  output, because this includes periods
-  to match Associated Press style.)
-A ``'AM'`` or ``'PM'``. ``'AM'``
-b Month, textual, 3 letters, lowercase. ``'jan'``
-B Not implemented.
-c ISO 8601 Format.  
``2008-01-02T10:30:00.000123``
-d Day of the month, 2 digits with   ``'01'`` to 
``'31'``
-  leading zeros.
-D Day of the week, textual, 3 letters.  ``'Fri'``
-f Time, in 12-hour hours and minutes,   ``'1'``, 
``'1:30'``
-  with minutes left off if they're zero.
-  Proprietary extension.
-F Month, textual, long. ``'January'``
-g Hour, 12-hour format without leading  ``'1'`` to 
``'12'``
-  zeros.
-G Hour, 24-hour format without leading  ``'0'`` to 
``'23'``
-  zeros.
-h Hour, 12-hour format. ``'01'`` to 
``'12'``
-H Hour, 24-hour format. ``'00'`` to 
``'23'``
-i Minutes.  ``'00'`` to 
``'59'``
-I Not implemented.
-j Day of the month without leading  ``'1'`` to 
``'31'``
-  zeros.
-l Day of the week, textual, long.   ``'Friday'``
-L Boolean for whether it's a leap year. ``True`` or 
``False``
-m Month, 2 digits with leading zeros.   ``'01'`` to 
``'12'``
-M Month, textual, 3 letters.``'Jan'``
-n Month without leading zeros.  ``'1'`` to 
``'12'``
-N Month abbreviation in Associated Press``'Jan.'``, 
``'Feb.'``, ``'March'``, ``'May'``
-  style. Proprietary extension.
-O Difference to Greenwich time in hours.``'+0200'``
-P Time, in 12-hour hours, minutes and   ``'1 a.m.'``, 
``'1:30 p.m.'``, ``'midnight'``, ``'noon'``, ``'12:30 p.m.'``
-  'a.m.'/'p.m.', with minutes left off
-  if they're zero and the special-case
-  strings 'midnight' and 'noon' if
-  appropriate. Proprietary extension.
-r RFC 2822 formatted date.  ``'Thu, 21 Dec 
2000 16:01:07 +0200'``
-s Seconds, 2 digits with leading zeros. ``'00'`` to 
``'59'``
-S English ordinal suffix for day of the ``'st'``, 
``'nd'``, ``'rd'`` or ``'th'``
-  month, 2 characters.
-t Number of days in the given month.``28`` to 
``31``
-T Time zone of this machine.``'EST'``, 
``'MDT'``
-u Microseconds. ``0`` to 
``99``
-U Seconds since the Unix Epoch
-  (January 1 1970 00:00:00 UTC).
-w Day of the week, digits without   ``'0'`` 
(Sunday) to ``'6'`` 

[Changeset] r14020 - django/trunk/docs/ref

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:38:21 -0500 (Fri, 08 Oct 2010)
New Revision: 14020

Modified:
   django/trunk/docs/ref/generic-views.txt
Log:
Fixed #14232 -- Clarified the data type of date_list in date-based generic 
views. Thanks to clelland for the report and patch.

Modified: django/trunk/docs/ref/generic-views.txt
===
--- django/trunk/docs/ref/generic-views.txt 2010-10-08 15:37:59 UTC (rev 
14019)
+++ django/trunk/docs/ref/generic-views.txt 2010-10-08 15:38:21 UTC (rev 
14020)
@@ -205,10 +205,10 @@
 
 In addition to ``extra_context``, the template's context will be:
 
-* ``date_list``: A list of ``datetime.date`` objects representing all
-  years that have objects available according to ``queryset``. These are
-  ordered in reverse. This is equivalent to
-  ``queryset.dates(date_field, 'year')[::-1]``.
+* ``date_list``: A ``DateQuerySet`` object containing all years that have
+  have objects available according to ``queryset``, represented as
+  ``datetime.datetime`` objects. These are ordered in reverse. This is
+  equivalent to ``queryset.dates(date_field, 'year')[::-1]``.
 
 .. versionchanged:: 1.0
The behaviour depending on ``template_object_name`` is new in this 
version.
@@ -290,9 +290,9 @@
 
 In addition to ``extra_context``, the template's context will be:
 
-* ``date_list``: A list of ``datetime.date`` objects representing all
-  months that have objects available in the given year, according to
-  ``queryset``, in ascending order.
+* ``date_list``: A ``DateQuerySet`` object containing all months that have
+  have objects available according to ``queryset``, represented as
+  ``datetime.datetime`` objects, in ascending order.
 
 * ``year``: The given year, as a four-character string.
 
@@ -380,9 +380,9 @@
 
 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.
+* ``date_list``: A ``DateQuerySet`` object containing all days that have
+  have objects available in the given month, according to ``queryset``,
+  represented as ``datetime.datetime`` objects, in ascending order.
 
 * ``month``: A ``datetime.date`` object representing the given month.
 

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

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:37:59 -0500 (Fri, 08 Oct 2010)
New Revision: 14019

Modified:
   django/trunk/docs/topics/testing.txt
Log:
Fixed #14274 -- Added admonition about using -Wall when you run tests. Thanks 
to Eric Holscher for the suggestion and draft, and to timo for contributions to 
the patch.

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-10-08 15:37:38 UTC (rev 
14018)
+++ django/trunk/docs/topics/testing.txt2010-10-08 15:37:59 UTC (rev 
14019)
@@ -309,6 +309,15 @@
 but not gracefully. No details of the tests run before the interruption will
 be reported, and any test databases created by the run will not be destroyed.
 
+.. admonition:: Test with warnings enabled
+
+It is a good idea to run your tests with ``python -Wall manage.py
+test``. This will allow you to catch any deprecation warnings that
+might be in your code. Django (as well as many other libraries) use
+warnings to flag when features are deprecated. It can also flag
+areas in your code that are not strictly wrong, but may benefit
+from a better implementation.
+
 Running tests outside the test runner
 -
 

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

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:37:38 -0500 (Fri, 08 Oct 2010)
New Revision: 14018

Modified:
   django/trunk/docs/ref/forms/fields.txt
Log:
Fixed #14375 -- Corrected the capitalization of MultiValueField. Thanks to Blue 
for the report.

Modified: django/trunk/docs/ref/forms/fields.txt
===
--- django/trunk/docs/ref/forms/fields.txt  2010-10-08 15:37:16 UTC (rev 
14017)
+++ django/trunk/docs/ref/forms/fields.txt  2010-10-08 15:37:38 UTC (rev 
14018)
@@ -775,7 +775,7 @@
 ...
 ValidationError: [u'Ensure this value has at most 20 characters (it 
has 28).']
 
-``MultiValuefield``
+``MultiValueField``
 ~~~
 
 .. class:: MultiValueField(**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.



[Changeset] r14017 - in django/trunk: django/contrib/markup/templatetags docs/faq docs/internals docs/ref/contrib docs/ref/templates

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:37:16 -0500 (Fri, 08 Oct 2010)
New Revision: 14017

Modified:
   django/trunk/django/contrib/markup/templatetags/markup.py
   django/trunk/docs/faq/general.txt
   django/trunk/docs/internals/contributing.txt
   django/trunk/docs/internals/documentation.txt
   django/trunk/docs/ref/contrib/markup.txt
   django/trunk/docs/ref/templates/builtins.txt
Log:
Fixed #14383 -- Corrected the capitalization of reStructuredText. Thanks to 
timo for the patch.

Modified: django/trunk/django/contrib/markup/templatetags/markup.py
===
--- django/trunk/django/contrib/markup/templatetags/markup.py   2010-10-08 
15:36:48 UTC (rev 14016)
+++ django/trunk/django/contrib/markup/templatetags/markup.py   2010-10-08 
15:37:16 UTC (rev 14017)
@@ -8,7 +8,7 @@
 * Markdown, which requires the Python-markdown library from
   http://www.freewisdom.org/projects/python-markdown
 
-* ReStructuredText, which requires docutils from http://docutils.sf.net/
+* reStructuredText, which requires docutils from http://docutils.sf.net/
 """
 
 from django import template

Modified: django/trunk/docs/faq/general.txt
===
--- django/trunk/docs/faq/general.txt   2010-10-08 15:36:48 UTC (rev 14016)
+++ django/trunk/docs/faq/general.txt   2010-10-08 15:37:16 UTC (rev 14017)
@@ -167,14 +167,14 @@
 ---
 
 The Django docs are available in the ``docs`` directory of each Django tarball
-release. These docs are in ReST (ReStructured Text) format, and each text file
+release. These docs are in reST (reStructuredText) format, and each text file
 corresponds to a Web page on the official Django site.
 
 Because the documentation is `stored in revision control`_, you can browse
 documentation changes just like you can browse code changes.
 
 Technically, the docs on Django's site are generated from the latest 
development
-versions of those ReST documents, so the docs on the Django site may offer more
+versions of those reST documents, so the docs on the Django site may offer more
 information than the docs that come with the latest Django release.
 
 .. _stored in revision control: 
http://code.djangoproject.com/browser/django/trunk/docs

Modified: django/trunk/docs/internals/contributing.txt
===
--- django/trunk/docs/internals/contributing.txt2010-10-08 15:36:48 UTC 
(rev 14016)
+++ django/trunk/docs/internals/contributing.txt2010-10-08 15:37:16 UTC 
(rev 14017)
@@ -700,10 +700,10 @@
 system ` that you should read prior to working on the
 documentation.
 
-Guidelines for ReST files
+Guidelines for reST files
 -
 
-These guidelines regulate the format of our ReST documentation:
+These guidelines regulate the format of our reST documentation:
 
 * In section titles, capitalize only initial words and proper nouns.
 

Modified: django/trunk/docs/internals/documentation.txt
===
--- django/trunk/docs/internals/documentation.txt   2010-10-08 15:36:48 UTC 
(rev 14016)
+++ django/trunk/docs/internals/documentation.txt   2010-10-08 15:37:16 UTC 
(rev 14017)
@@ -20,7 +20,7 @@
 
 Then, building the HTML is easy; just ``make html`` from the ``docs`` 
directory.
 
-To get started contributing, you'll want to read the `ReStructuredText
+To get started contributing, you'll want to read the `reStructuredText
 Primer`__. After that, you'll want to read about the `Sphinx-specific markup`__
 that's used to manage metadata, indexing, and cross-references.
 

Modified: django/trunk/docs/ref/contrib/markup.txt
===
--- django/trunk/docs/ref/contrib/markup.txt2010-10-08 15:36:48 UTC (rev 
14016)
+++ django/trunk/docs/ref/contrib/markup.txt2010-10-08 15:37:16 UTC (rev 
14017)
@@ -10,7 +10,7 @@
 
 * ``textile`` -- implements `Textile`_ -- requires `PyTextile`_
 * ``markdown`` -- implements `Markdown`_ -- requires `Python-markdown`_
-* ``restructuredtext`` -- implements `ReST (ReStructured Text)`_
+* ``restructuredtext`` -- implements `reST (reStructured Text)`_
   -- requires `doc-utils`_
 
 In each case, the filter expects formatted markup as a string and
@@ -26,12 +26,12 @@
 
 .. _Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29
 .. _Markdown: http://en.wikipedia.org/wiki/Markdown
-.. _ReST (ReStructured Text): http://en.wikipedia.org/wiki/ReStructuredText
+.. _reST (reStructured Text): http://en.wikipedia.org/wiki/ReStructuredText
 .. _PyTextile: http://loopcore.com/python-textile/
 .. _Python-markdown: http://www.freewisdom.org/projects/python-markdown
 .. _doc-utils: http://docutils.sf.net/
 
-ReStructured Text
+reStructured Text
 -
 
 When using 

[Changeset] r14016 - django/trunk/docs/howto/deployment

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:36:48 -0500 (Fri, 08 Oct 2010)
New Revision: 14016

Modified:
   django/trunk/docs/howto/deployment/modwsgi.txt
Log:
Fixed #14384 -- Updated mod_wsgi docs to match documented best practice. Thanks 
to monokrome for the report and wogan for the patch.

Modified: django/trunk/docs/howto/deployment/modwsgi.txt
===
--- django/trunk/docs/howto/deployment/modwsgi.txt  2010-10-08 15:36:15 UTC 
(rev 14015)
+++ django/trunk/docs/howto/deployment/modwsgi.txt  2010-10-08 15:36:48 UTC 
(rev 14016)
@@ -47,7 +47,9 @@
 
 If your project is not on your ``PYTHONPATH`` by default you can add::
 
-sys.path.append('/usr/local/django')
+path = '/usr/local/django'
+if path not in sys.path:
+sys.path.append(path)
 
 just above the final ``import`` line to place your project on the path. 
Remember to
 replace 'mysite.settings' with your correct settings file, and 
'/usr/local/django'

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

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 10:36:15 -0500 (Fri, 08 Oct 2010)
New Revision: 14015

Modified:
   django/trunk/docs/topics/i18n/internationalization.txt
Log:
Fixed #14421 -- Clarified the english in the i18n documentation. Thanks to Ned 
Batchelder for the report and patch.

Modified: django/trunk/docs/topics/i18n/internationalization.txt
===
--- django/trunk/docs/topics/i18n/internationalization.txt  2010-10-08 
15:33:27 UTC (rev 14014)
+++ django/trunk/docs/topics/i18n/internationalization.txt  2010-10-08 
15:36:15 UTC (rev 14015)
@@ -387,15 +387,14 @@
 This is {{ book_t }} by {{ author_t }}
 {% endblocktrans %}
 
-This tag is also in charge of handling another functionality: Pluralization.
-To make use of it you should:
+This tag also provides for pluralization. To use it:
 
-* Designate and bind a counter value by using ``count``, such value will
+* Designate and bind a counter value with the name ``count``. This value 
will
   be the one used to select the right plural form.
 
 * Specify both the singular and plural forms separating them with the
-  ``{% plural %}`` tag, which appears within ``{% blocktrans %}`` and
-  ``{% endblocktrans %}``.
+  ``{% plural %}`` tag within the ``{% blocktrans %}`` and
+  ``{% endblocktrans %}`` tags.
 
 An example::
 
@@ -414,7 +413,7 @@
 {% endblocktrans %}
 
 When you both use the pluralization feature and bind values to local variables
-in addition to the counter value, have in mind that the ``blocktrans``
+in addition to the counter value, keep in mind that the ``blocktrans``
 construct is internally converted to an ``ungettext`` call. This means the
 same :ref:`notes regarding ungettext variables `
 apply.

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

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 10:33:27 -0500 (Fri, 08 Oct 2010)
New Revision: 14014

Modified:
   django/trunk/docs/conf.py
Log:
Disabled unused Sphinx configuration option that triggered a warning.

Modified: django/trunk/docs/conf.py
===
--- django/trunk/docs/conf.py   2010-10-08 15:33:11 UTC (rev 14013)
+++ django/trunk/docs/conf.py   2010-10-08 15:33:27 UTC (rev 14014)
@@ -125,7 +125,7 @@
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ["_static"]
+#html_static_path = ["_static"]
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.

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

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 10:33:11 -0500 (Fri, 08 Oct 2010)
New Revision: 14013

Modified:
   django/trunk/docs/ref/templates/builtins.txt
Log:
Fixed #13188 -- Moved date format documentation from the now template tag to 
the date filter. Thanks, dwillis and timo.

Modified: django/trunk/docs/ref/templates/builtins.txt
===
--- django/trunk/docs/ref/templates/builtins.txt2010-10-08 15:11:59 UTC 
(rev 14012)
+++ django/trunk/docs/ref/templates/builtins.txt2010-10-08 15:33:11 UTC 
(rev 14013)
@@ -644,76 +644,13 @@
 now
 ~~~
 
-Display the date, formatted according to the given string.
+Display the current date and/or time, according to the given string.
 
-Uses the same format as PHP's ``date()`` function (http://php.net/date)
-with some custom extensions.
+Given format can be one of the predefined ones ``DATE_FORMAT``,
+``DATETIME_FORMAT``, ``SHORT_DATE_FORMAT`` or ``SHORT_DATETIME_FORMAT``,
+or a custom format, same as the :tfilter:`date` filter. Note that predefined
+formats may vary depending on the current locale.
 
-Available format strings:
-
-    
=
-Format character  Description   Example output
-    
=
-a ``'a.m.'`` or ``'p.m.'`` (Note that   ``'a.m.'``
-  this is slightly different than PHP's
-  output, because this includes periods
-  to match Associated Press style.)
-A ``'AM'`` or ``'PM'``. ``'AM'``
-b Month, textual, 3 letters, lowercase. ``'jan'``
-B Not implemented.
-c ISO 8601 Format.  
``2008-01-02T10:30:00.000123``
-d Day of the month, 2 digits with   ``'01'`` to 
``'31'``
-  leading zeros.
-D Day of the week, textual, 3 letters.  ``'Fri'``
-f Time, in 12-hour hours and minutes,   ``'1'``, 
``'1:30'``
-  with minutes left off if they're zero.
-  Proprietary extension.
-F Month, textual, long. ``'January'``
-g Hour, 12-hour format without leading  ``'1'`` to 
``'12'``
-  zeros.
-G Hour, 24-hour format without leading  ``'0'`` to 
``'23'``
-  zeros.
-h Hour, 12-hour format. ``'01'`` to 
``'12'``
-H Hour, 24-hour format. ``'00'`` to 
``'23'``
-i Minutes.  ``'00'`` to 
``'59'``
-I Not implemented.
-j Day of the month without leading  ``'1'`` to 
``'31'``
-  zeros.
-l Day of the week, textual, long.   ``'Friday'``
-L Boolean for whether it's a leap year. ``True`` or 
``False``
-m Month, 2 digits with leading zeros.   ``'01'`` to 
``'12'``
-M Month, textual, 3 letters.``'Jan'``
-n Month without leading zeros.  ``'1'`` to 
``'12'``
-N Month abbreviation in Associated Press``'Jan.'``, 
``'Feb.'``, ``'March'``, ``'May'``
-  style. Proprietary extension.
-O Difference to Greenwich time in hours.``'+0200'``
-P Time, in 12-hour hours, minutes and   ``'1 a.m.'``, 
``'1:30 p.m.'``, ``'midnight'``, ``'noon'``, ``'12:30 p.m.'``
-  'a.m.'/'p.m.', with minutes left off
-  if they're zero and the special-case
-  strings 'midnight' and 'noon' if
-  appropriate. Proprietary extension.
-r RFC 2822 formatted date.  ``'Thu, 21 Dec 
2000 16:01:07 +0200'``
-s Seconds, 2 digits with leading zeros. ``'00'`` to 
``'59'``
-S English ordinal suffix for day of the ``'st'``, 
``'nd'``, ``'rd'`` or ``'th'``
-  month, 2 characters.
-t Number of days in the given month.``28`` to 
``31``
-T Time zone of this machine.``'EST'``, 
``'MDT'``
-u Microseconds. ``0`` to 
``99``
-U Seconds since the Unix Epoch
-  (January 1 1970 00:00:00 UTC).
-w Day of the week, digits without   ``'0'`` 
(Sunday) to ``'6'`` (Saturday)
-  leading zeros.
-W ISO-8601 week number of 

Re: [Django] #14260: conversion of fixtures_regress tests from doctest to unittest format

2010-10-08 Thread Django
#14260: conversion of fixtures_regress tests from doctest to unittest format
+---
  Reporter:  dbrenneman | Owner:  russelm
Status:  closed | Milestone: 
 Component:  Testing framework  |   Version:  1.2
Resolution:  fixed  |  Keywords: 
 Stage:  Unreviewed | Has_patch:  0  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 Fixed in [13954] ([13959] for 1.2.X)

-- 
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] #14240: filesizeformat should localize number

2010-10-08 Thread Django
#14240: filesizeformat should localize number
+---
  Reporter:  David Danier   | Owner:  
anonymous
Status:  assigned   | Milestone:
   
 Component:  Template system|   Version:  
1.2  
Resolution: |  Keywords:
   
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  1 
   
Needs_better_patch:  0  |  
+---
Comment (by David Danier ):

 I'm not sure how to write these. Can you point me into the right
 direction? My first attempt on putting tests into
 regressiontests.defaultfilters seems to have failed because USE_I18N
 and/or USE_L10N is set to False. Then I discovered regressiontests.i18n,
 but there are no filter-tests in there (or at least I haven't found them).

 Apart from that: It seems like formats.number_format() just strips of the
 last digits if the float/decimal has to much decimal places. So some
 existing tests fail using the above patch as 1023.999something will result
 in "1023,9" instead of "1024.0". Is this the intended behavior of
 formats.number_format()? If so I will try to update 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] #14307: Document form ChoiceField tuple

2010-10-08 Thread Django
#14307: Document form ChoiceField tuple
+---
  Reporter:  adamv  | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by russellm):

  * needs_better_patch:  0 => 1
  * stage:  Ready for checkin => Accepted

Comment:

 This is a good start, but isn't quite right. ChoicesField.choices isn't
 require to just be tuples; it can also be a nested structure. The
 documentation for the model Field.choices details this; it would be better
 to reference the model docs for a full description of what is possible.

 Interestingly, the documentation *did* include such a reference when the
 nested groups feature was introduced in [7996]; it must have been lost in
 a refactor along the way.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] r14012 - in django/trunk: django/core/files docs/ref/files tests/regressiontests/file_storage

2010-10-08 Thread noreply
Author: jezdez
Date: 2010-10-08 10:11:59 -0500 (Fri, 08 Oct 2010)
New Revision: 14012

Modified:
   django/trunk/django/core/files/storage.py
   django/trunk/docs/ref/files/storage.txt
   django/trunk/tests/regressiontests/file_storage/tests.py
Log:
Fixed #10497 -- Added a few time-related methods to the storage API. Thanks for 
the report and patch to Stephan Jaekel.

Modified: django/trunk/django/core/files/storage.py
===
--- django/trunk/django/core/files/storage.py   2010-10-08 14:48:04 UTC (rev 
14011)
+++ django/trunk/django/core/files/storage.py   2010-10-08 15:11:59 UTC (rev 
14012)
@@ -2,6 +2,7 @@
 import errno
 import urlparse
 import itertools
+from datetime import datetime
 
 from django.conf import settings
 from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
@@ -120,6 +121,27 @@
 """
 raise NotImplementedError()
 
+def accessed_time(self, name):
+"""
+Returns the last accessed time (as datetime object) of the file
+specified by name.
+"""
+raise NotImplementedError()
+
+def created_time(self, name):
+"""
+Returns the creation time (as datetime object) of the file
+specified by name.
+"""
+raise NotImplementedError()
+
+def modified_time(self, name):
+"""
+Returns the last modified time (as datetime object) of the file
+specified by name.
+"""
+raise NotImplementedError()
+
 class FileSystemStorage(Storage):
 """
 Standard filesystem storage
@@ -220,6 +242,15 @@
 raise ValueError("This file is not accessible via a URL.")
 return urlparse.urljoin(self.base_url, name).replace('\\', '/')
 
+def accessed_time(self, name):
+return datetime.fromtimestamp(os.path.getatime(self.path(name)))
+
+def created_time(self, name):
+return datetime.fromtimestamp(os.path.getctime(self.path(name)))
+
+def modified_time(self, name):
+return datetime.fromtimestamp(os.path.getmtime(self.path(name)))
+
 def get_storage_class(import_path=None):
 if import_path is None:
 import_path = settings.DEFAULT_FILE_STORAGE

Modified: django/trunk/docs/ref/files/storage.txt
===
--- django/trunk/docs/ref/files/storage.txt 2010-10-08 14:48:04 UTC (rev 
14011)
+++ django/trunk/docs/ref/files/storage.txt 2010-10-08 15:11:59 UTC (rev 
14012)
@@ -13,6 +13,33 @@
 ``open()``. For storage systems that aren't accessible from the local
 filesystem, this will raise ``NotImplementedError`` instead.
 
+``Storage.accessed_time(name)``
+~~~
+
+.. versionadded:: 1.3
+
+Returns a ``datetime`` object containing the last accessed time of the file.
+For storage systems that aren't able to return the last accessed time, this
+will raise ``NotImplementedError`` instead.
+
+``Storage.created_time(name)``
+~~
+
+.. versionadded:: 1.3
+
+Returns a ``datetime`` object containing the creation time of the file.
+For storage systems that aren't able to return the creation time, this
+will raise ``NotImplementedError`` instead.
+
+``Storage.modified_time(name)``
+~~~
+
+.. versionadded:: 1.3
+
+Returns a ``datetime`` object containing the last modified time. For storage
+systems that aren't able to return the last modified time, this will raise
+``NotImplementedError`` instead.
+
 ``Storage.size(name)``
 ~~
 

Modified: django/trunk/tests/regressiontests/file_storage/tests.py
===
--- django/trunk/tests/regressiontests/file_storage/tests.py2010-10-08 
14:48:04 UTC (rev 14011)
+++ django/trunk/tests/regressiontests/file_storage/tests.py2010-10-08 
15:11:59 UTC (rev 14012)
@@ -6,6 +6,7 @@
 import time
 import unittest
 from cStringIO import StringIO
+from datetime import datetime, timedelta
 from django.conf import settings
 from django.core.exceptions import SuspiciousOperation
 from django.core.files.base import ContentFile, File
@@ -81,16 +82,16 @@
 
 class FileStorageTests(unittest.TestCase):
 storage_class = FileSystemStorage
-
+
 def setUp(self):
 self.temp_dir = tempfile.mktemp()
 os.makedirs(self.temp_dir)
 self.storage = self.storage_class(location=self.temp_dir,
 base_url='/test_media_url/')
-
+
 def tearDown(self):
 shutil.rmtree(self.temp_dir)
-
+
 def test_file_access_options(self):
 """
 Standard file access options are available, and work as expected.
@@ -104,10 +105,60 @@
 f = self.storage.open('storage_test', 'r')
 self.assertEqual(f.read(), 'storage contents')
 f.close()
-
+
 self.storage.delete('storage_test')
 

Re: [Django] #14405: problem in login view

2010-10-08 Thread Django
#14405: problem in login view
-+--
  Reporter:  bayazee | Owner:  nobody
Status:  new | Milestone:  1.3   
 Component:  Authentication  |   Version:  1.2   
Resolution:  |  Keywords:  login 
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Comment (by christandiono):

 Ah, that's true. A few exclusive ORs might have helped, maybe. I figured
 the second patch might reduce server load a bit.

-- 
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] r14011 - in django/trunk/docs: releases topics

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 09:48:04 -0500 (Fri, 08 Oct 2010)
New Revision: 14011

Added:
   django/trunk/docs/releases/1.2.2.txt
Modified:
   django/trunk/docs/releases/index.txt
   django/trunk/docs/topics/testing.txt
Log:
Fixed #14225 -- Added a documentation marker (and a 1.2.2 release notes file, 
required to satisfy Sphinx) for the enable_csrf_checks flag on the test client. 
Thanks to pub...@grep.ro for the report.

Added: django/trunk/docs/releases/1.2.2.txt
===
--- django/trunk/docs/releases/1.2.2.txt(rev 0)
+++ django/trunk/docs/releases/1.2.2.txt2010-10-08 14:48:04 UTC (rev 
14011)
@@ -0,0 +1,29 @@
+==
+Django 1.2.2 release notes
+==
+
+Welcome to Django 1.2.2!
+
+This is the second "bugfix" release in the Django 1.2 series,
+improving the stability and performance of the Django 1.2 codebase.
+
+Django 1.2.2 maintains backwards compatibility with Django
+1.2.1, but contain a number of fixes and other
+improvements. Django 1.2.2 is a recommended upgrade for any
+development or deployment currently using or targeting Django 1.2.
+
+For full details on the new features, backwards incompatibilities, and
+deprecated features in the 1.2 branch, see the :doc:`/releases/1.2`.
+
+One new feature
+===
+
+Ordinarily, a point release would not include new features, but in the
+case of Django 1.2.2, we have made an exception to this rule.
+
+In order to test a bug fix that forms part of the 1.2.2 release, it
+was necessary to add a feature -- the ``enforce_csrf_checks`` flag --
+to the :mod:`test client `. This flag forces
+the test client to perform full CSRF checks on forms. The default
+behavior of the test client hasn't changed, but if you want to do
+CSRF checks with the test client, it is now possible to do so.

Modified: django/trunk/docs/releases/index.txt
===
--- django/trunk/docs/releases/index.txt2010-10-08 14:17:13 UTC (rev 
14010)
+++ django/trunk/docs/releases/index.txt2010-10-08 14:48:04 UTC (rev 
14011)
@@ -26,6 +26,7 @@
 .. toctree::
:maxdepth: 1
 
+   1.2.2
1.2
 
 1.1 release

Modified: django/trunk/docs/topics/testing.txt
===
--- django/trunk/docs/topics/testing.txt2010-10-08 14:17:13 UTC (rev 
14010)
+++ django/trunk/docs/topics/testing.txt2010-10-08 14:48:04 UTC (rev 
14011)
@@ -575,6 +575,8 @@
 * By default, the test client will disable any CSRF checks
   performed by your site.
 
+  .. versionadded:: 1.2.2
+
   If, for some reason, you *want* the test client to perform CSRF
   checks, you can create an instance of the test client that
   enforces CSRF checks. To do this, pass in 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] r14010 - in django/branches/releases/1.2.X: django/contrib/syndication tests/regressiontests/syndication

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 09:17:13 -0500 (Fri, 08 Oct 2010)
New Revision: 14010

Modified:
   django/branches/releases/1.2.X/django/contrib/syndication/views.py
   django/branches/releases/1.2.X/tests/regressiontests/syndication/tests.py
Log:
[1.2.X] Fixed #13218 -- Ensure that syndicated content served over HTTPS uses 
https:// links by default. Thanks to schaefer for the report, and Ben Firshman 
for the patch.

Backport of r14007 from trunk.

Modified: django/branches/releases/1.2.X/django/contrib/syndication/views.py
===
--- django/branches/releases/1.2.X/django/contrib/syndication/views.py  
2010-10-08 14:16:50 UTC (rev 14009)
+++ django/branches/releases/1.2.X/django/contrib/syndication/views.py  
2010-10-08 14:17:13 UTC (rev 14010)
@@ -8,13 +8,17 @@
 from django.utils.encoding import force_unicode, iri_to_uri, smart_unicode
 from django.utils.html import escape
 
-def add_domain(domain, url):
+def add_domain(domain, url, secure=False):
 if not (url.startswith('http://')
 or url.startswith('https://')
 or url.startswith('mailto:')):
 # 'url' must already be ASCII and URL-quoted, so no need for encoding
 # conversions here.
-url = iri_to_uri(u'http://%s%s' % (domain, url))
+if secure:
+protocol = 'https'
+else:
+protocol = 'http'
+url = iri_to_uri(u'%s://%s%s' % (protocol, domain, url))
 return url
 
 class FeedDoesNotExist(ObjectDoesNotExist):
@@ -94,7 +98,7 @@
 current_site = get_current_site(request)
 
 link = self.__get_dynamic_attr('link', obj)
-link = add_domain(current_site.domain, link)
+link = add_domain(current_site.domain, link, request.is_secure())
 
 feed = self.feed_type(
 title = self.__get_dynamic_attr('title', obj),
@@ -102,8 +106,11 @@
 link = link,
 description = self.__get_dynamic_attr('description', obj),
 language = settings.LANGUAGE_CODE.decode(),
-feed_url = add_domain(current_site.domain,
-self.__get_dynamic_attr('feed_url', obj) or request.path),
+feed_url = add_domain(
+current_site.domain,
+self.__get_dynamic_attr('feed_url', obj) or request.path,
+request.is_secure(),
+),
 author_name = self.__get_dynamic_attr('author_name', obj),
 author_link = self.__get_dynamic_attr('author_link', obj),
 author_email = self.__get_dynamic_attr('author_email', obj),
@@ -137,7 +144,11 @@
 description = description_tmp.render(RequestContext(request, 
{'obj': item, 'site': current_site}))
 else:
 description = self.__get_dynamic_attr('item_description', item)
-link = add_domain(current_site.domain, 
self.__get_dynamic_attr('item_link', item))
+link = add_domain(
+current_site.domain,
+self.__get_dynamic_attr('item_link', item),
+request.is_secure(),
+)
 enc = None
 enc_url = self.__get_dynamic_attr('item_enclosure_url', item)
 if enc_url:

Modified: 
django/branches/releases/1.2.X/tests/regressiontests/syndication/tests.py
===
--- django/branches/releases/1.2.X/tests/regressiontests/syndication/tests.py   
2010-10-08 14:16:50 UTC (rev 14009)
+++ django/branches/releases/1.2.X/tests/regressiontests/syndication/tests.py   
2010-10-08 14:17:13 UTC (rev 14010)
@@ -236,6 +236,25 @@
 if link.getAttribute('rel') == 'self':
 self.assertEqual(link.getAttribute('href'), 
'http://example.com/customfeedurl/')
 
+def test_secure_urls(self):
+"""
+Test URLs are prefixed with https:// when feed is requested over HTTPS.
+"""
+response = self.client.get('/syndication/rss2/', **{
+'wsgi.url_scheme': 'https',
+})
+doc = minidom.parseString(response.content)
+chan = doc.getElementsByTagName('channel')[0]
+self.assertEqual(
+chan.getElementsByTagName('link')[0].firstChild.wholeText[0:5],
+'https'
+)
+atom_link = chan.getElementsByTagName('atom:link')[0]
+self.assertEqual(atom_link.getAttribute('href')[0:5], 'https')
+for link in doc.getElementsByTagName('link'):
+if link.getAttribute('rel') == 'self':
+self.assertEqual(link.getAttribute('href')[0:5], 'https')
+
 def test_item_link_error(self):
 """
 Test that a ImproperlyConfigured is raised if no link could be found
@@ -271,6 +290,10 @@
 'http://example.com/foo/?arg=value'
 )
 self.assertEqual(
+views.add_domain('example.com', '/foo/?arg=value', True),
+

[Changeset] r14009 - django/branches/releases/1.2.X/docs/ref/contrib/gis

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 09:16:50 -0500 (Fri, 08 Oct 2010)
New Revision: 14009

Modified:
   django/branches/releases/1.2.X/docs/ref/contrib/gis/tutorial.txt
Log:
[1.2.X] Fixed #14221 -- Cleaned up some text in the GIS tutorial. Thanks to 
Grant  for the report.

Backport of r14006 from trunk.

Modified: django/branches/releases/1.2.X/docs/ref/contrib/gis/tutorial.txt
===
--- django/branches/releases/1.2.X/docs/ref/contrib/gis/tutorial.txt
2010-10-08 14:16:29 UTC (rev 14008)
+++ django/branches/releases/1.2.X/docs/ref/contrib/gis/tutorial.txt
2010-10-08 14:16:50 UTC (rev 14009)
@@ -25,10 +25,10 @@
 please consult the :ref:`installation documentation `
 for more details.
 
-This tutorial is going to guide you through guide the user through the creation
-of a geographic web application for viewing the `world borders`_. [#]_  Some of
-the code used in this tutorial is taken from and/or inspired by the
-`GeoDjango basic apps`_ project. [#]_
+This tutorial will guide you through the creation of a geographic web
+application for viewing the `world borders`_. [#]_ Some of the code
+used in this tutorial is taken from and/or inspired by the `GeoDjango
+basic apps`_ project. [#]_
 
 .. note::
 

-- 
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] r14008 - django/branches/releases/1.2.X/django/db

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 09:16:29 -0500 (Fri, 08 Oct 2010)
New Revision: 14008

Modified:
   django/branches/releases/1.2.X/django/db/utils.py
Log:
[1.2.X] Fixed #14381 -- Clarified exception handling when instantiating 
Routers. Thanks to dauerbaustelle for the suggestion and patch.

Backport of r14005 from trunk.

Modified: django/branches/releases/1.2.X/django/db/utils.py
===
--- django/branches/releases/1.2.X/django/db/utils.py   2010-10-08 14:14:05 UTC 
(rev 14007)
+++ django/branches/releases/1.2.X/django/db/utils.py   2010-10-08 14:16:29 UTC 
(rev 14008)
@@ -111,9 +111,11 @@
 except ImportError, e:
 raise ImproperlyConfigured('Error importing database 
router %s: "%s"' % (klass_name, e))
 try:
-router = getattr(module, klass_name)()
+router_class = getattr(module, klass_name)
 except AttributeError:
 raise ImproperlyConfigured('Module "%s" does not define a 
database router name "%s"' % (module, klass_name))
+else:
+router = router_class()
 else:
 router = r
 self.routers.append(router)

-- 
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] r14007 - in django/trunk: django/contrib/syndication tests/regressiontests/syndication

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 09:14:05 -0500 (Fri, 08 Oct 2010)
New Revision: 14007

Modified:
   django/trunk/django/contrib/syndication/views.py
   django/trunk/tests/regressiontests/syndication/tests.py
Log:
Fixed #13218 -- Ensure that syndicated content served over HTTPS uses https:// 
links by default. Thanks to schaefer for the report, and Ben Firshman for the 
patch.

Modified: django/trunk/django/contrib/syndication/views.py
===
--- django/trunk/django/contrib/syndication/views.py2010-10-08 14:13:44 UTC 
(rev 14006)
+++ django/trunk/django/contrib/syndication/views.py2010-10-08 14:14:05 UTC 
(rev 14007)
@@ -8,13 +8,17 @@
 from django.utils.encoding import force_unicode, iri_to_uri, smart_unicode
 from django.utils.html import escape
 
-def add_domain(domain, url):
+def add_domain(domain, url, secure=False):
 if not (url.startswith('http://')
 or url.startswith('https://')
 or url.startswith('mailto:')):
 # 'url' must already be ASCII and URL-quoted, so no need for encoding
 # conversions here.
-url = iri_to_uri(u'http://%s%s' % (domain, url))
+if secure:
+protocol = 'https'
+else:
+protocol = 'http'
+url = iri_to_uri(u'%s://%s%s' % (protocol, domain, url))
 return url
 
 class FeedDoesNotExist(ObjectDoesNotExist):
@@ -94,7 +98,7 @@
 current_site = get_current_site(request)
 
 link = self.__get_dynamic_attr('link', obj)
-link = add_domain(current_site.domain, link)
+link = add_domain(current_site.domain, link, request.is_secure())
 
 feed = self.feed_type(
 title = self.__get_dynamic_attr('title', obj),
@@ -102,8 +106,11 @@
 link = link,
 description = self.__get_dynamic_attr('description', obj),
 language = settings.LANGUAGE_CODE.decode(),
-feed_url = add_domain(current_site.domain,
-self.__get_dynamic_attr('feed_url', obj) or request.path),
+feed_url = add_domain(
+current_site.domain,
+self.__get_dynamic_attr('feed_url', obj) or request.path,
+request.is_secure(),
+),
 author_name = self.__get_dynamic_attr('author_name', obj),
 author_link = self.__get_dynamic_attr('author_link', obj),
 author_email = self.__get_dynamic_attr('author_email', obj),
@@ -137,7 +144,11 @@
 description = description_tmp.render(RequestContext(request, 
{'obj': item, 'site': current_site}))
 else:
 description = self.__get_dynamic_attr('item_description', item)
-link = add_domain(current_site.domain, 
self.__get_dynamic_attr('item_link', item))
+link = add_domain(
+current_site.domain,
+self.__get_dynamic_attr('item_link', item),
+request.is_secure(),
+)
 enc = None
 enc_url = self.__get_dynamic_attr('item_enclosure_url', item)
 if enc_url:

Modified: django/trunk/tests/regressiontests/syndication/tests.py
===
--- django/trunk/tests/regressiontests/syndication/tests.py 2010-10-08 
14:13:44 UTC (rev 14006)
+++ django/trunk/tests/regressiontests/syndication/tests.py 2010-10-08 
14:14:05 UTC (rev 14007)
@@ -236,6 +236,25 @@
 if link.getAttribute('rel') == 'self':
 self.assertEqual(link.getAttribute('href'), 
'http://example.com/customfeedurl/')
 
+def test_secure_urls(self):
+"""
+Test URLs are prefixed with https:// when feed is requested over HTTPS.
+"""
+response = self.client.get('/syndication/rss2/', **{
+'wsgi.url_scheme': 'https',
+})
+doc = minidom.parseString(response.content)
+chan = doc.getElementsByTagName('channel')[0]
+self.assertEqual(
+chan.getElementsByTagName('link')[0].firstChild.wholeText[0:5],
+'https'
+)
+atom_link = chan.getElementsByTagName('atom:link')[0]
+self.assertEqual(atom_link.getAttribute('href')[0:5], 'https')
+for link in doc.getElementsByTagName('link'):
+if link.getAttribute('rel') == 'self':
+self.assertEqual(link.getAttribute('href')[0:5], 'https')
+
 def test_item_link_error(self):
 """
 Test that a ImproperlyConfigured is raised if no link could be found
@@ -271,6 +290,10 @@
 'http://example.com/foo/?arg=value'
 )
 self.assertEqual(
+views.add_domain('example.com', '/foo/?arg=value', True),
+'https://example.com/foo/?arg=value'
+)
+self.assertEqual(
 views.add_domain('example.com', 'http://djangoproject.com/doc/'),
 'http://djangoproject.com/doc/'
   

[Changeset] r14006 - django/trunk/docs/ref/contrib/gis

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 09:13:44 -0500 (Fri, 08 Oct 2010)
New Revision: 14006

Modified:
   django/trunk/docs/ref/contrib/gis/tutorial.txt
Log:
Fixed #14221 -- Cleaned up some text in the GIS tutorial. Thanks to Grant 
 for the report.

Modified: django/trunk/docs/ref/contrib/gis/tutorial.txt
===
--- django/trunk/docs/ref/contrib/gis/tutorial.txt  2010-10-08 13:56:54 UTC 
(rev 14005)
+++ django/trunk/docs/ref/contrib/gis/tutorial.txt  2010-10-08 14:13:44 UTC 
(rev 14006)
@@ -25,10 +25,10 @@
 please consult the :ref:`installation documentation `
 for more details.
 
-This tutorial is going to guide you through guide the user through the creation
-of a geographic web application for viewing the `world borders`_. [#]_  Some of
-the code used in this tutorial is taken from and/or inspired by the
-`GeoDjango basic apps`_ project. [#]_
+This tutorial will guide you through the creation of a geographic web
+application for viewing the `world borders`_. [#]_ Some of the code
+used in this tutorial is taken from and/or inspired by the `GeoDjango
+basic apps`_ project. [#]_
 
 .. note::
 

-- 
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] #14374: Missing templates on contrib.auth makes tests in a new project fail (startproject)

2010-10-08 Thread Django
#14374: Missing templates on contrib.auth makes tests in a new project fail
(startproject)
+---
  Reporter:  henriquebastos | Owner:  nobody
Status:  closed | Milestone:  1.3   
 Component:  Contrib apps   |   Version:  1.2   
Resolution:  fixed  |  Keywords:  startproject auth test
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by Alex):

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

Comment:

 Fixed in [14003].

-- 
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] #14258: Document that 1.3 has added an index to the session date field and a migration is recommended

2010-10-08 Thread Django
#14258: Document that 1.3 has added an index to the session date field and a
migration is recommended
+---
  Reporter:  SmileyChris| Owner:  nobody
Status:  new| Milestone:  1.3   
 Component:  Documentation  |   Version:
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 Chris - Following up your comment from #14231 -- Why does this need to be
 out of trunk? Isn't our normal release notes the right place for this?
 It's just a recommended (but not madatory) step if you're upgrading, isn't
 it?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #13: Related objects interface should be tighter (edit_inline)

2010-10-08 Thread Django
#13: Related objects interface should be tighter (edit_inline)
---+
  Reporter:  adrian| Owner:  barbuza
   
Status:  reopened  | Milestone: 
   
 Component:  django.contrib.admin  |   Version:  SVN
   
Resolution:|  Keywords:  nfa-someday 
nfa-changelist
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  1 |  
---+
Changes (by anonymous):

  * status:  closed => reopened
  * resolution:  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] #13: Related objects interface should be tighter (edit_inline)

2010-10-08 Thread Django
#13: Related objects interface should be tighter (edit_inline)
---+
  Reporter:  adrian| Owner:  barbuza
   
Status:  closed| Milestone: 
   
 Component:  django.contrib.admin  |   Version:  SVN
   
Resolution:  fixed |  Keywords:  nfa-someday 
nfa-changelist
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  1 |  
---+
Changes (by anonymous):

  * status:  reopened => closed
  * resolution:  => 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.



[Changeset] r14005 - django/trunk/django/db

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 08:56:54 -0500 (Fri, 08 Oct 2010)
New Revision: 14005

Modified:
   django/trunk/django/db/utils.py
Log:
Fixed #14381 -- Clarified exception handling when instantiating Routers. Thanks 
to dauerbaustelle for the suggestion and patch.

Modified: django/trunk/django/db/utils.py
===
--- django/trunk/django/db/utils.py 2010-10-08 13:53:25 UTC (rev 14004)
+++ django/trunk/django/db/utils.py 2010-10-08 13:56:54 UTC (rev 14005)
@@ -111,9 +111,11 @@
 except ImportError, e:
 raise ImproperlyConfigured('Error importing database 
router %s: "%s"' % (klass_name, e))
 try:
-router = getattr(module, klass_name)()
+router_class = getattr(module, klass_name)
 except AttributeError:
 raise ImproperlyConfigured('Module "%s" does not define a 
database router name "%s"' % (module, klass_name))
+else:
+router = router_class()
 else:
 router = r
 self.routers.append(router)

-- 
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] r14004 - django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 08:53:25 -0500 (Fri, 08 Oct 2010)
New Revision: 14004

Added:
   
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/logged_out.html
   
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/password_change_form.html
Log:
Backport of r14003 from trunk.

Added: 
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/logged_out.html
===
--- 
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/logged_out.html
 (rev 0)
+++ 
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/logged_out.html
 2010-10-08 13:53:25 UTC (rev 14004)
@@ -0,0 +1 @@
+Logged out
\ No newline at end of file

Added: 
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/password_change_form.html
===
--- 
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/password_change_form.html
   (rev 0)
+++ 
django/branches/releases/1.2.X/django/contrib/auth/tests/templates/registration/password_change_form.html
   2010-10-08 13:53:25 UTC (rev 14004)
@@ -0,0 +1 @@
+{{ form }}
\ No newline at end of file

-- 
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] r14003 - django/trunk/django/contrib/auth/tests/templates/registration

2010-10-08 Thread noreply
Author: russellm
Date: 2010-10-08 08:50:54 -0500 (Fri, 08 Oct 2010)
New Revision: 14003

Added:
   django/trunk/django/contrib/auth/tests/templates/registration/logged_out.html
   
django/trunk/django/contrib/auth/tests/templates/registration/password_change_form.html
Log:
#14374 -- Added some missing template files to ensure that contrib.auth tests 
will pass when admin isn't installed. Thanks to henriquebastos for the report 
and patch.

Added: 
django/trunk/django/contrib/auth/tests/templates/registration/logged_out.html
===
--- 
django/trunk/django/contrib/auth/tests/templates/registration/logged_out.html   
(rev 0)
+++ 
django/trunk/django/contrib/auth/tests/templates/registration/logged_out.html   
2010-10-08 13:50:54 UTC (rev 14003)
@@ -0,0 +1 @@
+Logged out
\ No newline at end of file

Added: 
django/trunk/django/contrib/auth/tests/templates/registration/password_change_form.html
===
--- 
django/trunk/django/contrib/auth/tests/templates/registration/password_change_form.html
 (rev 0)
+++ 
django/trunk/django/contrib/auth/tests/templates/registration/password_change_form.html
 2010-10-08 13:50:54 UTC (rev 14003)
@@ -0,0 +1 @@
+{{ form }}
\ No newline at end of file

-- 
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] #14240: filesizeformat should localize number

2010-10-08 Thread Django
#14240: filesizeformat should localize number
+---
  Reporter:  David Danier   | Owner:  
anonymous
Status:  assigned   | Milestone:
   
 Component:  Template system|   Version:  
1.2  
Resolution: |  Keywords:
   
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  1 
   
Needs_better_patch:  0  |  
+---
Changes (by russellm):

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

Comment:

 A reasonable suggestion, but the patch needs tests.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #14421: Fix the English on an internationalization doc page

2010-10-08 Thread Django
#14421: Fix the English on an internationalization doc page
+---
  Reporter:  nedbatchelder  | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * 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] #14421: Fix the English on an internationalization doc page

2010-10-08 Thread Django
#14421: Fix the English on an internationalization doc page
+---
  Reporter:  nedbatchelder  | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by nedbatchelder):

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

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #14422: Fix the English on an internationalization doc page

2010-10-08 Thread Django
#14422: Fix the English on an internationalization doc page
+---
  Reporter:  nedbatchelder  | Owner:  nobody
Status:  closed | Milestone:
 Component:  Documentation  |   Version:  1.2   
Resolution:  duplicate  |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by nedbatchelder):

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

Comment:

 sorry, submitted twice...

-- 
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] #14422: Fix the English on an internationalization doc page

2010-10-08 Thread Django
#14422: Fix the English on an internationalization doc page
---+
 Reporter:  nedbatchelder  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  1  |  
---+
 The international guys are doing a good job giving us i18n support, the
 least we can do is help them with English...

-- 
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] #14421: Fix the English on an internationalization doc page

2010-10-08 Thread Django
#14421: Fix the English on an internationalization doc page
---+
 Reporter:  nedbatchelder  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Documentation  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 The international guys are doing a good job giving us i18n support, the
 least we can do is help them with English...

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