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

2016-10-10 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):

 run this on browser and show response from network browser for see
 request/response:

 {{{
 def index(req):

 sess = {'sessionid':''}  ## if there is csrftoken, update dict
 with sessionid
 req.COOKIES.update(sess)
 print req.COOKIES

 return JsonResponse({'foo':'bar'})

 }}}

--
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.3dcd99870c8e8af529f1cfbbced9b38f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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:
 |  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/066.aff2c2477f5843e4a0682b87b3d30259%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:
  (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 MikiSoft):

 * status:  closed => new
 * resolution:  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/066.52676a6f4dcc77c883c7b39855860d10%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26426: Add a way to customize a QuerySet's joins

2016-10-10 Thread Django
#26426: Add a way to customize a QuerySet's joins
-+-
 Reporter:  Charlie DeTar|Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  QuerySet.extra   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by MikiSoft):

 [comment:5 Tim Graham], you have also closed this issue, is that by
 itention or not?

--
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.dfb90bad31dd4ef4e213fa40efdc40b7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 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 MikiSoft):

 [comment:5 Tim Graham],
 I understand that it's a duplicate, but in that issue it is provided the
 equivalent solution to the problem using `extra()` and `aggregate()`
 method, while here there isn't any possible one.

--
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.9b67b1e97b84db5aebbbe16a322f9069%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26426: Add a way to customize a QuerySet's joins

2016-10-10 Thread Django
#26426: Add a way to customize a QuerySet's joins
-+-
 Reporter:  Charlie DeTar|Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  QuerySet.extra   | 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:   => duplicate


Comment:

 I closed #27332 as 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 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.53eb8580fa1eaa0fe4da04016015ef8c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 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:   => duplicate


Comment:

 Duplicate of #26426.

--
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.e5f8d06284431d4d5fa53970bc110319%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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 Tim Graham):

 What does your Python code look like?

--
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.5f5e9857b04dc77f265fbb90509b5772%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:
  (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
-+-
Description changed by MikiSoft:

Old description:

> For example, this raw SQL:
> {{{
> SELECT event.*
> FROM event
> INNER JOIN
> business
> ON (event.business_id = business.id AND business.manager_id = 1)
> LEFT JOIN
> 'like'
> ON (event.id = object_id AND content_type_pk = 17 AND person_id = 1)
> ORDER BY COALESCE('like'.date, event.'when') DESC;
> }}}
>
> Can't be translated to the **equivalent** Django ORM expression even if
> using `extra()` command, because there isn't anywhere a possibility to
> set additional arguments on `JOIN` clauses. And when I'm using
> `filter(Q(argument) | ...)` it happens to always push all arguments to
> `WHERE` clause, which just causes a performance hit. I wish there was
> some parameter which would determine the destination of the argument,
> whether it has to go to the (last) `JOIN` clause, or to be put in `WHERE`
> (which goes by default). Also, I'm not able to comprehend how to perform
> correctly `LEFT JOIN` so in the end I have made some jumbled up
> expression which is completely inefficient (as it executes two queries,
> but it's the only way to do the same from above and get `QuerySet` in
> return):
>
> {{{
> from django.db.models import Q
> from django.db.models.functions import Coalesce
>
> Event.objects.filter(Q(pk__in=Like.objects.filter(person_id=1,
> content_type_id=17).prefetch_related('content_object').values_list('object_id',
> flat=True)) | Q(business__manager_id=1)).order_by(Coalesce('likes__date',
> 'when').desc())
> }}}
>
> I'm filing this issue because some (or probably many) people like me
> desperately need output in a form of a `QuerySet` because of the
> pagination and many other things `RawQuerySet` doesn't support, so using
> `raw()` isn't definitely an option in my case. Django has left me out of
> choice.

New description:

 For example, this raw SQL:
 {{{
 #!sql
 SELECT event.*
 FROM event
 INNER JOIN
 business
 ON (event.business_id = business.id AND business.manager_id = 1)
 LEFT JOIN
 'like'
 ON (event.id = object_id AND content_type_pk = 17 AND person_id = 1)
 ORDER BY COALESCE('like'.date, event.'when') DESC;
 }}}

 Can't be translated to the **equivalent** Django ORM expression even if
 using `extra()` command, because there isn't anywhere a possibility to set
 additional arguments on `JOIN` clauses. And when I'm using
 `filter(Q(argument) | ...)` it happens to always push all arguments to
 `WHERE` clause, which just causes a performance hit. I wish there was some
 parameter which would determine the destination of the argument, whether
 it has to go to the (last) `JOIN` clause, or to be put in `WHERE` (which
 goes by default). Also, I'm not able to comprehend how to perform
 correctly `LEFT JOIN` so in the end I have made some jumbled up expression
 which is completely inefficient (as it executes two queries, but it's the
 only way to do the same from above and get `QuerySet` in return):

 {{{
 #!python
 Event.objects.filter(Q(pk__in=Like.objects.filter(person_id=1,
 content_type_id=17).prefetch_related('content_object').values_list('object_id',
 flat=True)) | Q(business__manager_id=1)).order_by(Coalesce('likes__date',
 'when').desc())
 }}}

 I'm filing this issue because some (or probably many) people like me
 desperately need output in a form of a `QuerySet` because of the
 pagination and many other things `RawQuerySet` doesn't support, so using
 `raw()` isn't definitely an option in my case. Django has left me out of
 choice.

--

--
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.b076da010010fde1eb7e77c19e60ecb7%40djangoproject.com.
For more options, visit 

Re: [Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:
  (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 MikiSoft):

 * 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/066.606eeb62e96b8e5faa3a93a41e30ae06%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:
  (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
-+-
Description changed by MikiSoft:

Old description:

> For example, this raw SQL:
> {{{
> SELECT event.*
> FROM event
> INNER JOIN
> business
> ON (event.business_id = business.id AND business.manager_id = 1)
> LEFT JOIN
> 'like'
> ON (event.id = object_id AND content_type_pk = 17 AND person_id = 1)
> ORDER BY COALESCE('like'.date, event.'when') DESC;
> }}}
>
> Can't be translated to the **equivalent** Django ORM expression even if
> using `extra()` command, because there isn't anywhere a possibility to
> set additional arguments on `JOIN` clauses. And when I'm using
> `filter(Q(argument) | ...)` it happens to always push all arguments to
> `WHERE` clause, which just causes a performance hit. I wish there was
> some parameter which would determine the destination of the argument,
> whether it has to go to the (last) `JOIN` clause, or to be put in `WHERE`
> (which goes by default). Also, I'm not able to comprehend how to perform
> correctly `LEFT JOIN` so in the end I have made some jumbled up
> expression which is completely inefficient (as it executes two queries,
> but it's the only way to do the same from above and get `QuerySet` in
> return):
>
> {{{
> from django.db.models import Q
> from django.db.models.functions import Coalesce
>
> Event.objects.filter(Q(pk__in=Like.objects.filter(person__pk‌​‌​=1,
> content_type__pk=17).prefetch_related('content_object').values_l‌​‌​ist('object_id',
> flat=True)) | Q(business__manager=1)).order_by(Coalesce('likes__date',
> 'when').desc())
> }}}
>
> I'm filing this issue because some (or probably many) people like me
> desperately need output in a form of a `QuerySet` because of the
> pagination and many other things `RawQuerySet` doesn't support, so using
> `raw()` isn't definitely an option in my case. Django has left me out of
> choice.

New description:

 For example, this raw SQL:
 {{{
 SELECT event.*
 FROM event
 INNER JOIN
 business
 ON (event.business_id = business.id AND business.manager_id = 1)
 LEFT JOIN
 'like'
 ON (event.id = object_id AND content_type_pk = 17 AND person_id = 1)
 ORDER BY COALESCE('like'.date, event.'when') DESC;
 }}}

 Can't be translated to the **equivalent** Django ORM expression even if
 using `extra()` command, because there isn't anywhere a possibility to set
 additional arguments on `JOIN` clauses. And when I'm using
 `filter(Q(argument) | ...)` it happens to always push all arguments to
 `WHERE` clause, which just causes a performance hit. I wish there was some
 parameter which would determine the destination of the argument, whether
 it has to go to the (last) `JOIN` clause, or to be put in `WHERE` (which
 goes by default). Also, I'm not able to comprehend how to perform
 correctly `LEFT JOIN` so in the end I have made some jumbled up expression
 which is completely inefficient (as it executes two queries, but it's the
 only way to do the same from above and get `QuerySet` in return):

 {{{
 from django.db.models import Q
 from django.db.models.functions import Coalesce

 Event.objects.filter(Q(pk__in=Like.objects.filter(person_id=1,
 content_type_id=17).prefetch_related('content_object').values_list('object_id',
 flat=True)) | Q(business__manager_id=1)).order_by(Coalesce('likes__date',
 'when').desc())
 }}}

 I'm filing this issue because some (or probably many) people like me
 desperately need output in a form of a `QuerySet` because of the
 pagination and many other things `RawQuerySet` doesn't support, so using
 `raw()` isn't definitely an option in my case. Django has left me out of
 choice.

--

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

Re: [Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:
  (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 MikiSoft):

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


Old description:

> For example, this raw SQL:
> {{{
> SELECT event.*
> FROM event
> INNER JOIN
> business
> ON (event.business_id = business.id AND business.manager_id = 1)
> LEFT JOIN
> 'like'
> ON (event.id = object_id AND content_type_pk = 17 AND person_id = 1)
> ORDER BY COALESCE('like'.date, event.'when') DESC;
> }}}
>
> Can't be translated to equivalent Django ORM expression even if using
> `extra()` command, because there isn't anywhere a possibility to set
> additional arguments on `JOIN` clauses. And when I'm using
> `filter(Q(argument) | ...)` it happens to always push all arguments to
> `WHERE` clause, which just causes a performance hit. I wish there was
> some parameter which would determine the destination of the argument,
> whether it has to go to the (last) `JOIN` clause, or to be put in `WHERE`
> (which goes by default). Also, I'm not able to comprehend how to perform
> correctly `LEFT JOIN` so in the end I have made some jumbled up
> expression which is completely inefficient (as it executes two queries,
> but it's the only way to do the same from above and get `QuerySet` in
> return):
>
> {{{
> from django.db.models import Q, Coalesce
>
> Event.objects.filter(Q(pk__in=Like.objects.filter(person__pk‌​‌​=1,
> content_type=17).prefetch_related('content_object').values_l‌​‌​ist('object_id',
> flat=True)) | Q(business__manager=1)).order_by(Coalesce('likes__date',
> 'when').desc())
> }}}
>
> I'm filing this issue because some (or many?) people like me desperately
> need output in a form of a `QuerySet` because of the pagination and many
> other things `RawQuerySet` doesn't support, so using `raw()` isn't
> definitely an option in my case. Django has left me out of choice.

New description:

 For example, this raw SQL:
 {{{
 SELECT event.*
 FROM event
 INNER JOIN
 business
 ON (event.business_id = business.id AND business.manager_id = 1)
 LEFT JOIN
 'like'
 ON (event.id = object_id AND content_type_pk = 17 AND person_id = 1)
 ORDER BY COALESCE('like'.date, event.'when') DESC;
 }}}

 Can't be translated to the **equivalent** Django ORM expression even if
 using `extra()` command, because there isn't anywhere a possibility to set
 additional arguments on `JOIN` clauses. And when I'm using
 `filter(Q(argument) | ...)` it happens to always push all arguments to
 `WHERE` clause, which just causes a performance hit. I wish there was some
 parameter which would determine the destination of the argument, whether
 it has to go to the (last) `JOIN` clause, or to be put in `WHERE` (which
 goes by default). Also, I'm not able to comprehend how to perform
 correctly `LEFT JOIN` so in the end I have made some jumbled up expression
 which is completely inefficient (as it executes two queries, but it's the
 only way to do the same from above and get `QuerySet` in return):

 {{{
 from django.db.models import Q
 from django.db.models.functions import Coalesce

 Event.objects.filter(Q(pk__in=Like.objects.filter(person__pk‌​‌​=1,
 
content_type__pk=17).prefetch_related('content_object').values_l‌​‌​ist('object_id',
 flat=True)) | Q(business__manager=1)).order_by(Coalesce('likes__date',
 'when').desc())
 }}}

 I'm filing this issue because some (or probably many) people like me
 desperately need output in a form of a `QuerySet` because of the
 pagination and many other things `RawQuerySet` doesn't support, so using
 `raw()` isn't definitely an option in my case. Django has left me out of
 choice.

--

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

[Django] #27332: Specifying additional JOIN arguments

2016-10-10 Thread Django
#27332: Specifying additional JOIN arguments
--+
 Reporter:  MikiSoft  |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Database layer (models, ORM)  |Version:
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 For example, this raw SQL:
 {{{
 SELECT event.*
 FROM event
 INNER JOIN
 business
 ON (event.business_id = business.id AND business.manager_id = 1)
 LEFT JOIN
 'like'
 ON (event.id = object_id AND content_type_pk = 17 AND person_id = 1)
 ORDER BY COALESCE('like'.date, event.'when') DESC;
 }}}

 Can't be translated to equivalent Django ORM expression even if using
 `extra()` command, because there isn't anywhere a possibility to set
 additional arguments on `JOIN` clauses. And when I'm using
 `filter(Q(argument) | ...)` it happens to always push all arguments to
 `WHERE` clause, which just causes a performance hit. I wish there was some
 parameter which would determine the destination of the argument, whether
 it has to go to the (last) `JOIN` clause, or to be put in `WHERE` (which
 goes by default). Also, I'm not able to comprehend how to perform
 correctly `LEFT JOIN` so in the end I have made some jumbled up expression
 which is completely inefficient (as it executes two queries, but it's the
 only way to do the same from above and get `QuerySet` in return):

 {{{
 from django.db.models import Q, Coalesce

 Event.objects.filter(Q(pk__in=Like.objects.filter(person__pk‌​‌​=1,
 
content_type=17).prefetch_related('content_object').values_l‌​‌​ist('object_id',
 flat=True)) | Q(business__manager=1)).order_by(Coalesce('likes__date',
 'when').desc())
 }}}

 I'm filing this issue because some (or many?) people like me desperately
 need output in a form of a `QuerySet` because of the pagination and many
 other things `RawQuerySet` doesn't support, so using `raw()` isn't
 definitely an option in my case. Django has left me out of choice.

--
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/051.c395b044cb5099479fd1e71d9789f457%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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):

 I'm still unconvinced why response sessionid is empty ,
 https://github.com/django/django/blob/master/django/http/cookie.py#L74 ,

--
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.fc22c1b9412d968a61988976de2b5663%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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
-+-
Changes (by Ramin Farajpour Cami):

 * Attachment "without_seeesionid.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.1f31d9edf3f39a0469bccc07aae4ff3a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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
-+-
Changes (by Ramin Farajpour Cami):

 * Attachment "with_sessionid.2.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.65418a9761d9075bbffb942451575923%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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
-+-
Changes (by Ramin Farajpour Cami):

 * Attachment "with_sessionid.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.1cd91030ed648ffcdb0710dd79b77cd3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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 Tim Graham):

 What does "use sessionid= on request ajax" mean? Can you give some example
 code?

--
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.80649e8bce399832476ab1d370ef87f1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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):

 Thanks Tim,

 i use python 2, do you test this?

 {{{
 self.assertEqual(parse_cookie('sessionid=; csrftoken=d'))
 }}}

 my means this is when i use `sessionid=` on request ajax , response this
 `Set-Cookie: sessionid=;`  my opinion when sessionid is empty should not
 be sessionid "Set-Cookie" on response ,

 code parse_cookie :
 https://github.com/django/django/blob/master/django/http/cookie.py#L59

 i see code here :
 https://github.com/django/django/blob/master/django/http/response.py#L221

 when set on request `sessionid=` empty , pass from `parse_cookie` and in
 call `delete_cookie` and response `Set-Cookie: sessionid=;` , While this
 is should be not set on `Set-Cookie` sessionid,

  my opinion when `sessionid=` should avoid call method `delete_cookie`,

--
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.7db5e9164e058203f4f2f34547570c48%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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 Tim Graham):

 Here are the test failures:
 {{{
 ==
 FAIL: test_invalid_cookies (httpwrappers.tests.CookieTests)
 --
 Traceback (most recent call last):
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 58, in
 testPartExecutor
 yield
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 600, in run
 testMethod()
   File "/home/tim/code/django/tests/httpwrappers/tests.py", line 778, in
 test_invalid_cookies
 self.assertEqual(parse_cookie('a=b; "; c=d'), {'a': 'b', '': '"', 'c':
 'd'})
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 820, in
 assertEqual
 assertion_func(first, second, msg=msg)
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line , in
 assertDictEqual
 self.fail(self._formatMessage(msg, standardMsg))
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 665, in
 fail
 raise self.failureException(msg)
 AssertionError: {'c': 'd', 'a': 'b'} != {'': '"', 'c': 'd', 'a': 'b'}
 - {'a': 'b', 'c': 'd'}
 + {'': '"', 'a': 'b', 'c': 'd'}
 ?  +


 ==
 FAIL: test_python_cookies (httpwrappers.tests.CookieTests)
 --
 Traceback (most recent call last):
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 58, in
 testPartExecutor
 yield
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 600, in run
 testMethod()
   File "/home/tim/code/django/tests/httpwrappers/tests.py", line 753, in
 test_python_cookies
 {'keebler': '"E=mc2', 'L': '\\"Loves\\"', 'fudge': '\\012', '': '"'}
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 820, in
 assertEqual
 assertion_func(first, second, msg=msg)
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line , in
 assertDictEqual
 self.fail(self._formatMessage(msg, standardMsg))
   File "/opt/python3.5.2/lib/python3.5/unittest/case.py", line 665, in
 fail
 raise self.failureException(msg)
 AssertionError: {'fudge': '\\012', 'L': '\\"Loves\\"', 'keebler':
 '"E=mc2'} != {'fudge': '\\012', '': '"', 'L': '\\"Loves\\"', 'keebler':
 '"E=mc2'}
 - {'L': '\\"Loves\\"', 'fudge': '\\012', 'keebler': '"E=mc2'}
 + {'': '"', 'L': '\\"Loves\\"', 'fudge': '\\012', 'keebler': '"E=mc2'}
 ?  +
 }}}
 I guess dropping those cookies without a key might be fine, but I still
 don't understand the situation where you're running into 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/065.61470dbdf211e12d092a96d6a532767b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26447: Deprecate USE_ETAGS setting in favor of ConditionalGetMiddleware unconditionally setting an ETag

2016-10-10 Thread Django
#26447: Deprecate USE_ETAGS setting in favor of ConditionalGetMiddleware
unconditionally setting an ETag
-+-
 Reporter:  Denis Cornehl|Owner:  Denis
 Type:   |  Cornehl
  Cleanup/optimization   |   Status:  closed
Component:  HTTP handling|  Version:  1.9
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | 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:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"a840710e1e38bc9e55412bb36eca92eff94ebd2c" a840710e]:
 {{{
 #!CommitTicketReference repository=""
 revision="a840710e1e38bc9e55412bb36eca92eff94ebd2c"
 Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of
 ConditionalGetMiddleware.
 }}}

--
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.e6c4852c5b8ed266647a6112391bcc82%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-10 Thread Django
#24607: Serialization (and deserialization) of MTI models doesn't work with 
natural
keys
--+
 Reporter:  Denys Duchier |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Core (Serialization)  |  Version:  master
 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
--+
Changes (by Tim Graham):

 * needs_better_patch:  1 => 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/071.22d5784529279179506090581fbbd4b0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26447: Deprecate USE_ETAGS setting in favor of ConditionalGetMiddleware unconditionally setting an ETag

2016-10-10 Thread Django
#26447: Deprecate USE_ETAGS setting in favor of ConditionalGetMiddleware
unconditionally setting an ETag
-+-
 Reporter:  Denis Cornehl|Owner:  Denis
 Type:   |  Cornehl
  Cleanup/optimization   |   Status:  new
Component:  HTTP handling|  Version:  1.9
 Severity:  Normal   |   Resolution:
 Keywords:   | 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 Kevin Christopher Henry):

 * cc: k@… (added)
 * stage:  Accepted => Ready for checkin


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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.791e1f7651bb926b54df17764dc84b7c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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):

 Hi Tim,

 Any results on your testing?

--
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.a87f3dd97ecccaa1a478e283ca72efca%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 (was: Using USER_SEQUENCES instead of USER_CATALOG)

2016-10-10 Thread Django
#27323: Optimize Oracle introspection by using USER_SEQUENCES instead of
USER_CATALOG
-+-
 Reporter:  felixxm  |Owner:  felixxm
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 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
-+-

--
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.43bdf1539355e7a0fc51894c1abc4724%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-10 Thread Django
#27331: Proposed opt_group argument for ModelChoiceField and
ModelMultipleChoiceField
-+-
 Reporter:  Héctor Urbina|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 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
-+-

Comment (by Tim Graham):

 I'm still unconvinced that adding an argument with an HTML looking name to
 a model field that only affects selected widgets is a good design. I see
 that it's convenient compared to the alternative of providing a custom
 `ModelChoiceIterator` but I don't know that the coupling is a good design.

--
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.caaf451e5b0b3f9fd768351de1a6d326%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27272: Add a on_delete RESTRICT handler to allow cascading deletions while protecting direct ones

2016-10-10 Thread Django
#27272: Add a on_delete RESTRICT handler to allow cascading deletions while
protecting direct ones
-+-
 Reporter:  Daniel Izquierdo |Owner:  Daniel
 |  Izquierdo
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


Comment:

 Comments for improvement are on the 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/067.8caad4f44f67f1bb582d16e6f1b235e4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26954: has_module_permission set to False on ModelAdmin raises 403 Forbidden error when visiting its app page

2016-10-10 Thread Django
#26954: has_module_permission set to False on ModelAdmin raises 403 Forbidden 
error
when visiting its app page
---+--
 Reporter:  bhch   |Owner:  Halil Kaya
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  1.8
 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
---+--
Changes (by Tim Graham):

 * needs_tests:  1 => 0
 * easy:  1 => 0


Comment:

 [https://github.com/django/django/pull/7367 Updated PR]. Keryn, can you
 check it?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To 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/062.811bd7ab91b653d08eab48921fe8cbb2%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-10 Thread Django
#27331: Proposed opt_group argument for ModelChoiceField and
ModelMultipleChoiceField
-+-
 Reporter:  Héctor Urbina|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 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
-+-
Description changed by Héctor Urbina:

Old description:

> Hello,
>
> I've just implemented this and I thought It could well be incorporated
> into Django itself; I guess it's a fairly common feature that one may
> need on any project.
>
> What I propose is to add a `opt_group` argument to ModelChoiceField and
> ModelMultipleChoiceField; which indicates the item's field whose value is
> used to group the choices. It should be used in conjunction with a
> queryset which is (primarily) sorted by the same field.
>
> Let me show with an example:
> {{{
> #!python
> class Category(models.Model):
> name = models.CharField(max_length=20)
>
> class Item(models.Model):
> name = models.CharField(max_length=20)
> category = models.ForeignKey(Category)
> }}}
> And in some form's initialization process
> {{{
> #!python
> field = ModelChoiceField(queryset=Item.objects.order_by('category__name',
> 'name'), opt_group='category')
> }}}
> `field.choices` will dynamically collect choices into named groups as a
> 2-tuple, which the underlying widget should present using `optgroup` HTML
> elements.

New description:

 Hello,

 I've just implemented this and I thought It could well be incorporated
 into Django itself; I guess it's a fairly common feature that one may need
 on any project.

 What I propose is to add an optional `opt_group` argument to
 ModelChoiceField and ModelMultipleChoiceField; which indicates the item's
 field whose value is used to group the choices. It should be used in
 conjunction with a queryset which is (primarily) sorted by the same field.

 Let me show with an example:
 {{{
 #!python
 class Category(models.Model):
 name = models.CharField(max_length=20)

 class Item(models.Model):
 name = models.CharField(max_length=20)
 category = models.ForeignKey(Category)
 }}}
 And in some form's initialization process
 {{{
 #!python
 field = ModelChoiceField(queryset=Item.objects.order_by('category__name',
 'name'), opt_group='category')
 }}}
 `field.choices` will dynamically collect choices into named groups as a
 2-tuple, which the underlying widget should present using `optgroup` HTML
 elements.

--

--
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.b2849f58ab964a8369fed0f8d51709ca%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-10 Thread Django
#27331: Proposed opt_group argument for ModelChoiceField and
ModelMultipleChoiceField
-+-
 Reporter:  Héctor Urbina|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 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
-+-

Comment (by Héctor Urbina):

 Replying to [comment:2 Tim Graham]:
 > At first glance, that looks more appropriate as a widget option since
 `ModelChoiceField` isn't required to use a `Select` widget.

 The default `ModelChoiceField`'s widget (`Select`) is prepared to
 understand 2-tuples coming on the field's choices attribute and translates
 them to optgroups.
 `ModelChoiceField` uses `ModelChoiceIterator` to generate the choices;
 that is the actual class that is doing the job on
 
[https://github.com/ajendrex/django/commit/1ae142489f36d65b5cd0a51c243040c571fe01b8
 my current implementation]. My idea is to include support for optgroup,
 not require it; I'm updating my proposal to clarify that.

--
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.2dc7025a7d3d4b6a1d2b166d78f38599%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27327: Simplify time zone handling by making pytz a required dependency

2016-10-10 Thread Django
#27327: Simplify time zone handling by making pytz a required dependency
-+-
 Reporter:  Tim Graham   |Owner:  Tim
 Type:   |  Graham
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  master
 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 hadn't seen the DEP, but there seems to be consensus on the mailing list
 such that I don't think waiting for the DEP has much advantage.

--
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.5f70c71279ab785487f6727fc06109a2%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-10 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:  new
Component:  Migrations  |  Version:  1.8
 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):

 I'm not sure how changing a `CharField` primary key to an `AutoField`
 primary key should work (is it possible to autopopulate the column using
 the sequence?), but the current behavior of prompting for a default then
 erring with "multiple default values specified for column "character_id"
 of table "t27267_foo"" isn't good. I guess we could open a separate ticket
 for this issue. I'm not sure what else could be done with the information
 you provided.

--
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.a2e08fbba1a3b7f7c924c0b3eba0cd60%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-10 Thread Django
#27331: Proposed opt_group argument for ModelChoiceField and
ModelMultipleChoiceField
-+-
 Reporter:  Héctor Urbina|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Forms|  Version:  master
 Severity:  Normal   |   Resolution:
 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):

 * has_patch:  1 => 0


Comment:

 At first glance, that looks more appropriate as a widget option since
 `ModelChoiceField` isn't required to use a `Select` widget.

--
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.d319b17a73a8d53be8a1d18e785c68ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-10-10 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
-+-
Changes (by Tim Graham):

 * cc: Collin Anderson (added)
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 I don't entirely understand the issue but making the change you suggest
 results in test failures in `httpwrappers`.

--
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.74eaef3d3a4e01841c4c754ce53e97de%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27330: Generic CreateView/UpdateView doesn't send the kwargs to get_context_data

2016-10-10 Thread Django
#27330: Generic CreateView/UpdateView doesn't send the kwargs to 
get_context_data
-+--
 Reporter:  Dorian Amouroux  |Owner:  (none)
 Type:  Bug  |   Status:  closed
Component:  Generic views|  Version:  1.10
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--
Changes (by Tim Graham):

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


Comment:

 Duplicate of #21964 (closed as 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/072.0f314109cc0f8b6be0921f3b35f84986%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27272: Add a on_delete RESTRICT handler to allow cascading deletions while protecting direct ones

2016-10-10 Thread Django
#27272: Add a on_delete RESTRICT handler to allow cascading deletions while
protecting direct ones
-+-
 Reporter:  Daniel Izquierdo |Owner:  Daniel
 |  Izquierdo
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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
-+-
Changes (by Tim Graham):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/7364 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/067.883a1fdbc256f48e60e89ae89ac82e9f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27201: Django 1.10 with STATICFILES_STORAGE breaks on absolute path in CSS with double slash

2016-10-10 Thread Django
#27201: Django 1.10 with STATICFILES_STORAGE breaks on absolute path in CSS with
double slash
--+
 Reporter:  Salkot|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.staticfiles   |  Version:  1.10
 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 Jonatas CD):

 so, to make it clear, the decision in what is to be done here is this?
 (c) the decision to fail in this case should be formalised and ideally
 a clearer exception given instead of `SuspiciousFileOperation`

--
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.59d84bb5c244dbefa2df7460b6f6ccbe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27330: Generic CreateView/UpdateView doesn't send the kwargs to get_context_data

2016-10-10 Thread Django
#27330: Generic CreateView/UpdateView doesn't send the kwargs to 
get_context_data
-+--
 Reporter:  Dorian Amouroux  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Generic views|  Version:  1.10
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--
Changes (by Aleksandr Sobolev):

 * status:  assigned => new
 * owner:  Aleksandr Sobolev => (none)


--
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.e1da6c187657014a97055e594920da0c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.