Coverage for wagtailsharing/models.py : 90%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
related_name='sharing_site')
self.hostname + ('' if self.port == 80 else (':%d' % self.port)) )
def find_for_request(cls, request): """ Find a shared site associated with this HTTP request object. Raises Raises SharingSite.DoesNotExist if no appropriate sharing site exists.
Uses request hostname and port to find matching sharing site. """
def root_url(self): elif self.port == 443: return 'https://{}'.format(self.hostname) else: return 'http://{}:{:d}'.format(self.hostname, self.port) |