Opened 8 years ago

Closed 7 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@… 8 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 8 years ago by adrian

  • Component changed from Documentation to django.contrib.databrowse
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to adrian
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 8 years ago by nick@…

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

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

  • Has patch set
  • Summary changed from Limiting access to databrowse contrib to Document how to limit access to contrib.databrowse
  • Triage Stage changed from Accepted to Ready for checkin

comment:3 Changed 7 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(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