Skip to content

Commit b483ebb

Browse files
author
Kátia Nakamura
committed
cfp: add comment and tag fields to Rating Form
1 parent f745b1b commit b483ebb

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

pyconbalkan/cfp/forms.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ class Meta:
4747
model = CFPRating
4848
fields = (
4949
'mark',
50+
'comment',
51+
'tags'
5052
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Generated by Django 2.0.5 on 2018-08-09 12:58
2+
3+
from django.db import migrations
4+
import markdownx.models
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('cfp', '0006_auto_20180807_0944'),
11+
]
12+
13+
operations = [
14+
migrations.AddField(
15+
model_name='cfprating',
16+
name='comment',
17+
field=markdownx.models.MarkdownxField(blank=True, null=True),
18+
),
19+
]

pyconbalkan/cfp/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class CFPRating(models.Model):
4747
mark = models.IntegerField(validators=[MaxValueValidator(10, "Maximum rating is 10"), MinValueValidator(0, "Minimum Rating is 10")])
4848
cfp = models.ForeignKey(Cfp, related_name="ratings", on_delete=CASCADE)
4949
user = models.ForeignKey(getattr(settings, "AUTH_USER_MODEL"), on_delete=CASCADE)
50+
comment = MarkdownxField(blank=True, null=True)
5051
tags = TaggableManager()
5152

5253
class Meta:

0 commit comments

Comments
 (0)