コード例 #1
0
ファイル: forms.py プロジェクト: DirectEmployers/MyJobs
 def __init__(self, *args, **kwargs):
     super(PageForm, self).__init__(*args, **kwargs)
     self.fields['head'].initial = models.raw_base_head(self.Meta.model)
     # without this, we get two options for ''. Setting blank=False on the
     # model also gets rid of the second option, but means that the blank
     # opton can never be chosen
     doc_type = self.fields['doc_type']
     language_code = self.fields['language_code']
     doc_type.choices = doc_type.choices[1:]
     language_code.choices = language_code.choices[1:]
コード例 #2
0
ファイル: forms.py プロジェクト: supervisitor20/MyJobs
 def __init__(self, *args, **kwargs):
     super(PageForm, self).__init__(*args, **kwargs)
     self.fields['head'].initial = models.raw_base_head(self.Meta.model)
     # without this, we get two options for ''. Setting blank=False on the
     # model also gets rid of the second option, but means that the blank
     # opton can never be chosen
     doc_type = self.fields['doc_type']
     language_code = self.fields['language_code']
     doc_type.choices = doc_type.choices[1:]
     language_code.choices = language_code.choices[1:]
コード例 #3
0
ファイル: forms.py プロジェクト: AstroMatchDynamics/MyJobs
 def __init__(self, *args, **kwargs):
     super(BlockForm, self).__init__(*args, **kwargs)
     self.fields['template'].initial = models.raw_base_template(self.Meta.model)
     self.fields['head'].initial = models.raw_base_head(self.Meta.model)
コード例 #4
0
ファイル: forms.py プロジェクト: AstroMatchDynamics/MyJobs
 def __init__(self, *args, **kwargs):
     super(PageForm, self).__init__(*args, **kwargs)
     self.fields['head'].initial = models.raw_base_head(self.Meta.model)
コード例 #5
0
ファイル: forms.py プロジェクト: supervisitor20/MyJobs
 def __init__(self, *args, **kwargs):
     super(BlockForm, self).__init__(*args, **kwargs)
     self.fields['template'].initial = models.raw_base_template(
         self.Meta.model)
     self.fields['head'].initial = models.raw_base_head(self.Meta.model)
     autofocus_input(self)