1
- Django Postgres composite types
2
- ===============================
1
+ # Django Postgres composite types
3
2
4
3
An implementation of Postgres' [ composite types] ( http://www.postgresql.org/docs/current/static/rowtypes.html )
5
4
for [ Django] ( https://docs.djangoproject.com/en/1.9/ ) .
6
5
7
- Usage
8
- -----
6
+ ## Usage
9
7
10
8
Install with:
11
9
@@ -66,8 +64,7 @@ class Migration(migrations.Migration):
66
64
]
67
65
```
68
66
69
- Examples
70
- --------
67
+ ## Examples
71
68
72
69
Array fields:
73
70
@@ -93,7 +90,6 @@ Nested types:
93
90
class Point (CompositeType ):
94
91
""" A point on the cartesian plane."""
95
92
96
- # pylint:disable=invalid-name
97
93
x = models.IntegerField()
98
94
y = models.IntegerField()
99
95
@@ -110,10 +106,9 @@ class Box(CompositeType):
110
106
bottom_right = Point.Field()
111
107
```
112
108
113
- Gotchas and Caveats
114
- -------------------
109
+ ## Gotchas and Caveats
115
110
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
117
112
the state when the migration was written. A generic ` CreateType ` operation
118
113
which takes the fields of the type would be possible, but it would still
119
114
require manual handling still as Django's ` makemigrations ` is not currently
@@ -144,8 +139,8 @@ Lookups and indexes are not implemented yet
144
139
([ bug #9 ] ( https://github.com/danni/django-postgres-composite-types/issues/9 ) ,
145
140
[ bug #10 ] ( https://github.com/danni/django-postgres-composite-types/issues/10 ) ).
146
141
147
- Running Tests
148
- -------------------
142
+ ## Running Tests
143
+
149
144
Clone the repository, go to it's base directory and run the following commands.
150
145
151
146
pip install tox
@@ -155,16 +150,14 @@ Or if you want a specific environment
155
150
156
151
tox -e py35-dj2.0
157
152
158
- Authors
159
- -------
153
+ ## Authors
160
154
161
- * Danielle Madeley < danielle@madeley.id.au >
162
- * Tim Heap < hello@timheap.me >
155
+ - Danielle Madeley < danielle@madeley.id.au >
156
+ - Tim Heap < hello@timheap.me >
163
157
164
- License
165
- -------
158
+ ## License
166
159
167
- (c) 2016, Danielle Madeley < danielle@madeley.id.au >
160
+ (c) 2016, Danielle Madeley < danielle@madeley.id.au >
168
161
169
162
All rights reserved.
170
163
0 commit comments