Views¶
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.
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
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:
- 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 0x7f892ef359d8>, <function varies.<locals>.vary_decorator at 0x7f892e6286a8>]¶
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:
- 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: - app (flask.Flask) – The application to add the view to
- endpoint (str) – The name of the view
- path (str) – The URL path for the view
- permissions (tuple) – Passed to PermissionRequestListing.__init__()
- statuses (iterable) – Passed to PermissionRequestListing.__init__()
- 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.