From db5d40737f2d638c633b610874174be3b3eb307d Mon Sep 17 00:00:00 2001 From: Manuel Francisco Naranjo Date: Mon, 27 Jul 2015 16:12:10 -0300 Subject: [PATCH] Updating docs --- README.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 73a2e68..08f58bd 100644 --- a/README.rst +++ b/README.rst @@ -4,6 +4,8 @@ django-database-view A simple pluggable application that allows to work with database views. +So far only MySQL is supported as backend, but more could be added if necessary. + Quick start ----------- @@ -14,17 +16,13 @@ Quick start 'dbview', ) + 2. In your models.py create classes which extend dbview.models.DbView like this:: .. code-block:: python - :caption: models.py - :name: models.py - - ... from dbview.models import DbView - ... class MyView(DbView): fieldA = models.OneToOneField(modelA, primary_key=True, db_column='fielda__id') fieldB = models.IntegerField(blank=True, null=True, db_column='fieldb') @@ -42,5 +40,10 @@ like this:: values('fielda__id', 'fieldb') return str(qs.query) + 3. Then create a migration point for your view generation, edit that migration -and modify it to match: +and modify it, add: `from dbview.helpers import CreateView` and replace the line +the call to migrations.CreateModel with CreateView. + + +4. Migrate your database and start using your database views.