Skip to content

Commit

Permalink
Merge pull request #275 from edx/awais786/ECOM-5344-add-type-in-admin
Browse files Browse the repository at this point in the history
ECOM-5344
  • Loading branch information
bderusha authored Aug 24, 2016
2 parents 6e9fc9c + df2af24 commit bfae6ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion course_discovery/apps/course_metadata/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 5 additions & 1 deletion course_discovery/apps/course_metadata/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down

0 comments on commit bfae6ac

Please sign in to comment.