# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from decimal import Decimal
from django.db import models
from django.db.models import Q
from django.db.models.signals import post_save
from django.contrib.auth.models import User
from markitup.fields import MarkupField
from symposion.proposals.models import ProposalBase
@@ -18,26 +19,26 @@ class ProposalScoreExpression(object):
def as_sql(self, qn, connection=None):
sql = "((3 * plus_one + plus_zero) - (minus_zero + 3 * minus_one))"
return sql, []
def prepare_database_save(self, unused):
return self
class Votes(object):
PLUS_ONE = "+1"
PLUS_ZERO = "+0"
MINUS_ZERO = u"−0"
MINUS_ONE = u"−1"
MINUS_ZERO = "−0"
MINUS_ONE = "−1"
CHOICES = [
(PLUS_ONE, u"+1 — Good proposal and I will argue for it to be accepted."),
(PLUS_ZERO, u"+0 — OK proposal, but I will not argue for it to be accepted."),
(MINUS_ZERO, u"−0 — Weak proposal, but I will not argue strongly against acceptance."),
(MINUS_ONE, u"−1 — Serious issues and I will argue to reject this proposal."),
]
VOTES = Votes()
class ReviewAssignment(models.Model):
AUTO_ASSIGNED_INITIAL = 0