Django

Code

Ticket #4061 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Document how to limit access to contrib.databrowse

Reported by: bin Assigned to: nobody
Milestone: Component: django.contrib.databrowse
Version: SVN Keywords: databrowse
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

databrowse.diff (1.3 kB) - added by nick@efford.org on 08/21/07 12:12:52.
patch to Databrowse docs describing how to restrict access to logged-in users

Change History

04/17/07 02:30:16 changed by adrian

  • needs_better_patch changed.
  • component changed from Documentation to django.contrib.databrowse.
  • needs_tests changed.
  • owner changed from jacob to adrian.
  • needs_docs changed.
  • 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.

08/21/07 12:12:52 changed by nick@efford.org

  • attachment databrowse.diff added.

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

08/21/07 17:36:02 changed by Simon G. <dev@simon.net.nz>

  • has_patch set to 1.
  • summary changed from Limiting access to databrowse contrib to Document how to limit access to contrib.databrowse.
  • stage changed from Accepted to Ready for checkin.

09/14/07 13:59:20 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4061 (Document how to limit access to contrib.databrowse)




Change Properties
Action