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
410c54d2
Commit
410c54d2
authored
Feb 14, 2017
by
Awais
Committed by
Awais Qureshi
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing admin issue with large data in changed-by id.
ECOM-7222
parent
e14d8cb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
10 deletions
+36
-10
course_discovery/apps/publisher/admin.py
+36
-10
No files found.
course_discovery/apps/publisher/admin.py
View file @
410c54d2
...
...
@@ -2,21 +2,17 @@ from django.contrib import admin
from
guardian.admin
import
GuardedModelAdmin
from
course_discovery.apps.publisher.forms
import
CourseUserRoleForm
,
OrganizationUserRoleForm
,
UserAttributesAdminForm
from
course_discovery.apps.publisher.models
import
(
Course
,
CourseRun
,
CourseRunState
,
CourseState
,
CourseUserRole
,
OrganizationExtension
,
OrganizationUserRole
,
Seat
,
State
,
UserAttributes
)
admin
.
site
.
register
(
Course
)
admin
.
site
.
register
(
CourseRun
)
admin
.
site
.
register
(
Seat
)
admin
.
site
.
register
(
State
)
admin
.
site
.
register
(
CourseState
)
admin
.
site
.
register
(
CourseRunState
)
from
course_discovery.apps.publisher.models
import
(
Course
,
CourseRun
,
CourseRunState
,
CourseState
,
CourseUserRole
,
OrganizationExtension
,
OrganizationUserRole
,
Seat
,
State
,
UserAttributes
)
@admin.register
(
CourseUserRole
)
class
CourseUserRoleAdmin
(
admin
.
ModelAdmin
):
form
=
CourseUserRoleForm
raw_id_fields
=
(
'changed_by'
,)
@admin.register
(
OrganizationExtension
)
...
...
@@ -32,3 +28,33 @@ class UserAttributesAdmin(admin.ModelAdmin):
@admin.register
(
OrganizationUserRole
)
class
OrganizationUserRoleAdmin
(
admin
.
ModelAdmin
):
form
=
OrganizationUserRoleForm
@admin.register
(
CourseState
)
class
CourseStateAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'changed_by'
,)
@admin.register
(
CourseRunState
)
class
CourseRunStateAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'changed_by'
,)
@admin.register
(
Course
)
class
CourseAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'changed_by'
,)
@admin.register
(
CourseRun
)
class
CourseRunAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'changed_by'
,)
@admin.register
(
Seat
)
class
SeatAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'changed_by'
,)
@admin.register
(
State
)
class
StateAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'changed_by'
,)
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