Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/f/e/feincms-gallery-1.1.3/gallery/admin.py   feincms-gallery(Download)
class ThumbnailForm(forms.Form):
    id = forms.ModelChoiceField(
        queryset=MediaFile.objects.filter(type='image')
    )
    width = forms.IntegerField(min_value=0)
class MediaFileAdminForm(forms.ModelForm):
    mediafile = forms.ModelChoiceField(queryset=MediaFile.objects.filter(type='image'),
                                widget=MediaFileWidget(attrs={'class': 'image-fk'}), label=_('media file'))
    class Meta:
        model = GalleryMediaFile
                category = form.cleaned_data['category']
                count = 0
                mediafiles = MediaFile.objects.filter(categories=category)
                for gallery in queryset:
                    for mediafile in mediafiles: