Пример #1
0
	def __init__(self, *args, **kwargs):
		self.instance = kwargs.pop('instance', PackMember())
		super(PackMemberForm, self).__init__(*args, **kwargs)
		self.fields['member'] = ProductionField(
			initial=self.instance.member_id,
			# supertype='production',  # add this if we require pack members to be productions (not music or gfx)
		)
		self._meta = ModelFormOptions()  # required by BaseModelFormSet.add_fields. eww.
Пример #2
0
	def __init__(self, *args, **kwargs):
		self.instance = kwargs.pop('instance', SoundtrackLink())
		super(SoundtrackLinkForm, self).__init__(*args, **kwargs)
		self.fields['soundtrack'] = ProductionField(
			initial=self.instance.soundtrack_id,
			supertype='music',
			types_to_set=[ProductionType.objects.get(internal_name='music')],
		)
		self._meta = ModelFormOptions()  # required by BaseModelFormSet.add_fields. eww.
Пример #3
0
class PartyReleaseForm(forms.Form):
    production = ProductionField()
Пример #4
0
class PartyInvitationForm(forms.Form):
    production = ProductionField()
Пример #5
0
class BBStroForm(forms.Form):
    production = ProductionField()