[Django] #28130: Formset validate_min validation does not work on existing forms

2017-04-25 Thread Django
#28130: Formset validate_min validation does not work on existing forms
-+--
   Reporter:  Jim Ouwerkerk  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Forms  |Version:  1.11
   Severity:  Normal |   Keywords:  formsets
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+--
 The formset validation is changed because of ticket
 [https://code.djangoproject.com/ticket/26844 26844]

 However, the fix for the empty forms breaks the validate_min validation
 for formset with existing unchanged form data in Django 1.11.
 It counts unchanged existing forms as 'empty' form because they are not
 changed, but they should not be counted as empty.

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


Re: [Django] #28129: Custom template tag keyword only arguments

2017-04-25 Thread Django
#28129: Custom template tag keyword only arguments
-+-
 Reporter:  Alexander|Owner:  nobody
  Allakhverdiyev |
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  template,inspect | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Alexander Allakhverdiyev):

 Also we no longer need to use custom django.utils.inspect.getargspec
 anymore and can switch to python's
 [https://docs.python.org/3/library/inspect.html#inspect.getfullargspec
 inspect.getfullargspec()]

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


Re: [Django] #28129: Custom template tag keyword only arguments

2017-04-25 Thread Django
#28129: Custom template tag keyword only arguments
-+-
 Reporter:  Alexander|Owner:  nobody
  Allakhverdiyev |
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  template,inspect | 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 Alexander Allakhverdiyev:

Old description:

> Example tag with a keyword-only argument
> {{{
> @register.simple_tag(takes_context=True)
> def my_tag(context, arg1, *, kwarg2='n/a'):
> return ''
> }}}
> Html code
> {{{
> bla bla bla
> {% my_tag 'arg_1_value' kwarg_2='kwarg_value' %}
> }}}
> Result
> {{{
> ValueError: Function has keyword-only arguments or annotations, use
> getfullargspec() API which can support them
> }}}
>
> Proposed solution: use getfullargspec instead of getargspec in
> templates/base.py

New description:

 Example tag with a keyword-only argument
 {{{
 @register.simple_tag(takes_context=True)
 def my_tag(context, arg1, *, kwarg2='n/a'):
 return ''
 }}}
 Html code
 {{{
 bla bla bla
 {% my_tag 'arg_1_value' kwarg_2='kwarg_value' %}
 }}}
 Result
 {{{
 django.template.exceptions.TemplateSyntaxError: 'my_tag' received
 unexpected keyword argument 'kwarg_2'
 }}}

--

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


Re: [Django] #20939: Convert QuerySet to Query when filtering

2017-04-25 Thread Django
#20939: Convert QuerySet to Query when filtering
-+-
 Reporter:  Anssi Kääriäinen |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 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 Simon Charette ):

 In [changeset:"c9159a082ebe41a1f735f8d01720e746fb43c41e" c9159a08]:
 {{{
 #!CommitTicketReference repository=""
 revision="c9159a082ebe41a1f735f8d01720e746fb43c41e"
 Refs #20939 -- Removed the Query._prepare_as_filter_value() hack.
 }}}

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


Re: [Django] #20939: Convert QuerySet to Query when filtering

2017-04-25 Thread Django
#20939: Convert QuerySet to Query when filtering
-+-
 Reporter:  Anssi Kääriäinen |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 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 Simon Charette ):

 In [changeset:"ec50937bcbe160e658ef881021402e156beb0eaf" ec50937]:
 {{{
 #!CommitTicketReference repository=""
 revision="ec50937bcbe160e658ef881021402e156beb0eaf"
 Refs #20939 -- Removed the Query._forced_pk hack.
 }}}

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


[Django] #28129: Custom template tag keyword only arguments

2017-04-25 Thread Django
#28129: Custom template tag keyword only arguments
-+-
   Reporter:  Alexander  |  Owner:  nobody
  Allakhverdiyev |
   Type:  Bug| Status:  new
  Component:  Template   |Version:  master
  system |
   Severity:  Normal |   Keywords:  template,inspect
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Example tag with a keyword-only argument
 {{{
 @register.simple_tag(takes_context=True)
 def my_tag(context, arg1, *, kwarg2='n/a'):
 return ''
 }}}
 Html code
 {{{
 bla bla bla
 {% my_tag 'arg_1_value' kwarg_2='kwarg_value' %}
 }}}
 Result
 {{{
 ValueError: Function has keyword-only arguments or annotations, use
 getfullargspec() API which can support them
 }}}

 Proposed solution: use getfullargspec instead of getargspec in
 templates/base.py

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


Re: [Django] #28128: Fulltext search very slow with annotate(SearchVector)

2017-04-25 Thread Django
#28128: Fulltext search very slow with annotate(SearchVector)
--+--
 Reporter:  Gavin Wahl|Owner:  (none)
 Type:  Uncategorized |   Status:  closed
Component:  contrib.postgres  |  Version:  1.11
 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 Simon Charette):

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


Comment:

 I think this is a duplicate of #27719.

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


Re: [Django] #27996: Add pgcrypto extension and GEN_RANDOM_UUID function to contrib.postgres

2017-04-25 Thread Django
#27996: Add pgcrypto extension  and GEN_RANDOM_UUID function to contrib.postgres
-+-
 Reporter:  Paolo Melchiorre |Owner:  Paolo
 |  Melchiorre
 Type:  New feature  |   Status:  closed
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  uuid extension   | Triage Stage:  Ready for
  function random postgresql |  checkin
  cryptography   |
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:"fcb5dbfec0542faaa1b0adad754a1caf1bcd65e2" fcb5dbfe]:
 {{{
 #!CommitTicketReference repository=""
 revision="fcb5dbfec0542faaa1b0adad754a1caf1bcd65e2"
 Fixed #27996 -- Added RandomUUID function and CryptoExtension to
 contrib.postgres.
 }}}

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


Re: [Django] #28119: Test client cookies do not take into account server hostnames/domains

2017-04-25 Thread Django
#28119: Test client cookies do not take into account server hostnames/domains
-+-
 Reporter:  Ali Kaafarani|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Testing framework|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  test, client,| Triage Stage:
  cookie, domain |  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 if we'd want to add this complexity to the test client (which
 is fairly dumb and simple). Could you elaborate on the use case? Assuming
 you need the functionality for your own project, perhaps you can show us
 how complicated it is to implement in a `Client` subclass.

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


Re: [Django] #27998: LogEntry messages do not list m2m fields that were changed when an object is changed via ModelAdmin

2017-04-25 Thread Django
#27998: LogEntry messages do not list m2m fields that were changed when an 
object
is changed via ModelAdmin
---+
 Reporter:  ljsjl  |Owner:  ljsjl
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  1.10
 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 ljsjl):

 * has_patch:  0 => 1


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

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


[Django] #28128: Fulltext search very slow with annotate(SearchVector)

2017-04-25 Thread Django
#28128: Fulltext search very slow with annotate(SearchVector)
+
   Reporter:  Gavin Wahl|  Owner:  (none)
   Type:  Uncategorized | Status:  new
  Component:  contrib.postgres  |Version:  1.11
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 I have this model:

 {{{#!python
 class Bug(models.Model):
 # .. fields ...

 # This field is managed by Django, adding stuff to it that should be
 # included in the fulltext search.
 fulltext = models.TextField()
 }}}

 The `Bug` table has many rows, so I need to add an index on the fulltext
 column for fulltext search:

 {{{#!sql
 CREATE INDEX ON buggy_bug USING GIN (to_tsvector('english'::regconfig,
 COALESCE("fulltext", '')));
 }}}

 Note that postgres requires the `english` config argument to `to_tsvector`
 for it be allowed to be used in an index.

 Now, at query time, the expression Django uses must exactly match the
 expression in the functional index. By default,
 `filter(fulltext__search='foo')` leaves out the config argument to
 `to_tsvector`, so my index isn't used. The documentation shows us how to
 fix this, by annotating a search field:

 {{{#!sql
 Bug.objects.annotate(
 search=SearchVector('fulltext', config='english')
 ).filter(
 search='foo'
 )
 }}}

 Now the expressions match and the index is used. However, the query is
 still crazy slow. This is the query Django does:

 {{{#!sql
 SELECT "buggy_bug"."id",
to_tsvector('english'::regconfig, COALESCE("buggy_bug"."fulltext",
 '')) AS "search"
 FROM "buggy_bug"
 WHERE to_tsvector('english'::regconfig, COALESCE("buggy_bug"."fulltext",
 '')) @@ (plainto_tsquery('english'::regconfig, 'foo')) = true;
 }}}

 Which takes 2500 milliseconds on my data, and EXPLAIN confirms it is using
 the index.  With some playing around with it, I find that removing the
 annotated search column gives a huge speedup:

 {{{#!sql
 SELECT "buggy_bug"."id"
 FROM "buggy_bug"
 WHERE to_tsvector('english'::regconfig, COALESCE("buggy_bug"."fulltext",
 '')) @@ (plainto_tsquery('english'::regconfig, 'foo')) = true;
 }}}

 This query only takes 11 milliseconds.

 What's the point of selecting the result of to_tsvector? We don't actually
 use it in Django, we just had to do it to specify the config to use for
 to_tsvector.

 There needs to be a way to specify the config for to_tsvector in order to
 use an index without a huge slowdown.

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


Re: [Django] #28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator

2017-04-25 Thread Django
#28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator
--+--
 Reporter:  jambonrose|Owner:  jambonrose
 Type:  Bug   |   Status:  assigned
Component:  contrib.auth  |  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):

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


Re: [Django] #28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator

2017-04-25 Thread Django
#28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator
--+--
 Reporter:  jambonrose|Owner:  jambonrose
 Type:  Bug   |   Status:  assigned
Component:  contrib.auth  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by jambonrose):

 Opened PR: https://github.com/django/django/pull/8408

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


Re: [Django] #28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator

2017-04-25 Thread Django
#28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator
--+--
 Reporter:  jambonrose|Owner:  jambonrose
 Type:  Bug   |   Status:  assigned
Component:  contrib.auth  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Unreviewed
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by jambonrose):

 * has_patch:  0 => 1


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

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


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2017-04-25 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 Derek, FWIW deferred models are not an issue anymore from Django 1.10+.
 See #26207 for more details.

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


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2017-04-25 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Derek Frank):

 This is also an issue for deferred querysets.

 `queryset = Blog.objects.only('pk')`
 `queryset.delete()` will not run handlers for pre_delete and post_delete
 signals.

 It appears a new class type is defined for the deferred object.
 `id(queryset.first().__class__) == id(Blog)` --> `False`

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


[Django] #28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator

2017-04-25 Thread Django
#28127: Inconsistent Behavior in Auth with UserAttributeSimilarityValidator
+
   Reporter:  jambonrose|  Owner:  jambonrose
   Type:  Bug   | Status:  assigned
  Component:  contrib.auth  |Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 I started a discussion on the developer mailing list for this topic:
 https://groups.google.com/d/topic/django-developers/glrLyuPkiKs/discussion

 Effectively, the user creation form and the password change form use the
 `UserAttributeSimilarityValidator` differently. It is possible to create a
 user via a subclass of Django's `UserCreationForm` with a password that
 would be denied by the password change form. This is because the user
 creation form only checks similarity agains the  `username` field. When
 changing a password, the password is validated in  similarity to
 `username`, `first_name`, `last_name`, and `email`.

 This seems highly undesirable.

 The central cause is that the `ModelForm` superclass (of
 `UserCreationForm`) hasn't yet created the `User` instance.
 `UserCreationForm` manually adds `username` to the empty `User` instance
 on line 105 to allow for user attribute validation. In the event a
 developer subclasses `UserCreationForm`, then the form will still only
 validate against the `username`, rather than all of the fields in the
 field.

 I will have a PR with a proposed fix (discussed in the mailing list)
 shortly.

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


Re: [Django] #28126: Add GistIndex Model Index

2017-04-25 Thread Django
#28126: Add GistIndex Model Index
-+-
 Reporter:  Flavio Curella   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  GIS  |  Version:  1.11
 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 felixxm):

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


Re: [Django] #28085: EN django.po does not have default "Plural-Forms" to copy

2017-04-25 Thread Django
#28085: EN django.po does not have default "Plural-Forms" to copy
-+-
 Reporter:  Abaks|Owner:
 |  ChillarAnand
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.11
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:  plural localization  | Triage Stage:  Accepted
  en |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Claude Paroz):

 No, this is the base file we're using to feed Transifex. We only have to
 add the missing line in the en po file. Trivial.

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


Re: [Django] #28121: force_text incorrectly handles SafeBytes under PY3

2017-04-25 Thread Django
#28121: force_text incorrectly handles SafeBytes under PY3
+--
 Reporter:  Thomas Achtemichuk  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Utilities   |  Version:  1.11
 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 Claude Paroz):

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


Comment:

 I completely agree with Aymeric, there is no such thing as `SafeBytes`. It
 has already almost disappeared on master anyway.
 Tom, what you call a workaround is probably the right thing to do.

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


Re: [Django] #28085: EN django.po does not have default "Plural-Forms" to copy

2017-04-25 Thread Django
#28085: EN django.po does not have default "Plural-Forms" to copy
-+-
 Reporter:  Abaks|Owner:
 |  ChillarAnand
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.11
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:  plural localization  | Triage Stage:  Accepted
  en |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham):

 Does this update happen in Transifex?

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


Re: [Django] #28085: EN django.po does not have default "Plural-Forms" to copy

2017-04-25 Thread Django
#28085: EN django.po does not have default "Plural-Forms" to copy
-+-
 Reporter:  Abaks|Owner:
 |  ChillarAnand
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.11
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:  plural localization  | Triage Stage:  Accepted
  en |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by ChillarAnand):

 * status:  new => assigned
 * owner:  nobody => ChillarAnand


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


Re: [Django] #28005: normalize usage of terms 'argument' and 'parameter'

2017-04-25 Thread Django
#28005: normalize usage of terms 'argument' and 'parameter'
-+-
 Reporter:  Sergey Fedoseev  |Owner:
 Type:   |  ChillarAnand
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by ChillarAnand):

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


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


Re: [Django] #28126: Add GistIndex Model Index

2017-04-25 Thread Django
#28126: Add GistIndex Model Index
+
 Reporter:  Flavio Curella  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  GIS |  Version:  1.11
 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
 * stage:  Unreviewed => Accepted


Comment:

 [https://github.com/django/django/pull/8303 PR] from Marc.

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


Re: [Django] #28074: Document template-based widget rendering ramifications for contrib.gis

2017-04-25 Thread Django
#28074: Document template-based widget rendering ramifications for contrib.gis
-+-
 Reporter:  Tobi |Owner:  Tim
 Type:   |  Graham
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  geodjango,   | Triage Stage:  Accepted
  templates  |
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/8407 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.15d0cc84d42db303e94530f348c766be%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28126: Add GistIndex Model Index

2017-04-25 Thread Django
#28126: Add GistIndex Model Index
+--
 Reporter:  Flavio Curella  |Owner:  nobody
 Type:  New feature |   Status:  closed
Component:  GIS |  Version:  1.11
 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 Flavio Curella):

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


Comment:

 closed as duplicate of https://github.com/django/django/pull/8405

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


Re: [Django] #28125: Clarify 1.11 release notes about which Template class prohibits non-dict contexts

2017-04-25 Thread Django
#28125: Clarify 1.11 release notes about which Template class prohibits non-dict
contexts
-+-
 Reporter:  Eddie Bragg  |Owner:  Tim
 Type:   |  Graham
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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
 * stage:  Unreviewed => Accepted


Comment:

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


Re: [Django] #28125: Clarify 1.11 release notes about which Template class prohibits non-dict contexts (was: Calling render on a Template object passing a dict fails)

2017-04-25 Thread Django
#28125: Clarify 1.11 release notes about which Template class prohibits non-dict
contexts
-+-
 Reporter:  Eddie Bragg  |Owner:  Tim
 Type:   |  Graham
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.11
 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):

 * status:  new => assigned
 * component:  Template system => Documentation
 * owner:  nobody => Tim Graham
 * type:  Bug => Cleanup/optimization


Old description:

> According to the release docs for 1.11 any callto `render()` on a
> `Template` object you need to pass a `dict`
> https://docs.djangoproject.com/en/1.11/releases/1.11/#django-template-
> render-prohibits-non-dict-context
>
> I have code that originally passes a `Context` object.
> Upgrading to 1.11 from 1.10 and changing it to a `dict` causes this error
> `'dict' object has no attribute 'render_context'`
>
> Looking at Django code the error occurs at
> https://github.com/django/django/blob/1.11/django/template/base.py#L203
> I believe this code still expects a `Context` object.

New description:

 According to the release docs for 1.11 any call to `render()` on a
 `Template` object you need to pass a `dict`
 https://docs.djangoproject.com/en/1.11/releases/1.11/#django-template-
 render-prohibits-non-dict-context

 I have code that originally passes a `Context` object.
 Upgrading to 1.11 from 1.10 and changing it to a `dict` causes this error
 `'dict' object has no attribute 'render_context'`

 Looking at Django code the error occurs at
 https://github.com/django/django/blob/1.11/django/template/base.py#L203
 I believe this code still expects a `Context` object.

--

Comment:

 This is a confusion between `django.template.backends.django.Template`,
 which the release notes are meant to refer to, and
 `django.template.base.Template`. I'll clarify the release notes.

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


[Django] #28126: Add GistIndex Model Index

2017-04-25 Thread Django
#28126: Add GistIndex Model Index
--+
   Reporter:  Flavio Curella  |  Owner:  nobody
   Type:  New feature | Status:  new
  Component:  GIS |Version:  1.11
   Severity:  Normal  |   Keywords:
   Triage Stage:  Unreviewed  |  Has patch:  0
Needs documentation:  0   |Needs tests:  0
Patch needs improvement:  0   |  Easy pickings:  0
  UI/UX:  0   |
--+
 Django 1.11 added the Indexes
 (https://docs.djangoproject.com/en/1.11/ref/models/indexes/), but the GIST
 Index used prevalently in GIS application hasn't been implemented.

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


[Django] #28125: Calling render on a Template object passing a dict fails

2017-04-25 Thread Django
#28125: Calling render on a Template object passing a dict fails
---+
   Reporter:  Eddie Bragg  |  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  Template system  |Version:  1.11
   Severity:  Normal   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 According to the release docs for 1.11 any callto `render()` on a
 `Template` object you need to pass a `dict`
 https://docs.djangoproject.com/en/1.11/releases/1.11/#django-template-
 render-prohibits-non-dict-context

 I have code that originally passes a `Context` object.
 Upgrading to 1.11 from 1.10 and changing it to a `dict` causes this error
 `'dict' object has no attribute 'render_context'`

 Looking at Django code the error occurs at
 https://github.com/django/django/blob/1.11/django/template/base.py#L203
 I believe this code still expects a `Context` 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/053.d96dd436282c54c9e6bc281c0fac1749%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28121: force_text incorrectly handles SafeBytes under PY3

2017-04-25 Thread Django
#28121: force_text incorrectly handles SafeBytes under PY3
+--
 Reporter:  Thomas Achtemichuk  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Utilities   |  Version:  1.11
 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 Aymeric Augustin):

 In any case, the Python 3 behavior seems correct to me, the Python 2
 behavior seems dubious from a security perspective.

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


Re: [Django] #28121: force_text incorrectly handles SafeBytes under PY3

2017-04-25 Thread Django
#28121: force_text incorrectly handles SafeBytes under PY3
+--
 Reporter:  Thomas Achtemichuk  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Utilities   |  Version:  1.11
 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 Aymeric Augustin):

 Hrm. I realize I have no idea what `SafeBytes` are.

 If you don't know the charset of the document in which you're going to
 interpolate these bytes, you have no idea what unicode codepoints they'll
 map to and you cannot make any guarantees about their safety in a HTML
 context.

 It would be tempting to say "they're in DEFAULT_CHARSET", but that's too
 fragile for a security-critical feature. They could still be interpolated
 into something in another charset.

 IMO the only way to fix this is to remove `SafeBytes`. I can't see a way
 to define it in a way that makes sense from a security perspective, short
 of annotating them with a charset, but then we've reinvented text strings.

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


Re: [Django] #28118: reverse() and get_absolute_url() returns different output for same object ?

2017-04-25 Thread Django
#28118: reverse() and get_absolute_url() returns different output for same 
object ?
---+--
 Reporter:  Pat|Owner:  Michal
 Type:  Bug|   Status:  assigned
Component:  contrib.flatpages  |  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
---+--
Changes (by Michal):

 * status:  new => assigned
 * owner:  nobody => Michal


Comment:

 Can you show me your urls.py file?

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


Re: [Django] #28124: Timezone-related overflows in utils

2017-04-25 Thread Django
#28124: Timezone-related overflows in utils
-+-
 Reporter:  Zac Hatfield Dodds   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Utilities|  Version:  1.11
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
  timezone,overflow,datetime |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin):

 FWIW it's a design decision of mine when I implemented time zone support
 in 1.4, not an oversight.

 Back then, Django also contained some code implementing datetime
 arithmetic beyond 1970 / 2038 for `humanize` filters, but that code wasn't
 consistent with the rest of Django. I'm not sure what it became; perhaps
 it's still there.

 In any case I'm not eager to implement time zone arithmetic besides what
 Python and pytz support. It doesn't feel like a generalist web framework
 like Django should do that. It's more of a job for a specialized library.

 For these reasons I agree with closing this ticket 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/064.3b684d43ca82a894915aca0845073064%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28122: Overriding directory_index view's static/directory_index.html crashes with TypeError: context must be a dict rather than Context

2017-04-25 Thread Django
#28122: Overriding directory_index view's static/directory_index.html crashes 
with
TypeError: context must be a dict rather than Context
-+-
 Reporter:  Natt Piyapramote |Owner:  Tim
 |  Graham
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  1.11
 Severity:  Release blocker  |   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
-+-

Comment (by Tim Graham ):

 In [changeset:"4a89000ccf0483c67f66709cca90fc50ad82aacc" 4a89000c]:
 {{{
 #!CommitTicketReference repository=""
 revision="4a89000ccf0483c67f66709cca90fc50ad82aacc"
 [1.11.x] Fixed #28122 -- Fixed crash when overriding
 views.static.directory_index()'s template.

 Backport of 56970c5b61f8f1612944dc54b72ef210d433066f from 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/066.b64e496157fa799b2e75db8244370e04%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28122: Overriding directory_index view's static/directory_index.html crashes with TypeError: context must be a dict rather than Context

2017-04-25 Thread Django
#28122: Overriding directory_index view's static/directory_index.html crashes 
with
TypeError: context must be a dict rather than Context
-+-
 Reporter:  Natt Piyapramote |Owner:  Tim
 |  Graham
 Type:  Bug  |   Status:  closed
Component:  Core (Other) |  Version:  1.11
 Severity:  Release blocker  |   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 GitHub ):

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


Comment:

 In [changeset:"56970c5b61f8f1612944dc54b72ef210d433066f" 56970c5b]:
 {{{
 #!CommitTicketReference repository=""
 revision="56970c5b61f8f1612944dc54b72ef210d433066f"
 Fixed #28122 -- Fixed crash when overriding
 views.static.directory_index()'s template.
 }}}

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


Re: [Django] #28122: Overriding directory_index view's static/directory_index.html crashes with TypeError: context must be a dict rather than Context

2017-04-25 Thread Django
#28122: Overriding directory_index view's static/directory_index.html crashes 
with
TypeError: context must be a dict rather than Context
-+-
 Reporter:  Natt Piyapramote |Owner:  Tim
 |  Graham
 Type:  Bug  |   Status:  assigned
Component:  Core (Other) |  Version:  1.11
 Severity:  Release blocker  |   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 Claude Paroz):

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


Re: [Django] #26844: Formset's validate_min doesn't work correctly with empty forms

2017-04-25 Thread Django
#26844: Formset's validate_min doesn't work correctly with empty forms
+-
 Reporter:  Wim Feijen  |Owner:  Manasa Patibandla
 Type:  Bug |   Status:  closed
Component:  Forms   |  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 Simon Charette):

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


Comment:

 Jim, please file a new ticket instead of reopening this one. Just make
 sure to refer to this ticket to provide context.

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


Re: [Django] #28124: Timezone-related overflows in utils

2017-04-25 Thread Django
#28124: Timezone-related overflows in utils
-+-
 Reporter:  Zac Hatfield Dodds   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Utilities|  Version:  1.11
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
  timezone,overflow,datetime |  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:

 I don't see what else Django could do in this case.

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


[Django] #28124: Timezone-related overflows in utils

2017-04-25 Thread Django
#28124: Timezone-related overflows in utils
-+-
   Reporter:  Zac|  Owner:  nobody
  Hatfield Dodds |
   Type:  Bug| Status:  new
  Component:  Utilities  |Version:  1.11
   Severity:  Normal |   Keywords:
   Triage Stage: |  timezone,overflow,datetime
  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Many methods in django/utils/timezone.py will raise OverflowError if given
 an aware datetime and a timezone in which it is unrepresentable.

 This is literally an edge case, and simply propagating the exception may
 be the right thing to do.  Either way, reporting upstream means
 https://github.com/HypothesisWorks/hypothesis-python/issues/322 can be
 closed.

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


Re: [Django] #28122: Overriding directory_index view's static/directory_index.html crashes with TypeError: context must be a dict rather than Context

2017-04-25 Thread Django
#28122: Overriding directory_index view's static/directory_index.html crashes 
with
TypeError: context must be a dict rather than Context
--+--
 Reporter:  Natt Piyapramote  |Owner:  Tim Graham
 Type:  Bug   |   Status:  assigned
Component:  Core (Other)  |  Version:  1.11
 Severity:  Release blocker   |   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/8403 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/066.505a74f0b2cd7bc23601bb9b9f6d3c36%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28122: Overriding directory_index view's static/directory_index.html crashes with TypeError: context must be a dict rather than Context (was: Override static/directory_index.html templat

2017-04-25 Thread Django
#28122: Overriding directory_index view's static/directory_index.html crashes 
with
TypeError: context must be a dict rather than Context
--+--
 Reporter:  Natt Piyapramote  |Owner:  Tim Graham
 Type:  Bug   |   Status:  assigned
Component:  Core (Other)  |  Version:  1.11
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by Tim Graham):

 * status:  new => assigned
 * severity:  Normal => Release blocker
 * component:  Uncategorized => Core (Other)
 * owner:  nobody => Tim Graham
 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 `django.views.static.directory_index()` must be updated after
 6a7495051304d75865add6ff96422018984e1663.

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


Re: [Django] #28123: django.utils.html.smart_urlquote() is incorrectly parsing the query string

2017-04-25 Thread Django
#28123: django.utils.html.smart_urlquote() is incorrectly parsing the query 
string
+--
 Reporter:  Denis Pechenev  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Uncategorized   |  Version:  1.10
 Severity:  Normal  |   Resolution:
 Keywords:  smart_urlquote  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by Denis Pechenev):

 * type:  Uncategorized => Bug


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


Re: [Django] #28123: django.utils.html.smart_urlquote() is incorrectly parsing the query string

2017-04-25 Thread Django
#28123: django.utils.html.smart_urlquote() is incorrectly parsing the query 
string
+--
 Reporter:  Denis Pechenev  |Owner:  nobody
 Type:  Uncategorized   |   Status:  new
Component:  Uncategorized   |  Version:  1.10
 Severity:  Normal  |   Resolution:
 Keywords:  smart_urlquote  | 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 Denis Pechenev:

Old description:

> Query string like
> 'search_text=%D0%B4%D0%B6%D0%B8%D0%BD%D1%81%D0%BE%D0%B2%D1%8B%D0%B5+%D0%BA%D1%83%D1%80%D1%82%D0%BA%D0%B8'
> is already encoded. But smart_urlquote() encodes it again because of
> incorrect parsing in parse_qsl(). Value should be encoded with ASCII
> before parsing.
>
> So there should be something like:
>
> {{{
> query_parts = [(unquote(force_str(q[0])), unquote(force_str(q[1])))
>for q in parse_qsl(query.encode('ascii'),
> keep_blank_values=True)]
> }}}

New description:

 Query string like
 
'search_text=%D0%B4%D0%B6%D0%B8%D0%BD%D1%81%D0%BE%D0%B2%D1%8B%D0%B5+%D0%BA%D1%83%D1%80%D1%82%D0%BA%D0%B8'
 is already encoded. But smart_urlquote() encodes it again because of
 incorrect parsing in parse_qsl(). Value should be encoded with ASCII
 before parsing.

 So there should be something like:

 {{{
 query_parts = [(unquote(force_str(q[0])), unquote(force_str(q[1])))
for q in parse_qsl(query.encode('ascii'),
 keep_blank_values=True)]
 }}}

 https://github.com/django/django/blob/master/django/utils/html.py#L216

--

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


[Django] #28123: django.utils.html.smart_urlquote() is incorrectly parsing the query string

2017-04-25 Thread Django
#28123: django.utils.html.smart_urlquote() is incorrectly parsing the query 
string
--+
   Reporter:  Denis Pechenev  |  Owner:  nobody
   Type:  Uncategorized   | Status:  new
  Component:  Uncategorized   |Version:  1.10
   Severity:  Normal  |   Keywords:  smart_urlquote
   Triage Stage:  Unreviewed  |  Has patch:  0
Needs documentation:  0   |Needs tests:  0
Patch needs improvement:  0   |  Easy pickings:  0
  UI/UX:  0   |
--+
 Query string like
 
'search_text=%D0%B4%D0%B6%D0%B8%D0%BD%D1%81%D0%BE%D0%B2%D1%8B%D0%B5+%D0%BA%D1%83%D1%80%D1%82%D0%BA%D0%B8'
 is already encoded. But smart_urlquote() encodes it again because of
 incorrect parsing in parse_qsl(). Value should be encoded with ASCII
 before parsing.

 So there should be something like:

 {{{
 query_parts = [(unquote(force_str(q[0])), unquote(force_str(q[1])))
for q in parse_qsl(query.encode('ascii'),
 keep_blank_values=True)]
 }}}

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


Re: [Django] #28121: force_text incorrectly handles SafeBytes under PY3

2017-04-25 Thread Django
#28121: force_text incorrectly handles SafeBytes under PY3
+--
 Reporter:  Thomas Achtemichuk  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Utilities   |  Version:  1.11
 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 Thomas Achtemichuk):

 * cc: tom@… (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.edc597b8917da3638fb422d0f5dccd11%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28121: force_text incorrectly handles SafeBytes under PY3

2017-04-25 Thread Django
#28121: force_text incorrectly handles SafeBytes under PY3
+--
 Reporter:  Thomas Achtemichuk  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Utilities   |  Version:  1.11
 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 Thomas Achtemichuk):

 Claude, yes, that's what I've done to work around 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.8196a6682aaf4714951936f769b1fef2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26844: Formset's validate_min doesn't work correctly with empty forms

2017-04-25 Thread Django
#26844: Formset's validate_min doesn't work correctly with empty forms
+-
 Reporter:  Wim Feijen  |Owner:  Manasa Patibandla
 Type:  Bug |   Status:  new
Component:  Forms   |  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 Jim Ouwerkerk):

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


Comment:

 Replying to [comment:5 Tim Graham ]:
 > In [changeset:"f5c6295797b8332134fd89e0209a18a1d1d45e0c" f5c6295]:
 > {{{
 > #!CommitTicketReference repository=""
 revision="f5c6295797b8332134fd89e0209a18a1d1d45e0c"
 > Fixed #26844 -- Made formset's validate_min validation ignore empty
 forms.
 > }}}

 This commit breaks the validate_min validation for formset with existing
 unchanged data in Django 1.11.
 It counts unchanged existing forms as 'empty' form because they are not
 changed, but they should not be counted as empty.

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


Re: [Django] #28122: Override static/directory_index.html template will raise TypeError: context must be a dict rather than Context

2017-04-25 Thread Django
#28122: Override static/directory_index.html template will raise TypeError: 
context
must be a dict rather than Context
--+--
 Reporter:  Natt Piyapramote  |Owner:  nobody
 Type:  Uncategorized |   Status:  new
Component:  Uncategorized |  Version:  1.11
 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 Natt Piyapramote:

Old description:

> **Test step**
>
> 1. Create  **templates/static/directory_index.html** with following
> content
>
> {{{
> {% load i18n %}
>   
> {% blocktrans %}Index of {{ directory }}{% endblocktrans %}
> 
>   {% if directory != "/" %}
>   ../
>   {% endif %}
>   {% for f in file_list %}
>   {{ f }}
>   {% endfor %}
> 
>   
> 
> }}}
>
> 2. Config **settings.py**'s TEMPLATE_DIR to search **templates/**
>
> {{{
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [
> 'templates'   # add config
> here
> ],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
> }}}
>
> 3. Use **django.views.static.serve** in **urls.py**
>
> {{{
> def browse(request):
> return serve(request, request.path, '/tmp', show_indexes=True)
>
> urlpatterns = [
> url(r'^browse/', browse),
> }}}
>
> **Actual result**
> {{{
> TypeError at /browse/
> context must be a dict rather than Context.
> Request Method: GET
> Request URL:http://localhost:8001/browse/
> Django Version: 1.11
> Exception Type: TypeError
> Exception Value:
> context must be a dict rather than Context.
> Exception Location: /home/natt/.virtualenvs/django111/lib/python3.5
> /site-packages/django/template/context.py in make_context, line 287
> Python Executable:  /home/natt/.virtualenvs/django111/bin/python
> Python Version: 3.5.2
> Python Path:
> ['/home/natt/tmp/demo',
>  '/home/natt/.virtualenvs/django111/lib/python35.zip',
>  '/home/natt/.virtualenvs/django111/lib/python3.5',
>  '/home/natt/.virtualenvs/django111/lib/python3.5/plat-x86_64-linux-gnu',
>  '/home/natt/.virtualenvs/django111/lib/python3.5/lib-dynload',
>  '/usr/lib/python3.5',
>  '/usr/lib/python3.5/plat-x86_64-linux-gnu',
>  '/home/natt/.virtualenvs/django111/lib/python3.5/site-packages']
> Server time:Tue, 25 Apr 2017 07:24:00 +
>
> Internal Server Error: /qml/
> Traceback (most recent call last):
>   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
> packages/django/core/handlers/exception.py", line 41, in inner
> response = get_response(request)
>   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
> packages/django/core/handlers/base.py", line 187, in _get_response
> response = self.process_exception_by_middleware(e, request)
>   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
> packages/django/core/handlers/base.py", line 185, in _get_response
> response = wrapped_callback(request, *callback_args,
> **callback_kwargs)
>   File "/home/natt/tmp/demo/demo/urls.py", line 23, in main
> return serve(request, path, '/home/natt/cnmi/his/his/qmlweb/qml',
> show_indexes=True)
>   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
> packages/django/views/static.py", line 43, in serve
> return directory_index(path, fullpath)
>   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
> packages/django/views/static.py", line 107, in directory_index
> return HttpResponse(t.render(c))
>   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
> packages/django/template/backends/django.py", line 64, in render
> context = make_context(context, request,
> autoescape=self.backend.engine.autoescape)
>   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
> packages/django/template/context.py", line 287, in make_context
> raise TypeError('context must be a dict rather than %s.' %
> context.__class__.__name__)
> TypeError: context must be a dict rather than Context.
> }}}
>
> **Expected result**
> Directory browsing render successfully
> (This works correctly in Django 1.10)

New description:

 **Test step**

 1. Create  **templates/static/directory_index.html** with following
 content


[Django] #28122: Override static/directory_index.html template will raise TypeError: context must be a dict rather than Context

2017-04-25 Thread Django
#28122: Override static/directory_index.html template will raise TypeError: 
context
must be a dict rather than Context
+
   Reporter:  Natt Piyapramote  |  Owner:  nobody
   Type:  Uncategorized | Status:  new
  Component:  Uncategorized |Version:  1.11
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 **Test step**

 1. Create  **templates/static/directory_index.html** with following
 content

 {{{
 {% load i18n %}
   
 {% blocktrans %}Index of {{ directory }}{% endblocktrans %}
 
   {% if directory != "/" %}
   ../
   {% endif %}
   {% for f in file_list %}
   {{ f }}
   {% endfor %}
 
   
 
 }}}

 2. Config **settings.py**'s TEMPLATE_DIR to search **templates/**

 {{{
 TEMPLATES = [
 {
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': [
 'templates'   # add config
 here
 ],
 'APP_DIRS': True,
 'OPTIONS': {
 'context_processors': [
 'django.template.context_processors.debug',
 'django.template.context_processors.request',
 'django.contrib.auth.context_processors.auth',
 'django.contrib.messages.context_processors.messages',
 ],
 },
 },
 ]
 }}}

 3. Use **django.views.static.serve** in **urls.py**

 {{{
 def browse(request):
 return serve(request, request.path, '/tmp', show_indexes=True)

 urlpatterns = [
 url(r'^browse/', browse),
 }}}

 **Actual result**
 {{{
 TypeError at /browse/
 context must be a dict rather than Context.
 Request Method: GET
 Request URL:http://localhost:8001/browse/
 Django Version: 1.11
 Exception Type: TypeError
 Exception Value:
 context must be a dict rather than Context.
 Exception Location: /home/natt/.virtualenvs/django111/lib/python3.5
 /site-packages/django/template/context.py in make_context, line 287
 Python Executable:  /home/natt/.virtualenvs/django111/bin/python
 Python Version: 3.5.2
 Python Path:
 ['/home/natt/tmp/demo',
  '/home/natt/.virtualenvs/django111/lib/python35.zip',
  '/home/natt/.virtualenvs/django111/lib/python3.5',
  '/home/natt/.virtualenvs/django111/lib/python3.5/plat-x86_64-linux-gnu',
  '/home/natt/.virtualenvs/django111/lib/python3.5/lib-dynload',
  '/usr/lib/python3.5',
  '/usr/lib/python3.5/plat-x86_64-linux-gnu',
  '/home/natt/.virtualenvs/django111/lib/python3.5/site-packages']
 Server time:Tue, 25 Apr 2017 07:24:00 +

 Internal Server Error: /qml/
 Traceback (most recent call last):
   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
 packages/django/core/handlers/exception.py", line 41, in inner
 response = get_response(request)
   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
 packages/django/core/handlers/base.py", line 187, in _get_response
 response = self.process_exception_by_middleware(e, request)
   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
 packages/django/core/handlers/base.py", line 185, in _get_response
 response = wrapped_callback(request, *callback_args,
 **callback_kwargs)
   File "/home/natt/tmp/demo/demo/urls.py", line 23, in main
 return serve(request, path, '/home/natt/cnmi/his/his/qmlweb/qml',
 show_indexes=True)
   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
 packages/django/views/static.py", line 43, in serve
 return directory_index(path, fullpath)
   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
 packages/django/views/static.py", line 107, in directory_index
 return HttpResponse(t.render(c))
   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
 packages/django/template/backends/django.py", line 64, in render
 context = make_context(context, request,
 autoescape=self.backend.engine.autoescape)
   File "/home/natt/.virtualenvs/django111/lib/python3.5/site-
 packages/django/template/context.py", line 287, in make_context
 raise TypeError('context must be a dict rather than %s.' %
 context.__class__.__name__)
 TypeError: context must be a dict rather than Context.
 }}}

 **Expected result**
 Directory browsing render successfully
 (This works correctly in Django 1.10)

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