Browse Source

Add models

pull/10/head
Hironsan 7 years ago
parent
commit
f2362b018f
1 changed files with 22 additions and 1 deletions
  1. 23
      doccano/app/server/models.py

23
doccano/app/server/models.py

@ -1,3 +1,24 @@
from django.db import models
# Create your models here.
class Label(models.Model):
text = models.CharField(max_length=100)
class Annotation(models.Model):
text = models.TextField()
prob = models.FloatField()
labels = models.ManyToManyField(Label)
# users = models.ManyToManyField(User)
class User(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
password = models.CharField(max_length=32)
# password = forms.CharField(max_length=32, widget=forms.PasswordInput)
class Project(models.Model):
name = models.CharField(max_length=100)
# users = models.ManyToManyField(User)
Loading…
Cancel
Save