smisk.mvc.http

New in version 1.1.

HTTP support (status codes, etc)

exception smisk.mvc.http.HTTPExc
Wraps a HTTP status.
class smisk.mvc.http.Status(code, name, has_body=True, uses_template=True)

Represents a HTTP status.

is_error
service(app, *args, **kwargs)

Called when someone calls a HTTPExc object, wrapping this status.

This interface is compatible with the callables returned by routers. Mainly used by mvc.Application.error()

Parameters:
app : mvc.Application

The calling application

Return type:

dict

class smisk.mvc.http.Status300(code, name, has_body=True, uses_template=True)

Represents HTTP status 300, related to Content Negotiation.

service(app, url=None, *args, **kwargs)
class smisk.mvc.http.Status3xx(code, name, has_body=True, uses_template=True)

Represents HTTP status 301-307.

service(app, url=None, *args, **kwargs)
class smisk.mvc.http.Status404(code, name, has_body=True, uses_template=True)

Represents HTTP status 404.

service(app, description=None, *args, **kwargs)

Previous topic

smisk.mvc.helpers

Next topic

smisk.mvc.model — M in MVC

This Page

Quick search