old_contents: # -*- coding: utf-8 -*-
  
  from django import forms
  from crispy_forms.helper import FormHelper
  from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder
  from Instanssi.store.models import StoreItem
  
  
  class StoreItemForm(forms.ModelForm):
      def __init__(self, *args, **kwargs):
          super(StoreItemForm, self).__init__(*args, **kwargs)
          self.fields['event'].required = True
          self.helper = FormHelper()
          self.helper.layout = Layout(
              Fieldset(
                  u'Tuote',
                  'event',
                  'name',
                  'description',
                  'price',
                  'max',
                  'available',
                  'max_per_order',
                  'delivery_type',
                  'imagefile_original',
                  ButtonHolder(
                      Submit('submit', u'Tallenna')
                  )
              )
          )
  
      class Meta:
          model = StoreItem
          exclude = ('imagefile_thumbnail',)
  
new_contents: # -*- coding: utf-8 -*-
  
  from django import forms
  from crispy_forms.helper import FormHelper
  from crispy_forms.layout import Submit, Layout, Fieldset, ButtonHolder
  from Instanssi.store.models import StoreItem
  
  class StoreItemForm(forms.ModelForm):
      def __init__(self, *args, **kwargs):
          super(StoreItemForm, self).__init__(*args, **kwargs)
          self.fields['event'].required = True
          self.helper = FormHelper()
          self.helper.layout = Layout(
              Fieldset(
                  u'Tuote',
                  'event',
                  'name',
                  'description',
                  'price',
                  'max',
                  'available',
                  'max_per_order',
                  'imagefile_original',
                  ButtonHolder(
                      Submit('submit', u'Tallenna')
                  )
              )
          )
  
      class Meta:
          model = StoreItem
          exclude = ('imagefile_thumbnail',)
  
subject: Remove deprecated fields from form