If using SafeFileField in model.py, I cannot make using the meta label dictionary override the default label on the rendered form. It works correctly with FileField. Code snippets follow:
models.py -
from safe_filefield.models import SafeFileField
class Quote(models.Model):
jobfile = SafeFieldField(upload_to='blah/', blank=True, allowed_extensions=(pdf))
forms.py -
class QuoteForm(ModelForm):
class meta:
model = Quote
fields = ('jobfile',)
labels = { 'jobfile': 'Job File', }
The resulting label is 'Jobfile' when using SafeFieldField and 'Job File' when using FileField.
If using SafeFileField in model.py, I cannot make using the meta label dictionary override the default label on the rendered form. It works correctly with FileField. Code snippets follow:
models.py -
from safe_filefield.models import SafeFileField class Quote(models.Model): jobfile = SafeFieldField(upload_to='blah/', blank=True, allowed_extensions=(pdf))
forms.py - class QuoteForm(ModelForm): class meta: model = Quote fields = ('jobfile',) labels = { 'jobfile': 'Job File', }
The resulting label is 'Jobfile' when using SafeFieldField and 'Job File' when using FileField.