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

Public Member Functions

def __init__ (self, subdomain, rules)
 
def get_rules (self, map)
 

Data Fields

 subdomain
 
 rules
 

Detailed Description

All URLs provided by this factory have the subdomain set to a
specific domain. For example if you want to use the subdomain for
the current language this can be a good setup::

    url_map = Map([
        Rule('/', endpoint='#select_language'),
        Subdomain('<string(length=2):lang_code>', [
            Rule('/', endpoint='index'),
            Rule('/about', endpoint='about'),
            Rule('/help', endpoint='help')
        ])
    ])

All the rules except for the ``'#select_language'`` endpoint will now
listen on a two letter long subdomain that holds the language code
for the current request.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  subdomain,
  rules 
)

Member Function Documentation

◆ get_rules()

def get_rules (   self,
  map 
)
Subclasses of `RuleFactory` have to override this method and return
an iterable of rules.

Reimplemented from RuleFactory.

Field Documentation

◆ rules

rules

◆ subdomain

subdomain

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