1 from django.forms import ModelForm
2 from models import Sandwich, Ingredient
3 from django.contrib.auth.models import User
4 from django import forms
7 class SandwichForm(ModelForm):
11 exclude = ('slug', 'user', 'ingredients')
12 fields = ('adjective', 'date_made', 'notes', 'picture')
15 class IngredientForm(ModelForm):
22 class NewUserForm(forms.Form):
23 first_name = forms.CharField()
24 last_name = forms.CharField()
25 email = forms.EmailField()
26 username = forms.CharField()
27 password = forms.CharField(widget=forms.PasswordInput)
28 confirm_password = forms.CharField(widget=forms.PasswordInput)