1. kerzum
  2. cmsplugin-faq


tehfink  committed 5e1125e

added search fields, cleanup

  • Participants
  • Parent commits 13ac00c
  • Branches default

Comments (0)

Files changed (2)

File cmsplugin_faq/forms.py

View file
 from django.forms.models import ModelForm
-#from cms.plugins.text.models import Text
-from models import FaqEntry, FaqList
+from models import FaqEntry
 from django import forms
     class Meta:
         model = FaqEntry
         exclude = ('page', 'position', 'placeholder', 'language', 'plugin_type')
-#not needed because we're not allowing listing from other pages yet        
-#class FaqListForm(ModelForm):
-#    def __init__(self, *args, **kwargs):
-#        super(FaqListForm, self).__init__(*args, **kwargs)
-#        if self.instance:
-#            self.fields['cmspage'].queryset = FaqList.objects.filter(publisher_is_draft=True)

File cmsplugin_faq/models.py

View file
                               applied to allow editing in the
                               admin. Read/write.
+    search_fields = ('topic', 'body',)
     def __unicode__(self):
         return u"%s" % (truncate_words(self.topic, 5)[:30]+"...")