Hi,
I have a Field class for attachments and I would like to rename the
attachment after upload. This class inherits from models.ImageField.
The problem is that in field method save_file() and _save() all values
pointing to ID are None.
new_object['id'] is None and instance._get_pk_val() is None
Hi group,
another question. Is there a way how to pass an information to markup that a
form field is required?
I have this form with one field, which is required (default value).
class CustomForm(forms.Form):
age = forms.ChoiceField(label='Age', choices=AGE_CHOICES)
{{ form.as_table}}
Hi group,
I have a form (from newforms) with choices
# Assume these are key-value pairs
AGE_CHOICES=(
(1, '0-3'),
(2, '3-6'),
(3, '6-15'),
)
class CustomForm(forms.Form):
age = forms.ChoiceField(label='Age', choices=AGE_CHOICES)
How can I get the value (not the key) of the age
3 matches
Mail list logo