Views

evesrp.views.index()[source]

The index page for EVE-SRP.

Login

evesrp.views.login.auth_method_login(auth_method)[source]

Trampoline for AuthMethod-specific views.

See Authmethod.view for more details.

evesrp.views.login.login()[source]

Presents the login form and processes responses from that form.

When a POST request is recieved, this function passes control to the appropriate login method.

evesrp.views.login.login_loader(userid)[source]

Pull a user object from the database.

This is used for loading users from existing sessions.

evesrp.views.login.logout()[source]

Logs the current user out.

Redirects to index().

Divisions

evesrp.views.divisions.add_division()[source]

Present a form for adding a division and also process that form.

Only accesible to adminstrators.

evesrp.views.divisions.get_division_details(division_id=None, division=None)[source]

Generate a page showing the details of a division.

Shows which groups and individuals have been granted permissions to each division.

Only accesible to administrators.

Parameters:division_id (int) – The ID number of the division
evesrp.views.divisions.list_transformers(division_id, attribute=None)[source]

API method to get a list of transformers for a division.

Parameters:
  • int (division_id) – the ID of the division to look up
  • str (attribute) – a specific attribute to look up. Optional.
Returns:

JSON

evesrp.views.divisions.modify_division(division_id)[source]

Dispatches modification requests to the specialized view function for that operation.

evesrp.views.divisions.permissions()[source]

Show a page listing all divisions.

evesrp.views.divisions.transformer_choices(attr)[source]

List of tuples enumerating attributes that can be transformed/linked. Mainly used as the choices argument to SelectField

Requests

class evesrp.views.requests.PayoutListing[source]

A special view made for quickly processing payouts for requests.

class evesrp.views.requests.PermissionRequestListing(permissions, statuses, title=None)[source]

Show all requests that the current user has permissions to access.

This is used for the various permission-specific views.

__init__(permissions, statuses, title=None)[source]

Create a PermissionRequestListing for the given permissions and statuses.

Parameters:
  • permissions (tuple) – The permissions to filter by
  • statuses (tuple) – A tuple of valid statuses for requests to be in
class evesrp.views.requests.PersonalRequests[source]

Shows a list of all personally submitted requests and divisions the user has permissions in.

It will show all requests the current user has submitted.

class evesrp.views.requests.RequestListing[source]

Abstract class for lists of Requests.

Subclasses will be able to respond to both normal HTML requests as well as to API requests with JSON.

decorators = [<function login_required at 0x7f213fd73a60>, <function varies.<locals>.vary_decorator at 0x7f213f3446a8>]

Decorators to apply to the view functions

dispatch_request(filters='', **kwargs)[source]

Returns the response to requests.

Part of the flask.views.View interface.

requests(filters)[source]

Returns a list Requests belonging to the specified Division, or all divisions if None.

Returns:Requests
Return type:iterable
template = 'requests_list.html'

The template to use for listing requests

class evesrp.views.requests.ValidKillmail(mail_class, **kwargs)[source]

Custom :py:class:’~.Field’ validator that checks if any Killmail accepts the given URL.

evesrp.views.requests.get_killmail_validators()[source]

Get a list of ValidKillmails for each killmail source.

This method is used to delay accessing current_app until we’re in a request context. :returns: a list of ValidKillmails :rtype list:

evesrp.views.requests.get_request_details(request_id=None, srp_request=None)[source]

Handles responding to all of the Request detail functions.

The various modifier functions all depend on this function to create the actual response content. Only one of the arguments is required. The srp_request argument is a conveniece to other functions calling this function that have already retrieved the request.

Parameters:
  • request_id (int) – the ID of the request.
  • srp_request (Request) – the request.
evesrp.views.requests.modify_request(request_id)[source]

Handles POST requests that modify Requests.

Because of the numerous possible forms, this function bounces execution to a more specific function based on the form’s “id_” field.

Parameters:request_id (int) – the ID of the request.
evesrp.views.requests.register_perm_request_listing(app, endpoint, path, permissions, statuses, title=None)[source]

Utility function for creating PermissionRequestListing views.

Parameters:
evesrp.views.requests.submit_request()[source]

Submit a Request.

Displays a form for submitting a request and then processes the submitted information. Verifies that the user has the appropriate permissions to submit a request for the chosen division and that the killmail URL given is valid. Also enforces that the user submitting this requests controls the character from the killmail and prevents duplicate requests.

evesrp.views.requests.url_for_page(pager, page_num)[source]

Utility method used in Jinja templates.