|
@@ -5,24 +5,20 @@ from __future__ import division
|
|
from __future__ import print_function
|
|
from __future__ import print_function
|
|
from __future__ import unicode_literals
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
+import collections
|
|
|
|
+
|
|
|
|
+from django import forms
|
|
from django.contrib.contenttypes.models import ContentType
|
|
from django.contrib.contenttypes.models import ContentType
|
|
from django.core.exceptions import ValidationError
|
|
from django.core.exceptions import ValidationError
|
|
from django.db import transaction
|
|
from django.db import transaction
|
|
-
|
|
|
|
-import gettext
|
|
|
|
from django.utils.encoding import force_text
|
|
from django.utils.encoding import force_text
|
|
|
|
|
|
-_ = gettext.gettext
|
|
|
|
-
|
|
|
|
-__author__ = 'marcos'
|
|
|
|
-
|
|
|
|
-import collections
|
|
|
|
-
|
|
|
|
-from django import forms
|
|
|
|
-
|
|
|
|
from rapid.widgets import RapidSelector, RapidRelationReadOnly, rapid_alternatives_widget
|
|
from rapid.widgets import RapidSelector, RapidRelationReadOnly, rapid_alternatives_widget
|
|
from rapid.wrappers import FieldData, ModelData
|
|
from rapid.wrappers import FieldData, ModelData
|
|
|
|
|
|
|
|
+import gettext
|
|
|
|
+_ = gettext.gettext
|
|
|
|
+
|
|
|
|
|
|
class RapidAlternativesField(forms.Field):
|
|
class RapidAlternativesField(forms.Field):
|
|
def __init__(self, field_name, alternatives, selector_name, form, request, instance=None, *args, **kwargs):
|
|
def __init__(self, field_name, alternatives, selector_name, form, request, instance=None, *args, **kwargs):
|