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
5e9c7e85
Commit
5e9c7e85
authored
Nov 26, 2021
by
Matheus Miranda
Browse files
Remove slug from django models translation
parent
aaa620fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
courses/migrations/0036_auto_20211126_1729.py
courses/migrations/0036_auto_20211126_1729.py
+25
-0
courses/translation.py
courses/translation.py
+2
-3
No files found.
courses/migrations/0036_auto_20211126_1729.py
0 → 100644
View file @
5e9c7e85
# Generated by Django 2.2.24 on 2021-11-26 20:29
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'courses'
,
'0035_auto_20211119_1729'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'course'
,
name
=
'slug_en'
,
),
migrations
.
RemoveField
(
model_name
=
'course'
,
name
=
'slug_es'
,
),
migrations
.
RemoveField
(
model_name
=
'course'
,
name
=
'slug_pt_br'
,
),
]
courses/translation.py
View file @
5e9c7e85
...
...
@@ -8,9 +8,8 @@ from .certification.models import CertificateTemplate
@
register
(
Course
)
class
CourseTranslationOptions
(
TranslationOptions
):
fields
=
(
'slug'
,
'name'
,
'application'
,
'requirement'
,
'abstract'
,
'structure'
,
'workload'
,
'course_load'
,
'pronatec'
,
'thumbnail'
,
'home_thumbnail'
,
fields
=
(
'name'
,
'application'
,
'requirement'
,
'abstract'
,
'structure'
,
'workload'
,
'course_load'
,
'pronatec'
,
'thumbnail'
,
'home_thumbnail'
,
'min_percent_to_complete'
,
'informations'
,
'description'
)
...
...
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