empty description by default

parent 7c2c3a4c
...@@ -31,7 +31,7 @@ class Course(models.Model): ...@@ -31,7 +31,7 @@ class Course(models.Model):
class Document(models.Model): class Document(models.Model):
name = models.CharField(max_length=200) name = models.CharField(max_length=200)
documentDate = models.DateField() documentDate = models.DateField()
description = models.CharField(max_length=10000,null=True,blank=True) description = models.CharField(max_length=10000,null=False,blank=True)
isAccepted = models.BooleanField(default=False) isAccepted = models.BooleanField(default=False)
user = models.ForeignKey('User', on_delete=models.SET_NULL,null=True,blank=True) user = models.ForeignKey('User', on_delete=models.SET_NULL,null=True,blank=True)
course = models.ForeignKey('Course',on_delete=models.SET_NULL,null=True,blank=True) course = models.ForeignKey('Course',on_delete=models.SET_NULL,null=True,blank=True)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{{ document.name }} {{ document.name }}
</div> </div>
{% if document.course.pk != Null %}<div class="meta"><a href="{% url 'core:get_course' document.course.pk %}">{{document.course}}</a></div>{% endif %} {% if document.course.pk != Null %}<div class="meta"><a href="{% url 'core:get_course' document.course.pk %}">{{document.course}}</a></div>{% endif %}
<div class="description">{{ document.description or "" }}</div> <div class="description">{{ document.description }}</div>
</div> </div>
<div class="extra content"> <div class="extra content">
<p class="ui {% if document.type == 'Annale' %}red{% else %}blue{% endif %} label">{{ document.type }}</p> <p class="ui {% if document.type == 'Annale' %}red{% else %}blue{% endif %} label">{{ document.type }}</p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment