17 lines
439 B
Python
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'] |