Return to Snippet

Revision: 22945
at January 26, 2010 09:55 by magicrebirth

Initial Code
from django import forms
from django.contrib.admin import widgets

class ScheduleAdminForm(forms.ModelForm):

    profiles = forms.ModelMultipleChoiceField(
                widget = widgets.FilteredSelectMultiple('Profiles',False),
                queryset = Profile.active_objects.all(),
                help_text = "this doesn't show. bummer.")

    class Meta:
        model = Schedule

class ScheduleAdmin(admin.ModelAdmin):

    form = ScheduleAdminForm, ScheduleAdmin)

Initial URL

Initial Description

Initial Title
modify django admin field to use specific queryset and form widget

Initial Tags
form, django

Initial Language