Opened 9 years ago

Closed 9 years ago

#4061 closed (fixed)

Document how to limit access to contrib.databrowse

Reported by: bin Owned by: nobody
Component: contrib.databrowse Version: master
Severity: Keywords: databrowse
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

For people that want to limit access to the databrowse contrib, it might make sense to point to the wrapper function at:

Limiting access to generic views

The wrapper could as well contain the register functions.

For example:

# Databrowse wrapper
from django.contrib import databrowse
from django.contrib.auth.decorators import login_required

databrowse.site.register(SomeModel)
databrowse.site.register(SomeOtherModel)

@login_required
def root(*args, **kwargs):
    return databrowse.site.root(*args, **kwargs)

Regards,
bin

Attachments (1)

databrowse.diff (1.3 KB) - added by nick@… 9 years ago.
patch to Databrowse docs describing how to restrict access to logged-in users

Download all attachments as: .zip

Change History (4)

comment:1 Changed 9 years ago by Adrian Holovaty

Component: Documentationdjango.contrib.databrowse
Needs documentation: unset
Needs tests: unset
Owner: changed from Jacob to Adrian Holovaty
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

This is a bit specific for the docs, considering the docs don't really exist yet, but I guess it'd be helpful to include this.

Changed 9 years ago by nick@…

Attachment: databrowse.diff added

patch to Databrowse docs describing how to restrict access to logged-in users

comment:2 Changed 9 years ago by Simon G. <dev@…>

Has patch: set
Summary: Limiting access to databrowse contribDocument how to limit access to contrib.databrowse
Triage Stage: AcceptedReady for checkin

comment:3 Changed 9 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [6201]) Fixed #4061: added docs on how to limit access to databrowse. Thanks, Nick Efford

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