1- Django Postgres composite types
2- ===============================
1+ # Django Postgres composite types
32
43An implementation of Postgres' [ composite types] ( http://www.postgresql.org/docs/current/static/rowtypes.html )
54for [ Django] ( https://docs.djangoproject.com/en/1.9/ ) .
65
7- Usage
8- -----
6+ ## Usage
97
108Install with:
119
@@ -66,8 +64,7 @@ class Migration(migrations.Migration):
6664 ]
6765```
6866
69- Examples
70- --------
67+ ## Examples
7168
7269Array fields:
7370
@@ -93,7 +90,6 @@ Nested types:
9390class Point (CompositeType ):
9491 """ A point on the cartesian plane."""
9592
96- # pylint:disable=invalid-name
9793 x = models.IntegerField()
9894 y = models.IntegerField()
9995
@@ -110,10 +106,9 @@ class Box(CompositeType):
110106 bottom_right = Point.Field()
111107```
112108
113- Gotchas and Caveats
114- -------------------
109+ ## Gotchas and Caveats
115110
116- The migration operation currently loads the * current * state of the type, not
111+ The migration operation currently loads the _ current _ state of the type, not
117112the state when the migration was written. A generic ` CreateType ` operation
118113which takes the fields of the type would be possible, but it would still
119114require manual handling still as Django's ` makemigrations ` is not currently
@@ -144,8 +139,8 @@ Lookups and indexes are not implemented yet
144139([ bug #9 ] ( https://github.com/danni/django-postgres-composite-types/issues/9 ) ,
145140[ bug #10 ] ( https://github.com/danni/django-postgres-composite-types/issues/10 ) ).
146141
147- Running Tests
148- -------------------
142+ ## Running Tests
143+
149144Clone the repository, go to it's base directory and run the following commands.
150145
151146 pip install tox
@@ -155,40 +150,12 @@ Or if you want a specific environment
155150
156151 tox -e py35-dj2.0
157152
158- Authors
159- -------
160-
161- * Danielle Madeley < danielle@madeley.id.au >
162- * Tim Heap < hello@timheap.me >
163-
164- License
165- -------
166-
167- (c) 2016, Danielle Madeley < danielle@madeley.id.au >
168-
169- All rights reserved.
170-
171- Redistribution and use in source and binary forms, with or without
172- modification, are permitted provided that the following conditions are met:
173-
174- 1 . Redistributions of source code must retain the above copyright notice, this
175- list of conditions and the following disclaimer.
153+ ## Authors
176154
177- 2 . Redistributions in binary form must reproduce the above copyright notice,
178- this list of conditions and the following disclaimer in the documentation
179- and/or other materials provided with the distribution.
155+ - Danielle Madeley < danielle@madeley.id.au >
156+ - Tim Heap < hello@timheap.me >
180157
181- 3 . Neither the name of the copyright holder nor the names of its contributors
182- may be used to endorse or promote products derived from this software
183- without specific prior written permission.
158+ ## License
184159
185- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
186- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
187- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
188- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
189- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
190- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
191- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
192- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
193- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
194- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
160+ This project is licensed under the BSD license.
161+ See the LICENSE file for the full text of the license.
0 commit comments