Show the available document attributes during document indexing setup form
This commit is contained in:
@@ -2,6 +2,9 @@ from __future__ import absolute_import
|
|||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
|
||||||
|
from common.classes import ModelAttribute
|
||||||
|
from documents.models import Document
|
||||||
|
|
||||||
from .models import Index, IndexTemplateNode
|
from .models import Index, IndexTemplateNode
|
||||||
|
|
||||||
|
|
||||||
@@ -22,6 +25,7 @@ class IndexTemplateNodeForm(forms.ModelForm):
|
|||||||
super(IndexTemplateNodeForm, self).__init__(*args, **kwargs)
|
super(IndexTemplateNodeForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['index'].widget = forms.widgets.HiddenInput()
|
self.fields['index'].widget = forms.widgets.HiddenInput()
|
||||||
self.fields['parent'].widget = forms.widgets.HiddenInput()
|
self.fields['parent'].widget = forms.widgets.HiddenInput()
|
||||||
|
self.fields['expression'].help_text = ' '.join([unicode(self.fields['expression'].help_text), ModelAttribute.help_text_for(Document, type_names=['indexing'])])
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = IndexTemplateNode
|
model = IndexTemplateNode
|
||||||
|
|||||||
Reference in New Issue
Block a user