tcms.core.contrib.linkreference.views module


Add new link to a specific target

The target should be a valid model within TCMS, which are documented in LINKREF_TARGET.

Incoming request should be a POST request, and contains following arguments:

  • target: To which the new link will link to. The available target names are documented in the LINKREF_TARGET.
  • target_id: the ID used to construct the concrete target instance, to which the new link will be linked.
  • name: a short description to this new link, and accept 64 characters at most.
  • url: the actual URL.
tcms.core.contrib.linkreference.views.remove(_request, link_id)[source]

Remove a specific link with ID link_id


Create a link reference to an object. data is a dict with the following keys:

  • name (str) – name of the reference
  • url (str) – URL
  • target_id (int) – PK of the object we link to

Data suitable for JSON response to clients

Return type: