Re: [Django] #28877: Improve humanize’s |ordinal formatting

2017-12-04 Thread Django
#28877: Improve humanize’s |ordinal formatting
-+-
 Reporter:  Tzu-ping Chung   |Owner:  Tzu-ping
 |  Chung
 Type:  New feature  |   Status:  assigned
Component:  contrib.humanize |  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 Tzu-ping Chung):

 * owner:  nobody => Tzu-ping Chung
 * status:  new => assigned
 * has_patch:  0 => 1


Comment:

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


Re: [Django] #11964: Add the ability to use database-level CHECK CONSTRAINTS

2017-12-04 Thread Django
#11964: Add the ability to use database-level CHECK CONSTRAINTS
-+-
 Reporter:  Matthew Schinckel|Owner:  Ian Foote
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  check contsraint | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ian Foote):

 Now that Django 2 is released, I'd like to see this land. I think I've
 resolved all the outstanding issues raised on the pull request before. Is
 the next step to rebase/squash my work in progress commits?

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


Re: [Django] #28884: RenameField crashes with AttributeError when renaming a ManyToManyField

2017-12-04 Thread Django
#28884: RenameField crashes with AttributeError when renaming a ManyToManyField
-+-
 Reporter:  Emanuele Di Giacomo  |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  2.0
 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 Simon Charette):

 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/9421

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


Re: [Django] #28883: uuid URL path converter failed if UUID is anything but lowercase

2017-12-04 Thread Django
#28883: uuid URL path converter failed if UUID is anything but lowercase
-+-
 Reporter:  Jean-Daniel  |Owner:  Daniel Leicht
 Type:  Bug  |   Status:  assigned
Component:  Core (URLs)  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  uuid | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 > If the converter claims to catch UUIDs it has to be compliant with the
 RFC

 I don't think the ''purity'' argument is strong enough to discard Tim's
 concerns about URL unicity.

 Please chime in on the thread he pointed to in order voice your concern
 about case sensitivity. This ticket tracker doesn't get enough exposure to
 justify reverting a recent decision made by the community.

 Thanks.

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

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


Re: [Django] #28883: uuid URL path converter failed if UUID is anything but lowercase

2017-12-04 Thread Django
#28883: uuid URL path converter failed if UUID is anything but lowercase
-+-
 Reporter:  Jean-Daniel  |Owner:  daniel-leicht
 Type:  Bug  |   Status:  assigned
Component:  Core (URLs)  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  uuid | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by daniel-leicht):

 PR: https://github.com/django/django/pull/9420

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


Re: [Django] #28883: uuid URL path converter failed if UUID is anything but lowercase

2017-12-04 Thread Django
#28883: uuid URL path converter failed if UUID is anything but lowercase
-+-
 Reporter:  Jean-Daniel  |Owner:  Daniel Leicht
 Type:  Bug  |   Status:  assigned
Component:  Core (URLs)  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  uuid | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Daniel Leicht):

 * status:  new => assigned
 * owner:  nobody => Daniel Leicht


Comment:

 If the converter claims to catch UUIDs it has to be compliant with the RFC

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


[Django] #28885: Bottom parts of "Congratulations!" page cut off internationalized content

2017-12-04 Thread Django
#28885: Bottom parts of "Congratulations!" page cut off internationalized 
content
-+-
   Reporter:  Maciej |  Owner:  nobody
  Olko   |
   Type:  Bug| Status:  new
  Component:  Core   |Version:  2.0
  (Other)|   Keywords:  i18n, template,
   Severity:  Normal |  defaults
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  1  |
-+-
 Bottom parts (footer) of "Congratulations!" page[1] (rocket taking
 off/default urlconf) cut off text if it is too long. It happens for e.g.
 Russian and Lower Serbian languages. Screenshots:
 [[Image(https://screenshots.firefox.com/H4OzOchrVQCvNp5e/localhost)]]
 [[Image(https://screenshots.firefox.com/dG8BTsWHB4s0F2pL/localhost)]]

 For many other languages, the problem is more of just esthetic nature, as
 the padding to the bottom of page is not equal to the footer top ruler (if
 translations aren't one-liners in effect).

 The footer shouldn't have fixed height. I am afraid that some JavaScript
 is neccessary to calculate footer's height if we are about to keep the
 layout.

 [1] django/django/views/templates/default_urlconf.html

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

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


Re: [Django] #28540: Document changes to file upload permissions in Django 1.11 (was: When you save three or more ImageField in admin file perm = 0o600)

2017-12-04 Thread Django
#28540: Document changes to file upload permissions in Django 1.11
-+-
 Reporter:  Yaroslav Demidenko   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  ImageField, save,| Triage Stage:  Accepted
  permissions|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * component:  File uploads/storage => Documentation
 * type:  Bug => Cleanup/optimization


Comment:

 The behavior might also be mentioned somewhere in the file upload
 documentation.

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

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


Re: [Django] #28862: Removing a field from index_together/unique_together and from the model generates a migration that crashes (was: Removing a field from index_together and from the model generates

2017-12-04 Thread Django
#28862: Removing a field from index_together/unique_together and from the model
generates a migration that crashes
---+
 Reporter:  Artem Maslovskiy   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Migrations |  Version:  1.9
 Severity:  Normal |   Resolution:
 Keywords:  models migrations  | 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):

 * component:  Database layer (models, ORM) => Migrations
 * stage:  Unreviewed => Accepted


Comment:

 That test is from the ticket I was thinking of: #23614 (fixed in Django
 1.7.2 and later). The comment isn't accurate because the order of
 operations changed in 5c9c1e029d139bd3d5213804af2ed9f317cd0b86 (Django
 1.9). That change in ordering looks incorrect.

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


Re: [Django] #28882: Cannot save disabled MultiValueFields (was: Cannot save disabled SplitDateTimeField)

2017-12-04 Thread Django
#28882: Cannot save disabled MultiValueFields
---+
 Reporter:  avalanchy  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Forms  |  Version:  1.11
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tim Graham):

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


Re: [Django] #28884: RenameField crashes with AttributeError when renaming a ManyToManyField (was: Regression in Django 2.0: RenameField throws AttributeError)

2017-12-04 Thread Django
#28884: RenameField crashes with AttributeError when renaming a ManyToManyField
-+-
 Reporter:  Emanuele Di Giacomo  |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  2.0
 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
-+-

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


Re: [Django] #28877: Improve humanize’s |ordinal formatting

2017-12-04 Thread Django
#28877: Improve humanize’s |ordinal formatting
--+
 Reporter:  Tzu-ping Chung|Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  contrib.humanize  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Claude Paroz):

 * stage:  Unreviewed => Accepted


Comment:

 Pull request welcome!

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


Re: [Django] #28884: Regression in Django 2.0: RenameField throws AttributeError

2017-12-04 Thread Django
#28884: Regression in Django 2.0: RenameField throws AttributeError
-+-
 Reporter:  Emanuele Di Giacomo  |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  2.0
 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 Simon Charette):

 * status:  new => assigned
 * owner:  nobody => Simon Charette
 * 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.4778a81529a6c43a975c2aa0bbb114ac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28873: Use dict.setdefault() to set model and form field defaults

2017-12-04 Thread Django
#28873: Use dict.setdefault() to set model and form field defaults
-+-
 Reporter:  Дилян Палаузов   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  1.11
 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:"87c76aa116ef49be2d6ff3ecf2fec37414638246" 87c76aa]:
 {{{
 #!CommitTicketReference repository=""
 revision="87c76aa116ef49be2d6ff3ecf2fec37414638246"
 Fixed #28873 -- Used dict.setdefault() to set model and form field
 defaults.
 }}}

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

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


Re: [Django] #28874: Errors on hidden input fields print out double escaped HTML

2017-12-04 Thread Django
#28874: Errors on hidden input fields print out double escaped HTML
-+-
 Reporter:  Kyle Agronick|Owner:  Daniil
 |  Ryzhkov
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by Daniil Ryzhkov):

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


Re: [Django] #28883: uuid URL path converter failed if UUID is anything but lowercase

2017-12-04 Thread Django
#28883: uuid URL path converter failed if UUID is anything but lowercase
-+--
 Reporter:  Jean-Daniel  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  uuid | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Old description:

> According to RFC4122:
>
> {{{
> Each field is treated as an integer and has its value printed as a zero-
> filled hexadecimal digit string with the most significant digit first.
> The hexadecimal values "a" through "f" are output as lower case
> characters and are case insensitive on input.
> }}}
>
> Actually, when trying to parse uuid using the url dispatcher's "uuid path
> convert", it returns URL not found for anything but lower case UUID,
> which is surprising as they should be case insensitive.
>
> The uuid path converter should be updated to support upper, lower or even
> mixed case UUID, as long as they are properly formatted.

New description:

 According to [https://tools.ietf.org/html/rfc4122 RFC4122]:

 {{{
 Each field is treated as an integer and has its value printed as a zero-
 filled hexadecimal digit string with the most significant digit first.
 The hexadecimal values "a" through "f" are output as lower case characters
 and are case insensitive on input.
 }}}

 Actually, when trying to parse uuid using the url dispatcher's "uuid path
 convert", it returns URL not found for anything but lower case UUID, which
 is surprising as they should be case insensitive.

 The uuid path converter should be updated to support upper, lower or even
 mixed case UUID, as long as they are properly formatted.

--

Comment (by Tim Graham):

 I'm not sure this change is desirable, at least for everyone, as that
 would permit many URLs (all case combinations) to map to the same page. A
 [https://groups.google.com/d/msg/django-
 developers/Y51CKkqq6Ng/9DAO7yaVEAAJ django-developers discussion] didn't
 yield any objections to removing support for case-insensitive URLs (via
 `(?i)` in URL patterns).

 Also, with the current architecture URL converters, I don't think it's
 possible to implement 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/069.e5f5fcf95522ebc775e78a0a64ae67cd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28879: Widget NumberInput becomes text if you change size

2017-12-04 Thread Django
#28879: Widget NumberInput becomes text if you change size
-+-
 Reporter:  Chris Davies-|Owner:  nobody
  Barnard|
 Type:  Uncategorized|   Status:  closed
Component:  Uncategorized|  Version:  1.11
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Chris Davies-Barnard):

 Thanks Tim.

 Sorry - Brain fade and tiredness left me unable to think beyond the
 obvious.

 Its a shame for the inconsistency!

 Chris

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

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


[Django] #28884: Regression in Django 2.0: RenameField throws AttributeError

2017-12-04 Thread Django
#28884: Regression in Django 2.0: RenameField throws AttributeError
---+
   Reporter:  Emanuele Di Giacomo  |  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  Migrations   |Version:  2.0
   Severity:  Release blocker  |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 Original issue: https://groups.google.com/forum/#!topic/django-
 users/O7s658gIHTE

 With Django 2.0, a `RenameField` on a model which has a reverse many to
 many relationship raises an exception: `AttributeError: 'ManyToManyRel'
 object has no attribute 'field_name'`.

 This is a regression in Django 2.0: the same migration with Django 1.11
 terminates successfully

 Below the code and the commands to reproduce the problem:

 {{{
 # myapp/models.py

 from django.db import models


 class ModelA(models.Model):
 new_name = models.IntegerField()


 class ModelB(models.Model):
 model_as = models.ManyToManyField('ModelA')

 # myapp/migrations/0001_initial.py

 from django.db import migrations, models


 class Migration(migrations.Migration):

 initial = True

 dependencies = [
 ]

 operations = [
 migrations.CreateModel(
 name='ModelA',
 fields=[
 ('id', models.AutoField(auto_created=True,
 primary_key=True, serialize=False, verbose_name='ID')),
 ('old_name', models.IntegerField()),
 ],
 ),
 migrations.CreateModel(
 name='ModelB',
 fields=[
 ('id', models.AutoField(auto_created=True,
 primary_key=True, serialize=False, verbose_name='ID')),
 ('model_as', models.ManyToManyField(to='myapp.ModelA')),
 ],
 ),
 ]

 # myapp/migrations/0002_auto_20171204_1012.py

 from django.db import migrations


 class Migration(migrations.Migration):

 dependencies = [
 ('myapp', '0001_initial'),
 ]

 operations = [
 migrations.RenameField(
 model_name='modela',
 old_name='old_name',
 new_name='new_name',
 ),
 ]

 $ ./manage.py migrate
 Operations to perform:
   Apply all migrations: admin, auth, contenttypes, myapp, sessions
 Running migrations:
   Applying contenttypes.0001_initial... OK
   Applying auth.0001_initial... OK
   Applying admin.0001_initial... OK
   Applying admin.0002_logentry_remove_auto_add... OK
   Applying contenttypes.0002_remove_content_type_name... OK
   Applying auth.0002_alter_permission_name_max_length... OK
   Applying auth.0003_alter_user_email_max_length... OK
   Applying auth.0004_alter_user_username_opts... OK
   Applying auth.0005_alter_user_last_login_null... OK
   Applying auth.0006_require_contenttypes_0002... OK
   Applying auth.0007_alter_validators_add_error_messages... OK
   Applying auth.0008_alter_user_username_max_length... OK
   Applying auth.0009_alter_user_last_name_max_length... OK
   Applying myapp.0001_initial... OK
   Applying myapp.0002_auto_20171204_1012...Traceback (most recent call
 last):
   File "./manage.py", line 15, in 
 execute_from_command_line(sys.argv)
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 371, in
 execute_from_command_line
 utility.execute()
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 365, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/core/management/base.py", line 288, in run_from_argv
 self.execute(*args, **cmd_options)
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/core/management/base.py", line 335, in execute
 output = self.handle(*args, **options)
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/core/management/commands/migrate.py", line 200, in handle
 fake_initial=fake_initial,
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 117, in migrate
 state = self._migrate_all_forwards(state, plan, full_plan, fake=fake,
 fake_initial=fake_initial)
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 147, in
 _migrate_all_forwards
 state = self.apply_migration(state, migration, fake=fake,
 fake_initial=fake_initial)
   File "/home/edg/src/example/env/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 244, in apply_migration
 state = 

Re: [Django] #28879: Widget NumberInput becomes text if you change size

2017-12-04 Thread Django
#28879: Widget NumberInput becomes text if you change size
-+-
 Reporter:  Chris Davies-|Owner:  nobody
  Barnard|
 Type:  Uncategorized|   Status:  closed
Component:  Uncategorized|  Version:  1.11
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


Comment:

 According to [https://stackoverflow.com/questions/22709792/html-input-
 type-number-wont-resize a stackoverflow question], `input[type=number]`
 does not support the `size` attribute.

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

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


[Django] #28883: uuid URL path converter failed if UUID is anything but lowercase

2017-12-04 Thread Django
#28883: uuid URL path converter failed if UUID is anything but lowercase
---+
   Reporter:  Jean-Daniel  |  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  Core (URLs)  |Version:  2.0
   Severity:  Normal   |   Keywords:  uuid
   Triage Stage:  Unreviewed   |  Has patch:  0
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 According to RFC4122:

 {{{
 Each field is treated as an integer and has its value printed as a zero-
 filled hexadecimal digit string with the most significant digit first.
 The hexadecimal values "a" through "f" are output as lower case characters
 and are case insensitive on input.
 }}}

 Actually, when trying to parse uuid using the url dispatcher's "uuid path
 convert", it returns URL not found for anything but lower case UUID, which
 is surprising as they should be case insensitive.

 The uuid path converter should be updated to support upper, lower or even
 mixed case UUID, as long as they are properly formatted.

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


Re: [Django] #28879: Widget NumberInput becomes text if you change size

2017-12-04 Thread Django
#28879: Widget NumberInput becomes text if you change size
-+-
 Reporter:  Chris Davies-|Owner:  nobody
  Barnard|
 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
-+-

Comment (by Chris Davies-Barnard):

 Yes,  apologies.

 However, using NumberInput means the new size is not followed and the
 fields return to their normal size.

 So maybe this is a Django CSS issue?

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

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


Re: [Django] #28882: Cannot save disabled SplitDateTimeField

2017-12-04 Thread Django
#28882: Cannot save disabled SplitDateTimeField
---+--
 Reporter:  avalanchy  |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Forms  |  Version:  1.11
 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 avalanchy):

 There is a pull request with unit test.

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

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


Re: [Django] #28540: When you save three or more ImageField in admin file perm = 0o600

2017-12-04 Thread Django
#28540: When you save three or more ImageField in admin file perm = 0o600
-+-
 Reporter:  Yaroslav Demidenko   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.11
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  ImageField, save,| Triage Stage:  Accepted
  permissions|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

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


Re: [Django] #28540: When you save three or more ImageField in admin file perm = 0o600

2017-12-04 Thread Django
#28540: When you save three or more ImageField in admin file perm = 0o600
-+-
 Reporter:  Yaroslav Demidenko   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  1.11
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  ImageField, save,| Triage Stage:
  permissions|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simen Heggestøyl):

 * cc: Simen Heggestøyl (added)
 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 We've hit the same issue, and I've identified
 f734e2d4b2fc4391a4d097b80357724815c1d414 as the offending commit.

 The issue seems to be that when `FILE_UPLOAD_PERMISSIONS` is `None`, the
 default system permissions are used. This worked fine for us, because our
 system default is 644, which is what we wanted. After
 f734e2d4b2fc4391a4d097b80357724815c1d414 however, when the uploaded file
 is sufficiently large, the system's permissions for temporary files is
 used instead (which was 600 in our case).

 Setting `FILE_UPLOAD_PERMISSIONS` explicitly fixes the issue, but I think
 this behavioral change should be mentioned in 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/064.e22bfce2a0a2ab079cc19d26a79dff36%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28858: Remove 'else' after 'return' or 'raise'

2017-12-04 Thread Django
#28858: Remove 'else' after 'return' or 'raise'
-+-
 Reporter:  Дилян Палаузов   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Other) |  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 Adam (Chainz) Johnson):

 So I'm very slightly in favour of removing the useless 'elses', I also
 consider it a tiny bit more readable, and amazingly cpython *does*
 generate less code in this case (it's no faster though, it's just removing
 an extra two opcodes from a redundant return None):

 {{{
 In [6]: def foo():
...: if foo:
...: return 1
...: else:
...: return 2
...:

 In [7]: def bar():
...: if bar:
...: return 1
...: return 2
...:

 In [8]: dis.dis(foo)
   2   0 LOAD_GLOBAL  0 (foo)
   2 POP_JUMP_IF_FALSE8

   3   4 LOAD_CONST   1 (1)
   6 RETURN_VALUE

   5 >>8 LOAD_CONST   2 (2)
  10 RETURN_VALUE
  12 LOAD_CONST   0 (None)
  14 RETURN_VALUE

 In [9]: dis.dis(bar)
   2   0 LOAD_GLOBAL  0 (bar)
   2 POP_JUMP_IF_FALSE8

   3   4 LOAD_CONST   1 (1)
   6 RETURN_VALUE

   4 >>8 LOAD_CONST   2 (2)
  10 RETURN_VALUE
 }}}

 However I doubt it's worth anyone's time to go through Django removing
 them. Perhaps we can add it to the style guide now, close this ticket, and
 fix it as code gets modified in the future.

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

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


Re: [Django] #28860: Reduce calls to len()

2017-12-04 Thread Django
#28860: Reduce calls to len()
-+-
 Reporter:  Дилян Палаузов   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  master
 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 Дилян Палаузов):

 My comments for django/db/backends/oracle/creation.py and
 django/db/backends/postgresql/operations.py weren't tackled.

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

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


Re: [Django] #28873: Use dict.setdefault() to set model and form field defaults (was: More of dict.setdefault)

2017-12-04 Thread Django
#28873: Use dict.setdefault() to set model and form field defaults
-+-
 Reporter:  Дилян Палаузов   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Other) |  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 Tim Graham):

 * component:  Uncategorized => Core (Other)
 * has_patch:  0 => 1
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Ready for checkin


Comment:

 [https://github.com/django/django/pull/9418 PR] from the patch.

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

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


Re: [Django] #28882: Cannot save disabled SplitDateTimeField

2017-12-04 Thread Django
#28882: Cannot save disabled SplitDateTimeField
---+--
 Reporter:  avalanchy  |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Forms  |  Version:  1.11
 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 Hrishikesh Barman):

 Can you provide a code sample to try 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/067.cfff70f74b049fbb1e27c7be66e935be%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28860: Reduce calls to len()

2017-12-04 Thread Django
#28860: Reduce calls to len()
-+-
 Reporter:  Дилян Палаузов   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  master
 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:"d2afa5eb2308e672b6313876856e32e2561b90f3" d2afa5eb]:
 {{{
 #!CommitTicketReference repository=""
 revision="d2afa5eb2308e672b6313876856e32e2561b90f3"
 Fixed #28860 -- Removed unnecessary len() calls.
 }}}

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

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


Re: [Django] #28881: Document that CommonPasswordValidator assumes all words are lower case (was: Common password validator does not handle case correctly)

2017-12-04 Thread Django
#28881: Document that CommonPasswordValidator assumes all words are lower case
--+
 Reporter:  Nick Farrell  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  2.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * component:  Uncategorized => Documentation
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 I think documenting the existing requirement for the password list to be
 lower case would be fine. A documentation fix would address the problem
 for older versions of Django and also avoid unnecessary computations for
 lists that are already lower 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.8cd5a4aea2a7b16482a774e1237be3f6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28879: Widget NumberInput becomes text if you change size

2017-12-04 Thread Django
#28879: Widget NumberInput becomes text if you change size
-+-
 Reporter:  Chris Davies-|Owner:  nobody
  Barnard|
 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
-+-

Old description:

> I'm adjusting the width of some form fields because small integers such
> as qty and price don't need to be 20 long and the following code results
> in them becoming type = 'text' regardless.
> {{{
> models.DecimalField: {'widget': TextInput(attrs={'size':'7'})},
> models.IntegerField: {'widget': NumberInput(attrs={'size':'3'})},
> }}
> breaking other aspects.  Sorry don't know if I need to add more detail
> etc...

New description:

 I'm adjusting the width of some form fields because small integers such as
 qty and price don't need to be 20 long and the following code results in
 them becoming type = 'text' regardless.
 {{{
 models.DecimalField: {'widget': TextInput(attrs={'size':'7'})},
 models.IntegerField: {'widget': NumberInput(attrs={'size':'3'})},
 }}}
 breaking other aspects.  Sorry don't know if I need to add more detail
 etc...

--

Comment (by Tim Graham):

 Your steps to reproduce use `TextInput` not `NumberInput`.

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

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


Re: [Django] #28879: Widget NumberInput becomes text if you change size

2017-12-04 Thread Django
#28879: Widget NumberInput becomes text if you change size
-+-
 Reporter:  Chris Davies-|Owner:  nobody
  Barnard|
 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
-+-
Changes (by Chris Davies-Barnard):

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


Comment:

 Hi Tim,

 Yes,  more information below.   My javascript call that relied on
 type=number worked using the model as described but once I included the
 formfield_overrides it stopped because the inputs had become type=text.

 {{{#!python
 #Invoice Item Class
 class MainInvoiceItem(models.Model):
 id = models.AutoField(primary_key=True) # AutoField?
 invoice = models.ForeignKey(MainInvoice, on_delete=models.CASCADE)
 order = models.IntegerField('Order')
 description = models.TextField('Description', max_length=1000)
 qty = models.IntegerField('Qty')
 price = models.DecimalField('Price', max_digits=7, decimal_places=2)
 discount = models.DecimalField('Discount/Mark Up', max_digits=5,
 decimal_places=2,default=0, )
 vat = models.DecimalField('VAT', max_digits=4,
 decimal_places=2,default=0, )
 total = models.DecimalField('Total', max_digits=7, decimal_places=2)
 created = models.DateTimeField('Created Date',auto_now_add=True)
 modified = models.DateTimeField('Modified Date',auto_now=True)

 class Meta:
 db_table = 'main_invoice_items'
 verbose_name = 'Item'
 verbose_name_plural = 'Items'
 ordering = ['order']
 }}}

 Presented as inline items in the MainInvoice admin view

 {{{#!python
 # Invoice Admin #
 class InlineInvoiceItems(admin.TabularInline):
 #form = IndicatorInlineForm
 model = MainInvoiceItem
 extra = 1
 formfield_overrides = {
 models.DecimalField: {'widget':
 TextInput(attrs={'size':'7'})},
 models.IntegerField: {'widget':
 TextInput(attrs={'size':'3'})},
 models.TextField: {'widget': Textarea(attrs={'rows':2,
 'cols':90})},
 }
 }}}

 This works - but you will note that the html now shows decimal or integer
 fields created as type=number become type=text.  This doesn't cause a
 major problem unless you are trying to grab type=number with javascript
 and want to avoid grabbing 'text' fields at the same time.

 {{{
 
   
 
 }}}

 Hope this explains it better.

 Chris

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

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


Re: [Django] #28879: Widget NumberInput becomes text if you change size

2017-12-04 Thread Django
#28879: Widget NumberInput becomes text if you change size
-+-
 Reporter:  Chris Davies-|Owner:  nobody
  Barnard|
 Type:  Uncategorized|   Status:  closed
Component:  Uncategorized|  Version:  1.11
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


Old description:

> I'm adjusting the width of some form fields because small integers such
> as qty and price don't need to be 20 long and the following code results
> in them becoming type = 'text' regardless.
>
> models.DecimalField: {'widget': TextInput(attrs={'size':'7'})},
> models.IntegerField: {'widget': NumberInput(attrs={'size':'3'})},
>
> breaking other aspects.  Sorry don't know if I need to add more detail
> etc...

New description:

 I'm adjusting the width of some form fields because small integers such as
 qty and price don't need to be 20 long and the following code results in
 them becoming type = 'text' regardless.
 {{{
 models.DecimalField: {'widget': TextInput(attrs={'size':'7'})},
 models.IntegerField: {'widget': NumberInput(attrs={'size':'3'})},
 }}
 breaking other aspects.  Sorry don't know if I need to add more detail
 etc...

--

Comment:

 I guess you're putting those lines in a `ModelAdmin.formfield_overrides`?
 I tried this and couldn't reproduce the problem. Please reopen if you can
 provide a sample project or a test case that demonstrates the problem.

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

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