OpenQuizz
Une application de gestion des contenus pédagogiques
Url Class Reference
Inheritance diagram for Url:
Collaboration diagram for Url:

Public Member Functions

def __init__ (self, endpoint=None, absolute=False, scheme=None, **kwargs)
 
def output (self, key, obj)
 
- Public Member Functions inherited from Raw
def __init__ (self, default=None, attribute=None)
 
def format (self, value)
 

Data Fields

 endpoint
 
 absolute
 
 scheme
 
- Data Fields inherited from Raw
 attribute
 
 default
 

Detailed Description

A string representation of a Url

:param endpoint: Endpoint name. If endpoint is ``None``,
    ``request.endpoint`` is used instead
:type endpoint: str
:param absolute: If ``True``, ensures that the generated urls will have the
    hostname included
:type absolute: bool
:param scheme: URL scheme specifier (e.g. ``http``, ``https``)
:type scheme: str

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  endpoint = None,
  absolute = False,
  scheme = None,
**  kwargs 
)

Member Function Documentation

◆ output()

def output (   self,
  key,
  obj 
)
Pulls the value for the given key from the object, applies the
field's formatting and returns the result. If the key is not found
in the object, returns the default value. Field classes that create
values which do not require the existence of the key in the object
should override this and return the desired value.

:exception MarshallingException: In case of formatting problem

Reimplemented from Raw.

Field Documentation

◆ absolute

absolute

◆ endpoint

endpoint

◆ scheme

scheme

The documentation for this class was generated from the following file: