Repository: liqd/a4-opin

Issue:
DST: change a few bits of content
some text within the dst still have to be changed.

Set the agende of an event, a process, a project etc has to be replaced by:
"Learn about what people like most"

![bildschirmfoto 2017-08-21 um 12 32 40](https://user-images.githubusercontent.com/15954895/29515774-0d9f8c84-866e-11e7-8107-4eb45c744593.png)


there is also one answer choice missing in the fine tuning. Instead of having four answer choices for the third question there should be five: "Don't know"

![bildschirmfoto 2017-08-21 um 12 36 02](https://user-images.githubusercontent.com/15954895/29515826-51660628-866e-11e7-8459-d73cce607884.png)

same counts for the fourth question in feasibility. there should be a fifth answer choise saying "Don't know" as well.

![bildschirmfoto 2017-08-21 um 12 44 39](https://user-images.githubusercontent.com/15954895/29515921-abfd222e-866e-11e7-9cc9-2eb708e88205.png)




Discussion:

Resolving patch:
diff --git a/euth/blueprints/blueprints.py b/euth/blueprints/blueprints.py
--- a/euth/blueprints/blueprints.py
+++ b/euth/blueprints/blueprints.py
@@ -11,6 +11,23 @@
 from .names import BlueprintNames
 
 
+class BlueprintEnum(Enum):
+    def __new__(cls, value, label):
+        obj = object.__new__(cls)
+        obj._value_ = len(cls.__members__) + 1
+        obj._value = value
+        obj.label = label
+        return obj
+
+    @property
+    def value(self):
+        return self._value
+
+    @classmethod
+    def get(cls, value):
+        return next(m for m in cls if m._value == value)
+
+
 @unique
 class Aim(Enum):
     collect_ideas = (
@@ -38,7 +55,7 @@ class Aim(Enum):
     )
     run_survey = (
         'run_survey',
-        _('Set the agenda of an event, a process, a project etc.'),
+        _('Learn about what people like most.'),
         [_('Opinion polls, majority votes etc.')]
     )
     run_competition = (
@@ -63,99 +80,57 @@ def __new__(cls, value, label, examples):
 
 
 @unique
-class Result(Enum):
+class Result(BlueprintEnum):
     collect_ideas = 3, _('Collection of commented ideas')
     majority_vote = 2, _('Majority vote')
     both = 1, _('Both')
 
-    def __new__(cls, value, label):
-        obj = object.__new__(cls)
-        obj._value_ = value
-        obj.label = label
-        return obj
-
 
 @unique
-class Experience(Enum):
+class Experience(BlueprintEnum):
     five_projects = 4, _('More than 5 participative projects')
     two_projects = 3, _('More than 2 participative projects')
     one_project = 2, ('1-2 participative projects')
     no_projects = 1, ('I have no experiences in organising participative '
                       ' projects')
 
-    def __new__(cls, value, label):
-        obj = object.__new__(cls)
-        obj._value_ = value
-        obj.label = label
-        return obj
-
 
-class Motivation(Enum):
+class Motivation(BlueprintEnum):
     high = 4, _('High motivation')
     medium = 3, _('Medium motivation')
     low = 2, _('Low motivation')
     not_found = 1, _('No motivation')
     unkown = 2, _('I don\'t know.')
 
-    def __new__(cls, value, label):
-        obj = object.__new__(cls)
-        obj._value_ = value
-        obj.label = label
-        return obj
-
 
 @unique
-class Participants(Enum):
+class Participants(BlueprintEnum):
     few = 0, '< 25'
     some = 1, '25-50'
     many = 2, '50+'
 
-    def __new__(cls, value, label):
-        obj = object.__new__(cls)
-        obj._value_ = value
-        obj.label = label
-        return obj
-
 
 @unique
-class Duration(Enum):
+class Duration(BlueprintEnum):
     one_weeks = 0, _('1-2 weeks')
     two_weeks = 1, _('2-4 weeks')
     four_weeks = 2, _('more than 4 weeks')
 
-    def __new__(cls, value, label):
-        obj = object.__new__(cls)
-        obj._value_ = value
-        obj.label = label
-        return obj
-
 
 @unique
-class Scope(Enum):
+class Scope(BlueprintEnum):
     local = 0, _('Local')
     regional = 1, _('Regional')
     national = 2, _('National or international')
 
-    def __new__(cls, value, label):
-        obj = object.__new__(cls)
-        obj._value_ = value
-        obj.label = label
-        return obj
-
 
-class Accessibility(Enum):
+class Accessibility(BlueprintEnum):
     very_easy = 1, _('Very easy to access')
     easy = 2, _('Easy to access')
     hard = 3, _('Hard to access')
     very_hard = 4, _('Very hard to access')
     unkown = 3, _('I don\'t know')
 
-    def __new__(cls, value, label):
-        obj = object.__new__(cls)
-        obj._value_ = value
-        obj.label = label
-        return obj
-
 
 ComplexityVector = namedtuple(
     'ComplexityVector', [
diff --git a/euth/blueprints/forms.py b/euth/blueprints/forms.py
--- a/euth/blueprints/forms.py
+++ b/euth/blueprints/forms.py
@@ -75,7 +75,7 @@ def clean_aim(self, *args, **kwargs):
 
     def _clean_enum(self, name, enum):
         try:
-            return enum(int(self.cleaned_data[name]))
+            return enum.get(int(self.cleaned_data[name]))
         except (KeyError, ValueError):
             raise ValidationError(_('Invalid selection'))
 


Test patch: