Code

Opened 2 years ago

Last modified 4 weeks ago

#17890 new Bug

django.contrib.admin.site extra_context

Reported by: riccardodivirgilio Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords: extra_context
Cc: stephenmuss@…, timmartin Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

hi, in django.contrib.admin.site the method password_change do not support extra_context, i think it's a minor bug to be fixed.

Attachments (0)

Change History (8)

comment:1 Changed 2 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 2 years ago by smuss

  • Cc stephenmuss@… added
  • Has patch set

Have created a patch and submitted a pull request at https://github.com/django/django/pull/64

This is no longer current. A new pull request has been opened at https://github.com/django/django/pull/499.

Last edited 18 months ago by smuss (previous) (diff)

comment:3 Changed 2 years ago by claudep

  • Needs tests set

comment:4 Changed 2 years ago by smuss

  • Needs tests unset

Tests added to pull request.

comment:5 Changed 23 months ago by anonymous

  • Keywords extra_context added

comment:6 Changed 18 months ago by smuss

I closed the previous pull request and opened a new one at https://github.com/django/django/pull/499.

comment:7 Changed 13 months ago by lucmult

  • Needs documentation set
  • Patch needs improvement set

Hi,

I didn't understand the use case of this extra_context.

I think the same result it's possible to achieve overwriting the template.

Can you explain better the use case of this new extra_context?

For the patch/pull request:

1 - It'd need to update docs:
https://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.views.password_change

2 - It'd need to update the provided template, currently it's ignoring extra_context

Thanks.

comment:8 Changed 4 weeks ago by timmartin

  • Cc timmartin added

Since the ticket was opened, each_context() has been added to the AdminSite class, so it's possible to provide additional context fields by subclassing AdminSite and overriding each_context(). Does this make this ticket unnecessary? I'll happily fix up the patch if it's useful, but I don't want to do that if the feature is no longer needed.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.