Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
course-discovery
Commits
3628f567
Commit
3628f567
authored
Apr 19, 2016
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75 from edx/peter-fogg/expose-marketing-url
Expose course marketing URL.
parents
462b89cf
3a78f878
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletions
+4
-1
course_discovery/apps/api/serializers.py
+1
-0
course_discovery/apps/api/tests/test_serializers.py
+2
-1
course_discovery/apps/course_metadata/tests/factories.py
+1
-0
No files found.
course_discovery/apps/api/serializers.py
View file @
3628f567
...
...
@@ -141,6 +141,7 @@ class CourseSerializer(TimestampModelSerializer):
fields
=
(
'key'
,
'title'
,
'short_description'
,
'full_description'
,
'level_type'
,
'subjects'
,
'prerequisites'
,
'expected_learning_items'
,
'image'
,
'video'
,
'owners'
,
'sponsors'
,
'modified'
,
'course_runs'
,
'marketing_url'
)
...
...
course_discovery/apps/api/tests/test_serializers.py
View file @
3628f567
...
...
@@ -59,7 +59,8 @@ class CourseSerializerTests(TestCase):
'owners'
:
[],
'sponsors'
:
[],
'modified'
:
json_date_format
(
course
.
modified
),
# pylint: disable=no-member
'course_runs'
:
CourseRunSerializer
(
course
.
course_runs
,
many
=
True
)
.
data
'course_runs'
:
CourseRunSerializer
(
course
.
course_runs
,
many
=
True
)
.
data
,
'marketing_url'
:
course
.
marketing_url
}
self
.
assertDictEqual
(
serializer
.
data
,
expected
)
...
...
course_discovery/apps/course_metadata/tests/factories.py
View file @
3628f567
...
...
@@ -89,6 +89,7 @@ class CourseFactory(factory.DjangoModelFactory):
level_type
=
factory
.
SubFactory
(
LevelTypeFactory
)
image
=
factory
.
SubFactory
(
ImageFactory
)
video
=
factory
.
SubFactory
(
VideoFactory
)
marketing_url
=
FuzzyText
(
prefix
=
'https://example.com/test-course-url'
)
class
Meta
:
model
=
Course
...
...
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