Skip to content

Commit 581281e

Browse files
committed
More documentation.
1 parent 39b5ba6 commit 581281e

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

doc/views.rst

+14-3
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,21 @@ Or add an ``id`` column to your view's SQL query (this example uses
9696
Creating the Views
9797
==================
9898

99-
Creating the views is simple. Just run the ``sync_pgviews`` command.
99+
Creating the views is simple. Just run the ``sync_pgviews`` command::
100+
101+
$ ./manage.py sync_pgviews
102+
Creating views for django.contrib.auth.models
103+
Creating views for django.contrib.contenttypes.models
104+
Creating views for myapp.models
105+
myapp.models.Superusers (myapp_superusers): created
106+
myapp.models.SimpleUser (myapp_simpleuser): created
107+
myapp.models.Staffness (myapp_staffness): created
100108

101109
Migrations
102110
==========
103111

104-
Views play well with South migrations; just run ``sync_pgviews`` after
105-
``migrate`` to ensure any required tables have been created/updated.
112+
Views play well with South migrations. If a migration modifies the underlying
113+
table(s) that a view depends on so as to break the view, that view will be
114+
silently deleted by Postgres. For this reason, it's important to run
115+
``sync_pgviews`` after ``migrate`` to ensure any required tables have been
116+
created/updated.

test_project/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# django-postgres Test Project
22

3+
This test project contains Python tests of the various pieces of API
4+
functionality implemented by django-postgres. More tests exist in `../tests/`.
5+
36
To run the tests:
47

58
1. Install Postgres. I use [Postgres.app](http://postgresapp.com/).

0 commit comments

Comments
 (0)