forked from openedx/course-discovery
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds instructor to Wordpress data loader (#13)
- Loading branch information
1 parent
4dc3c62
commit b3fcb83
Showing
7 changed files
with
168 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3093,6 +3093,25 @@ | |
} | ||
], | ||
'tags': ['tag1', 'tag2', 'tag3'], | ||
'featured_image_url': 'http://example.com/demo-course-image.jpg' | ||
'featured_image_url': 'http://example.com/demo-course-image.jpg', | ||
'course_instructors': [ | ||
{ | ||
'given_name': 'Test instructor', | ||
'bio': 'This is a test instructor', | ||
'email': '[email protected]', | ||
'designation': 'SQA', | ||
'profile_image_url': 'http://example.com/demo-course-image.jpg', | ||
'marketing_id': 100, | ||
'marketing_url': 'http://example.com/demo-course-image', | ||
'phone_number': '12345', | ||
'website': 'http://example.com', | ||
'instructor_socials': [ | ||
{ | ||
'field_name': 'facebook', | ||
'url': 'http://facebook.com' | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...y/apps/course_metadata/migrations/0255_add_designation_and_profile_image_url_to_person.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 2.2.16 on 2021-02-15 07:45 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('course_metadata', '0254_auto_20210201_1107'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='person', | ||
name='designation', | ||
field=models.TextField(blank=True, null=True), | ||
), | ||
migrations.AddField( | ||
model_name='person', | ||
name='profile_image_url', | ||
field=models.URLField(blank=True, null=True), | ||
), | ||
] |
34 changes: 34 additions & 0 deletions
34
...se_discovery/apps/course_metadata/migrations/0256_add_instructor_info_fields_to_person.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 2.2.16 on 2021-02-18 08:09 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('course_metadata', '0255_add_designation_and_profile_image_url_to_person'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='person', | ||
name='marketing_id', | ||
field=models.PositiveIntegerField(blank=True, help_text='This field contains instructor post ID from wordpress.', null=True), | ||
), | ||
migrations.AddField( | ||
model_name='person', | ||
name='marketing_url', | ||
field=models.URLField(blank=True, null=True), | ||
), | ||
migrations.AddField( | ||
model_name='person', | ||
name='phone_number', | ||
field=models.CharField(blank=True, max_length=50, null=True, validators=[django.core.validators.RegexValidator(message='Phone number can only contain numbers.', regex='^\\+?1?\\d*$')]), | ||
), | ||
migrations.AddField( | ||
model_name='person', | ||
name='website', | ||
field=models.URLField(blank=True, null=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
course_discovery/apps/course_metadata/migrations/0257_add_social_media_type_choices.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.16 on 2021-02-18 08:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('course_metadata', '0256_add_instructor_info_fields_to_person'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='personsocialnetwork', | ||
name='type', | ||
field=models.CharField(choices=[('blog', 'Blog'), ('dribbble', 'Dribbble'), ('facebook', 'Facebook'), ('github', 'github'), ('instagram', 'Instagram'), ('linkedin', 'LinkedIn'), ('medium', 'medium'), ('others', 'Others'), ('skype', 'Skype'), ('stackoverflow', 'stackoverflow'), ('twitter', 'Twitter'), ('youtube', 'Youtube')], db_index=True, max_length=15), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters