Views

These are all the views included in this app.

spotnet.views.search(request[, search=None[, cats=None[, scats=None]]])

Show a list of posts. Filter by passing the optional arguments.

spotnet.views.viewpost(request, id)

Show a single post.

spotnet.views.download(request, id[, dls=None])

Download a post using a download server. Pass a downloadserver name, or it will the default download server.

spotnet.views.downloaded(request)

Show the list of all downloaded posts.

spotnet.views.download_nzb(request, id)

Download the nzb file for a spot.

spotnet.views.update(request)

Start updating the spot database. This only works if you set the optional setting SPOTNET_UPDATE_ALLOW_INPAGE to True.

Helpers

spotnet.views.view_related_post_list(request, objects, page, title[, extra_actions={}])

This is a helper function that other views can call to show a list of model instances that have a foreign key to a spotnet post.

The view downloaded uses this helper. View the source for details on how to use this.

Parameters:
  • request – the HttpRequest object
  • objects – the queryset for a model that has a ForeignKey field to the spotnet Post model called post
  • page – the page number in the paginator
  • title – the title string for this page
  • extra_actions – a dict mapping action names to Action instances that can be applied to the related objects