diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-04-16 21:56:10 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-04-16 21:56:10 +0000 |
| commit | 30fb62d71af0186c98c7d5208a72609f74943092 (patch) | |
| tree | d197a631d386e01bc3b20dab7dd4a78f4ed9a258 /docs/databrowse.txt | |
| parent | 83c4c531205ba0b38e4e4fce4274168302c6d0aa (diff) | |
Added django.contrib.databrowse
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/databrowse.txt')
| -rw-r--r-- | docs/databrowse.txt | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/docs/databrowse.txt b/docs/databrowse.txt new file mode 100644 index 0000000000..81fd2e8cb8 --- /dev/null +++ b/docs/databrowse.txt @@ -0,0 +1,54 @@ +========== +Databrowse +========== + +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. + +.. admonition:: Note + + Databrowse is **very** new and is currently under active development. It + may change substantially before the next Django release. + + With that said, it's easy to use, and it doesn't require writing any + code. So you can play around with it today, with very little investment in + time or coding. + +How to use Databrowse +===================== + + 1. Point Django at the default Databrowse templates. There are two ways to + do this: + + * Add ``'django.contrib.databrowse'`` to your ``INSTALLED_APPS`` + setting. This will work if your ``TEMPLATE_LOADERS`` setting includes + the ``app_directories`` template loader (which is the case by + default). See the `template loader docs`_ for more. + + * Otherwise, determine the full filesystem path to the + ``django/contrib/databrowse/templates`` directory, and add that + directory to your ``TEMPLATE_DIRS`` setting. + + 2. Register a number of models with the Databrowse site:: + + from django.contrib import databrowse + + databrowse.site.register(SomeModel) + databrowse.site.register(SomeOtherModel) + + Note that you should register the model *classes*, not instances. + + It doesn't matter where you put this, as long as it gets executed at + some point. A good place for it is in your URLconf file (``urls.py``). + + 3. Add the following line to your URLconf:: + + (r'^databrowse/(.*)', databrowse.site.root), + + The prefix doesn't matter -- you can use ``databrowse/`` or ``db/`` or + whatever you'd like. + + 4. Run the Django server and visit ``/databrowse/`` in your browser. |
