Basic form for adding a version. Still needs: * Check of slug uniqueness * Choose between author user or author name * slug auto-creation * ingredients TODO: * Add recipe
10 lines
245 B
Python
10 lines
245 B
Python
from django.forms import ModelForm, BooleanField
|
|
from .models import Recipe, Version, Ingredient
|
|
|
|
class VersionForm(ModelForm):
|
|
class Meta:
|
|
model = Version
|
|
fields = ['label', 'slug', 'body']
|
|
|
|
# use_author_user = BooleanField(initial=True)
|