Pretty nice commit overall, made the upload mechanic much more realistic and usable. Only thing left for the upload is the user id assignment. Check new ideas in discord.
This commit is contained in:
@ -1,9 +1,15 @@
|
||||
from django import forms
|
||||
from .models import Image
|
||||
from .models import Image, Videos
|
||||
|
||||
|
||||
class ImageForm(forms.ModelForm):
|
||||
"""Form for the image model"""
|
||||
class Meta:
|
||||
model = Image
|
||||
fields = ('image',)
|
||||
fields = ('title', 'image')
|
||||
|
||||
class VideoForm(forms.ModelForm):
|
||||
"""Form for the image model"""
|
||||
class Meta:
|
||||
model = Videos
|
||||
fields = ('title', 'video')
|
||||
|
Reference in New Issue
Block a user