pandora/pandora/archive/forms.py
j 45798810a9 - rework file/upload handling, no more extras
- cleanup imdb data, get from external data service
- rename filesview
2011-10-15 17:21:41 +02:00

34 lines
793 B
Python

from ajax_filtered_fields.forms import ForeignKeyByLetter
from django.conf import settings
from django import forms
import models
from item.models import Item
ajax_filtered_js = (
settings.ADMIN_MEDIA_PREFIX + "js/SelectBox.js",
settings.ADMIN_MEDIA_PREFIX + "js/SelectFilter2.js",
settings.STATIC_URL + 'js/jquery/jquery.js',
settings.STATIC_URL + 'js/ajax_filtered_fields.js',
)
class FileAdminForm(forms.ModelForm):
item = ForeignKeyByLetter(Item, field_name='itemId')
class Meta:
model = models.File
class Media:
js = ajax_filtered_js
class InstanceAdminForm(forms.ModelForm):
file = ForeignKeyByLetter(models.File, field_name='path')
class Meta:
model = models.Instance
class Media:
js = ajax_filtered_js