Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
f32ecf0e
Commit
f32ecf0e
authored
Jul 26, 2021
by
Matheus Miranda
Browse files
Create class VideoFile
parent
a6934054
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
courses/migrations/0030_videofile.py
courses/migrations/0030_videofile.py
+24
-0
No files found.
courses/migrations/0030_videofile.py
0 → 100644
View file @
f32ecf0e
# Generated by Django 2.2.24 on 2021-07-26 17:27
import
courses.videos.models
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'courses'
,
'0029_auto_20210719_2107'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'VideoFile'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
max_length
=
255
)),
(
'file'
,
models
.
FileField
(
default
=
None
,
null
=
True
,
upload_to
=
courses
.
videos
.
models
.
get_upload_path
)),
(
'video'
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'file'
,
to
=
'courses.Video'
,
verbose_name
=
'file'
)),
],
),
]
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