Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
test-it
test_oauth2_django
Commits
630ea71b
Commit
630ea71b
authored
Nov 05, 2017
by
Sharad Heft
Browse files
Character-Auth is now correctly a M2M relationship.
parent
cb5de71b
Changes
2
Hide whitespace changes
Inline
Side-by-side
test_oauth/migrations/0001_initial.py
View file @
630ea71b
...
...
@@ -40,7 +40,7 @@ class Migration(migrations.Migration):
migrations
.
AddField
(
model_name
=
'character'
,
name
=
'auth'
,
field
=
models
.
ForeignKey
(
related_name
=
'characters'
,
to
=
settings
.
AUTH_USER_MODEL
),
field
=
models
.
ManyToManyField
(
related_name
=
'characters'
,
to
=
settings
.
AUTH_USER_MODEL
,
db_index
=
True
),
preserve_default
=
True
,
),
]
test_oauth/models.py
View file @
630ea71b
...
...
@@ -6,7 +6,7 @@ class Character(models.Model):
id
=
models
.
BigIntegerField
(
primary_key
=
True
)
name
=
models
.
CharField
(
max_length
=
128
)
auth
=
models
.
ForeignKey
(
auth
=
models
.
ManyToManyField
(
settings
.
AUTH_USER_MODEL
,
db_index
=
True
,
related_name
=
'characters'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment