You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
473 B

# -*- coding: utf-8 -*-
from django.db import models
from model_utils import Choices
class User(models.Model):
ROLES = Choices(
('student', 'Студент'),
('teacher', 'Преподователь'),
)
token = models.CharField(max_length=256)
role = models.CharField(max_length=32, choices=ROLES, default=ROLES.student)
class Repository(models.Model):
user = models.ForeignKey(User)
name = models.CharField(max_length=256)