diff options
Diffstat (limited to 'archaeological_operations/forms.py')
| -rw-r--r-- | archaeological_operations/forms.py | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 247dcc20a..7bac80b48 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -714,6 +714,7 @@ class DashboardForm(forms.Form):  class OperationFormGeneral(ManageOldType, forms.Form):      form_label = _(u"General")      base_model = 'archaeological_site' +    file_upload = True      associated_models = {'scientist': Person,                           'in_charge': Person,                           'cira_rapporteur': Person, @@ -802,6 +803,13 @@ class OperationFormGeneral(ManageOldType, forms.Form):                                         required=False)      virtual_operation = forms.BooleanField(required=False,                                             label=_(u"Virtual operation")) +    image = forms.ImageField( +        label=_(u"Image"), help_text=mark_safe( +            _(u"<p>Heavy images are resized to: %(width)dx%(height)d " +              u"(ratio is preserved).</p>") % { +                'width': settings.IMAGE_MAX_SIZE[0], +                'height': settings.IMAGE_MAX_SIZE[1]}), +        required=False, widget=widgets.ImageFileInput())      def __init__(self, *args, **kwargs):          super(OperationFormGeneral, self).__init__(*args, **kwargs) | 
