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
SRCT
bookshare
Commits
f782aa56
Commit
f782aa56
authored
Feb 25, 2020
by
Daniel W Bond
Browse files
OneToOne also require on_delete's
parent
5abf58ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
bookshare/core/models.py
View file @
f782aa56
...
...
@@ -10,7 +10,8 @@ from model_utils.models import TimeStampedModel
class
Student
(
TimeStampedModel
):
# django user includes username, password, first name, and last name
user
=
models
.
OneToOneField
(
User
)
user
=
models
.
OneToOneField
(
User
,
on_delete
=
models
.
CASCADE
)
pf_first_name
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
)
pf_last_name
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
)
...
...
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