Opened 18 years ago

Closed 17 years ago

#4061 closed (fixed)

Document how to limit access to contrib.databrowse

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

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@… 17 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 by Adrian Holovaty, 18 years ago

Component: Documentationdjango.contrib.databrowse
Owner: changed from Jacob to Adrian Holovaty
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.

by nick@…, 17 years ago

Attachment: databrowse.diff added

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

comment:2 by Simon G. <dev@…>, 17 years ago

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

comment:3 by Jacob, 17 years ago

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