Commit 0f0d7db9 authored by Administrator's avatar Administrator

[Feature] Templates/models: adding help text, not working yet

parent 626182c9
......@@ -246,6 +246,7 @@ def add_corpus(request):
if request.method == 'POST':
# create a form instance and populate it with data from the request:
form = CorpusForm(request.POST, request.FILES)
print(form)
# check whether it's valid:
if form.is_valid():
node = form.save()
......
......@@ -64,7 +64,7 @@ class Node(CTENode):
metadata = hstore.DictionaryField(blank=True)
resource = models.ManyToManyField(Resource, blank=True)
ngrams = models.ManyToManyField(Ngram, blank=True)
ngrams = models.ManyToManyField(Ngram, blank=True, help_text="Hold down")
def __str__(self):
......
......@@ -69,9 +69,11 @@
</div>
<div class="fieldWrapper">
<label for="id_ngrams">Ngrams :</label>
<label for="id_ngrams">{{ form.ngrams.label }}</label>
<p>
{{ form.ngrams.errors }}
<p>{{ form.ngrams }}</p>
{{ form.ngrams.help_text }}
{{ form.ngrams }}</p>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment