Allow for course subscriptions

This commit is contained in:
Arjun Singh
2012-09-13 16:03:19 -07:00
parent 8bad4c8dbc
commit a83b9322ae
2 changed files with 4 additions and 2 deletions

View File

@@ -5,7 +5,8 @@ from student.models import CourseEnrollment
import logging
from util.cache import cache
from django.core import cache
cache = cache.get_cache('default')
def cached_has_permission(user, permission, course_id=None):
"""

View File

@@ -8,7 +8,8 @@ class User(models.Model):
accessible_fields = ['username', 'email', 'follower_ids', 'upvoted_ids', 'downvoted_ids',
'id', 'external_id', 'subscribed_user_ids', 'children', 'course_id',
'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']