Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add coursecreator option to django model #269

Open
wants to merge 1 commit into
base: open-release/koa.nelp
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cms/djangoapps/course_creators/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ class CourseCreatorAdmin(admin.ModelAdmin):
# Fields to display on the overview page.
list_display = ['username', get_email, 'state', 'state_changed', 'note', 'all_organizations']
filter_horizontal = ('organizations',)
readonly_fields = ['username', 'state_changed']
readonly_fields = ['state_changed']
# Controls the order on the edit form (without this, read-only fields appear at the end).
fieldsets = (
add_fieldsets = (
(None, {
'fields': ['username', 'state', 'state_changed', 'note', 'all_organizations', 'organizations']
}),
Expand All @@ -98,7 +98,7 @@ def username(self, inst):
username.admin_order_field = 'user__username'

def has_add_permission(self, request):
return False
return True

def has_delete_permission(self, request, obj=None):
return False
Expand Down