I have a page called view_requests.html
. One one tab on the page, I'd like to have basically a list of objects reddit style that people can upvote. I accomplished this using django-voting
.
However, on a second tab, I would like the ability to add a request. This requires that I have a form that people can submit.
The problem I'm facing is that to implement the Reddit style voting, I had to use the following configuration in my URLs.py (ie. not create my own view for it in views.py). But to create a form, I need to access some code I wrote in views.py. Is it possible to have both on the same page in separate tabs, and how would I go about doing this?
url(r'^view_requests/?$', object_list, dict(queryset=LibraryRequest.objects.all(),
template_object_name='request', template_name='spicemodels/view_requests.html',
paginate_by=15, allow_empty=True), name="view_requests"),