redirect
konigle.models.website.redirect
¶
BaseRedirect
¶
Redirect
¶
RedirectCreate
¶
RedirectUpdate
¶
Bases: UpdateModel
Model for updating redirect resources.
path = Field(default=None)
class-attribute
instance-attribute
¶
Source path for the redirect.
permanent = Field(default=None)
class-attribute
instance-attribute
¶
Whether the redirect is permanent (HTTP 301) or temporary (HTTP 302).
target = Field(default=None)
class-attribute
instance-attribute
¶
Target path for the redirect.
validate_redirect_path(v)
¶
Validate that the redirect path starts with a slash.
validate_redirect_target(v)
¶
Validate that the redirect target is a valid URL or path.