Re: [Django] #16563: Error pickling request.user

2011-11-03 Thread Django
#16563: Error pickling request.user
-+
 Reporter:  zero.fuxor@… |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  contrib.auth |  Version:  1.3
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by SmileyChris):

 No, it's due to the fact that a `SimpleLazyObject` isn't picklable.

-- 
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] #17122: Admin widgets and forms do not support custom model fields that store non-unicode data in the database to be the primary key referenced by relation fields.

2011-11-03 Thread Django
#17122: Admin widgets and forms do not support custom model fields that store 
non-
unicode data in the database to be the primary key referenced by relation
fields.
-+--
 Reporter:  nickname123  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  1.3
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+--
Changes (by nickname123):

 * needs_better_patch:  0 => 1


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

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



[Django] #17163: Add NamedUrlWizardView.get_step_url

2011-11-03 Thread Django
#17163: Add NamedUrlWizardView.get_step_url
-+
 Reporter:  Bradley Ayers   |  Owner:  nobody
 Type:  New feature  | Status:  new
Component:  contrib.formtools|Version:  SVN
 Severity:  Normal   |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+
 I propose that a method `get_step_url` should be added to
 `NamedUrlWizardView`. This hook would allow wizard URLs to contain more
 than just `step`. This would tie in nicely with #17162

-- 
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] #16563: Error pickling request.user

2011-11-03 Thread Django
#16563: Error pickling request.user
-+
 Reporter:  zero.fuxor@… |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  contrib.auth |  Version:  1.3
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by PaulM):

 Is this regression related to the change to using
 `pickle.HIGHEST_PROTOCOL` throughout Django? The memcached backend used
 that, but locmem didn't. Does that mean this isn't a regression after all,
 and depended on the non-canonical behavior of locmem using the lowest
 pickle protocol?

-- 
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] #17162: Remove WizardView.get_wizard_name()

2011-11-03 Thread Django
#17162: Remove WizardView.get_wizard_name()
-+
 Reporter:  Bradley Ayers   |  Owner:  nobody
 Type:  New feature  | Status:  new
Component:  contrib.formtools|Version:  SVN
 Severity:  Normal   |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+
 I propose removing `WizardView.get_wizard_name`. I think this is a good
 idea
 because currently it seems like `get_wizard_name` is essentially just the
 current implementation of
 get_prefix. `get_wizard_name` isn't used anywhere else, and adds the
 burden of
 being an API that would need to be maintained. Essentially this would just
 mean moving
 the contents of `get_wizard_name` into `get_prefix`.

 I also propose changing `WizardView.get_prefix` to accept `request, *args,
 **kwargs`. This would allow for greater flexibility in how the prefix is
 determined.

 My current use-case is that I want to be able to have multiple incomplete
 wizards
 in progress at the same time. I then want to have the wizard prefix in the
 URL,
 so that a user is able to navigate to the different incomplete instances
 of the wizard
 that they're currently completing. I've achieved this for my situation by
 reimplementing `WizardView.dispatch` and `WizardView.get_prefix`, but my
 above suggestion would simplify this.

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

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



[Django] #17161: Call super in BaseForm.__init__

2011-11-03 Thread Django
#17161: Call super in BaseForm.__init__
---+
 Reporter:  reames@…   |  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Uncategorized  |Version:  1.3
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 Currently /django/forms/forms.py !BaseForm.!__init!__ (as well as a fair
 number of other classes) does not call super().!__init!__. This makes it
 impossible to create form mixins.
 Consider:

 {{{
 from django import forms

 class FormMixin(object):
   def __init__(self, *args, **kwargs):
 super(FormMixin, self).__init__(*args, **kwargs)
 self.my_flag = true

 class MyForm(forms.Form, FormMixin):
   field1 = forms.CharField()

 class MyModelForm(forms.ModelForm, FormMixin):
   class Meta(object):
 model = SpamModel

 }}}

 Because of python's mro the init() in the mixin never gets called because
 !BaseForm.!__init!__ does not call it.

 Ideally, all classes in django that have an !__init!__() should also call
 super().!__init!__()

-- 
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] #14496: Conflict between ModelForm.Meta.exclude and ModelAdmin.readonly attributes

2011-11-03 Thread Django
#14496: Conflict between ModelForm.Meta.exclude and ModelAdmin.readonly 
attributes
-+-
 Reporter:  msgre_valise |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  1.2
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  ModelForm| Triage Stage:  Ready for
  ModelAdmin readonly_fields |  checkin
  exclude conflict   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by anonymous):

 In case someone wants code to work around this, put this in your
 ModelAdmin subclass:

 {{{
 def get_form(self, request, obj=None, **kwargs):
 """Work around https://code.djangoproject.com/ticket/14496 (not
 fixed in Django 1.3)"""
 form = super(OffcutAdminRestricted, self).get_form(request, obj,
 **kwargs)
 for e in self.form._meta.exclude:
 if e in form.base_fields:
 del form.base_fields[e]
 form._meta.exclude.append(e)
 return form
 }}}

-- 
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] #17156: QuerySet.__contains__ needs documentation

2011-11-03 Thread Django
#17156: QuerySet.__contains__ needs documentation
--+
 Reporter:  guettli   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.3
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by lukeplant):

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


Comment:

 The docs should be added to this list:
 https://docs.djangoproject.com/en/dev/ref/models/querysets/#when-
 querysets-are-evaluated

-- 
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] #17157: CSRF fails in cross-domain iframes on IE

2011-11-03 Thread Django
#17157: CSRF fails in cross-domain iframes on IE
+
 Reporter:  akaihola|Owner:  nobody
 Type:  New feature |   Status:  new
Component:  Documentation   |  Version:  SVN
 Severity:  Normal  |   Resolution:
 Keywords:  csrf iframe ie  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+
Changes (by lukeplant):

 * 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] #17146: Django docs possiable error

2011-11-03 Thread Django
#17146: Django docs possiable error
-+-
 Reporter:  from_a_far@… |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |  Version:  1.3
Component:  Documentation|   Resolution:  invalid
 Severity:  Normal   | Triage Stage:
 Keywords:  documentation|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by lukeplant):

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


Comment:

 It says 'roughly' translates, and it is correct. `get()` may or may not
 add  a LIMIT clause (that's an implementation detail) - in fact it
 currently doesn't do any LIMIT clause, in order to be able to throw an
 exception when more than one object is matched.

-- 
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] #16128: cascade delete does not work for proxy models

2011-11-03 Thread Django
#16128: cascade delete does not work for proxy models
-+-
 Reporter:  xkennyx@…|Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  1.3
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  cascade delete   |  Needs documentation:  0
  proxy meta |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 (Also, to thibault: I'm not sure what constraints Django does or does not
 normally create on MySQL, but if it behaves differently with an FK to a
 proxy model than with an FK to its concrete parent, then that certainly
 does sound like a bug. It's a different one from this bug, however.)

 Thanks to everyone for the work on this patch thus far!

-- 
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] #16128: cascade delete does not work for proxy models

2011-11-03 Thread Django
#16128: cascade delete does not work for proxy models
-+-
 Reporter:  xkennyx@…|Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  1.3
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  cascade delete   |  Needs documentation:  0
  proxy meta |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 To be clear, there are two varieties of this problem: if the FK points to
 the proxy subclass and you delete the concrete superclass instance, or if
 the FK points to the concrete superclass and you delete a proxy subclass
 instance. So the tests should cover both of these cases, with both one
 level of proxying and multiple levels of proxying.

 Also, contrib.auth models shouldn't be reused in non-auth tests. In
 general a new test for a new bug should get new test models, unless it's
 closely related to existing tests (i.e. just adding a new test method or
 two to an existing TestCase), in which case it can share the models
 already used in that TestCase.

-- 
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] #16128: cascade delete does not work for proxy models

2011-11-03 Thread Django
#16128: cascade delete does not work for proxy models
-+-
 Reporter:  xkennyx@…|Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  Database layer   |  Version:  1.3
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  cascade delete   |  Needs documentation:  0
  proxy meta |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 #17140 was a duplicate.

-- 
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] #17140: Unexpected behaviour with on_delete handlers and proxy models (IntegrityError)

2011-11-03 Thread Django
#17140: Unexpected behaviour with on_delete handlers and proxy models
(IntegrityError)
-+-
 Reporter:  jaap3|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.3
  (models, ORM)  |   Resolution:  duplicate
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  ForeignKey   |  Needs documentation:  0
  on_delete proxy model  |  Patch needs improvement:  0
  IntegrityError CASCADE SET_NULL|UI/UX:  0
Has patch:  0|
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by carljm):

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


Comment:

 I'm not sure I see how this is the reverse of #16128. If I'm reading that
 one right, the failure is in the exact same case: FK pointing to proxy
 model, real parent of proxy deleted. I think this is a duplicate of that
 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] #15624: aggregate produces incorrect sql statement

2011-11-03 Thread Django
#15624: aggregate produces incorrect sql statement
-+-
 Reporter:  zeroos <232002@…>|Owner:
 Type:  Bug  |   Status:  new
Component:  ORM aggregation  |  Version:  SVN
 Severity:  Normal   |   Resolution:
 Keywords:  aggregate sql| Triage Stage:  Accepted
  syntax error   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by marekw2143):

 * owner:  marekw2143 =>
 * status:  assigned => new


-- 
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] #15250: Cannot fill parent model instance in cache

2011-11-03 Thread Django
#15250: Cannot fill parent model instance in cache
-+-
 Reporter:  vzima|Owner:
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.2
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by marekw2143):

 * status:  assigned => new
 * owner:  marekw2143 =>
 * ui_ux:   => 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] #13376: Messages should have an "expire" flag

2011-11-03 Thread Django
#13376: Messages should have an "expire" flag
--+
 Reporter:  ryanshow@…|Owner:
 Type:  New feature   |   Status:  new
Component:  contrib.messages  |  Version:  1.2-beta
 Severity:  Normal|   Resolution:
 Keywords:  messages, expire  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by marekw2143):

 * status:  assigned => new
 * owner:  marekw2143 =>
 * ui_ux:   => 0
 * easy:   => 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] #17160: Exception with CachedStaticFilesStorage

2011-11-03 Thread Django
#17160: Exception with CachedStaticFilesStorage
-+-
 Reporter:  AndrewG  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  contrib.staticfiles  |  Version:  SVN
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
Has patch:  0|  Unreviewed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by anonymous):

 Same error on r17066 and r17067.

-- 
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] #16563: Error pickling request.user

2011-11-03 Thread Django
#16563: Error pickling request.user
-+
 Reporter:  zero.fuxor@… |Owner:  nobody
 Type:  Bug  |   Status:  reopened
Component:  contrib.auth |  Version:  1.3
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by anonymous):

 Same problem with Django 1.4 (trunk), but in Django 1.3 all fine
 {{{
 from django.core.cache import cache
 car = Car.objects.get(pk=8809)
 car.name = 'test'
 car.save()
 cache.set('test', request.user, 1)
 }}}
 Raise error:
 can't pickle function objects
 C:\Python\lib\site-packages\django\core\cache\backends\locmem.py in set
 self._set(key, pickle.dumps(value), timeout)

 C:\Python\lib\copy_reg.py in _reduce_ex
 raise TypeError, "can't pickle %s objects" % base.__name__

-- 
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] #12698: ValidationError bug when passing a string message argument in model validation

2011-11-03 Thread Django
#12698: ValidationError bug when passing a string message argument in model
validation
-+-
 Reporter:  orokusaki|Owner:  nobody
 Type:  Uncategorized|   Status:  reopened
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  core.exceptions, |  Needs documentation:  0
  core.forms.models, model   |  Patch needs improvement:  0
  validation |UI/UX:  0
Has patch:  1|
  Needs tests:  1|
Easy pickings:  0|
-+-
Changes (by joel.rosen@…):

 * status:  closed => reopened
 * severity:   => Normal
 * type:   => Uncategorized
 * easy:   => 0
 * ui_ux:   => 0
 * resolution:  fixed =>


Comment:

 Has this been resolved?  I'm still getting this error when I raise a
 ValidationError in a model's validate_unique() method.  I looked at the
 code in the patch and then at the code in my django installation (1.3.1)
 and saw it hadn't been applied.  I figured it must have been fixed in the
 SVN release, so I just upgraded, and it hasn't.  Anyone?

-- 
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] #17160: Exception with CachedStaticFilesStorage

2011-11-03 Thread Django
#17160: Exception with CachedStaticFilesStorage
-+-
 Reporter:  AndrewG  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  contrib.staticfiles  |  Version:  SVN
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
Has patch:  0|  Unreviewed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by jezdez):

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


Comment:

 Could you please check if it worked before r17067 or r17068 as I don't
 have access to a Windows machine at the moment?

-- 
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] #17160: Exception with CachedStaticFilesStorage

2011-11-03 Thread Django
#17160: Exception with CachedStaticFilesStorage
-+
 Reporter:  AndrewG  |  Owner:  nobody
 Type:  Uncategorized| Status:  new
Component:  contrib.staticfiles  |Version:  SVN
 Severity:  Normal   |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+
 When run manage.py collectstatic with
 STATICFILES_STORAGE =
 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'

 Stop with
   File "C:\Python\lib\site-
 packages\django\contrib\staticfiles\storage.py", line 74, in hashed_name
 (clean_name, self))
 ValueError: The file 'images/arrows-ff.png' could not be found with
 .

 when process css file, but image arrows-ff.png exists.

-- 
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] #17159: Paginator.Page() should throw an exception for invalid [next|previous]_page_number()

2011-11-03 Thread Django
#17159: Paginator.Page() should throw an exception for invalid
[next|previous]_page_number()
+--
 Reporter:  mehta.apurva@…  |Owner:  mehta.apurva@…
 Type:  Bug |   Status:  new
Component:  Core (Other)|  Version:  1.3
 Severity:  Normal  |   Resolution:
 Keywords:  paginator core  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  1   |UI/UX:  0
+--
Changes (by anonymous):

 * owner:  nobody => mehta.apurva@…
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-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] #17159: Paginator.Page() should throw an exception for invalid [next|previous]_page_number()

2011-11-03 Thread Django
#17159: Paginator.Page() should throw an exception for invalid
[next|previous]_page_number()
+
 Reporter:  mehta.apurva@…  |  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Core (Other)|Version:  1.3
 Severity:  Normal  |   Keywords:  paginator core
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  1   |  UI/UX:  0
+
 The next_page_number() and previous_page_number() currently return an
 incremented or decremented number without verifying if the page is in the
 range or not. They should instead throw an exception.

 Repro Steps
 ===
 >>> from django.core.paginator import Paginator
 >>> objects = ['john', 'paul', 'george', 'ringo', 'bill', 'gates',
 'steve', 'jobs']
 >>> p = Paginator(objects, 2)
 >>> p.count
 8
 >>> p.num_pages
 4
 >>> p.page_range
 [1, 2, 3, 4]
 >>> p.page(1).has_previous()
 False
 >>> p.page(4).has_next()
 False
 >>> p.page(1).previous_page_number()  ### Should throw Exception
 0
 >>> p.page(4).next_page_number() ### Should throw Exception
 5
 >>>

-- 
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] #17158: django.db.backends.BaseDatabaseOperations.last_executed_query issue

2011-11-03 Thread Django
#17158: django.db.backends.BaseDatabaseOperations.last_executed_query issue
--+
 Reporter:  a.gerchenov@… |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.2
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 Method "last_executed_query" should not always return "smart_unicode(sql)
 % u_params". If params variable is empty it should return just
 "smart_unicode(sql)". The problem is when we try to execute query with
 MySQL DATA_FORMAT function it says error.

 Example:

 {{{
 from django.db import connection
 c = connection.cursor()
 c.execute("SELECT * FROM VAR_current GROUP BY DATE_FORMAT(closing_month,
 '%Y-%m');")
 print c.fetchall()
 }}}

 Error:

 {{{
 django/db/backends/__init__.py", line 216, in last_executed_query
 return smart_unicode(sql) % u_params
 TypeError: not enough arguments for format string
 }}}

 This issue is closely related to #9055.

-- 
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] r17068 - in django/trunk: django/contrib/staticfiles tests/regressiontests/staticfiles_tests tests/regressiontests/staticfiles_tests/project/documents/cached

2011-11-03 Thread noreply
Author: jezdez
Date: 2011-11-03 03:51:02 -0700 (Thu, 03 Nov 2011)
New Revision: 17068

Modified:
   django/trunk/django/contrib/staticfiles/storage.py
   
django/trunk/tests/regressiontests/staticfiles_tests/project/documents/cached/relative.css
   django/trunk/tests/regressiontests/staticfiles_tests/tests.py
Log:
Fixed #16966 -- Stopped CachedStaticFilesStorage from choking on querystrings 
and path fragments.

Modified: django/trunk/django/contrib/staticfiles/storage.py
===
--- django/trunk/django/contrib/staticfiles/storage.py  2011-11-02 17:45:32 UTC 
(rev 17067)
+++ django/trunk/django/contrib/staticfiles/storage.py  2011-11-03 10:51:02 UTC 
(rev 17068)
@@ -3,6 +3,8 @@
 import os
 import posixpath
 import re
+from urllib import unquote
+from urlparse import urlsplit, urlunsplit
 
 from django.conf import settings
 from django.core.cache import (get_cache, InvalidCacheBackendError,
@@ -64,23 +66,28 @@
 self._patterns.setdefault(extension, []).append(compiled)
 
 def hashed_name(self, name, content=None):
+parsed_name = urlsplit(unquote(name))
+clean_name = parsed_name.path
 if content is None:
-if not self.exists(name):
+if not self.exists(clean_name):
 raise ValueError("The file '%s' could not be found with %r." %
- (name, self))
+ (clean_name, self))
 try:
-content = self.open(name)
+content = self.open(clean_name)
 except IOError:
 # Handle directory paths
 return name
-path, filename = os.path.split(name)
+path, filename = os.path.split(clean_name)
 root, ext = os.path.splitext(filename)
 # Get the MD5 hash of the file
 md5 = hashlib.md5()
 for chunk in content.chunks():
 md5.update(chunk)
 md5sum = md5.hexdigest()[:12]
-return os.path.join(path, u"%s.%s%s" % (root, md5sum, ext))
+hashed_name = os.path.join(path, u"%s.%s%s" % (root, md5sum, ext))
+unparsed_name = list(parsed_name)
+unparsed_name[2] = hashed_name
+return urlunsplit(unparsed_name)
 
 def cache_key(self, name):
 return u'staticfiles:cache:%s' % name
@@ -98,7 +105,7 @@
 hashed_name = self.hashed_name(name)
 # set the cache if there was a miss (e.g. if cache server goes 
down)
 self.cache.set(cache_key, hashed_name)
-return super(CachedFilesMixin, self).url(hashed_name)
+return unquote(super(CachedFilesMixin, self).url(hashed_name))
 
 def url_converter(self, name):
 """
@@ -132,9 +139,9 @@
 else:
 start, end = 1, sub_level - 1
 joined_result = '/'.join(name_parts[:-start] + url_parts[end:])
-hashed_url = self.url(joined_result, force=True)
+hashed_url = self.url(unquote(joined_result), force=True)
 # Return the hashed and normalized version to the file
-return 'url("%s")' % hashed_url
+return 'url("%s")' % unquote(hashed_url)
 return converter
 
 def post_process(self, paths, dry_run=False, **options):

Modified: 
django/trunk/tests/regressiontests/staticfiles_tests/project/documents/cached/relative.css
===
--- 
django/trunk/tests/regressiontests/staticfiles_tests/project/documents/cached/relative.css
  2011-11-02 17:45:32 UTC (rev 17067)
+++ 
django/trunk/tests/regressiontests/staticfiles_tests/project/documents/cached/relative.css
  2011-11-03 10:51:02 UTC (rev 17068)
@@ -1,5 +1,6 @@
 @import url("../cached/styles.css");
 @import url("absolute.css");
+@import url("absolute.css#eggs");
 body {
 background: #d3d6d8 url(img/relative.png);
 }
\ No newline at end of file

Modified: django/trunk/tests/regressiontests/staticfiles_tests/tests.py
===
--- django/trunk/tests/regressiontests/staticfiles_tests/tests.py   
2011-11-02 17:45:32 UTC (rev 17067)
+++ django/trunk/tests/regressiontests/staticfiles_tests/tests.py   
2011-11-03 10:51:02 UTC (rev 17068)
@@ -61,7 +61,7 @@
 self.addCleanup(os.unlink, _nonascii_filepath)
 
 def assertFileContains(self, filepath, text):
-self.assertTrue(text in self._get_file(smart_unicode(filepath)),
+self.assertIn(text, self._get_file(smart_unicode(filepath)),
 u"'%s' not in '%s'" % (text, filepath))
 
 def assertFileNotFound(self, filepath):
@@ -72,11 +72,15 @@
 template = loader.get_template_from_string(template)
 return template.render(Context(kwargs)).strip()
 
-def assertTemplateRenders(self, template, result, **kwargs):
+def static_template_snippet(self, path):
+return "

Re: [Django] #16966: CachedStaticFilesStorage chokes on file references that end with a '#' or '?' character

2011-11-03 Thread Django
#16966: CachedStaticFilesStorage chokes on file references that end with a '#' 
or
'?' character
-+-
 Reporter:  mkai |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.staticfiles  |  Version:  SVN
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
  CachedStaticFilesStorage,  |  Needs documentation:  0
  CachedFilesMixin, collectstatic|  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by jezdez):

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


Comment:

 In [17068]:
 {{{
 #!CommitTicketReference repository="" revision="17068"
 Fixed #16966 -- Stopped CachedStaticFilesStorage from choking on
 querystrings and path fragments.
 }}}

-- 
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] #17157: CSRF fails in cross-domain iframes on IE

2011-11-03 Thread Django
#17157: CSRF fails in cross-domain iframes on IE
---+
 Reporter:  akaihola   |  Owner:  nobody
 Type:  New feature| Status:  new
Component:  Documentation  |Version:  SVN
 Severity:  Normal |   Keywords:  csrf iframe ie
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  1  |  UI/UX:  0
---+
 Internet Explorer >=6
 [http://en.wikipedia.org/wiki/HTTP_cookie#Browser_settings blocks third-
 party cookies by default].
 This [http://bitkickers.blogspot.com/2011/06/django-csrf-verification-
 failed-in-ie.html causes CSRF to fail]
 for forms which are in iframes which come from a different domain. The
 user gets this message:
 {{{
 Forbidden (403)
 CSRF verification failed. Request aborted.
 }}}

 When a developer hits this problem,
 [http://stackoverflow.com/questions/7441889/#7991359 possible solutions]
 are

 * not use an iframe
 * bring the iframed page under the same domain as the main page
 * use the [https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#edge-
 cases @csrf_exempt]
   decorator for the form
 * add HTTP headers to tell the browser to allow third-party cookies (see
   [http://bitkickers.blogspot.com/2011/06/django-csrf-verification-failed-
 in-ie.html Chase Seibert's work around #3])

 None of the solutions can be made for the developer by Django,
 so the best Django can do is to provide a note about this corner case in
 the
 [https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#scenarios
 Scenarios section of the CSRF documentation].

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

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