Exemplo n.º 1
0
 def get_context_data(self, **kwargs):
     context = super().get_context_data(**kwargs)
     form = forms.QueryForm()
     form.fields['q'].widget.attrs['placeholder'] = 'Type a tag !'
     form.fields['q'].label = ''
     context['form'] = form
     return context
Exemplo n.º 2
0
def index(request):
    number_series = models.MathematicalObject.objects.count()
    form = forms.QueryForm()
    form.fields['q'].widget.attrs[
        'placeholder'] = 'Type any series or product in LaTeX !'
    form.fields['q'].label = ''
    return render(request, "front/index.html", {
        'number_series': number_series,
        'form': form
    })