[Changeset] r10959 - in django/branches/soc2009/admin-ui/django/contrib/admin: media/css templates/admin/edit_inline

2009-06-08 Thread noreply

Author: zain
Date: 2009-06-08 23:57:26 -0500 (Mon, 08 Jun 2009)
New Revision: 10959

Modified:
   django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css
   
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
Log:
[soc2009/admin-ui] Better styling for Selector Inlines, and proper javascript 
hiding


Modified: 
django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css
===
--- django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css   
2009-06-09 03:44:46 UTC (rev 10958)
+++ django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css   
2009-06-09 04:57:26 UTC (rev 10959)
@@ -334,6 +334,10 @@
 width: 19%;
 }
 
+.inline-selector a, .inline-selector a:visited {
+color: #000;
+}
+
 .inline-selector-item {
 background-color: #F6F6F6;
 border: 1px solid #E7E7E7;
@@ -342,10 +346,13 @@
 font-size: 0.9em;
 }
 
+.inline-selector-item:hover {
+background-color: #C1DBFD;
+}
+
 .inline-detail {
 float: right;
 width: 80%;
-background: #c9c;
 border-left: 1px solid #EEE;
 }
 
@@ -353,6 +360,14 @@
 float: right;
 }
 
+.inline-selected {
+background-color: #9EB7D5;
+}
+
+.inline-selected a, .inline-selected a:visited {
+color: #FFF;
+}
+
 .clear {
 clear: both;
 }
\ No newline at end of file

Modified: 
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
===
--- 
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
 2009-06-09 03:44:46 UTC (rev 10958)
+++ 
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
 2009-06-09 04:57:26 UTC (rev 10959)
@@ -9,49 +9,53 @@
 
 {% for inline_admin_form in inline_admin_formset %}
 
+
 {% if inline_admin_form.original or 
inline_admin_form.show_url %}
 {% if inline_admin_form.original %} {{ 
inline_admin_form.original }}{% endif %}
 {% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %}
 {% else %}
-New Inline
+[New Inline]
 {% endif %}
+
 
 {% endfor %}
 
 
 
 {% for inline_admin_form in inline_admin_formset %}
-
-{% if inline_admin_form.original or 
inline_admin_form.show_url %}
-{% if inline_admin_form.original %} {{ 
inline_admin_form.original }}{% endif %}
-{% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %}
-{% else %}
-[New Inline]
+
+
+{% if inline_admin_form.original or 
inline_admin_form.show_url %}
+{% if inline_admin_form.original %} {{ 
inline_admin_form.original }}{% endif %}
+{% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %}
+{% else %}
+[New Inline]
+{% endif %}
+
+{% if inline_admin_formset.formset.can_delete %}
+
+{% if inline_admin_form.original %}
+{{ inline_admin_form.deletion_field.field 
}} {{ inline_admin_form.deletion_field.label_tag }}
+{% endif %}
+
+{% endif %}
+
+
+{% if inline_admin_form.form.non_field_errors %}
+{{ inline_admin_form.form.non_field_errors }}
 {% endif %}
-
-{% if inline_admin_formset.formset.can_delete %}
-
-{% if inline_admin_form.original %}
-{{ inline_admin_form.deletion_field.field }} 
{{ inline_admin_form.deletion_field.label_tag }}
-{% endif %}
-
-{% endif %}
-
-
-{% if inline_admin_form.form.non_field_errors %}
-{{ inline_admin_form.form.non_field_errors }}
-{% endif %}
-
-
+
 {% if inline_admin_form.has_auto_field %}{{ 
inline_admin_form.pk_field.field }}{% endif %}
+
 {{ inline_admin_form.fk_field.field }}
+ 

Re: [Django] #10845: The use of "Instance" in "Creating Forms from Models" is confusing.

2009-06-08 Thread Django
#10845: The use of "Instance" in "Creating Forms from Models" is confusing.
+---
  Reporter:  ElfSternberg   | Owner:  jacob  
Status:  assigned   | Milestone:  1.1
 Component:  Documentation  |   Version:  1.0
Resolution: |  Keywords:  grammar
 Stage:  Ready for checkin  | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

  * has_patch:  0 => 1

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



[Changeset] r10958 - in django/branches/soc2009/admin-ui/django/contrib: admin admin/media/css admin/templates/admin/edit_inline contenttypes

2009-06-08 Thread noreply

Author: zain
Date: 2009-06-08 22:44:46 -0500 (Mon, 08 Jun 2009)
New Revision: 10958

Added:
   
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
Modified:
   django/branches/soc2009/admin-ui/django/contrib/admin/__init__.py
   django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css
   django/branches/soc2009/admin-ui/django/contrib/admin/options.py
   django/branches/soc2009/admin-ui/django/contrib/contenttypes/generic.py
Log:
[soc2009/admin-ui] the beginnings of a new type of inline, called Selector 
Inline, based on this mockup: 
http://media.wilsonminer.com/images/django/related-objects-stacked.gif



Modified: django/branches/soc2009/admin-ui/django/contrib/admin/__init__.py
===
--- django/branches/soc2009/admin-ui/django/contrib/admin/__init__.py   
2009-06-08 14:51:44 UTC (rev 10957)
+++ django/branches/soc2009/admin-ui/django/contrib/admin/__init__.py   
2009-06-09 03:44:46 UTC (rev 10958)
@@ -1,6 +1,6 @@
 from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
 from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
-from django.contrib.admin.options import StackedInline, TabularInline
+from django.contrib.admin.options import StackedInline, TabularInline, 
SelectorInline
 from django.contrib.admin.sites import AdminSite, site
 from django.utils.importlib import import_module
 

Modified: 
django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css
===
--- django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css   
2009-06-08 14:51:44 UTC (rev 10957)
+++ django/branches/soc2009/admin-ui/django/contrib/admin/media/css/forms.css   
2009-06-09 03:44:46 UTC (rev 10958)
@@ -327,4 +327,32 @@
 
 .add_inline {
 display: none;
+}
+
+.inline-selector {
+float: left;
+width: 19%;
+}
+
+.inline-selector-item {
+background-color: #F6F6F6;
+border: 1px solid #E7E7E7;
+padding: 5px;
+margin: 7px 0px 7px 5px;
+font-size: 0.9em;
+}
+
+.inline-detail {
+float: right;
+width: 80%;
+background: #c9c;
+border-left: 1px solid #EEE;
+}
+
+.inline-selector-delete {
+float: right;
+}
+
+.clear {
+clear: both;
 }
\ No newline at end of file

Modified: django/branches/soc2009/admin-ui/django/contrib/admin/options.py
===
--- django/branches/soc2009/admin-ui/django/contrib/admin/options.py
2009-06-08 14:51:44 UTC (rev 10957)
+++ django/branches/soc2009/admin-ui/django/contrib/admin/options.py
2009-06-09 03:44:46 UTC (rev 10958)
@@ -1166,3 +1166,6 @@
 
 class TabularInline(InlineModelAdmin):
 template = 'admin/edit_inline/tabular.html'
+
+class SelectorInline(InlineModelAdmin):
+template = 'admin/edit_inline/selector.html'
\ No newline at end of file

Added: 
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
===
--- 
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
 (rev 0)
+++ 
django/branches/soc2009/admin-ui/django/contrib/admin/templates/admin/edit_inline/selector.html
 2009-06-09 03:44:46 UTC (rev 10958)
@@ -0,0 +1,84 @@
+{% load i18n %}
+
+
+{{ inline_admin_formset.formset.management_form }}
+{{ inline_admin_formset.opts.verbose_name_plural|capfirst 
}}
+
+{{ inline_admin_formset.formset.non_form_errors }}
+
+
+{% for inline_admin_form in inline_admin_formset %}
+
+{% if inline_admin_form.original or 
inline_admin_form.show_url %}
+{% if inline_admin_form.original %} {{ 
inline_admin_form.original }}{% endif %}
+{% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %}
+{% else %}
+New Inline
+{% endif %}
+
+{% endfor %}
+
+
+
+{% for inline_admin_form in inline_admin_formset %}
+
+{% if inline_admin_form.original or 
inline_admin_form.show_url %}
+{% if inline_admin_form.original %} {{ 
inline_admin_form.original }}{% endif %}
+{% if inline_admin_form.show_url %}{% trans "View on site" %}{% endif %}
+{% else %}
+[New Inline]
+{% endif %}
+
+{% if inline_admin_formset.formset.can_delete %}
+
+{% if inline_admin_form.original %}
+{{ 

Re: [Django] #11284: Support i18n tags in templates with .js extension

2009-06-08 Thread Django
#11284: Support i18n tags in templates with .js extension
---+
  Reporter:  andrewbadr| Owner:  nobody
Status:  closed| Milestone:
 Component:  Internationalization  |   Version:  1.0   
Resolution:  invalid   |  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

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

Comment:

 Have a look at the "-e" option to `django-admin.py makemessages` (`django-
 admin.py help makemessages`).

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



[Django] #11284: Support i18n tags in templates with .js extension

2009-06-08 Thread Django
#11284: Support i18n tags in templates with .js extension
--+-
 Reporter:  andrewbadr|   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Internationalization  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 We are using dynamically generated javascript that includes strings for
 translation. These are marked with the `trans` template tag. There is no
 way to get these strings added to a pofile, since makemessages forcefully
 rejects the 'js' extension.

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



Re: [Django] #10922: Model formsets - matching POST data to model instances is fragile

2009-06-08 Thread Django
#10922: Model formsets - matching POST data to model instances is fragile
-+--
  Reporter:  kmtracey| Owner:  nobody
Status:  new | Milestone:  1.1   
 Component:  Forms   |   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  1 
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

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

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



Re: [Django] #6799: Update to truncate words methods to make them more callable

2009-06-08 Thread Django
#6799: Update to truncate words methods to make them more callable
---+
  Reporter:  bret  | Owner:  adamfast
Status:  assigned  | Milestone:  1.2 
 Component:  Contrib apps  |   Version:  SVN 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  1 |  
---+
Changes (by SmileyChris):

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

Comment:

 If you're going to do this, you may as well only do the appending of
 `end_text` if it's not false. This will avoid adding trailing whitespace.

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



Re: [Django] #10950: Unused import in django/forms/fields.py

2009-06-08 Thread Django
#10950: Unused import in django/forms/fields.py
+---
  Reporter:  dc | Owner:  nobody
Status:  new| Milestone:
 Component:  Forms  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

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



Re: [Django] #10927: Content Types shortcut view throws 500s easily

2009-06-08 Thread Django
#10927: Content Types shortcut view throws 500s easily
+---
  Reporter:  jdunck | Owner:  nobody
Status:  new| Milestone:
 Component:  Contrib apps   |   Version:  1.1-beta-1
Resolution: |  Keywords:
 Stage:  Ready for checkin  | Has_patch:  1 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

  * stage:  Unreviewed => Ready for checkin

Comment:

 Reviewed - looks good and the tests prove it works :)

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



Re: [Django] #10928: BooleanField: different behaviour when default=callable

2009-06-08 Thread Django
#10928: BooleanField: different behaviour when default=callable
---+
  Reporter:  a...@gc-web.de| Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by SmileyChris):

  * stage:  Unreviewed => Accepted

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



Re: [Django] #10909: Allow use of the Sitemaps Framework without requiring the sites contrib application

2009-06-08 Thread Django
#10909: Allow use of the Sitemaps Framework without requiring the sites contrib
application
---+
  Reporter:  qingfeng  | Owner:  nobody
Status:  new   | Milestone:
 Component:  Contrib apps  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  1 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by SmileyChris):

  * keywords:  sitemaps =>
  * needs_docs:  0 => 1
  * summary:  Django Sitemaps Framework does not allow the use of the
  Domain Settings Site => Allow use of the
  Sitemaps Framework without requiring the sites
  contrib application
  * version:  1.0 => SVN
  * stage:  Unreviewed => Accepted

Comment:

 It's a useful idea, but adding a setting isn't the way to go about it. I'm
 attaching a better version - it just needs docs if someone wants to write
 them.

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



Re: [Django] #10899: easier manipulation of sessions by test client

2009-06-08 Thread Django
#10899: easier manipulation of sessions by test client
+---
  Reporter:  tallfred   | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  1 
Needs_better_patch:  1  |  
+---
Changes (by SmileyChris):

  * stage:  Unreviewed => Accepted

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



Re: [Django] #10899: easier manipulation of sessions by test client

2009-06-08 Thread Django
#10899: easier manipulation of sessions by test client
+---
  Reporter:  tallfred   | Owner:  nobody
Status:  reopened   | Milestone:
 Component:  Testing framework  |   Version:  SVN   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  1 
Needs_docs:  1  |   Needs_tests:  1 
Needs_better_patch:  1  |  
+---
Comment (by SmileyChris):

 Good job - I scratched my head for a bit figuring out why my session tests
 were failing (due to my implementation of the obvious "pretty and faster"
 code).

 Hint: you don't need the `_failure` method for property - just don't
 provide a set or del method for the property and Python will raise an
 attribute error if someone tries to.

 I'd leave out your `ClientHandler` changes from this ticket - open that in
 a new ticket if you want, but no point in making this one any more
 complex.

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



Re: [Django] #10880: Link to 1.0 docs has two trailing slashes

2009-06-08 Thread Django
#10880: Link to 1.0 docs has two trailing slashes
--+-
  Reporter:  guettli  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Django Web site  |   Version:  1.0   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by SmileyChris):

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

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



Re: [Django] #10862: Confusing image field text

2009-06-08 Thread Django
#10862: Confusing image field text
+---
  Reporter:  mw | Owner:  nobody
Status:  new| Milestone:
 Component:  Documentation  |   Version:  SVN   
Resolution: |  Keywords:  imagefield
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  1  |  
+---
Changes (by SmileyChris):

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

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



Re: [Django] #10857: redirect on existing auth in django.contrib.auth.views.login

2009-06-08 Thread Django
#10857: redirect on existing auth in django.contrib.auth.views.login
-+--
  Reporter:  radez   | Owner:  nobody
Status:  closed  | Milestone:
 Component:  Authentication  |   Version:  1.0   
Resolution:  wontfix |  Keywords:
 Stage:  Unreviewed  | Has_patch:  1 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by SmileyChris):

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

Comment:

 This changes the behavior of the login view for everyone. Developers may
 be relying on being able to view the login page, even if they are already
 logged in.

 Sounds like you should be wrapping the login view in your own view which
 redirects if they are already logged in (and as an aside, the patch should
 have been doing `return HttpResponseRedirect(redirect_to)`).

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



Re: [Django] #10856: Error: Failed to load processor TracGuideToc

2009-06-08 Thread Django
#10856: Error: Failed to load processor TracGuideToc
--+-
  Reporter:  cwolf127 | Owner:  nobody  
Status:  new  | Milestone:  
 Component:  Django Web site  |   Version:  1.0 
Resolution:   |  Keywords:  TracGuideToc TOC
 Stage:  Accepted | Has_patch:  0   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by SmileyChris):

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

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



Re: [Django] #9616: bdist_rpm fails in 1.0.1 - version names with hyphens are not compatible with rpm specs

2009-06-08 Thread Django
#9616: bdist_rpm fails in 1.0.1 - version names with hyphens are not compatible
with rpm specs
+---
  Reporter:  tome   | Owner:  mtredinnick  
Status:  assigned   | Milestone:  1.2  
 Component:  Uncategorized  |   Version:  1.0  
Resolution: |  Keywords:  rpm, bdist_rpm, setup
 Stage:  Accepted   | Has_patch:  0
Needs_docs:  0  |   Needs_tests:  0
Needs_better_patch:  0  |  
+---
Changes (by jacob):

  * milestone:  1.1 => 1.2

Comment:

 Kicking out of 1.1 since this is a bug in old versions of bdist_rpm. It's
 something we should be able to work around, but let's not have it block
 1.1.

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



Re: [Django] #9587: formset with can_delete shouldn't require deleted forms to validate

2009-06-08 Thread Django
#9587: formset with can_delete shouldn't require deleted forms to validate
+---
  Reporter:  Daniel Pope   | Owner:  
nobody
Status:  closed | Milestone:  
1.1   
 Component:  Forms  |   Version:  
1.0   
Resolution:  fixed  |  Keywords:  
formset can_delete
 Stage:  Accepted   | Has_patch:  1 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  1  |  
+---
Comment (by jsamsa):

 Can we improve this to read the delete field value from cleaned_data so
 that validation has a chance to raise validation errors on delete?  I have
 a case where I don't want to allow delete on inlines after the parent
 model reaches a certain state.  I'll try writing a patch.

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



Re: [Django] #11110: Comments redirect after posting is not honoured if comment contains errors or is previewed

2009-06-08 Thread Django
#0: Comments redirect after posting is not honoured if comment contains 
errors
or is previewed
--+-
  Reporter:  Jeff Winters | Owner:  nobody
Status:  new  | Milestone:
 Component:  django.contrib.comments  |   Version:  SVN   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  1 
Needs_docs:  0|   Needs_tests:  1 
Needs_better_patch:  0|  
--+-
Comment (by kgfullerton):

 Added patch which contains the fix for revision 10957 as well as test case
 - not sure why the diff isn't showing (is the output from svn diff)

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



[Django] #11283: latest() doesn't clear previous ordering

2009-06-08 Thread Django
#11283: latest() doesn't clear previous ordering
--+-
 Reporter:  benmoran  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 Unlike order_by() in django.db.models.query, the latest() method doesn't
 clear previous orderings.

 This means that latest can return incorrect results if used on a
 previously sorted QuerySet, e.g.
  {{{ Article.objects.order_by('id').latest('id') }}}
 returns the first rather than the last id.

 It looks strange when written on a single line, but can happen - I
 encountered it with code from django-reversion using QuerySets that
 already had orderings set.

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



Re: [Django] #11282: Action after search in admin should return to search results

2009-06-08 Thread Django
#11282: Action after search in admin should return to search results
---+
  Reporter:  Leo   | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 Possibly a dupe of #6903.

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



Re: [Django] #11282: Action after search in admin should return to search results

2009-06-08 Thread Django
#11282: Action after search in admin should return to search results
---+
  Reporter:  Leo   | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by Leo):

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

Comment:

 ugh, sorry about the WikiFormatting fail...

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



[Django] #11282: Action after search in admin should return to search results

2009-06-08 Thread Django
#11282: Action after search in admin should return to search results
--+-
 Reporter:  Leo   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Repro:
 1) Do a search in the admin on a model that results in some results
 2) Select one or more with the checkboxes next to them and perform some
 action (such as delete)

 Expected Result:
 * You're returned to the search results

 Actual result:
 * You're returned to the default list

 This may be a 'feature' rather than a bug, however if you don't check any
 objects and perform the action (deletion), the you do get the search
 result list back.

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



Re: [Django] #11281: Broken Link

2009-06-08 Thread Django
#11281: Broken Link
--+-
  Reporter:  MrBoulababa  | Owner:  nobody 
Status:  closed   | Milestone: 
 Component:  Django Web site  |   Version:  1.0
Resolution:  wontfix  |  Keywords:  Broken link
 Stage:  Unreviewed   | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Comment (by MrBoulababa):

 Ok, Admin action is a new feature.
 Sorry for this innapropriate 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-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11281: Broken Link

2009-06-08 Thread Django
#11281: Broken Link
--+-
  Reporter:  MrBoulababa  | Owner:  nobody 
Status:  closed   | Milestone: 
 Component:  Django Web site  |   Version:  1.0
Resolution:  wontfix  |  Keywords:  Broken link
 Stage:  Unreviewed   | Has_patch:  0  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by Alex):

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

Comment:

 These links are automatically generated.

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



[Django] #11281: Broken Link

2009-06-08 Thread Django
#11281: Broken Link
-+--
 Reporter:  MrBoulababa  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Django Web site  | Version:  1.0   
 Keywords:  Broken link  |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Under this URL:
 http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/
 The link to the 1.0 version of the page doesn't work.

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



Re: [Django] #11212: Don't encode emails with base64/qp

2009-06-08 Thread Django
#11212: Don't encode emails with base64/qp
---+
  Reporter:  phr   | Owner:  nobody   
Status:  new   | Milestone:   
 Component:  django.core.mail  |   Version:  SVN  
Resolution:|  Keywords:  send_mail
 Stage:  Unreviewed| Has_patch:  1
Needs_docs:  0 |   Needs_tests:  1
Needs_better_patch:  0 |  
---+
Comment (by phr):

 I'm not quite sure what to test here. Only a single parameter needs to be
 changed
 in file django/core/mail.py at line 23:

 {{{
 -Charset.add_charset('utf-8', Charset.SHORTEST, Charset.QP, 'utf-8')
 +Charset.add_charset('utf-8', Charset.SHORTEST, None, 'utf-8')
 }}}

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



[Changeset] r10957 - django/branches/releases/1.0.X

2009-06-08 Thread noreply

Author: russellm
Date: 2009-06-08 09:51:44 -0500 (Mon, 08 Jun 2009)
New Revision: 10957

Modified:
   django/branches/releases/1.0.X/
Log:
[1.0.X] Block recent trunk revisions from merge


Property changes on: django/branches/releases/1.0.X
___
Name: svnmerge-blocked
   - 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792,9799-9800,9803-9805,9808,9814-9820,9838-9841,9844-9846,9860,9862,9876,9882,9888-9898,9904-9905,9910-9911,9913,9915,9918,9921,9928,9930,9938,9940-9941,9944,9951-9952,9955,9963-9965,9978,9985,9989,10002,10005-10006,10008,10011-10012,10018,10021,10026-10030,10032-10035,10042-10048,10053,10062-10065,10070,10077,10080-10084,10088-10103,10105,10107-10124,10128-10135,10137,10141-10142,10144,10148,10161-10162,10168-10169,10171-10172,10174,10177-10179,10181-10184,10186-10188,10190-10191,10197,10222,10229,10235,10248-10249,10258,10271-10272,10275,10281,10315,10317-10318,10323,10326-10327,10330-10332,10345-10347,10352,10357,10364,10369-10370,10381-10385,10408-10410,10412,10428,10438-10439,10443,10446,10451,10454-10456,10465,10468,10481,10486-10488,10493-10494,10498,10506-10507,10510,10515-10516,10521-10523,10526-10527,10529,10538,10549,10558-10560,10562,10565-10566,10572,10575,10579,10590,10593-10594,10597-10598,10602,10621,10623,10628,10633,10636-10638,10642,10648,10650-10651,10664-10665,10674,10677-10678,10680-10681,10692,10705-10706,10711-10712,10716-10717,10721,10728,10730-10731,10735,10737-10742,10751,10776,10780-10781,10784-10786,10803-10804,10807,10818,10824,10826,10830,10926,10928-10929,10931
   + 
/django/trunk:9098,9103,9110,9112,9145,9152,9157,9160,9188,9248,9263,9278,9299-9300,9303-9304,9332,9344,9346,9348-9349,9353-9354,9397-9398,9463-9465,9470,9489-9490,9527-9528,9530-9532,9537-9538,9551-9555,9558,9561,9569,9592-9594,9620,9625,9637,9643,9646,9690,9700-9702,9707-9708,9714-9715,9724,9727-9729,9739,9742-9749,9752-9756,9759-9760,9763-9766,9769,9781,9785-9788,9791-9792,9799-9800,9803-9805,9808,9814-9820,9838-9841,9844-9846,9860,9862,9876,9882,9888-9898,9904-9905,9910-9911,9913,9915,9918,9921,9928,9930,9938,9940-9941,9944,9951-9952,9955,9963-9965,9978,9985,9989,10002,10005-10006,10008,10011-10012,10018,10021,10026-10030,10032-10035,10042-10048,10053,10062-10065,10070,10077,10080-10084,10088-10103,10105,10107-10124,10128-10135,10137,10141-10142,10144,10148,10161-10162,10168-10169,10171-10172,10174,10177-10179,10181-10184,10186-10188,10190-10191,10197,10222,10229,10235,10248-10249,10258,10271-10272,10275,10281,10315,10317-10318,10323,10326-10327,10330-10332,10345-10347,10352,10357,10364,10369-10370,10381-10385,10408-10410,10412,10428,10438-10439,10443,10446,10451,10454-10456,10465,10468,10481,10486-10488,10493-10494,10498,10506-10507,10510,10515-10516,10521-10523,10526-10527,10529,10538,10549,10558-10560,10562,10565-10566,10572,10575,10579,10590,10593-10594,10597-10598,10602,10621,10623,10628,10633,10636-10638,10642,10648,10650-10651,10664-10665,10674,10677-10678,10680-10681,10692,10705-10706,10711-10712,10716-10717,10721,10728,10730-10731,10735,10737-10742,10751,10776,10780-10781,10784-10786,10803-10804,10807,10818,10824,10826,10830,10926,10928-10929,10931,10954-10955


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



Re: [Django] #6094: core handlers do not catch middleware exceptions

2009-06-08 Thread Django
#6094: core handlers do not catch middleware exceptions
+---
  Reporter:  gwilson| Owner:  gwilson
Status:  assigned   | Milestone: 
 Component:  HTTP handling  |   Version:  SVN
Resolution: |  Keywords: 
 Stage:  Accepted   | Has_patch:  1  
Needs_docs:  0  |   Needs_tests:  0  
Needs_better_patch:  0  |  
+---
Changes (by gvangool):

 * cc: gvangool (added)

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



[Changeset] r10956 - in django/branches/soc2009/i18n-improvements: django/conf django/conf/locale django/conf/locale/ca django/conf/locale/en django/contrib/admin/templates/admin django/contrib/admin/

2009-06-08 Thread noreply

Author: garcia_marc
Date: 2009-06-08 08:46:06 -0500 (Mon, 08 Jun 2009)
New Revision: 10956

Added:
   django/branches/soc2009/i18n-improvements/django/conf/locale/__init__.py
   django/branches/soc2009/i18n-improvements/django/conf/locale/ca/__init__.py
   django/branches/soc2009/i18n-improvements/django/conf/locale/ca/formats.py
   django/branches/soc2009/i18n-improvements/django/conf/locale/en/__init__.py
   django/branches/soc2009/i18n-improvements/django/conf/locale/en/formats.py
   django/branches/soc2009/i18n-improvements/django/utils/formats.py
Modified:
   django/branches/soc2009/i18n-improvements/django/conf/global_settings.py
   
django/branches/soc2009/i18n-improvements/django/contrib/admin/templates/admin/object_history.html
   
django/branches/soc2009/i18n-improvements/django/contrib/admin/templatetags/admin_list.py
   
django/branches/soc2009/i18n-improvements/django/contrib/databrowse/datastructures.py
   
django/branches/soc2009/i18n-improvements/django/utils/translation/trans_null.py
   
django/branches/soc2009/i18n-improvements/django/utils/translation/trans_real.py
   django/branches/soc2009/i18n-improvements/docs/ref/settings.txt
   django/branches/soc2009/i18n-improvements/tests/regressiontests/i18n/tests.py
Log:
[soc2009/i18n-improvements] Created a specific function to get locale formats 
(to avoid using gettext), and updated the code that used gettext.

Modified: 
django/branches/soc2009/i18n-improvements/django/conf/global_settings.py
===
--- django/branches/soc2009/i18n-improvements/django/conf/global_settings.py
2009-06-08 13:35:39 UTC (rev 10955)
+++ django/branches/soc2009/i18n-improvements/django/conf/global_settings.py
2009-06-08 13:46:06 UTC (rev 10956)
@@ -103,6 +103,10 @@
 LOCALE_PATHS = ()
 LANGUAGE_COOKIE_NAME = 'django_language'
 
+# If you set this to True, Django will format dates, numbers and calendars
+# according to user current locale
+USE_FORMAT_I18N = False
+
 # Not-necessarily-technical managers of the site. They get broken link
 # notifications and other various e-mails.
 MANAGERS = ADMINS
@@ -277,6 +281,25 @@
 # http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
 MONTH_DAY_FORMAT = 'F j'
 
+# Default shortformatting for date objects. See all available format strings 
here:
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+SHORT_DATE_FORMAT = 'N j, Y'
+
+# Default short formatting for datetime objects.
+# See all available format strings here:
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+SHORT_DATETIME_FORMAT = 'N j, Y, P'
+
+# Default first day of week, to be used on calendars
+# 0 means Sunday
+FIRST_DAY_OF_WEEK = 0
+
+# Default decimal separator symbol
+DECIMAL_SEPARATOR = '.'
+
+# Default thousand separator symbol
+THOUSAND_SEPARATOR = ','
+
 # Do you want to manage transactions manually?
 # Hint: you really don't!
 TRANSACTIONS_MANAGED = False

Added: django/branches/soc2009/i18n-improvements/django/conf/locale/__init__.py
===

Added: 
django/branches/soc2009/i18n-improvements/django/conf/locale/ca/__init__.py
===

Added: 
django/branches/soc2009/i18n-improvements/django/conf/locale/ca/formats.py
===
--- django/branches/soc2009/i18n-improvements/django/conf/locale/ca/formats.py  
(rev 0)
+++ django/branches/soc2009/i18n-improvements/django/conf/locale/ca/formats.py  
2009-06-08 13:46:06 UTC (rev 10956)
@@ -0,0 +1,18 @@
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j \de F \de Y'
+DATETIME_FORMAT = 'j \de F \de Y \\a \le\s H:i'
+TIME_FORMAT = 'P'
+YEAR_MONTH_FORMAT = 'F \de Y'
+MONTH_DAY_FORMAT = 'j \de F'
+
+SHORT_DATE_FORMAT = 'd/m/Y'
+SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
+
+FIRST_DAY_OF_WEEK = 1 # 0 means Sunday
+
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+
+

Added: 
django/branches/soc2009/i18n-improvements/django/conf/locale/en/__init__.py
===

Added: 
django/branches/soc2009/i18n-improvements/django/conf/locale/en/formats.py
===
--- django/branches/soc2009/i18n-improvements/django/conf/locale/en/formats.py  
(rev 0)
+++ django/branches/soc2009/i18n-improvements/django/conf/locale/en/formats.py  
2009-06-08 13:46:06 UTC (rev 10956)
@@ -0,0 +1,18 @@
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'N j, Y'
+DATETIME_FORMAT = 'N j, Y, P'
+TIME_FORMAT = 'P'
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'F j'
+
+SHORT_DATE_FORMAT = 'm/d/Y'
+SHORT_DATETIME_FORMAT = 'm/d/Y h:i A'
+
+FIRST_DAY_OF_WEEK = 0 # 0 means Sunday
+
+DECIMAL_SEPARATOR = '.'

[Changeset] r10955 - in django/trunk: django/db/models tests/modeltests/proxy_models tests/modeltests/proxy_models/fixtures

2009-06-08 Thread noreply

Author: russellm
Date: 2009-06-08 08:35:39 -0500 (Mon, 08 Jun 2009)
New Revision: 10955

Added:
   django/trunk/tests/modeltests/proxy_models/fixtures/
   django/trunk/tests/modeltests/proxy_models/fixtures/mypeople.json
Modified:
   django/trunk/django/db/models/base.py
   django/trunk/tests/modeltests/proxy_models/models.py
Log:
Fixed #11194 -- Corrected loading of Proxy models from fixtures (and, by 
extension, save_base(raw=True) for Proxy models).

Modified: django/trunk/django/db/models/base.py
===
--- django/trunk/django/db/models/base.py   2009-06-08 13:04:22 UTC (rev 
10954)
+++ django/trunk/django/db/models/base.py   2009-06-08 13:35:39 UTC (rev 
10955)
@@ -435,7 +435,9 @@
 # That means that we don't try to be smart about saving attributes
 # that might have come from the parent class - we just save the
 # attributes we have been given to the class we have been given.
-if not raw:
+# We also go through this process to defer the save of proxy objects
+# to their actual underlying model.
+if not raw or meta.proxy:
 if meta.proxy:
 org = cls
 else:

Added: django/trunk/tests/modeltests/proxy_models/fixtures/mypeople.json
===
--- django/trunk/tests/modeltests/proxy_models/fixtures/mypeople.json   
(rev 0)
+++ django/trunk/tests/modeltests/proxy_models/fixtures/mypeople.json   
2009-06-08 13:35:39 UTC (rev 10955)
@@ -0,0 +1,9 @@
+[
+{
+"pk": 100,
+"model": "proxy_models.myperson",
+"fields": {
+"name": "Elvis Presley"
+}
+}
+]
\ No newline at end of file

Modified: django/trunk/tests/modeltests/proxy_models/models.py
===
--- django/trunk/tests/modeltests/proxy_models/models.py2009-06-08 
13:04:22 UTC (rev 10954)
+++ django/trunk/tests/modeltests/proxy_models/models.py2009-06-08 
13:35:39 UTC (rev 10955)
@@ -286,6 +286,13 @@
 MyPersonProxy pre save
 MyPersonProxy post save
 
+>>> signals.pre_save.disconnect(h1, sender=MyPerson)
+>>> signals.post_save.disconnect(h2, sender=MyPerson)
+>>> signals.pre_save.disconnect(h3, sender=Person)
+>>> signals.post_save.disconnect(h4, sender=Person)
+>>> signals.pre_save.disconnect(h5, sender=MyPersonProxy)
+>>> signals.post_save.disconnect(h6, sender=MyPersonProxy)
+
 # A proxy has the same content type as the model it is proxying for (at the
 # storage level, it is meant to be essentially indistinguishable).
 >>> ctype = ContentType.objects.get_for_model
@@ -354,4 +361,11 @@
 # Select related + filter on a related proxy of proxy field
 >>> ProxyImprovement.objects.select_related().get(associated_bug__summary__icontains='fix')
 
+
+Proxy models can be loaded from fixtures (Regression for #11194)
+>>> from django.core import management
+>>> management.call_command('loaddata', 'mypeople.json', verbosity=0)
+>>> MyPerson.objects.get(pk=100)
+
+
 """}


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



Re: [Django] #10672: Proxy Model does not send save signal

2009-06-08 Thread Django
#10672: Proxy Model does not send save signal
---+
  Reporter:  zbyte64   | Owner:  Nobody
Status:  closed| Milestone:  1.1   
 Component:  Database layer (models, ORM)  |   Version:  1.1-beta-1
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

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

Comment:

 (In [10954]) Fixed #10672 -- Altered save_base to ensure that proxy models
 send a post_save signal.

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



[Changeset] r10954 - in django/trunk: django/db/models tests/modeltests/proxy_models

2009-06-08 Thread noreply

Author: russellm
Date: 2009-06-08 08:04:22 -0500 (Mon, 08 Jun 2009)
New Revision: 10954

Modified:
   django/trunk/django/db/models/base.py
   django/trunk/tests/modeltests/proxy_models/models.py
Log:
Fixed #10672 -- Altered save_base to ensure that proxy models send a post_save 
signal.

Modified: django/trunk/django/db/models/base.py
===
--- django/trunk/django/db/models/base.py   2009-06-08 05:29:47 UTC (rev 
10953)
+++ django/trunk/django/db/models/base.py   2009-06-08 13:04:22 UTC (rev 
10954)
@@ -411,29 +411,35 @@
 
 save.alters_data = True
 
-def save_base(self, raw=False, cls=None, force_insert=False,
-force_update=False):
+def save_base(self, raw=False, cls=None, origin=None,
+force_insert=False, force_update=False):
 """
 Does the heavy-lifting involved in saving. Subclasses shouldn't need to
 override this method. It's separate from save() in order to hide the
 need for overrides of save() to pass around internal-only parameters
-('raw' and 'cls').
+('raw', 'cls', and 'origin').
 """
 assert not (force_insert and force_update)
-if not cls:
+if cls is None:
 cls = self.__class__
-meta = self._meta
-signal = True
-signals.pre_save.send(sender=self.__class__, instance=self, 
raw=raw)
+meta = cls._meta
+if not meta.proxy:
+origin = cls
 else:
 meta = cls._meta
-signal = False
 
+if origin:
+signals.pre_save.send(sender=origin, instance=self, raw=raw)
+
 # If we are in a raw save, save the object exactly as presented.
 # That means that we don't try to be smart about saving attributes
 # that might have come from the parent class - we just save the
 # attributes we have been given to the class we have been given.
 if not raw:
+if meta.proxy:
+org = cls
+else:
+org = None
 for parent, field in meta.parents.items():
 # At this point, parent's primary key field may be unknown
 # (for example, from administration form which doesn't fill
@@ -441,7 +447,8 @@
 if field and getattr(self, parent._meta.pk.attname) is None 
and getattr(self, field.attname) is not None:
 setattr(self, parent._meta.pk.attname, getattr(self, 
field.attname))
 
-self.save_base(cls=parent)
+self.save_base(cls=parent, origin=org)
+
 if field:
 setattr(self, field.attname, 
self._get_pk_val(parent._meta))
 if meta.proxy:
@@ -492,8 +499,8 @@
 setattr(self, meta.pk.attname, result)
 transaction.commit_unless_managed()
 
-if signal:
-signals.post_save.send(sender=self.__class__, instance=self,
+if origin:
+signals.post_save.send(sender=origin, instance=self,
 created=(not record_exists), raw=raw)
 
 save_base.alters_data = True

Modified: django/trunk/tests/modeltests/proxy_models/models.py
===
--- django/trunk/tests/modeltests/proxy_models/models.py2009-06-08 
05:29:47 UTC (rev 10953)
+++ django/trunk/tests/modeltests/proxy_models/models.py2009-06-08 
13:04:22 UTC (rev 10954)
@@ -259,6 +259,33 @@
 >>> OtherPerson._default_manager.all()
 [, ]
 
+# Test save signals for proxy models
+>>> from django.db.models import signals
+>>> def make_handler(model, event):
+... def _handler(*args, **kwargs):
+... print u"%s %s save" % (model, event)
+... return _handler
+>>> h1 = make_handler('MyPerson', 'pre')
+>>> h2 = make_handler('MyPerson', 'post')
+>>> h3 = make_handler('Person', 'pre')
+>>> h4 = make_handler('Person', 'post')
+>>> signals.pre_save.connect(h1, sender=MyPerson)
+>>> signals.post_save.connect(h2, sender=MyPerson)
+>>> signals.pre_save.connect(h3, sender=Person)
+>>> signals.post_save.connect(h4, sender=Person)
+>>> dino = MyPerson.objects.create(name=u"dino")
+MyPerson pre save
+MyPerson post save
+
+# Test save signals for proxy proxy models
+>>> h5 = make_handler('MyPersonProxy', 'pre')
+>>> h6 = make_handler('MyPersonProxy', 'post')
+>>> signals.pre_save.connect(h5, sender=MyPersonProxy)
+>>> signals.post_save.connect(h6, sender=MyPersonProxy)
+>>> dino = MyPersonProxy.objects.create(name=u"pebbles")
+MyPersonProxy pre save
+MyPersonProxy post save
+
 # A proxy has the same content type as the model it is proxying for (at the
 # storage level, it is meant to be essentially indistinguishable).
 >>> ctype = ContentType.objects.get_for_model
@@ -266,7 +293,7 @@
 True
 
 >>> MyPersonProxy.objects.all()
-[, ]
+[, , , 
]
 
 >>> u = User.objects.create(name='Bruce')
 >>>