browser.interfaces - Browser Interfaces¶
Interfaces for viewing components.
-
interface
waeup.kofa.browser.interfaces.
IBreadcrumb
[source]¶ Provide breadcrumbs.
-
viewname
¶ The viewname, for which the breadcrumb is provided.
-
parent
¶ The parent object.
-
title
¶ Context description
-
parent_viewname
¶ The viewname of the parent to use.
-
context
¶ The context of the breadcrumb.
-
target
¶ The link target.
-
-
interface
waeup.kofa.browser.interfaces.
IBreadcrumbContainer
[source]¶ A container of breadcrumbs.
-
getList
()¶ Get the list of breadcrumbs as real Python list.
-
__iter__
()¶ Allow iteration over the container.
-
-
interface
waeup.kofa.browser.interfaces.
IBreadcrumbIgnorable
[source]¶ A marker interface for breadcrumbs that should be skipped in output.
If a breadcrumb wants to be skipped in real output (for instance, because it is set on a layer in site hierarchy that should not be accessed by users), it can also provide this interface. The getBreadcrumbList() function defined here will exclude IIgnorables by default.
-
interface
waeup.kofa.browser.interfaces.
ICaptcha
[source]¶ -
verify
(request)¶ Verify data entered in an HTTP request.
Expects some IHTTPRequest object and returns an ICaptchaResponse indicating that the solution was correct or not.
If the solution could not be verified (this might also happen because of technical reasons), the response might contain an error code.
-
-
interface
waeup.kofa.browser.interfaces.
ICaptchaConfig
[source]¶ Any type of captcha might need some configuration data.
By default we require no configuration data.
-
interface
waeup.kofa.browser.interfaces.
ICaptchaManager
[source]¶ A chooser that collects available captchas.
-
getCaptcha
()¶ Get captcha chosen for a certain site or default.
-
getAvailCaptchas
()¶ Return a dict of available captchas with registered names as keys.
-
-
interface
waeup.kofa.browser.interfaces.
ICaptchaRequest
[source]¶ A set of data required to verify captcha solutions.
To solve a captcha we need at least a solution. Many types of captchas might also need a challenge to compare whether the solution is correct.
-
challenge
¶ The challenge the solution might match
-
solution
¶ Solution string a user entered
-
-
interface
waeup.kofa.browser.interfaces.
ICaptchaResponse
[source]¶ A formalized response for captcha solutions.
-
is_valid
¶ Indicates validity of entered captcha data.
-
error_code
¶ Error when trying to validate entered captcha data.
Error codes are not expected to be readable strings.
-
-
interface
waeup.kofa.browser.interfaces.
IChangePassword
[source]¶ Extends:
waeup.kofa.interfaces.IKofaObject
Interface needed for change pasword page.
-
identifier
¶ Unique Identifier
User Name, Student or Applicant Id, Matriculation or Registration Number
-
email
¶ Email Address
-
-
interface
waeup.kofa.browser.interfaces.
IPDFCreator
[source]¶ A component that knows where logo graphics for PDFs are stored and can generate PDF documents.
It is a utility (and not a simple function or class) to make these data customizable in derived packages.
-
header_logo_path
¶ Path to header logo JPG
-
paint_background
(canvas, doc)¶ A callback function to render background of PDFs.
-
watermark_path
¶ Path to watermark logo JPG
-
create_pdf
(data, headerline=None, title=None, author=None, footer='', note=None, sigs_in_footer=[])¶ Create a PDF.
data is expected to be a list of reportlab flowables (paragraphs, images, tables, etc.), that will be rendered into some background.
headerline will be displayed in page head and title under the top bar.
note is optional HTML markup added at bottom of created document.
footer is the text rendered in the bottom line next to the page numbers.
sigs_in_footer is a set of translateable strings that will be rendered into signature boxes at bottom of each page.
If no headerline is given, a default will be rendered (name of university).
If no title is given, nothing will be rendered.
-
Extends:
waeup.kofa.interfaces.IKofaObject
Objects that provide student navigation should implement this interface.
Some student object that has a display_fullname attribute.