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

Public Member Functions

def __init__ (self, units, start, stop, length=None, on_update=None)
 
def set (self, start, stop, length=None, units="bytes")
 
def unset (self)
 
def to_header (self)
 
def __nonzero__ (self)
 
def __str__ (self)
 
def __repr__ (self)
 

Data Fields

 on_update
 

Static Public Attributes

 units
 
 start
 
 stop
 
 length
 

Detailed Description

Represents the content range header.

.. versionadded:: 0.7

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  units,
  start,
  stop,
  length = None,
  on_update = None 
)

Member Function Documentation

◆ __nonzero__()

def __nonzero__ (   self)

◆ __repr__()

def __repr__ (   self)

◆ __str__()

def __str__ (   self)

◆ set()

def set (   self,
  start,
  stop,
  length = None,
  units = "bytes" 
)
Simple method to update the ranges.

◆ to_header()

def to_header (   self)

◆ unset()

def unset (   self)
Sets the units to `None` which indicates that the header should
no longer be used.

Field Documentation

◆ length

length
static

◆ on_update

on_update

◆ start

start
static

◆ stop

stop
static

◆ units

units
static

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