django_crucrudile.routes
A route is an implementation of the django_crucrudile.entities.Entity
abstract class that yields URL patterns made from its attributes. In the code, this is represented by subclassing django_crucrudile.entities.Entity
and providing a generator in patterns()
, yielding URL patterns made from the route attributes. When route classes provide django_crucrudile.entities.Entity.patterns
, it makes them become concrete implementations of the Entity abstract class. Route classes themselves are abstract by nature and need a definition of the abstract function base.BaseRoute.get_callback
.
CallbackRoute
: Implementsbase.BaseRoute
usingmixins.callback.CallbackMixin
that provides an implementation ofbase.BaseRoute.get_callback
that returns the callback set on the route (either inCallbackRoute.__init__
or as class attribute)ViewRoute
: Implementsbase.BaseRoute
usingmixins.view.ViewMixin
that provides an implementation ofbase.BaseRoute.get_callback
that returns the a callback obtaining from the view class set on the route (either inmixins.view.ViewMixin.__init__
or as class attribute).ModelViewRoute
: Implementsbase.BaseRoute
usingmixins.view.ViewMixin
andmixins.model.ModelMixin
, passes the model in the view keyword arguments, and can be used with Django generic views.
django_crucrudile.routes.base
django_crucrudile.routes.mixins
django_crucrudile.routes.mixins.arguments
django_crucrudile.routes.mixins.arguments.ArgumentsMixin
django_crucrudile.routes.mixins.arguments.parser
django_crucrudile.routes.mixins.model
django_crucrudile.routes.mixins.callback
django_crucrudile.routes.mixins.view
django_crucrudile.routes
django_crucrudile.routes.CallbackRoute
django_crucrudile.routes.ViewRoute
django_crucrudile.routes.ModelViewRoute