from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Fieldset, Layout, Submit
from django import forms
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _

from core.widgets import SimpleMDEWidget
from .models import Experiment, Condition


class ExperimentCreateForm(forms.ModelForm):

    class Meta:
        model = Experiment
        fields = ['name', 'description']
        widgets = {
            'description': SimpleMDEWidget(),
        }

    @cached_property
    def helper(self):
        helper = FormHelper()
        helper.layout = Layout(
            Fieldset(
                '',
                'name',
                'description',
            ),
            FormActions(
                Submit(
                    'save', _('Create New Experiment'), css_class='btn-lg',
                )
            )
        )
        return helper

from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Fieldset, Layout, Submit, Div
from django import forms
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _

from core.widgets import SimpleMDEWidget
from .models import Experiment, Condition


class ExperimentCreateForm(forms.ModelForm):

    class Meta:
        model = Experiment
        fields = ['name', 'description']
        widgets = {
            'description': SimpleMDEWidget(),
        }

    @cached_property
    def helper(self):
        helper = FormHelper()
        helper.layout = Layout(
            Fieldset(
                '',
                'name',
                'description',
            ),
        )
        return helper

Disable form submit for now
Disable form submit for now

  from crispy_forms.bootstrap import FormActions
  from crispy_forms.helper import FormHelper
- from crispy_forms.layout import Fieldset, Layout, Submit
+ from crispy_forms.layout import Fieldset, Layout, Submit, Div
  from django import forms
  from django.utils.functional import cached_property
  from django.utils.translation import ugettext_lazy as _
  
  from core.widgets import SimpleMDEWidget
  from .models import Experiment, Condition
  
  
  class ExperimentCreateForm(forms.ModelForm):
  
      class Meta:
          model = Experiment
          fields = ['name', 'description']
          widgets = {
              'description': SimpleMDEWidget(),
          }
  
      @cached_property
      def helper(self):
          helper = FormHelper()
          helper.layout = Layout(
              Fieldset(
                  '',
                  'name',
                  'description',
              ),
-             FormActions(
-                 Submit(
-                     'save', _('Create New Experiment'), css_class='btn-lg',
-                 )
-             )
          )
          return helper
  
Disable form submit for now
## Code Before:
from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Fieldset, Layout, Submit
from django import forms
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _

from core.widgets import SimpleMDEWidget
from .models import Experiment, Condition


class ExperimentCreateForm(forms.ModelForm):

    class Meta:
        model = Experiment
        fields = ['name', 'description']
        widgets = {
            'description': SimpleMDEWidget(),
        }

    @cached_property
    def helper(self):
        helper = FormHelper()
        helper.layout = Layout(
            Fieldset(
                '',
                'name',
                'description',
            ),
            FormActions(
                Submit(
                    'save', _('Create New Experiment'), css_class='btn-lg',
                )
            )
        )
        return helper

## Instruction:
Disable form submit for now
## Code After:
from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Fieldset, Layout, Submit, Div
from django import forms
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _

from core.widgets import SimpleMDEWidget
from .models import Experiment, Condition


class ExperimentCreateForm(forms.ModelForm):

    class Meta:
        model = Experiment
        fields = ['name', 'description']
        widgets = {
            'description': SimpleMDEWidget(),
        }

    @cached_property
    def helper(self):
        helper = FormHelper()
        helper.layout = Layout(
            Fieldset(
                '',
                'name',
                'description',
            ),
        )
        return helper
