[Django] #26478: Template Context should validate names

2016-04-07 Thread Django
#26478: Template Context should validate names
---+--
 Reporter:  steveire   |  Owner:  nobody
 Type:  New feature| Status:  new
Component:  Uncategorized  |Version:  1.9
 Severity:  Normal |   Keywords:  template
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+--
 The 'for' tag does not validate names of unpacked variables, allowing
 things like

 `{% for k|upper, "v" in mapping.items %}`

 without throwing an error. Such 'variables' are not useful within the
 `for` block.

 {{{#!python
 #!/usr/bin/env python

 from django.template import Template, Context
 from django.template.engine import Engine

 e = Engine()

 c = Context()
 c["m"] = {"one": "1", "two": "2"}

 t = e.from_string('{% for k|upper, v in m.items %}{{ k|upper }} : {{ v
 }}\n{% endfor %}')
 print t.render(c)
 #  : 2
 #  : 1

 t = e.from_string('{% for "k", v in m.items %}{{ "k" }} : {{ v }}\n{%
 endfor %}')
 print t.render(c)
 # k : 2
 # k : 1
 }}}

 The for tag should error on an attempt to unpack to variables which
 contain FILTER_SEPARATOR, double-quoted string or single-quoted string.

 The underlying issue is that `Context` does not validate keys it is given,
 so the `cycle` tag also has this issue in the form of `{% cycle 'a' 'b'
 'c' as "letter" %}`, as does `widthratio` and any other tag which has an
 'as' form.

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

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


Re: [Django] #26475: Using functools.partial in model field options causes creation of unnecessary migration on every 'makemigrations' call

2016-04-07 Thread Django
#26475: Using functools.partial in model field options causes creation of
unnecessary migration on every 'makemigrations' call
+--
 Reporter:  un-def  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.9
 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 oneTimePad):

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


Comment:

 partial is not a python class to subclass; it's a function: see
 [implementation]
 :https://github.com/python/cpython/blob/master/Lib/functools.py#236


 Maybe:

 {{{
 class Partial(object):

  def __init__(self,partialFct):
   self.func = partialFct
  def __call__(self,*args,**kwargs):
  return self.func(*args,**kwargs)

  def __eq__(self,other):
  return(  self.func.func == other.func.func and
self.func.args == other.func.args and
self.func.keywords == other.func.keywords)
  def __ne__(self,other):
   return not self.__eq__(other)

 Usage:
  def concat(*args):
return ''.join(args)

 class TestModel(models.Model):
   test_field = models.CharField(max_length =128, default =
 Partial(partial(concat, 'foo', 'bar')))


 }}}

 Just an idea. Not tested with Django.

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


Re: [Django] #20027: manage.py shebang should reflect used python executable

2016-04-07 Thread Django
#20027: manage.py shebang should reflect used python executable
---+--
 Reporter:  anonymous  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Python 3   |  Version:  1.5
 Severity:  Normal |   Resolution:  wontfix
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by collinanderson):

 I expect this will become more of an issue soon when people start using
 Ubuntu 16.04, which doesn't have /usr/bin/python installed by default. It
 basically means Django won't work outside of a virtualenv unless you
 manually change manage.py.

 os.path.basename(sys.executable) seems reasonable to me.

 Or, we could hard code it as python3 and and tell people to change it by
 hand if they really want to start a new project using python 2. :)

 Or just wait til January when we remove py2 support anyway.

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


Re: [Django] #26476: Migration preserve_default does not works properly?

2016-04-07 Thread Django
#26476: Migration preserve_default does not works properly?
-+-
 Reporter:  madEng84 |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.8
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  preserve_default | Triage Stage:
  sqlmigrate |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by shaib):

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


Comment:

 If table `my_app_label` is not empty when you run this migration, and you
 try to add a non-null column without a default, your database should give
 an error. This is why Django uses a default in the transaction.

 Your reading of the documentation is a bit too literal -- or, arguably,
 the documentation is not clear enough; what is meant is that Django never
 '''leaves''' defaults in the database.

 Indeed, for large databases the aler-table queries (well, the first) could
 be quite heavy. I am not aware of a light way to add a non-nullable column
 to a large table.

 In the future, please ask "is this a bug" type questions on a users'
 forum, such as the #django IRC channel or django-users mailing list.

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


Re: [Django] #26005: uri_to_iri() perfoms percent decoding incorrectly

2016-04-07 Thread Django
#26005: uri_to_iri() perfoms percent decoding incorrectly
---+---
 Reporter:  Chronial   |Owner:  varunnaganathan
 Type:  Bug|   Status:  assigned
Component:  Utilities  |  Version:  1.8
 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 Chronial):

 New PR against master: https://github.com/django/django/pull/6428. I also
 didn't foresee what that this fix would affect the testing infrastructure
 so I didn't run the whole test suite last time. Now everything should
 work.

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

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


Re: [Django] #26037: Document precedence of USE_X_FORWARDED_HOST and USE_X_FORWARDED_PORT settings

2016-04-07 Thread Django
#26037: Document precedence of USE_X_FORWARDED_HOST and USE_X_FORWARDED_PORT
settings
-+-
 Reporter:  benoitbryon  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  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
-+-

Comment (by Tim Graham ):

 In [changeset:"1920d4d5a8d69a488b59c7c4cd4f80a514fe2df8" 1920d4d]:
 {{{
 #!CommitTicketReference repository=""
 revision="1920d4d5a8d69a488b59c7c4cd4f80a514fe2df8"
 [1.9.x] Fixed #26037 -- Documented precedence of USE_X_FORWARDED_HOST/PORT
 settings.

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


Re: [Django] #26477: Docs: Example about bookmarks mentions books

2016-04-07 Thread Django
#26477: Docs: Example about bookmarks mentions books
---+--
 Reporter:  decibyte   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--

Comment (by Tim Graham ):

 In [changeset:"4bb3ddbcc674601743c63311d7efbf0e1fd19742" 4bb3ddbc]:
 {{{
 #!CommitTicketReference repository=""
 revision="4bb3ddbcc674601743c63311d7efbf0e1fd19742"
 Fixed #26477 -- Fixed typo in docs/ref/contrib/contenttypes.txt
 }}}

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


Re: [Django] #26477: Docs: Example about bookmarks mentions books

2016-04-07 Thread Django
#26477: Docs: Example about bookmarks mentions books
---+--
 Reporter:  decibyte   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:  fixed
 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:   => fixed


Comment:

 In [changeset:"92d77f31606e5fb2b1a5d0963fed0433d766a920" 92d77f31]:
 {{{
 #!CommitTicketReference repository=""
 revision="92d77f31606e5fb2b1a5d0963fed0433d766a920"
 [1.9.x] Fixed #26477 -- Fixed typo in docs/ref/contrib/contenttypes.txt

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


Re: [Django] #26477: Docs: Example about bookmarks mentions books

2016-04-07 Thread Django
#26477: Docs: Example about bookmarks mentions books
---+--
 Reporter:  decibyte   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--

Comment (by Tim Graham ):

 In [changeset:"7c67508a801ba2435c7d45a6982a9beb2203cf73" 7c67508a]:
 {{{
 #!CommitTicketReference repository=""
 revision="7c67508a801ba2435c7d45a6982a9beb2203cf73"
 [1.8.x] Fixed #26477 -- Fixed typo in docs/ref/contrib/contenttypes.txt

 Backport of 4bb3ddbcc674601743c63311d7efbf0e1fd19742 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.229ef692b20bea42fd144776df02d9c8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26476: Migration preserve_default does not works properly? (was: Migration preserve_default does not works properly)

2016-04-07 Thread Django
#26476: Migration preserve_default does not works properly?
-+-
 Reporter:  madEng84 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  preserve_default | Triage Stage:
  sqlmigrate |  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.f7fbf060cb115ca04af6632df4ed7619%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26477: Docs: Example about bookmarks mentions books

2016-04-07 Thread Django
#26477: Docs: Example about bookmarks mentions books
---+--
 Reporter:  decibyte   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  master
 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 decibyte):

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


Re: [Django] #26477: Docs: Example about bookmarks mentions books

2016-04-07 Thread Django
#26477: Docs: Example about bookmarks mentions books
---+--
 Reporter:  decibyte   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by decibyte):

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


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

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


Re: [Django] #26477: Docs: Example about bookmarks mentions books

2016-04-07 Thread Django
#26477: Docs: Example about bookmarks mentions books
---+
 Reporter:  decibyte   |  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Documentation  |Version:  master
 Severity:  Normal | Resolution:
 Keywords: |   Triage Stage:  Unreviewed
Has patch:  0  |  Easy pickings:  1
UI/UX:  0  |
---+
Changes (by decibyte):

 * Attachment "contenttypes-docs-fix.patch" added.

 A patch to replace "books" with "bookmarks"

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


[Django] #26477: Docs: Example about bookmarks mentions books

2016-04-07 Thread Django
#26477: Docs: Example about bookmarks mentions books
---+
 Reporter:  decibyte   |  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Documentation  |Version:  master
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  1  |  UI/UX:  0
---+
 In the docs about the contenttypes framework, there's an example of using
 `related_query_name` for `GenericRelation`. In the second part of the code
 example, the comment says:

 {{{
 Get all tags belonging to books containing `django` in the url
 }}}

 But the example is about bookmarks, not books.

 
https://github.com/django/django/blob/ecb59cc6579402b68ddfd4499bf30edacf5963be/docs/ref/contrib/contenttypes.txt#L386-L396

 I have attached a patch for this. I'd be happy to provide it via a pull
 request on GitHub, if that is a better of contributing a tiny fix like
 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/051.25b9d84462e87a9aa93c7c66f32b80a7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #26476: Migration preserve_default does not work properly

2016-04-07 Thread Django
#26476: Migration preserve_default does not work properly
+-
 Reporter:  madEng84|  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Migrations  |Version:  1.8
 Severity:  Normal  |   Keywords:  preserve_default sqlmigrate
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+-
 Hi all, I'm using Django<1.9
 When i change my model adding a default to one field or adding a new field
 to existing model with a default, and I launch:

 `./manage.py sqlmigrate my_app_label my_migration_name`

 I see:

 ''BEGIN;
 ALTER TABLE `my_app_label` ADD COLUMN `my_char_field` varchar(36) DEFAULT
 test NOT NULL;
 ALTER TABLE `my_app_label` ALTER COLUMN `my_char_field` DROP DEFAULT;
 COMMIT;''

 Reading Docs ([https://docs.djangoproject.com/en/1.8/ref/migration-
 operations/#alterfield]) i can see, about  that ''preserve_default'', that
 :

The preserve_default argument indicates whether the field’s default
 value is permanent and should be baked into the project state (True), or
 if it is temporary and just for this migration (False) - usually because
 the migration is altering a nullable field to a non-nullable one and needs
 a default value to put into existing rows. It does not affect the behavior
 of setting defaults in the database directly - '''Django never sets
 database defaults and always applies them in the Django ORM code'''.

 So why I see launching sqlmigrate **DEFAULT** and than **DROP DEFAULT** ?
 For large databases this could be an heavy pair of query.

 Best Regards

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


Re: [Django] #26476: Migration preserve_default does not works properly (was: Migration preserve_default does not work properly)

2016-04-07 Thread Django
#26476: Migration preserve_default does not works properly
-+-
 Reporter:  madEng84 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  preserve_default | Triage Stage:
  sqlmigrate |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by madEng84):

 * needs_docs:   => 0
 * needs_better_patch:   => 0
 * needs_tests:   => 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.182aa2f7267f8cd2a50aabc3d45e22f4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #14370: Adding support for Autocomplete in contrib.admin

2016-04-07 Thread Django
#14370: Adding support for Autocomplete in contrib.admin
-+-
 Reporter:  tyrion   |Owner:  codingjoe
 Type:  New feature  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  autocomplete,| Triage Stage:  Accepted
  jquery, javascript, widgets,   |
  admin  |
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by kevin-brown):

 * cc: kevin-brown (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/064.d5e663e0adee9021250f0dea76728c68%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26421: ModelSignal should use Apps.lazy_model_operation

2016-04-07 Thread Django
#26421: ModelSignal should use Apps.lazy_model_operation
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
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 timgraham):

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


Comment:

 Left a few comments for improvement.

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


[Django] #26475: Using functools.partial in model field options causes creation of unnecessary migration on every 'makemigrations' call

2016-04-07 Thread Django
#26475: Using functools.partial in model field options causes creation of
unnecessary migration on every 'makemigrations' call
+
 Reporter:  un-def  |  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Migrations  |Version:  1.9
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+
 Consider this simple model:


 {{{
 from django.db import models

 from functools import partial


 def concat(*args):
 return ''.join(args)


 class TestModel(models.Model):

 test_field = models.CharField(
 max_length=128,
 default=partial(concat, 'foo', 'bar')
 )
 }}}

 Every time you run `./manage.py makemigration` it leads to creation of
 migration:

 {{{
 $ ./manage.py makemigrations
 Migrations for 'test_app':
   0008_auto_py:
 - Alter field test_field on testmodel

 $ ./manage.py makemigrations
 Migrations for 'test_app':
   0009_auto_py:
 - Alter field test_field on testmodel

 $ ./manage.py makemigrations
 Migrations for 'test_app':
   0010_auto_py:
 - Alter field test_field on testmodel
 }}}

 All created migrations are equal.

 Cause: when project state is rendered from previous migration file,
 `functools.partial` instance is created (`migrations.AlterField(...
 default=functools.partial(djtest_app.models.concat, *('foo', 'bar'),
 **{}), ...)`). After that each model field is deconstructed to dict and
 previous and current field states (i.e. dicts) are compared
 
[https://github.com/django/django/blob/2cd2d188516475ddf256e6267cd82c495fb5c430/django/db/migrations/autodetector.py#L862]
 But different instances of `functools.partial` with same arguments are not
 equal — I guess that `partial` doesn't implement own `__eq__`/`__ne__`
 methods, so comparison is made by object `id()` (memory address), and
 false field changes is detected.

 Possible solution (workaround): we can use own `partial` subclass in
 migration files. Our subclass implements custom `__eq__`/`__ne__` magic
 methods:

 {{{
 class Partial(functools.partial):

 def __eq__(self, other):
 return (self.func == other.func and
 self.args == other.args and
 self.keywords == other.keywords)

 def __ne__(self, other):
 return not self.__eq__(other)
 }}}

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


Re: [Django] #26037: Document precedence of USE_X_FORWARDED_HOST and USE_X_FORWARDED_PORT settings

2016-04-07 Thread Django
#26037: Document precedence of USE_X_FORWARDED_HOST and USE_X_FORWARDED_PORT
settings
-+-
 Reporter:  benoitbryon  |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  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:"5cda4677b3df1be971000ef27470d3efc308d3be" 5cda4677]:
 {{{
 #!CommitTicketReference repository=""
 revision="5cda4677b3df1be971000ef27470d3efc308d3be"
 Fixed #26037 -- Documented precedence of USE_X_FORWARDED_HOST/PORT
 settings.
 }}}

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

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


Re: [Django] #24972: Removing unique_together constraint makes migration fail on Django 1.8.2 with MySQL

2016-04-07 Thread Django
#24972: Removing unique_together constraint makes migration fail on Django 1.8.2
with MySQL
-+-
 Reporter:  adambrenecki |Owner:
 |  adambrenecki
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  1.9
 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 adamn):

 I just tried replicating and couldn't get it to happen again.
 Unfortunately I fried all of my previous migrations to get it to work on
 the real project and my test project starting from scratch worked fine.  I
 guess we'll leave well enough alone.

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


Re: [Django] #26464: Add a link to the OWASP Top 10 in "Security in Django" doc (was: Addition to the "Security in Django": Incremental URLs/Identifiers)

2016-04-07 Thread Django
#26464: Add a link to the OWASP Top 10 in "Security in Django" doc
---+
 Reporter:  CrazyPython|Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Documentation  |  Version:  1.9
 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 timgraham):

 * has_patch:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 The discussion on the mailing list concluded to to add a link to the OWASP
 Top 10: [https://github.com/django/django/pull/6425 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/069.8e850773204c62e73b2fd2b5a3f85a74%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26474: Add source of minified javascript files

2016-04-07 Thread Django
#26474: Add source of minified javascript files
--+
 Reporter:  rhertzog  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Packaging |  Version:  1.9
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timgraham):

 * component:  Uncategorized => Packaging
 * stage:  Unreviewed => Accepted


Comment:

 We can add the non-minified versions I guess. This would also include
 modifying `django/contrib/admin/options.py` to use `extra` in
 `vendor/xregexp/xregexp.min.js`.

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


Re: [Django] #24096: GROUP BY on oracle fails with TextField and BinaryField

2016-04-07 Thread Django
#24096: GROUP BY on oracle fails with TextField and BinaryField
-+-
 Reporter:  jarshwah |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by jaywink):

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


Re: [Django] #24709: ArrayField doesn't support .update() and F() objects

2016-04-07 Thread Django
#24709: ArrayField doesn't support .update() and F() objects
-+-
 Reporter:  ris  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  contrib.postgres |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  postgresql contrib   | Triage Stage:  Accepted
  arrayfield update  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by codingjoe):

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


Re: [Django] #26085: contenttypes.views.shortcut fails if a FK to Site returns None

2016-04-07 Thread Django
#26085: contenttypes.views.shortcut fails if a FK to Site returns None
--+
 Reporter:  jaap3 |Owner:  jibaku
 Type:  Bug   |   Status:  assigned
Component:  contrib.contenttypes  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+
Changes (by daniponi):

 * cc: daniponi (added)
 * needs_better_patch:  1 => 0


Comment:

 Created a PR to fix the test problem as suggested by claudep.
 [https://github.com/django/django/pull/6427]

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