from django import forms
#Third Party apps imports

#Imports local apps
from .models import Menu, MenuItems

from datetime import date

#Core Django Imports
from django import forms
from django.forms.models import inlineformset_factory
#Third Party apps imports

#Imports local apps
from .models import Menu, MenuItems, UserSelectedLunch, Subscribers

class MenuForm(forms.ModelForm):
	day = forms.DateField(label='Menu date', input_formats=['%d-%m-%Y'])

	class Meta:
		model = Menu
		fields = '__all__'

MenuItemsFormSet = inlineformset_factory(Menu, MenuItems, fields=('name','menu',))

class MenuSelectForm(forms.ModelForm):

	class Meta:
		model = UserSelectedLunch
		fields = '__all__'

class SubscribersForm(forms.ModelForm):

	class Meta:
		model = Subscribers
		fields = '__all__'
Add ModelForm of Menu, MenuItems and Subscriber
Add ModelForm of Menu, MenuItems and Subscriber

+ from datetime import date
+ 
+ #Core Django Imports
  from django import forms
+ from django.forms.models import inlineformset_factory
  #Third Party apps imports
  
  #Imports local apps
- from .models import Menu, MenuItems
+ from .models import Menu, MenuItems, UserSelectedLunch, Subscribers
  
+ class MenuForm(forms.ModelForm):
+ 	day = forms.DateField(label='Menu date', input_formats=['%d-%m-%Y'])
+ 
+ 	class Meta:
+ 		model = Menu
+ 		fields = '__all__'
+ 
+ MenuItemsFormSet = inlineformset_factory(Menu, MenuItems, fields=('name','menu',))
+ 
+ class MenuSelectForm(forms.ModelForm):
+ 
+ 	class Meta:
+ 		model = UserSelectedLunch
+ 		fields = '__all__'
+ 
+ class SubscribersForm(forms.ModelForm):
+ 
+ 	class Meta:
+ 		model = Subscribers
+ 		fields = '__all__'
Add ModelForm of Menu, MenuItems and Subscriber
## Code Before:
from django import forms
#Third Party apps imports

#Imports local apps
from .models import Menu, MenuItems

## Instruction:
Add ModelForm of Menu, MenuItems and Subscriber
## Code After:
from datetime import date

#Core Django Imports
from django import forms
from django.forms.models import inlineformset_factory
#Third Party apps imports

#Imports local apps
from .models import Menu, MenuItems, UserSelectedLunch, Subscribers

class MenuForm(forms.ModelForm):
	day = forms.DateField(label='Menu date', input_formats=['%d-%m-%Y'])

	class Meta:
		model = Menu
		fields = '__all__'

MenuItemsFormSet = inlineformset_factory(Menu, MenuItems, fields=('name','menu',))

class MenuSelectForm(forms.ModelForm):

	class Meta:
		model = UserSelectedLunch
		fields = '__all__'

class SubscribersForm(forms.ModelForm):

	class Meta:
		model = Subscribers
		fields = '__all__'