15 lines
392 B
Python
15 lines
392 B
Python
from django.db import models
|
|
from django.utils import timezone
|
|
|
|
from projects.models import Project
|
|
|
|
|
|
class Issue(models.Model):
|
|
project = models.ForeignKey(Project, on_delete=models.CASCADE)
|
|
title = models.CharField(max_length=200)
|
|
text = models.TextField(blank=True)
|
|
create_date = models.DateTimeField(default=timezone.now)
|
|
|
|
def __str__(self):
|
|
return self.title
|