Package: django-databrowse
Table of contentsInstallationHow to use DatabrowseRequiring user loginTestsTranslationsNoteExtracted fromDjango 1.4 since databrowse deprecationDatabrowse is a Django application that lets you browse your data.As the Django admin dynamically creates an admin interface by introspecting
your models, Databrowse dynamically creates a rich, browsable Web site by
introspecting your models.Installationdjango-databrowseis available on pypihttp://pypi.python.org/pypi/django-databrowseSo easily install it bypip$ pip install django-databrowseOr byeasy_install$ easy_install django-databrowseAnother way is by cloningdjango-databrowse’sgit repo$ git clone git://github.com/Alir3z4/django-databrowse.gitThen install it by running:$ python setup.py installHow to use DatabrowsePoint Django at the default Databrowse templates. There are two ways to
do this:Add'django_databrowse'to yourINSTALLED_APPSsetting. This will work if yourTEMPLATE_LOADERSsetting
includes theapp_directoriestemplate loader (which is the case by
default). See thetemplate loader docsfor more.Otherwise, determine the full filesystem path to thedjango_databrowse/templatesdirectory, and add that
directory to yourTEMPLATE_DIRSsetting.Register a number of models with the Databrowse site:import django_databrowse
from myapp.models import SomeModel, SomeOtherModel, YetAnotherModel

django_databrowse.site.register(SomeModel)
django_databrowse.site.register(SomeOtherModel, YetAnotherModel)Note that you should register the modelclasses, not instances.it is possible to register several models in the same
call todjango_databrowse.site.register.It doesn’t matter where you put this, as long as it gets executed at some
point. A good place for it is in yourURLconf file(urls.py).Change your URLconf to import the~django_databrowsemodule:from django_databrowse…and add the following line to your URLconf:(r'^django_databrowse/(.*)', django_databrowse.site.root),The prefix doesn’t matter – you can usedatabrowse/ordb/or
whatever you’d like.Run the Django server and visit/databrowse/in your browser.Requiring user loginYou can restrict access to logged-in users with only a few extra lines of
code. Simply add the following import to your URLconf:from django.contrib.auth.decorators import login_requiredThen modify theURLconfso that thedjango_databrowse.site.rootview is decorated withdjango.contrib.auth.decorators.login_required:(r'^databrowse/(.*)', login_required(django_databrowse.site.root)),If you haven’t already added support for user logins to yourURLconf, as described in theuser authentication docs, then you will need to do so now with the following
mapping:(r'^accounts/login/$', 'django.contrib.auth.views.login'),The final step is to create the login form required bydjango.contrib.auth.views.login. Theuser authentication docsprovide full details and a
sample template that can be used for this purpose.Testsdjango-databrowsehas been tested Django 1.6 and later. To run the the tests:$ python run_tests.pyIt’s also available on travis-ci:https://travis-ci.org/Alir3z4/django-databrowse/TranslationsCurrentlyEnglishis only available language that is being packaged. If you would like to contribute
in localization you can finddjango-databrowseproject on Transifex as well:https://www.transifex.com/projects/p/django-databrowse/Translation Status on Transifex