File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,21 @@ Or add an ``id`` column to your view's SQL query (this example uses
96
96
Creating the Views
97
97
==================
98
98
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
100
108
101
109
Migrations
102
110
==========
103
111
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.
Original file line number Diff line number Diff line change 1
1
# django-postgres Test Project
2
2
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
+
3
6
To run the tests:
4
7
5
8
1 . Install Postgres. I use [ Postgres.app] ( http://postgresapp.com/ ) .
You can’t perform that action at this time.
0 commit comments