1#!/usr/bin/env python3
 2
 3"""Present the PUS definition objects in a Django web interface."""
 4
 5import urllib
 6
 7from chart.project import settings
 8
 9def browse_packetdef_url(self):
10    """Return a URL to a page describing this packetdef."""
11    from django.urls import reverse
12    url = urllib.parse.urlparse(settings.CHART_WEB)
13    return '{scheme}://{loc}{local}'.format(
14        scheme=url.scheme,
15        loc=url.netloc,
16        local=reverse('db:packet', kwargs={'packet_name': self.name}))