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
e95c4f16
Commit
e95c4f16
authored
Feb 05, 2021
by
Matheus Miranda
Browse files
Fix migrations for CourseCategory and CourseTrack
parent
1c221fda
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
41 deletions
+9
-41
courses/migrations/.0018_auto_20210202_1655.py.swp
courses/migrations/.0018_auto_20210202_1655.py.swp
+0
-0
courses/migrations/0018_auto_20210205_1024.py
courses/migrations/0018_auto_20210205_1024.py
+5
-1
courses/migrations/0019_coursetrack.py
courses/migrations/0019_coursetrack.py
+4
-3
courses/migrations/0020_auto_20210203_1009.py
courses/migrations/0020_auto_20210203_1009.py
+0
-17
courses/migrations/0021_coursetrack_home_position.py
courses/migrations/0021_coursetrack_home_position.py
+0
-18
courses/models.py
courses/models.py
+0
-2
No files found.
courses/migrations/.0018_auto_20210202_1655.py.swp
0 → 100644
View file @
e95c4f16
File added
courses/migrations/0018_auto_2021020
2
_1
655
.py
→
courses/migrations/0018_auto_2021020
5
_1
024
.py
View file @
e95c4f16
# Generated by Django 2.2.17 on 2021-02-0
2
1
9:55
# Generated by Django 2.2.17 on 2021-02-0
5
1
3:24
import
autoslug.fields
import
autoslug.fields
from
django.db
import
migrations
,
models
from
django.db
import
migrations
,
models
...
@@ -22,6 +22,10 @@ class Migration(migrations.Migration):
...
@@ -22,6 +22,10 @@ class Migration(migrations.Migration):
(
'color'
,
models
.
CharField
(
blank
=
True
,
help_text
=
'Title color in hex format (i.e: #1aafd0).'
,
max_length
=
7
,
verbose_name
=
'color'
)),
(
'color'
,
models
.
CharField
(
blank
=
True
,
help_text
=
'Title color in hex format (i.e: #1aafd0).'
,
max_length
=
7
,
verbose_name
=
'color'
)),
(
'parent'
,
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'courses.CourseCategory'
,
verbose_name
=
'course category parent'
)),
(
'parent'
,
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'courses.CourseCategory'
,
verbose_name
=
'course category parent'
)),
],
],
options
=
{
'verbose_name'
:
'Course Category'
,
'verbose_name_plural'
:
'Course Categories'
,
},
),
),
migrations
.
AddField
(
migrations
.
AddField
(
model_name
=
'course'
,
model_name
=
'course'
,
...
...
courses/migrations/0019_coursetrack.py
View file @
e95c4f16
# Generated by Django 2.2.17 on 2021-02-0
2 20:40
# Generated by Django 2.2.17 on 2021-02-0
5 13:25
import
autoslug.fields
import
autoslug.fields
from
django.db
import
migrations
,
models
from
django.db
import
migrations
,
models
...
@@ -7,7 +7,7 @@ from django.db import migrations, models
...
@@ -7,7 +7,7 @@ from django.db import migrations, models
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
dependencies
=
[
(
'courses'
,
'0018_auto_2021020
2
_1
655
'
),
(
'courses'
,
'0018_auto_2021020
5
_1
024
'
),
]
]
operations
=
[
operations
=
[
...
@@ -15,8 +15,9 @@ class Migration(migrations.Migration):
...
@@ -15,8 +15,9 @@ class Migration(migrations.Migration):
name
=
'CourseTrack'
,
name
=
'CourseTrack'
,
fields
=
[
fields
=
[
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'id'
,
models
.
AutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
blank
=
True
,
max_length
=
255
,
verbose_name
=
'Name'
)),
(
'name'
,
models
.
CharField
(
max_length
=
255
,
verbose_name
=
'Name'
)),
(
'slug'
,
autoslug
.
fields
.
AutoSlugField
(
editable
=
False
,
populate_from
=
'name'
,
unique
=
True
,
verbose_name
=
'Slug'
)),
(
'slug'
,
autoslug
.
fields
.
AutoSlugField
(
editable
=
False
,
populate_from
=
'name'
,
unique
=
True
,
verbose_name
=
'Slug'
)),
(
'home_position'
,
models
.
IntegerField
(
null
=
True
)),
(
'courses'
,
models
.
ManyToManyField
(
blank
=
True
,
to
=
'courses.Course'
,
verbose_name
=
'courses'
)),
(
'courses'
,
models
.
ManyToManyField
(
blank
=
True
,
to
=
'courses.Course'
,
verbose_name
=
'courses'
)),
],
],
options
=
{
options
=
{
...
...
courses/migrations/0020_auto_20210203_1009.py
deleted
100644 → 0
View file @
1c221fda
# Generated by Django 2.2.16 on 2021-02-03 13:09
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'courses'
,
'0019_coursetrack'
),
]
operations
=
[
migrations
.
AlterModelOptions
(
name
=
'coursecategory'
,
options
=
{
'verbose_name'
:
'Course Category'
,
'verbose_name_plural'
:
'Course Categories'
},
),
]
courses/migrations/0021_coursetrack_home_position.py
deleted
100644 → 0
View file @
1c221fda
# Generated by Django 2.2.16 on 2021-02-03 14:13
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'courses'
,
'0020_auto_20210203_1009'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'coursetrack'
,
name
=
'home_position'
,
field
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
),
),
]
courses/models.py
View file @
e95c4f16
...
@@ -336,7 +336,6 @@ class CourseTrack(models.Model):
...
@@ -336,7 +336,6 @@ class CourseTrack(models.Model):
name
=
models
.
CharField
(
name
=
models
.
CharField
(
_
(
'Name'
),
_
(
'Name'
),
max_length
=
255
,
max_length
=
255
,
blank
=
True
,
)
)
slug
=
AutoSlugField
(
slug
=
AutoSlugField
(
_
(
'Slug'
),
_
(
'Slug'
),
...
@@ -350,7 +349,6 @@ class CourseTrack(models.Model):
...
@@ -350,7 +349,6 @@ class CourseTrack(models.Model):
)
)
home_position
=
models
.
IntegerField
(
home_position
=
models
.
IntegerField
(
null
=
True
,
null
=
True
,
blank
=
True
,
)
)
class
Meta
:
class
Meta
:
...
...
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