You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This package provides the both of both worlds.
For more details, see the documentation at Read The Docs.
Screenshot
Installation
First install the module, preferably in a virtual environment:
Now, the AnyUrlField offers users a dropdown field to directly select an article.
The default field is a django.forms.models.ModelChoiceField field
with a django.forms.widgets.Select widget.
This can be customized using the form_field and widget parameters:
That will display the Article model as raw input field with a browse button.
Contributing
This module is designed to be generic. In case there is anything you didn't like about it,
or think it's not flexible enough, please let us know. We'd love to improve it!
If you have any other valuable contribution, suggestion or idea,
please let us know as well because we will look into it.
Pull requests are welcome too. :-)
About
An improved URL selector to choose between internal models and external URLs