django-dirbrowser

Software Screenshot:
django-dirbrowser
Software Details:
Version: 0.0.3
Upload Date: 11 May 15
Distribution Type: Freeware
Downloads: 15

Rating: nan/5 (Total Votes: 0)

django-dirbrowser is a Django app that allows users to give access to a local directory and still using Django auth, Django templates and Django middleware.

Installation

 Install or add django-dirbrowser to your Python path.

 pip install django-dirbrowser

or with wasy_intall

 easy_install django-dirbrowser

Usage

1. Add dirbrowser to your INSTALLED_APPS setting.

2. Add dirbrowse serve to your project's urls.py file:

 from dirbrowser.views import serve

 (r'^browse/(?P< path >.*)$', serve, {'document_root': CURRENT_DIR}),


3. Or personalize it on your own views:

 from dirbrowser.views import serve

 def mybrowser(reques, path):
 extra_context = {.. some extra vars ..}

 return serve(request, document_root='path_to_my_root_dir',
 template="custom_template.html",
 extra_context=extra_context)


The serve view accepts the parameters:

- document_root : Path to the root directory to serve
- template : Template used to show index page (if show_indexes is True)
- extra_context : Extra context to the template
- show_indexes : if True show the directory index page. Default is False

Requirements:

  • Python
  • Django

Other Software of Developer Ferran Pegueroles Forcadell

mysql-autodoc
mysql-autodoc

6 Jun 15

mysql-autodoc
mysql-autodoc

12 May 15

ffmigration
ffmigration

11 May 15

Comments to django-dirbrowser

Comments not found
Add Comment
Turn on images!