JS-P04/app/forms.py
Kacper Donat 3a649df550 Whole app
2020-06-08 22:46:01 +02:00

17 lines
439 B
Python

from django import forms
from .models import Photo, Album
class PhotoForm(forms.ModelForm):
class Meta:
model = Photo
fields = ['title', 'photo', 'description', 'taken_on']
class PhotoEditForm(forms.ModelForm):
class Meta:
model = Photo
fields = ['title', 'description', 'taken_on']
class AlbumForm(forms.ModelForm):
class Meta:
model = Album
fields = ['title', 'description']