-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
36 lines (28 loc) · 1.29 KB
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from django.db import models
# Create your models here.
class cp(models.Model):
title = models.TextField(null=True , blank = True)
data = models.TextField(null=True , blank = True)
question = models.TextField(null=True , blank = True)
def __str__(self):
return self.title
class problemofday(models.Model):
problem_of_the_day = models.URLField(max_length = 300 , null=True , blank =True)
old_questions = models.TextField(null=True , blank =True)
ratings = models.CharField(max_length = 100 , default =1200)
tags = models.CharField(max_length = 200 , default = 'implementation')
def __str__(self):
return self.tags
class problemset(models.Model):
url = models.URLField(max_length = 300 , null=True , blank =True)
date_of_problem = models.DateField(null=True , blank =True)
tags = models.TextField(null=True , blank =True)
ratings = models.CharField(max_length = 100 , default =1200)
name = models.CharField(max_length = 200 , null = True , blank =True)
def __str__(self):
return str(self.name)
class CpBooks(models.Model):
book_name = models.CharField(max_length = 200 , default="NA")
view_down = models.URLField(max_length = 200 , null=True , blank = True)
def __str__(self):
return self.book_name