Hi All,

I am working on custom admin interface form generation. I want to display
big amount of results (around 5k) as multiple choice field in django form.

I want to add search functionality and paginate my following
"ModelMultipleChoiceField" field of django form

so that results can be selected easily. Is it the right approch?
Here is my forms.py









*class ScheduledTestForm(forms.ModelForm):        tags =
forms.ModelMultipleChoiceField(queryset=Tag.objects.all())       class
Meta:        model = Test        exclude = ['pita_id', 'challenge',
'test_template']*

Here is my template.html :(partial code) :


{% block nav-global %}{% endblock %}
{% block content %}



*<form action="." method="post">        {% csrf_token %}        {{
form.as_p  }}        <input type="submit" value="Submit" />*
    </form>
{% endblock %}
_______________________________________________
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers

Reply via email to