mirror of
https://github.com/pinry/pinry.git
synced 2026-01-29 10:39:23 +01:00
Change position and label of upload field.
This commit is contained in:
@@ -5,7 +5,17 @@ from .models import Pin
|
||||
|
||||
class PinForm(forms.ModelForm):
|
||||
url = forms.CharField(label='URL', required=False)
|
||||
image = forms.ImageField(label='Upload', required=False)
|
||||
image = forms.ImageField(label='or Upload', required=False)
|
||||
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(forms.ModelForm, self).__init__(*args, **kwargs)
|
||||
self.fields.keyOrder = (
|
||||
'url',
|
||||
'image',
|
||||
'description',
|
||||
)
|
||||
|
||||
|
||||
def check_if_image(self, data):
|
||||
# Test file type
|
||||
|
||||
Reference in New Issue
Block a user