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
fb402a1a
Commit
fb402a1a
authored
Jul 28, 2021
by
Matheus Miranda
Browse files
Remove VideoFile translation migration
parent
f178c59f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
64 deletions
+4
-64
courses/migrations/0031_auto_20210727_1145.py
courses/migrations/0031_auto_20210727_1145.py
+0
-60
courses/translation.py
courses/translation.py
+4
-4
No files found.
courses/migrations/0031_auto_20210727_1145.py
deleted
100644 → 0
View file @
f178c59f
# Generated by Django 2.2.24 on 2021-07-27 14:45
import
courses.videos.models
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'courses'
,
'0030_videofile'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'file_en'
,
field
=
models
.
FileField
(
default
=
None
,
null
=
True
,
upload_to
=
courses
.
videos
.
models
.
get_upload_path
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'file_es'
,
field
=
models
.
FileField
(
default
=
None
,
null
=
True
,
upload_to
=
courses
.
videos
.
models
.
get_upload_path
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'file_pt_br'
,
field
=
models
.
FileField
(
default
=
None
,
null
=
True
,
upload_to
=
courses
.
videos
.
models
.
get_upload_path
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'name_en'
,
field
=
models
.
CharField
(
max_length
=
255
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'name_es'
,
field
=
models
.
CharField
(
max_length
=
255
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'name_pt_br'
,
field
=
models
.
CharField
(
max_length
=
255
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'video_en'
,
field
=
models
.
OneToOneField
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'file'
,
to
=
'courses.Video'
,
verbose_name
=
'file'
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'video_es'
,
field
=
models
.
OneToOneField
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'file'
,
to
=
'courses.Video'
,
verbose_name
=
'file'
),
),
migrations
.
AddField
(
model_name
=
'videofile'
,
name
=
'video_pt_br'
,
field
=
models
.
OneToOneField
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'file'
,
to
=
'courses.Video'
,
verbose_name
=
'file'
),
),
]
courses/translation.py
View file @
fb402a1a
...
...
@@ -2,7 +2,7 @@ from modeltranslation.translator import register, TranslationOptions
from
.models
import
Course
,
Lesson
,
Unit
,
ProfessorMessage
from
.course_material.models
import
CourseMaterial
,
File
from
.stats.models
import
AccessibleArea
from
.videos.models
import
VideoFile
#
from .videos.models import VideoFile
from
.certification.models
import
CertificateTemplate
...
...
@@ -51,6 +51,6 @@ class CertificateTemplateTranslationOptions(TranslationOptions):
'organization_name'
,
'text'
)
@
register
(
VideoFile
)
class
VideoFileTranslationOptions
(
TranslationOptions
):
fields
=
(
'name'
,
'file'
,
'video'
)
#
@register(VideoFile)
#
class VideoFileTranslationOptions(TranslationOptions):
#
fields = ('name', 'file', 'video')
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