from django.forms import ModelForm
from empty_formset import DeleteIfEmptyInlineFormSet, DeleteIfEmptyModelForm
from django.forms.models import inlineformset_factory
from django import forms

from models import Route, RouteBase
from airport.models import *

class RouteBaseForm(DeleteIfEmptyModelForm):
    base = forms.ModelChoiceField(queryset=Airport.objects.all(), widget=forms.TextInput)

    class Meta:
        model = RouteBase

class RouteForm(ModelForm):
    class Meta:
        model = Route
        exclude = ('home', 'bases')

RouteBaseFormset = inlineformset_factory(Route, RouteBase, form=RouteBaseForm, formset=DeleteIfEmptyInlineFormSet, extra=5, can_delete=True)

42f7369c6c41c644845a94481c0f3f72070a187c
<mask token>


class RouteBaseForm(DeleteIfEmptyModelForm):
    <mask token>


    class Meta:
        model = RouteBase


class RouteForm(ModelForm):


    class Meta:
        model = Route
        exclude = 'home', 'bases'


<mask token>

<mask token>


class RouteBaseForm(DeleteIfEmptyModelForm):
    base = forms.ModelChoiceField(queryset=Airport.objects.all(), widget=
        forms.TextInput)


    class Meta:
        model = RouteBase


class RouteForm(ModelForm):


    class Meta:
        model = Route
        exclude = 'home', 'bases'


<mask token>

<mask token>


class RouteBaseForm(DeleteIfEmptyModelForm):
    base = forms.ModelChoiceField(queryset=Airport.objects.all(), widget=
        forms.TextInput)


    class Meta:
        model = RouteBase


class RouteForm(ModelForm):


    class Meta:
        model = Route
        exclude = 'home', 'bases'


RouteBaseFormset = inlineformset_factory(Route, RouteBase, form=
    RouteBaseForm, formset=DeleteIfEmptyInlineFormSet, extra=5, can_delete=True
    )

from django.forms import ModelForm
from empty_formset import DeleteIfEmptyInlineFormSet, DeleteIfEmptyModelForm
from django.forms.models import inlineformset_factory
from django import forms
from models import Route, RouteBase
from airport.models import *


class RouteBaseForm(DeleteIfEmptyModelForm):
    base = forms.ModelChoiceField(queryset=Airport.objects.all(), widget=
        forms.TextInput)


    class Meta:
        model = RouteBase


class RouteForm(ModelForm):


    class Meta:
        model = Route
        exclude = 'home', 'bases'


RouteBaseFormset = inlineformset_factory(Route, RouteBase, form=
    RouteBaseForm, formset=DeleteIfEmptyInlineFormSet, extra=5, can_delete=True
    )

from django.forms import ModelForm
from empty_formset import DeleteIfEmptyInlineFormSet, DeleteIfEmptyModelForm
from django.forms.models import inlineformset_factory
from django import forms

from models import Route, RouteBase
from airport.models import *

class RouteBaseForm(DeleteIfEmptyModelForm):
    base = forms.ModelChoiceField(queryset=Airport.objects.all(), widget=forms.TextInput)

    class Meta:
        model = RouteBase

class RouteForm(ModelForm):
    class Meta:
        model = Route
        exclude = ('home', 'bases')

RouteBaseFormset = inlineformset_factory(Route, RouteBase, form=RouteBaseForm, formset=DeleteIfEmptyInlineFormSet, extra=5, can_delete=True)
