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
bfae6ac0
Commit
bfae6ac0
authored
Aug 24, 2016
by
Bill DeRusha
Committed by
GitHub
Aug 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #275 from edx/awais786/ECOM-5344-add-type-in-admin
ECOM-5344
parents
6e9fc9ce
df2af24c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
course_discovery/apps/course_metadata/admin.py
+1
-1
course_discovery/apps/course_metadata/forms.py
+5
-1
No files found.
course_discovery/apps/course_metadata/admin.py
View file @
bfae6ac0
...
...
@@ -75,7 +75,7 @@ class ProgramAdmin(admin.ModelAdmin):
# ordering the field display on admin page.
fields
=
(
'title'
,
'status'
,
'banner_image_url'
,
'card_image_url'
,
'overview'
,
'video'
,
'title'
,
'status'
,
'
type'
,
'
banner_image_url'
,
'card_image_url'
,
'overview'
,
'video'
,
)
fields
+=
(
'courses'
,
'course_runs'
,
'excluded_course_runs'
...
...
course_discovery/apps/course_metadata/forms.py
View file @
bfae6ac0
...
...
@@ -9,11 +9,15 @@ class ProgramAdminForm(forms.ModelForm):
class
Meta
:
model
=
Program
exclude
=
(
'subtitle'
,
'category'
,
'
type'
,
'
marketing_slug'
,
'weeks_to_complete'
,
'subtitle'
,
'category'
,
'marketing_slug'
,
'weeks_to_complete'
,
'min_hours_effort_per_week'
,
'max_hours_effort_per_week'
,
'authoring_organizations'
,
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
ProgramAdminForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
'type'
]
.
required
=
True
class
CourseRunSelectionForm
(
forms
.
ModelForm
):
...
...
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