Re: [Django] #27328: return `Set-Cookie` if sessionid= None value

2016-10-12 Thread Django
#27328: return `Set-Cookie` if sessionid=  None value
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:  Bug  |   Status:  new
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ramin Farajpour Cami):

 > Even if we were to change Django to not delete empty sessionid cookies,
 that should be a change to the _session_ code (to not call delete_cookie
 in that case), not a change to the cookie parsing code. Does that seem
 right?

 Hi Collin,

 you are right,

 > and then place it before SessionMiddleware:

 {{{
 class RemoveEmptyCookiesMiddleware:

 def process_request(request):
 request.COOKIES = {k: v for k, v in request.COOKIES.items() if k
 and v}
 }}}

 i'm confused , we have here two `for` loop `1- process_request()`  `2-
 parse_cookie()`, what happen for performance and speed !!!???

 so, do you think eligible this method(`RemoveEmptyCookiesMiddleware`)
 merged to django master?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.d46320c45838455b68ba13404deece02%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27334: File uploads could rename temporary files rather than copying them

2016-10-12 Thread Django
#27334: File uploads could rename temporary files rather than copying them
-+-
 Reporter:  Adam Chidlow |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  FileField,   | Triage Stage:  Accepted
  TemporaryUploadedFile  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Adam Chidlow):

 Thanks for taking a second look.

 I've written a test and put it and the one line change into a GitHub pull
 request.

 This is my first pull request to django, if I've made any mistakes in
 coding conventions or the pull request process please let me know and I'll
 correct 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.e634b7e118f6c49e361416b0cbbc85c5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19705: CommonMiddleware handles If-None-Match incorrectly

2016-10-12 Thread Django
#19705: CommonMiddleware handles If-None-Match incorrectly
-+-
 Reporter:  Aymeric Augustin |Owner:  Denis
 |  Cornehl
 Type:  Bug  |   Status:  closed
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Kevin Christopher Henry):

 [https://github.com/django/django/pull/7378 PR] for having GZipMiddleware
 set gzip modification times to 0.

 I'm not aware of any downside, and the advantage is that
 `ConditionalGetMiddleware` will work (that is, produce 304 Not Modified
 responses) on gzipped content (e.g. if the order of the middlewares is
 reversed, or if the `gzip_page()` view decorator is used).

 This usage is allowed by the specification ("MTIME = 0 means no time stamp
 is available", Section 2.3.1 of [https://tools.ietf.org/html/rfc1952 RFC
 1952]) and is in common use (for example, Java's `GZipOutputStream` sets
 the MTIME to 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.7ffd275a8e832d1694b7d1dcb77307e3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27340: Model pre_init signal should provide an `instance` argument

2016-10-12 Thread Django
#27340: Model pre_init signal should provide an `instance` argument
-+-
 Reporter:  Ask Solem Hoel   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ask Solem Hoel):

 * needs_docs:   => 0
 * needs_better_patch:   => 0
 * component:  Uncategorized => Database layer (models, ORM)
 * needs_tests:   => 0
 * type:  Uncategorized => New feature


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.ec4b4acd3ad497522e2432d3dba745cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27340: Model pre_init signal should provide an `instance` argument

2016-10-12 Thread Django
#27340: Model pre_init signal should provide an `instance` argument
+
 Reporter:  Ask Solem Hoel  |  Owner:  nobody
 Type:  Uncategorized   | Status:  new
Component:  Uncategorized   |Version:  1.10
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+
 I struggle to find reasons as to why this argument is ommitted.

 The current signature for pre_init is:

 {{{
 class Model(six.with_metaclass(ModelBase)):
 _deferred = False

 def __init__(self, *args, **kwargs):
 signals.pre_init.send(sender=self.__class__, args=args,
 kwargs=kwargs)
 }}}

 I suggest that the signature should be:

 {{{
 class Model(six.with_metaclass(ModelBase)):
 _deferred = False

 def __init__(self, *args, **kwargs):
 signals.pre_init.send(sender=self.__class__, args=args,
 kwargs=kwargs, instance=self)
 }}}

 Or alternatively, that the `post_init` signal contains the args and kwargs
 used to construct the model.

 The reason for wanting access to the instance in pre_init is that I want
 to track changes
 to the model since it was first retrieved from the database - This is
 currently not possible without subclassing Model,
 and that is not a realistic option for us as we deal with third party
 models.

 The current way we handle this is by using `pre_save` to fetch the row
 from the database again, but this is suboptimal
 and this a simple change would allow us to do 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/046.fc94fb75509c1f2b46e962efc1fa2670%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27200: Provide makemigrations router.allow_migrate() with a model_name (was: router.allow_migrate without a model/hint, what is it supposed to do? Does it make sense to make that call?)

2016-10-12 Thread Django
#27200: Provide makemigrations router.allow_migrate() with a model_name
-+-
 Reporter:  Joseph Kahn  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Migrations   |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:  makemigrations,  | Triage Stage:  Accepted
  router, allow_migrate  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * has_patch:  0 => 1
 * stage:  Unreviewed => Accepted
 * type:  Bug => Cleanup/optimization


Comment:

 [https://github.com/django/django/pull/7377 PR]

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.9b52f6375866397dea1a53cd51922db8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27267: Renaming a primary key fails with "cannot drop constraint on table because other objects depend on it"

2016-10-12 Thread Django
#27267: Renaming a primary key fails with "cannot drop constraint on table 
because
other objects depend on it"
+--
 Reporter:  Melvyn Sopacua  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  1.8
 Severity:  Normal  |   Resolution:  needsinfo
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by Tim Graham):

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


Comment:

 I created #27338 and #27339 based on issues I could find. I still don't
 see steps on how to reproduce the "cannot drop constraint" error.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.798cf8d0263818e0f0628789f5650da0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27338: Running an AlterField to change a CharField primary key to AutoField crashes

2016-10-12 Thread Django
#27338: Running an AlterField to change a CharField primary key to AutoField
crashes
--+
 Reporter:  Tim Graham|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  master
 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
--+

Comment (by Tim Graham):

 #27339 is related.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.2905c57973a7130873b57d9ddc514ce5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27339: Adding an AutoField prompts for a default which creates a broken migration

2016-10-12 Thread Django
#27339: Adding an AutoField prompts for a default which creates a broken 
migration
+
   Reporter:  Tim Graham|  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Migrations|Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Change:
 {{{
 class Foo(models.Model):
 id = models.CharField(max_length=20, primary_key=True)
 }}}
 to:
 {{{
 class Foo(models.Model):
 character_id = models.AutoField(primary_key=True)
 }}}
 The created migration has these operations:
 {{{
 migrations.RemoveField(
 model_name='foo',
 name='id',
 ),
 migrations.AddField(
 model_name='foo',
 name='character_id',
 field=models.AutoField(default=0, primary_key=True, serialize=False),
 preserve_default=False,
 ),
 }}}
 (entering 0 at the default prompt). Running the migration on PostgreSQL
 gives: `ProgrammingError: multiple default values specified for column
 "character_id" of table "t27267_foo"`. I'm not sure if this can be made to
 work sensibly. Removing the default from the migration operation works,
 but if there's an existing data, the `character_id` field must be
 populated somehow (perhaps a `RunPython` could be done in the same
 migration?). #27338 is related. This was discovered while investigating
 #27267.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.a159e3165649a04bcbe6411cf2512ecb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27338: Running an AlterField to change a CharField primary key to AutoField crashes

2016-10-12 Thread Django
#27338: Running an AlterField to change a CharField primary key to AutoField
crashes
+
   Reporter:  Tim Graham|  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Migrations|Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 For example: change `id = models.CharField(max_length=20,
 primary_key=True)` to `id = models.AutoField(primary_key=True)`. It
 generates this operation:
 {{{
 migrations.AlterField(
 model_name='foo',
 name='id',
 field=models.AutoField(primary_key=True, serialize=False),
 ),
 }}}
 Running it on PostgreSQ gives: `django.db.utils.ProgrammingError: operator
 class "varchar_pattern_ops" does not accept data type integer`. I'm not
 sure if this can be made to work sensibly. Is it possible to autopopulate
 the `AutoField`? I ran into this situation while investigating #27267.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.36bf92ab9d12806a41dd566a1f6841a9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24607: Serialization (and deserialization) of MTI models doesn't work with natural keys

2016-10-12 Thread Django
#24607: Serialization (and deserialization) of MTI models doesn't work with 
natural
keys
--+
 Reporter:  Denys Duchier |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  Core (Serialization)  |  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"74a575eb7296fb04e1fc2bd4e3f68dee3c66ee0a" 74a575eb]:
 {{{
 #!CommitTicketReference repository=""
 revision="74a575eb7296fb04e1fc2bd4e3f68dee3c66ee0a"
 Fixed #24607 -- Serialized natural keys in multi-table inheritance models.
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.919e7bb7cb7865a9159db484c0ec4709%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21046: django-admin.py always creates files with Unix line endings

2016-10-12 Thread Django
#21046: django-admin.py always creates files with Unix line endings
-+-
 Reporter:  Florian Sening   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  1.5
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 I asked for feedback [https://groups.google.com/d/topic/django-
 users/-b6kql_CzYE/discussion on django-users].

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.e3e44eb6ee7770e8ee4b8570f1342246%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27324: Simplify get_constraints on Oracle

2016-10-12 Thread Django
#27324: Simplify get_constraints on Oracle
-+-
 Reporter:  felixxm  |Owner:  felixxm
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  oracle   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Accepted => Ready for checkin


Comment:

 Looks good, pending feedback from anyone interested in Oracle.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.e20d2ad6bbc34f19d2c98c092cfce630%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27337: Convoluted MTI with abstract model mixin fails on PY2, works on PY3

2016-10-12 Thread Django
#27337: Convoluted MTI with abstract model mixin fails on PY2, works on PY3
-+-
 Reporter:  Tim Heap |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  python2, mti py2 | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Heap):

 I will eagerly look forward to the day we can all drop Python 2 support.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.822a59bb8d21fca41c775edfa1665330%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27337: Convoluted MTI with abstract model mixin fails on PY2, works on PY3

2016-10-12 Thread Django
#27337: Convoluted MTI with abstract model mixin fails on PY2, works on PY3
-+-
 Reporter:  Tim Heap |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.10
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  python2, mti py2 | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * keywords:  python2, mti => python2, mti py2
 * needs_docs:   => 0
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 I'm not going to spend any time investigating the issue, but I'll assume
 the report is valid and accept the ticket. We're accepting Python
 2-specific bug fixes until mid-January 2017 (1.11 alpha), at which point
 we'll close any unresolved issues that only affect Python 2 as wontfix as
 master will become Python 3 only.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.1ffab1109d60d2adcaf9e94bca369a7c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27337: Convoluted MTI with abstract model mixin fails on PY2, works on PY3

2016-10-12 Thread Django
#27337: Convoluted MTI with abstract model mixin fails on PY2, works on PY3
--+--
 Reporter:  Tim Heap  |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.10
 Severity:  Normal|   Keywords:  python2, mti
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+--
 This is a rather convoluted situation, but with the set up below, PY2
 fails but PY3 works. For context, this is roughly the same model set up
 used in Wagtail:

 * A Page class with custom Metaclass,
 * Developers extend Page using MTI to make custom page types
 * Mixins can be used for adding common functionality from e.g. plugins.

 {{{#!python
 from django.db import models
 from django.utils import six
 from django.test import TestCase

 class ConvolutedMTIWithAbtractMixinTests(TestCase):
 def test_convoluted_mti(self):

 class PageBase(type(models.Model)):
 """
 Wagtail's metaclass does some things, but nothing related.
 This empty metaclass still spoils things for some reason?
 """

 class Page(six.with_metaclass(PageBase, models.Model)):
 """The base page model. Every page should inherit from
 this."""
 url = models.CharField(max_length=255)

 class Meta:
 app_label = 'tests'

 class FancyMixin(models.Model):
 """A model mixin with extra functionality, including extra
 model fields."""
 fancy_field = models.CharField(max_length=10)

 class Meta:
 abstract = True

 class MyPage(FancyMixin, Page):
 """My custom page type. Extends Page using MTI, and mixes in
 FancyMixin"""
 content = models.CharField(max_length=255)

 class Meta:
 app_label = 'tests'

 # The page_ptr from MyPage to Page is created.
 self.assertTrue(hasattr(MyPage, 'page_ptr'))

 # The other fields are all there
 self.assertTrue(MyPage._meta.get_field('url'))
 self.assertTrue(MyPage._meta.get_field('fancy_field'))
 self.assertTrue(MyPage._meta.get_field('content'))

 # The page_ptr field exists as a parent pointer to page.
 self.assertIn(Page, MyPage._meta.parents)
 self.assertIsInstance(MyPage._meta.parents[Page],
 models.OneToOneField)

 # But Django on py27 gets confused, and 'page_ptr' is not
 'registered'
 # (There is no nice _meta.has_field, so try: catch will do.)
 try:
 MyPage._meta.get_field('page_ptr')
 except FieldDoesNotExist:
 self.fail("MyPage.page_ptr field is missing!")
 }}}

 I stuck this test in `tests/model_inheritance/tests.py` when testing this
 out, but the tests can probably go anywhere. For some tests failing in the
 wild, this Travis CI build (https://travis-
 ci.org/takeflight/wagtail/builds/167013485) of some patches to Wagtail
 shows this happening on Django 1.8, 1.9 and 1.10 at least, but only on
 Python 2.7.

 I've poked around a little bit to see if I could work out what is going
 on, but I am not familiar enough with the model internals to make much
 headway.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.61257da253f07b79837013a87f34d933%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27323: Optimize Oracle introspection by using USER_SEQUENCES instead of USER_CATALOG

2016-10-12 Thread Django
#27323: Optimize Oracle introspection by using USER_SEQUENCES instead of
USER_CATALOG
-+-
 Reporter:  felixxm  |Owner:  felixxm
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Oracle sequences | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"794f866cecb7598c1537067cc1d932d95a86f439" 794f866c]:
 {{{
 #!CommitTicketReference repository=""
 revision="794f866cecb7598c1537067cc1d932d95a86f439"
 Fixed #27323 -- Optimized Oracle introspection by using USER_SEQUENCES
 instead of USER_CATALOG.
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.d8e1af5d2c6121d2fa464d79bb3be455%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters (was: Allow FilterSpecs to return Q-likes)

2016-10-12 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tim Graham):

 * has_patch:  1 => 0
 * type:  New feature => Bug
 * 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ea2ec131fa660d5a427e51507db37965%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19705: CommonMiddleware handles If-None-Match incorrectly

2016-10-12 Thread Django
#19705: CommonMiddleware handles If-None-Match incorrectly
-+-
 Reporter:  Aymeric Augustin |Owner:  Denis
 |  Cornehl
 Type:  Bug  |   Status:  closed
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Kevin Christopher Henry):

 [https://github.com/django/django/pull/7376 PR] for having
 `GZipMiddleware` make `ETags` weak to allow conditional responses.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.4d5610386ee11c409cc5a5c0e337a92b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27331: Proposed opt_group argument for ModelChoiceField and ModelMultipleChoiceField

2016-10-12 Thread Django
#27331: Proposed opt_group argument for ModelChoiceField and
ModelMultipleChoiceField
-+-
 Reporter:  Héctor Urbina|Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  ModelChoiceField | Triage Stage:
  optgroup   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


Comment:

 As the discussion has stalled here, you can write to the
 DevelopersMailingList for other opinions. Thanks.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.704b48da0c97f49321ee9e76c2e0d428%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27332: Specifying additional ON arguments, and more flexibility with joins

2016-10-12 Thread Django
#27332: Specifying additional ON arguments, and more flexibility with joins
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:
  (models, ORM)  |
 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 Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 I don't know. I'll tentatively accept the ticket but it might not be
 feasible to construct every query through the ORM.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.506b66e23a261dc985e09ce683872adb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27335: Avoid object save during QuerySet.update_or_create() when there were no changes (was: Avoid object save during QuerySet.update_or_create when there were no changes)

2016-10-12 Thread Django
#27335: Avoid object save during QuerySet.update_or_create() when there were no
changes
-+-
 Reporter:  tonnzor  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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 Tim Graham):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.7ec3230f0a2029d9e1331894f565a134%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27334: File uploads could rename temporary files rather than copying them

2016-10-12 Thread Django
#27334: File uploads could rename temporary files rather than copying them
-+-
 Reporter:  Adam Chidlow |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  FileField,   | Triage Stage:  Accepted
  TemporaryUploadedFile  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.17fb7144e206f47ea7dea92410f63521%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27333: EmailMessage.message().as_string() incorrectly base64 encoded on Python 3

2016-10-12 Thread Django
#27333: EmailMessage.message().as_string() incorrectly base64 encoded on Python 
3
-+-
 Reporter:  aRkadeFR |Owner:  Claude
 |  Paroz
 Type:  Bug  |   Status:  closed
Component:  Core (Mail)  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  email, base64| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz ):

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


Comment:

 In [changeset:"458e2fbfcc0a06d7d55ff5a1dcd79c91c64e8138" 458e2fbf]:
 {{{
 #!CommitTicketReference repository=""
 revision="458e2fbfcc0a06d7d55ff5a1dcd79c91c64e8138"
 Fixed #27333 -- Prevented BASE64 encoding in message.as_string() on Python
 3

 Thanks Tim Graham for the review.
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.1094cc5085d395622e106cfdd67685e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19705: CommonMiddleware handles If-None-Match incorrectly

2016-10-12 Thread Django
#19705: CommonMiddleware handles If-None-Match incorrectly
-+-
 Reporter:  Aymeric Augustin |Owner:  Denis
 |  Cornehl
 Type:  Bug  |   Status:  closed
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"bd7237d7ec5bb66add624a0cf31ac85f9aceadce" bd7237d7]:
 {{{
 #!CommitTicketReference repository=""
 revision="bd7237d7ec5bb66add624a0cf31ac85f9aceadce"
 Fixed #19705 -- Set proper headers on conditional Not Modified responses.
 }}}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.8fac8049995ae9840556efc6d138a7b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #4994: Cookies are not sent back for HTTP Not Modified (304) from CommonMiddleware

2016-10-12 Thread Django
#4994: Cookies are not sent back for HTTP Not Modified (304) from 
CommonMiddleware
-+-
 Reporter:  colin@…  |Owner:  Malcolm
 |  Tredinnick
 Type:  Bug  |   Status:  closed
Component:  HTTP handling|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  etags| Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * ui_ux:   => 0
 * type:   => Bug
 * severity:   => Normal
 * easy:   => 0


Old description:

> The CommonMiddleware functionality generates a new HTTP Response object
> (304) when the E-Tag matches.  This new response does not include the
> Set-Cookie header, which then breaks the login page from
> django.contrib.auth.views.login.
>
> This also violates the Cookie specification (see
> [http://wp.netscape.com/newsref/std/cookie_spec.html]): If a proxy server
> receives a response which contains a Set-cookie header, it should
> propagate the Set-cookie header to the client, regardless of whether the
> response was 304 (Not Modified) or 200 (OK).
>
> The attached patch solves this by moving any set cookies over into the
> new response object.

New description:

 The CommonMiddleware functionality generates a new HTTP Response object
 (304) when the E-Tag matches.  This new response does not include the Set-
 Cookie header, which then breaks the login page from
 django.contrib.auth.views.login.

 This also violates [https://curl.haxx.se/rfc/cookie_spec.html the Cookie
 specification]: If a proxy server receives a response which contains a
 Set-cookie header, it should propagate the Set-cookie header to the
 client, regardless of whether the response was 304 (Not Modified) or 200
 (OK).

 Apache has [https://bz.apache.org/bugzilla/show_bug.cgi?id=18388 similar
 behavior].

 The attached patch solves this by moving any set cookies over into the new
 response object.

--

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/075.39bd04860e2d0efa392e2ab345a09c5f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10541: cannot save file from a pipe on Python 2 (was: cannot save file from a pipe)

2016-10-12 Thread Django
#10541: cannot save file from a pipe on Python 2
-+-
 Reporter:  liangent |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  File |  Version:  1.3
  uploads/storage|   Resolution:
 Severity:  Normal   |  worksforme
 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 Tim Graham):

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


Comment:

 The test passes on Python 3 and given the lack of interest in this issue,
 I think it's fine to close

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.308b58df636b4f6d276e98a990f1bc64%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration template

2016-10-12 Thread Django
#27336: Whitespace control django configuration template
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin):

 Well I'm not sure what needs to be explained... The Django admin uses the
 Django template language, that's it...

 It was implemented before Jinja2 existed and 10 years before Django added
 first class support for Jinja2.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.6942244cd0ca1619ddca1f892e5361c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27328: return `Set-Cookie` if sessionid= None value

2016-10-12 Thread Django
#27328: return `Set-Cookie` if sessionid=  None value
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:  Bug  |   Status:  new
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Collin Anderson):

 If you want, you can easily create a Middleware the removes these cookies:
 {{{
 class RemoveEmptyCookiesMiddleware:

 def process_request(request):
 request.COOKIES = {k: v for k, v in request.COOKIES.items() if k
 and v}

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.55fce0e39be53bf2961cfabdc62f1bd5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27334: File uploads could rename temporary files rather than copying them

2016-10-12 Thread Django
#27334: File uploads could rename temporary files rather than copying them
-+-
 Reporter:  Adam Chidlow |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  FileField,   | Triage Stage:
  TemporaryUploadedFile  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 I didn't look into the specifics but existing tests are passing with that
 change which is a good sign. Can you write a new test?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b2c4a29669aabbc231375f9fb5db9c1f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27328: return `Set-Cookie` if sessionid= None value

2016-10-12 Thread Django
#27328: return `Set-Cookie` if sessionid=  None value
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:  Bug  |   Status:  new
Component:  HTTP handling|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Collin Anderson):

 Hi Ramin,

 The goal of `parse_cookie()` is to try to give an exact as possible `dict`
 representation of the `Cookie:` header. It seems intuitive to me that
 `sessionid=; csrftoken=d` would translate to `{'sessionid': '',
 'csrftoken': 'd'}`. You want `parse_cookie()` to ignore cookies with no
 value, but Django has always kept cookies with empty values like these,
 even before I refactored the parse_cookie code recently. Before that
 Django used Python's Cookie library to parse cookies, which also keeps
 cookies with empty values.

 Even if we were to change Django to not delete empty `sessionid` cookies,
 that should be a change to the _session_ code (to not call `delete_cookie`
 in that case), not a change to the cookie parsing code. Does that seem
 right?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.e34b9f2dcfe052a212f8572b5f220606%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27334: File uploads could rename temporary files rather than copying them

2016-10-12 Thread Django
#27334: File uploads could rename temporary files rather than copying them
-+-
 Reporter:  Adam Chidlow |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  FileField,   | Triage Stage:
  TemporaryUploadedFile  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Adam Chidlow):

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


Comment:

 I'm pretty sure this is not a duplicate of #21602. From what I understand
 that ticket is talking about potential race conditions in a few different
 scenarios. In this case, the consequences of solving this ticket would
 solve one particular case of that ticket, but solving the linked ticket
 wouldn't necessarily do so in a way that solves this ticket as well.

 Furthermore, I think this ticket should just be a one-line fix.
 {{{
 def pre_save(self, model_instance, add):
 "Returns field's value just before saving."
 file = super(FileField, self).pre_save(model_instance, add)
 if file and not file._committed:
 # Commit the file to storage prior to saving the model
 file.save(file.name, file, save=False)
 return file
 }}}
 Should change the file.save call to:
 {{{
 file.save(file.name, file.file, save=False)
 }}}
 This will work, since the only times `_committed` is `False` is if the
 file has been deleted (in which case `bool(file)` is `False`), or a
 `FileField` has been set to an instance of `File` that is not also an
 instance of `FieldFile`, in which case passing the `File` object that was
 set to the field as the contents to `Storage.save` is perfectly valid.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.8c646a052150199e732819299cfc9703%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration template (was: Whitespace control django configuration Jinja2)

2016-10-12 Thread Django
#27336: Whitespace control django configuration template
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.4b846a178a89f5c725afa85d51c404e0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ramin Farajpour Cami):

 Replying to [comment:7 Aymeric Augustin]:
 > It's amazing that the admin renders at all with Jinja2.

 can you explain why use django template language?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.f89a5653f2a5fc8eeab65a6f5410d868%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin):

 It's amazing that the admin renders at all with Jinja2.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.4c445e346e9408a998914984451728ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ramin Farajpour Cami):

 * resolution:  invalid => wontfix


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.e439f766a65f435f9756d8bd892cd88f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


Comment:

 The Django admin uses the Django template language (and its behavior won't
 be changed as #2594 says), not Jinja2.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.2873939fa6ee591cb017106434180c41%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ramin Farajpour Cami):

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


Comment:

 Steps :

 1- Go to http://127.0.0.1:8000/admin/auth/user/

 2- right click browser inspect-element on header message `WELCOME, Test.
 VIEW SITE / CHANGE PASSWORDUSER-TOOLSLOG OUT`

 3- you see many space from render (Attach image) ,

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.bfc9215b7fd6caba00847e7189560b0b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 |  worksforme
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ramin Farajpour Cami):

 * Attachment "123213.PNG" 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.ec60aa69c6950f630179069949b32239%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 |  worksforme
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aymeric Augustin):

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


Comment:

 You can pass arbitrary options such as `trim_blocks` to
 `jinja2.Environment` by putting them in `OPTIONS`:
 
https://docs.djangoproject.com/en/1.10/topics/templates/#django.template.backends.jinja2.Jinja2

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0efa014df204cde72ba57e4fbb4e06c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 Could you give more details about the problem, including steps to
 reproduce?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.d49aa440551a42f03c505c0177da0fd9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
-+-
 Reporter:  Ramin Farajpour  |Owner:  nobody
  Cami   |
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Template system  |  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Ramin Farajpour Cami):

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


Old description:

> Hi,
>
> i see on django admin panle anything Whitespace control Jinja2 ,so i
> think django can not support defulat whitespace control, this means
> `trim_blocks` and `lstrip_blocks enabled` is disbale,
>
> Jinja2 WhiteSpace Control is what you need :
> http://jinja.pocoo.org/docs/templates/#whitespace-control

New description:

 Hi,

 i see on django admin panle,there isn't Whitespace control on jinja2
 template ,so i think django can not support defulat whitespace control,
 this means `trim_blocks` and `lstrip_blocks enabled` is disbale,

 Jinja2 WhiteSpace Control is what you need :
 http://jinja.pocoo.org/docs/templates/#whitespace-control

--

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.f42ffb67bc1b9889355da009cf22cdf8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27336: Whitespace control django configuration Jinja2

2016-10-12 Thread Django
#27336: Whitespace control django configuration Jinja2
--+
 Reporter:  Ramin Farajpour Cami  |  Owner:  nobody
 Type:  Cleanup/optimization  | Status:  new
Component:  Template system   |Version:  1.10
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 Hi,

 i see on django admin panle anything Whitespace control Jinja2 ,so i think
 django can not support defulat whitespace control, this means
 `trim_blocks` and `lstrip_blocks enabled` is disbale,

 Jinja2 WhiteSpace Control is what you need :
 http://jinja.pocoo.org/docs/templates/#whitespace-control

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.ddf02c28b95eb26f25fd130475e2703a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18150: Uploading a file ending with a backslash fails

2016-10-12 Thread Django
#18150: Uploading a file ending with a backslash fails
--+
 Reporter:  Peter Kuma|Owner:  (none)
 Type:  Bug   |   Status:  new
Component:  File uploads/storage  |  Version:  1.4
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * owner:  supersteve9219 => (none)
 * status:  assigned => new


Comment:

 When updating a patch (please send a pull request these days), you also
 need update the ticket flags (uncheck "Needs documentation" and "Patch
 needs improvement") so that the ticket appears in the patch review queue.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.d9cf115f5202334cf30d050ffa33e177%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #27335: Avoid object save during QuerySet.update_or_create when there were no changes

2016-10-12 Thread Django
#27335: Avoid object save during QuerySet.update_or_create when there were no
changes
--+
 Reporter:  tonnzor   |  Owner:  nobody
 Type:  Cleanup/optimization  | Status:  new
Component:  Database layer (models, ORM)  |Version:  master
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 Right now when you use QuerySet.update_or_create -- it always saves into
 DB even if there were no changes.

 It would be great that if nothing is changed -- nothing is saved into DB.
 I found myself often reusing the same pattern in our projects.

 Use case:

 {{{#!python
 >>> from django.contrib.auth.models import User
 >>> User.objects.create(is_superuser=True, username='admin',
 is_active=True) # generate a use in DB to work with
 >>> # later in our code
 >>> user, created = User.objects.update_or_create(defaults={'is_active':
 True}, username='admin')
 # here an extra DB write though no data were changed
 }}}

 If you check the current code in master
 (https://github.com/django/django/blob/master/django/db/models/query.py#L477):
 {{{#!python
 try:
 obj = self.select_for_update().get(**lookup)
 except self.model.DoesNotExist:
 obj, created = self._create_object_from_params(lookup,
 params)
 if created:
 return obj, created
 for k, v in six.iteritems(defaults):
 setattr(obj, k, v() if callable(v) else v)
 obj.save(using=self.db) # HERE IT IS => always save
 }}}

 If object exists in DB, it would apply all attributes from `default` and
 save it even if there were no changes in values.

 We could do something like that:
 {{{#!python
 changed = False
 for k, v in six.iteritems(defaults):
 v = v() if callable(v) else v
 if v != getattr(obj, k):
 modified = True
 setattr(obj, k, v)
 if changed:
 obj.save(using=self.db) # save only if there were changes
 }}}

 If you think it is too complex for all use cases, we may put a flag for
 enabling / disabling this feature or have another method for this logic.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.4e2e256a5cdeb082cf9ea4ebfa1f9af2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21602: FileSystemStorage._save() Should Save to a Temporary Filename and Rename to Attempt to be Atomic

2016-10-12 Thread Django
#21602: FileSystemStorage._save() Should Save to a Temporary Filename and 
Rename to
Attempt to be Atomic
--+
 Reporter:  Kevin Stone   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  File uploads/storage  |  Version:  master
 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
--+

Comment (by Tim Graham):

 This is also suggested in #27334 (closed as 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.d391eb58ab0e889b3e5f0cc98d672554%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27334: File uploads could rename temporary files rather than copying them (was: File uploads create copies instead of renaming)

2016-10-12 Thread Django
#27334: File uploads could rename temporary files rather than copying them
-+-
 Reporter:  Adam Chidlow |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  File |  Version:  1.10
  uploads/storage|
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  FileField,   | Triage Stage:
  TemporaryUploadedFile  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * status:  new => closed
 * needs_better_patch:   => 0
 * component:  Uncategorized => File uploads/storage
 * resolution:   => duplicate
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Bug => Cleanup/optimization


Comment:

 Looks like a duplicate of #21602.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b61652d50a9851b0b8c5be9f5cc71fb5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13539: The delete confirmation page does not check for object-level permissions when building the related list

2016-10-12 Thread Django
#13539: The delete confirmation page does not check for object-level permissions
when building the related list
-+-
 Reporter:  Ion Scerbatiuc   |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  delete object-level  | Triage Stage:  Accepted
  permissions|
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Virtosu Bogdan):

 Can't the check be changed to `user.has_perm(p) or user.has_perm(p, obj)`
 ?
 Default backend will work as expected and custom object-level backends
 will work as long as they return `False` for `obj=None`, which should
 probably be the case.
 This would not have any performance costs.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.88e14c0f516df3fd37bc6dc60aca9b95%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.