Files
edx-platform/lms/djangoapps/user_api/models.py
Greg Price 6a97ddf53c Add an API to interact with users and preferences
The new API uses Django REST Framework. For now, it is designed specifically
to support the use cases required by the forum digest notifier (not yet built),
with a goal of making it more generally useful over time.
2013-07-22 10:57:18 -04:00

13 lines
407 B
Python

from django.contrib.auth.models import User
from django.db import models
class UserPreference(models.Model):
"""A user's preference, stored as generic text to be processed by client"""
user = models.ForeignKey(User, db_index=True, related_name="+")
key = models.CharField(max_length=255, db_index=True)
value = models.TextField()
class Meta:
unique_together = ("user", "key")