django.contrib.databrowse

Posted by topher
on Saturday, May 12

There’s a new django.contrib add-on called databrowse. From the documentaion,

Databrowse 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.

You need to:

1. Add ‘django.contrib.databrowse’ to your INSTALLED_APPS setting.

You don’t need to run syncdb.

2. Register models on the Databrowse site.

1
2
3
4
from django.contrib import databrowse

databrowse.site.register(SomeModel)
databrowse.site.register(SomeOtherModel)

You can put this on urls.py.

3. Add to your URLConf


(r'^databrowse/(.*)', databrowse.site.root),

Test databroswe by going to /databrowse.

Here’s a screenshot:

Full screen

Comments

Leave a response