omassot пре 7 година
родитељ
комит
bb32086127
6 измењених фајлова са 14 додато и 9 уклоњено
  1. 2 1
      .gitignore
  2. 1 1
      main/forms.py
  3. 2 1
      main/models.py
  4. 1 1
      main/static/css/custom.css
  5. 1 1
      main/templates/_comment_div.html
  6. 7 4
      main/templates/epic_details.html

+ 2 - 1
.gitignore

@@ -7,4 +7,5 @@
 /work/*
 tmp*
 ~$*
-.sqlite3
+.sqlite3
+main/migrations/*

+ 1 - 1
main/forms.py

@@ -60,7 +60,7 @@ class CommentForm(forms.ModelForm):
     class Meta:
         model = Comment
         fields = ('content',)
-    content = MartorFormField(label="Ajouter un commentaire")
+    content = MartorFormField(label="Commentaire")
 
 class SprintForm(forms.ModelForm):
     class Meta:

+ 2 - 1
main/models.py

@@ -8,6 +8,7 @@ from django.db import models, connection
 from django.db.models.aggregates import Sum
 from martor.models import MartorField
 
+
 class Member(models.Model):
     user = models.OneToOneField(User, on_delete=models.CASCADE)
     trigram = models.CharField(max_length=5)
@@ -163,7 +164,7 @@ class Story(BaseModel):
                              related_name="stories", 
                              verbose_name="Epic")
     name = models.CharField(max_length=200, default="", verbose_name="Nom")
-    weight = models.IntegerField(blank=True, choices=WEIGHTS, verbose_name="Poids")
+    weight = models.IntegerField(blank=True, null=True, choices=WEIGHTS, verbose_name="Poids")
     description = MartorField(blank=True, default="", verbose_name="Description")
     closed = models.BooleanField(default=False, verbose_name="Clôturée")
     author = models.ForeignKey(User, 

+ 1 - 1
main/static/css/custom.css

@@ -283,7 +283,7 @@ select[multiple] option {
 }
 
 #comment-section {
-	margin: 0 2.5%; 
+	margin: 0 2.5%;
 }
 
 #comment-section .martor-field {

+ 1 - 1
main/templates/_comment_div.html

@@ -36,7 +36,7 @@
 	{% endfor %}
 	</ul>
 	
-	<form action="{% url 'comment_post' obj_uuid=com_pack.obj.uuid %}" method="post" accept-charset="utf-8" enctype="multipart/form-data">
+	<form action="{% url 'comment_post' obj_uuid=com_pack.obj.uuid %}" method="post" accept-charset="utf-8" enctype="multipart/form-data" style="margin-top:4em;">
 		{% csrf_token %}
 		
 		{{ com_pack.empty_form.as_p }}

+ 7 - 4
main/templates/epic_details.html

@@ -32,6 +32,12 @@
 	
 	<hr>
 	
+	<div class="description">
+		{{ epic.description|safe_markdown }}
+	</div>
+	
+	<hr>
+	
 	<div class="flex-row">
 		<h4 class="flex-extend">Stories</h4>
 		<a href="{% url 'story_create' epic_id=epic.id %}">
@@ -50,10 +56,7 @@
 	 {% else %}
 	 	<span class="annotation">(Aucune story)</span>
 	 {% endif %}
-	
-	<div class="description">
-		{{ epic.description|safe_markdown }}
-	</div>
+
 
 	<hr>