Commit 0ea9e432 by Arjun Singh

Allow for course subscriptions

parent d378643c
...@@ -5,7 +5,8 @@ from student.models import CourseEnrollment ...@@ -5,7 +5,8 @@ from student.models import CourseEnrollment
import logging import logging
from util.cache import cache from util.cache import cache
from django.core import cache
cache = cache.get_cache('default')
def cached_has_permission(user, permission, course_id=None): def cached_has_permission(user, permission, course_id=None):
""" """
......
...@@ -8,7 +8,8 @@ class User(models.Model): ...@@ -8,7 +8,8 @@ class User(models.Model):
accessible_fields = ['username', 'email', 'follower_ids', 'upvoted_ids', 'downvoted_ids', accessible_fields = ['username', 'email', 'follower_ids', 'upvoted_ids', 'downvoted_ids',
'id', 'external_id', 'subscribed_user_ids', 'children', 'course_id', 'id', 'external_id', 'subscribed_user_ids', 'children', 'course_id',
'subscribed_thread_ids', 'subscribed_commentable_ids', 'subscribed_thread_ids', 'subscribed_commentable_ids',
'subscribed_course_ids', 'threads_count', 'comments_count', 'default_sort_key' 'subscribed_course_ids', 'threads_count', 'comments_count',
'default_sort_key'
] ]
updatable_fields = ['username', 'external_id', 'email', 'default_sort_key'] updatable_fields = ['username', 'external_id', 'email', 'default_sort_key']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment