Login

Tag "urlman"

Snippet List

URLMan serializer field for Django Rest Framework (DRF)

This snippet shows how to add a `url` field to your API objects, which will then show up as an object in your JSON output. As parameters, you can specify: - `urls`: A list of strings that exist on your URLMan class - `attribute`: The name of the URLMan class on your model, defaults to `"urls"` - `full`: If the full URLs including schema and hostname should be supplied, defaults to `True`

  • django-rest-framework
  • urlman
Read More

1 snippet posted so far.