The index page for EVE-SRP.
Trampoline for AuthMethod-specific views.
See Authmethod.view for more details.
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.
Pull a user object from the database.
This is used for loading users from existing sessions.
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)¶
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)¶
API method to get a list of transformers for a division.
- int (division_id) – the ID of the division to look up
- str (attribute) – a specific attribute to look up. Optional.
Dispatches modification requests to the specialized view function for that operation.
Show a page listing all divisions.
List of tuples enumerating attributes that can be transformed/linked. Mainly used as the choices argument to SelectField
- class evesrp.views.requests.PayoutListing¶
A special view made for quickly processing payouts for requests.
- class evesrp.views.requests.PermissionRequestListing(permissions, statuses, title=None)¶
Show all requests that the current user has permissions to access.
This is used for the various permission-specific views.
- class evesrp.views.requests.PersonalRequests¶
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¶
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 0x7f24f72f3268>, <function varies.<locals>.vary_decorator at 0x7f24f671c400>]¶
Decorators to apply to the view functions
- dispatch_request(filters='', **kwargs)¶
Returns the response to requests.
Part of the flask.views.View interface.
Returns: Requests Return type: iterable
- template = 'requests_list.html'¶
The template to use for listing requests
- class evesrp.views.requests.ValidKillmail(mail_class, **kwargs)¶
Custom :py:class:’~.Field’ validator that checks if any Killmail accepts the given URL.
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)¶
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.
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)¶
Utility function for creating PermissionRequestListing views.
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)¶
Utility method used in Jinja templates.