Sfoglia il codice sorgente

Change position and label of upload field.

tags/v0.4.0
Isaac Bythewood 12 anni fa
parent
commit
4ee8d3239d
1 ha cambiato i file con 11 aggiunte e 1 eliminazioni
  1. +11
    -1
      pinry/pins/forms.py

+ 11
- 1
pinry/pins/forms.py Vedi File

@@ -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


Caricamento…
Annulla
Salva