Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
test-it
test_oauth2_django
Commits
371525e8
Commit
371525e8
authored
Dec 13, 2017
by
Sharad Heft
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the reusable app for Django 2.0.
parent
815ee0e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
setup.py
setup.py
+1
-1
test_oauth/migrations/0002_django20.py
test_oauth/migrations/0002_django20.py
+21
-0
test_oauth/models.py
test_oauth/models.py
+7
-1
No files found.
setup.py
View file @
371525e8
...
...
@@ -2,7 +2,7 @@ from setuptools import setup
setup
(
name
=
'test_oauth2_django'
,
version
=
'0.
1
'
,
version
=
'0.
2
'
,
description
=
'A basic library for Django apps to use TEST Alliance OAuth2.'
,
url
=
'https://git.pleaseignore.com/sharad/test_oauth2_django'
,
author
=
'Sharad Heft'
,
...
...
test_oauth/migrations/0002_django20.py
0 → 100644
View file @
371525e8
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'test_oauth'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'testoauth2data'
,
name
=
'primary_character'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
default
=
None
,
to
=
'test_oauth.Character'
,
null
=
True
),
preserve_default
=
True
,
),
]
test_oauth/models.py
View file @
371525e8
...
...
@@ -26,6 +26,7 @@ class Character(models.Model):
class
TESTOAuth2Data
(
models
.
Model
):
user
=
models
.
OneToOneField
(
settings
.
AUTH_USER_MODEL
,
on_delete
=
models
.
CASCADE
,
primary_key
=
True
,
related_name
=
'auth'
)
...
...
@@ -33,7 +34,12 @@ class TESTOAuth2Data(models.Model):
access_token
=
models
.
CharField
(
max_length
=
128
)
refresh_token
=
models
.
CharField
(
max_length
=
128
)
primary_character
=
models
.
ForeignKey
(
Character
,
null
=
True
,
default
=
None
)
primary_character
=
models
.
ForeignKey
(
Character
,
on_delete
=
models
.
SET_NULL
,
null
=
True
,
default
=
None
)
class
Meta
:
verbose_name
=
'OAuth2 Token'
...
...
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