Skip to content

Commit 2f775a7

Browse files
committed
feat: add coursecreator option to django model
With this change is possible add coursecreator without needing a login in cms for the user. The add option is matched with the field username of the user model.
1 parent e08be24 commit 2f775a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cms/djangoapps/course_creators/admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ class CourseCreatorAdmin(admin.ModelAdmin):
7272
# Fields to display on the overview page.
7373
list_display = ['username', get_email, 'state', 'state_changed', 'note', 'all_organizations']
7474
filter_horizontal = ('organizations',)
75-
readonly_fields = ['username', 'state_changed']
75+
readonly_fields = ['state_changed']
7676
# Controls the order on the edit form (without this, read-only fields appear at the end).
77-
fieldsets = (
77+
add_fieldsets = (
7878
(None, {
7979
'fields': ['username', 'state', 'state_changed', 'note', 'all_organizations', 'organizations']
8080
}),
@@ -98,7 +98,7 @@ def username(self, inst):
9898
username.admin_order_field = 'user__username'
9999

100100
def has_add_permission(self, request):
101-
return False
101+
return True
102102

103103
def has_delete_permission(self, request, obj=None):
104104
return False

0 commit comments

Comments
 (0)