This repository was archived by the owner on Jul 24, 2021. It is now read-only.
Commit 8c64de9
committed
Replace default User model PK
The default Django User model PK is an int() AutoField
and django-openstack-auth sets this to a hash string. Django
then breaks trying to coerce that string to an int().
This patch adds a new explicit PK to the d-o-a User
model. It also adds the standard Django "models.py" so
that the consumer application (Horizon) may use it.
The consumer application must set:
AUTH_USER_MODEL = 'openstack_auth.User'
to use the new model in place of the default 'auth.User'.
The approach in this patch was inspired by Lin Hua
Cheng <os.lcheng@gmail.com>.
Partial-Bug: 1491117
Change-Id: I549209eb0bb0ddf36d92ee9dc1a9bac799ce67e51 parent 87f2158 commit 8c64de9
2 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
| |||
199 | 204 | | |
200 | 205 | | |
201 | 206 | | |
| 207 | + | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| |||
0 commit comments