Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
dcb18910
Commit
dcb18910
authored
Sep 10, 2020
by
Laury Bueno
Browse files
[Stats] Add Classroom to the list of actionable models
parent
684faa41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
courses/stats/apps.py
courses/stats/apps.py
+1
-0
courses/stats/views.py
courses/stats/views.py
+2
-0
No files found.
courses/stats/apps.py
View file @
dcb18910
...
...
@@ -10,6 +10,7 @@ class CoursesStatsConfig(AppConfig):
from
actstream
import
registry
registry
.
register
(
get_user_model
())
registry
.
register
(
'courses.Course'
)
registry
.
register
(
'courses.classroom.Classroom'
)
registry
.
register
(
'stats.AccessibleArea'
)
registry
.
register
(
'discussion.Topic'
)
registry
.
register
(
'discussion.Forum'
)
courses/stats/views.py
View file @
dcb18910
...
...
@@ -7,6 +7,7 @@ from discussion.models import Forum, Topic
from
.serializers
import
UserActionsSerializer
,
UserAccessSerializer
from
.models
import
AccessibleArea
from
..models
import
Course
from
..classroom.models
import
Classroom
class
UserActionsView
(
views
.
APIView
):
...
...
@@ -16,6 +17,7 @@ class UserActionsView(views.APIView):
# Only models from this list are registered to be used on actions
allowed_models
=
{
'Course'
:
Course
,
'Classroom'
:
Classroom
,
'Topic'
:
Topic
,
'Forum'
:
Forum
,
}
...
...
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