Welcome to django-any-urlfield’s documentation!

The any_urlfield module provides an improved URL selector that supports both URLs to internal models and external URLs.

This addresses is a common challenge in CMS interfaces; where providing a URLField makes it hard to enter internal URLs, while providing a ModelChoiceField makes it too inflexible.

AnyUrlField, with external URL input.
AnyUrlField, with internal page input.

Relevant public classes:

  • Model fields:
  • AnyUrlField: allow users to choose either a model or external link as URL value
  • Form widget rendering:

Indices and tables