示例#1
0
 def __init__(self, *args, **kwargs):
     search_results = kwargs.pop("search_results", [])
     super(AssignTopicToClustersForm, self).__init__(*args, **kwargs)
     self.fields['topic'] = forms.ChoiceField(choices=get_topics_options(),
                                              required=False)
     self.fields['selected_clusters'] = forms.MultipleChoiceField(
         label="Select clusters",
         choices=get_search_clusters(search_results),
         widget=forms.CheckboxSelectMultiple,
         required=False)
示例#2
0
class TopicClassificationForm(forms.Form):
    topic = forms.ChoiceField(choices=get_topics_options())
    model_name = forms.ChoiceField(choices=get_models_options())
示例#3
0
class GenerateSampleForm(forms.Form):
    filename = forms.CharField(max_length=25)
    topic = forms.ChoiceField(choices=get_topics_options())
示例#4
0
class AssignTopicFromFileForm(forms.Form):
    topic = forms.ChoiceField(choices=get_topics_options())
    file = forms.FileField()
示例#5
0
class TopicsForm(forms.Form):
    tree_name = forms.CharField(max_length=25)
    topic = forms.ChoiceField(choices=get_topics_options())