Files
Pinry/pinry/core/forms.py
Krzysztof Klimonda 53f05dbb6d A general project refactor
Removed pins django app, and moved code to the core. Moved user related
code out of core to the users app.
2013-03-03 04:47:34 -08:00

18 lines
384 B
Python

from django import forms
from django_images.models import Image
FIELD_NAME_MAPPING = {
'image': 'qqfile',
}
class ImageForm(forms.ModelForm):
def add_prefix(self, field_name):
field_name = FIELD_NAME_MAPPING.get(field_name, field_name)
return super(ImageForm, self).add_prefix(field_name)
class Meta:
model = Image
fields = ('image',)