Re: [Django] #34241: Django admin not showing seconds for list_display nor readonly DateTimeField

2023-01-06 Thread Django
#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
---+--
 Reporter:  Petr Dlouhý|Owner:  nobody
 Type:  New feature|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 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:  1
---+--

Comment (by Petr Dlouhý):

 @Claude Paroz That would be very nice. It might even be sufficient for the
 debuging purposes, because using developer tools is much more easier than
 going into shell/dbshell.
 Also custom JS would be very easy option in such case (although I would
 probably stick with the solution described further up).

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018588d419ed-01f96516-5f74-4bd6-884b-240b48ce7bba-00%40eu-central-1.amazonses.com.


Re: [Django] #34241: Django admin not showing seconds for list_display nor readonly DateTimeField

2023-01-06 Thread Django
#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
---+--
 Reporter:  Petr Dlouhý|Owner:  nobody
 Type:  New feature|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 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:  1
---+--

Comment (by Claude Paroz):

 I *may* see some value in adding the full iso representation of the
 datetime as a data attribute of the div. It's probably still not directly
 addressing the use case of this ticket, but at least would provide a way
 for some clever tools to extend the UI if needed (e.g. some custom 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018588ba13ba-fd405175-1422-48f8-b239-4bc0c849b99c-00%40eu-central-1.amazonses.com.


Re: [Django] #34241: Django admin not showing seconds for list_display nor readonly DateTimeField

2023-01-06 Thread Django
#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
---+--
 Reporter:  Petr Dlouhý|Owner:  nobody
 Type:  New feature|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 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:  1
---+--

Comment (by Petr Dlouhý):

 OK. For anyone concerned I have find solution that is a bit hacky, but is
 best of what I can think is possible right now:

 In some `__init__.py` file:
 {{{
 from django.contrib.admin import utils
 from django.db.models import DateTimeField
 from django.utils.html import format_html


 _display_for_field = utils.display_for_field


 # Modify DateTime field format and display tooltip with full date and time
 def display_for_field(value, field, empty_value_display):
 if value and isinstance(field, DateTimeField):
 return format_html(
 '{}', value, value.strftime("%Y-%m-%d
 %H:%M:%S %Z")
 )
 return _display_for_field(value, field, empty_value_display)


 utils.display_for_field = display_for_field
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185875800ce-19a5320b-33b3-4463-960a-4bf01563bf21-00%40eu-central-1.amazonses.com.


Re: [Django] #34241: Django admin not showing seconds for list_display nor readonly DateTimeField

2023-01-06 Thread Django
#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
---+--
 Reporter:  Petr Dlouhý|Owner:  nobody
 Type:  New feature|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 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:  1
---+--

Comment (by Carlton Gibson):

 I'd imagine `ModelAdmin.formfield_overrides` would serve for editable
 fields, with a project level base class if wanted throughout.

 I don't think it's feasible for read-only fields without progress on
 #30577 (which lacks even a proof-of-concept).

 I agree that second and sub-second precision is not required (or desired)
 in the vast majority of cases.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018587523eca-2b25fce5-2947-49d3-b210-0ccb1eeab785-00%40eu-central-1.amazonses.com.


Re: [Django] #34241: Django admin not showing seconds for list_display nor readonly DateTimeField

2023-01-06 Thread Django
#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
---+--
 Reporter:  Petr Dlouhý|Owner:  nobody
 Type:  New feature|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 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:  1
---+--

Comment (by Mariusz Felisiak):

 > Most of Django features are not NEEDED for ALL users.

 But we don't force users to use them. Your proposition with `title` would
 appear for all admin users.

 > When I am digging deeper I see big inconsistency in the fact, that when
 I am editing the field I must enter the date including seconds but then
 the time is otupted in changelist_table or as readonly field without them.

 I understand that you don't agree with my opinion :), so please feel-free
 to start a discussion on the DevelopersMailingList, where you'll reach a
 wider audience and see what other think, and
 [https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
 features/#requesting-features follow the guidelines with regards to
 requesting features].

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018587437235-b9167efa-6991-4fbf-9ac0-9641233f94c8-00%40eu-central-1.amazonses.com.


Re: [Django] #34220: Cannot import csrf_input_lazy from partially initialized module.

2023-01-06 Thread Django
#34220: Cannot import csrf_input_lazy from partially initialized module.
-+-
 Reporter:  thommy   |Owner:
 |  rajdesai24
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  4.1
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Jinja2 TemplateView  | Triage Stage:  Ready for
  ImportError csrf_input_lazy|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"d5f892d873c6f98178121214f3c00d284ae1296d" d5f892d8]:
 {{{
 #!CommitTicketReference repository=""
 revision="d5f892d873c6f98178121214f3c00d284ae1296d"
 Fixed #34220 -- Moved csrf_input_lazy, csrf_token_lazy imports to the
 toplevel.

 This prevents random errors with partially initialized modules.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185873bf607-ec77b071-4c36-4f21-a3a3-0737571a11e4-00%40eu-central-1.amazonses.com.


Re: [Django] #34241: Django admin not showing seconds for list_display nor readonly DateTimeField

2023-01-06 Thread Django
#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
---+--
 Reporter:  Petr Dlouhý|Owner:  nobody
 Type:  New feature|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 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:  1
---+--

Comment (by Petr Dlouhý):

 {{{
 Agreed, but it's not something all users need for all dates.
 }}}

 Most of Django features are not NEEDED for ALL users.
 When I am digging deeper I see big inconsistency in the fact, that when I
 am editing the field I must enter the date including seconds but then the
 time is otupted in changelist_table or as readonly field without them.

 {{{
 You can always change format for a single field, e.g
 }}}
 That is not very practical nor DRY if I want to make it for every DateTime
 field in admin including external applications.

 Maybe there is some way to override readonly field outputs in Django admin
 I am not aware of or maybe there isn't and creating something like that
 would help to solve other tickets like:
 https://code.djangoproject.com/ticket/30577

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701858737a677-d3b3d572-3812-4648-b4b3-6ea3e215d789-00%40eu-central-1.amazonses.com.


Re: [Django] #34220: Cannot import csrf_input_lazy from partially initialized module.

2023-01-06 Thread Django
#34220: Cannot import csrf_input_lazy from partially initialized module.
-+-
 Reporter:  thommy   |Owner:
 |  rajdesai24
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:  Jinja2 TemplateView  | Triage Stage:  Ready for
  ImportError csrf_input_lazy|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by thommy):

 Thank you :-)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185873208b5-373a1131-5166-4329-8f19-1285bc11ba7f-00%40eu-central-1.amazonses.com.


Re: [Django] #34220: Cannot import csrf_input_lazy from partially initialized module.

2023-01-06 Thread Django
#34220: Cannot import csrf_input_lazy from partially initialized module.
-+-
 Reporter:  thommy   |Owner:
 |  rajdesai24
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:  Jinja2 TemplateView  | Triage Stage:  Ready for
  ImportError csrf_input_lazy|  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701858729fd0d-68bd1f91-8658-410d-aff5-8660505d1e2c-00%40eu-central-1.amazonses.com.


Re: [Django] #34220: Cannot import csrf_input_lazy from partially initialized module.

2023-01-06 Thread Django
#34220: Cannot import csrf_input_lazy from partially initialized module.
-+-
 Reporter:  thommy   |Owner:
 |  rajdesai24
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:  Jinja2 TemplateView  | Triage Stage:  Accepted
  ImportError csrf_input_lazy|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by rajdesai24):

 Please find the [https://github.com/django/django/pull/16433 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185871c08e3-3da31b3d-9f0a-4733-80b7-7a8c124448f2-00%40eu-central-1.amazonses.com.


Re: [Django] #34220: Cannot import csrf_input_lazy from partially initialized module.

2023-01-06 Thread Django
#34220: Cannot import csrf_input_lazy from partially initialized module.
-+-
 Reporter:  thommy   |Owner:
 |  rajdesai24
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:  Jinja2 TemplateView  | Triage Stage:  Accepted
  ImportError csrf_input_lazy|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by rajdesai24):

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


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018586aff02c-49716d29-aed5-4664-a3e7-93df94f7f922-00%40eu-central-1.amazonses.com.


Re: [Django] #34241: Django admin not showing seconds for list_display nor readonly DateTimeField

2023-01-06 Thread Django
#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
---+--
 Reporter:  Petr Dlouhý|Owner:  nobody
 Type:  New feature|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 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:  1
---+--
Changes (by Mariusz Felisiak):

 * cc: Carlton Gibson (added)


Comment:

 > More importantly the seconds might be very important even for many
 ordinary admin users. There might be several use-cases.

 Agreed, but it's not something all users need for all dates.

 > ... or at least make it possible to easily configure the output data
 format in admin interface without need to change it systemwide.

 You can always change format for a single field, e.g
 {{{#!python
 class MyModelAdmin(admin.ModelAdmin):

 @admin.display(description="Created with seconds")
 def custom_created(self, obj):
 return obj.created.strftime("d M. Y H:i:s")

 list_display = (..., "custom_created")
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018586aae0d2-be06bb62-e2f8-4702-9f22-5ba1e6fd297a-00%40eu-central-1.amazonses.com.


Re: [Django] #34110: Add InMemoryStorage

2023-01-06 Thread Django
#34110: Add InMemoryStorage
-+-
 Reporter:  Josh |Owner:  Francesco
 |  Panico
 Type:  New feature  |   Status:  assigned
Component:  File |  Version:  dev
  uploads/storage|
 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 Francesco Panico):

 * needs_better_patch:  1 => 0


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701858660b554-8c542c58-8aa6-4801-a5bf-e99e3dccf056-00%40eu-central-1.amazonses.com.


Re: [Django] #34176: Annotation's original field-name can clash with result field name over aggregation

2023-01-06 Thread Django
#34176: Annotation's original field-name can clash with result field name over
aggregation
-+-
 Reporter:  Shai Berger  |Owner:  Simon
 |  Charette
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018586252898-160a6e6d-9eef-44f8-b9b3-a5e2d687402e-00%40eu-central-1.amazonses.com.