Opened 7 years ago

Closed 4 years ago

#7955 closed Cleanup/optimization (wontfix)

Change popup variable name in django.contrib.admin

Reported by: dcramer Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

[25/Jul/2008 02:48:19] "GET /admin/businesses/category/?pop=1 HTTP/1.1" 200 2091
[25/Jul/2008 02:48:22] "GET /admin/businesses/category/add/?_popup=1 HTTP/1.1" 200 2913

It'd make sense to have keep them consistent, and use _popup.

Attachments (1)

7955.patch (2.5 KB) - added by mk 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by mk

comment:1 Changed 7 years ago by mk

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

comment:2 Changed 7 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:3 Changed 6 years ago by mrts

  • Triage Stage changed from Accepted to Design decision needed

_pop is used for changelist popups whereas _popup is used for object popups.

Having this distinction is actually useful, for instance I have a fairly complex use-case where the changelist shows only a subset of objects, but access to single objects is still needed via raw_id_fields popups. Let me exemplify:

class ExposeObject(admin.ModelAdmin):
    def queryset(self, request):
        """Show objects in pop-ups that are not visible via default manager."""
        if request.REQUEST.has_key('_popup'):
            return self.model.all_objects.get_query_set()
        else:
            return super(ShowInListAdmin, self).queryset(request)

Changing state to DDN, but I'm personally -0.

comment:4 Changed 4 years ago by lukeplant

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:5 Changed 4 years ago by jacob

  • Easy pickings unset
  • Resolution set to wontfix
  • Status changed from new to closed
  • UI/UX unset

Yeah, this is a bit inconsistant but it doesn't have any actual ramifications so we'll leave it the way it is. If there's an actual bug here this inconstancy causes please feel free to reopen.

Thanks!

Note: See TracTickets for help on using tickets.
Back to Top