<reponame>NSYT0607/DONGKEY<gh_stars>1-10
from django import forms

from .models import Club
from .models import ClubRule


class ClubForm(forms.ModelForm):
    class Meta:
        model = Club
        exclude = ('calendar',)

    # def save(self, commit=True):
    #     club = super().save(commit=False)
    #     club.position = True
    #     if commit:
    #         club.save()
    #     return club


class ClubRuleForm(forms.ModelForm):
    class Meta:
        model = ClubRule
        exclude = ('club', )

from django import forms

from .models import Club
from .models import ClubRule


class ClubForm(forms.ModelForm):
    class Meta:
        model = Club
        exclude = ('calendar',)

    # def save(self, commit=True):
    #     club = super().save(commit=False)
    #     club.position = True
    #     if commit:
    #         club.save()
    #     return club


class ClubRuleForm(forms.ModelForm):
    class Meta:
        model = ClubRule
        exclude = ('club', )
# def save(self, commit=True): #     club = super().save(commit=False) #     club.position = True #     if commit: #         club.save() #     return club