django-route’s models¶
Router¶
-
class
django_route.models.
Router
(id, code, source, rank, action, condition, description, is_active)¶ Parameters: - code (SlugField) – Code name for the router. Can be used as variable value inside append_params using {route_code}.
- source (CharField) – Source path
- rank (PositiveSmallIntegerField) – Lower the value higher is it’s preference
- action (CharField) – Path to be followed from source to destination. One of 301/302/proxy
- condition (TextField) – Condition for routing decision
- description (TextField) – Description for router
- is_active (BooleanField) – Active
Destination¶
-
class
django_route.models.
Destination
(id, weight, url, router, carry_params, append_params, is_active)¶ Parameters: - weight (PositiveSmallIntegerField) – Higher the value higher is it’s preference
- url (CharField) – Url
- router_id (ForeignKey) – Router
- carry_params (BooleanField) – Carry forward url params
- append_params (CharField) – Params to be appended
- is_active (BooleanField) – Active