A Python library providing a declarative way to build URL patterns for Django models, similar to Django REST Framework's reverse patterns but more general. Current version 2.0.3, with a focus on simplicity and type safety. Release cadence is low; the library is in maintenance mode.
pip install urlmanVerified import paths — ran on the pinned version, not inferred.
Define URL patterns as a nested Urls class on your Django model.
Update imports to 'from urlman import Urls'.
Remove 'name' argument; use the method name as the URL name.
Define methods that return strings; they are automatically treated as properties by urlman.
Define 'class urls(Urls):' inside your model, not 'class Urls(Urls):'.
Use inst.urls.detail, not inst.urls().