Utils Urls

inyoka.utils.urls

This module implements unicode aware unicode functions. It also allows to build urls for different subdomains using the href function.

copyright:
  1. 2007-2024 by the Inyoka Team, see AUTHORS for more details.

license:

BSD, see LICENSE for more details.

inyoka.utils.urls.href(_module='portal', *parts, **query)

Generates an internal URL for different subdomains.

inyoka.utils.urls.is_safe_domain(url)

Check whether url points to the same host as inyoka

Return True if the url is a safe redirection (i.e. it doesn’t point to a different host and uses a safe scheme). Always returns False on an empty url.

inyoka.utils.urls.url_for(obj, action=None, **kwargs)

Get the URL for an object. As we are not using django contrib stuff any more this method is not useful any more but no it isn’t because django does ugly things with get_absolute_url so we have to do that.