Esempio n. 1
0
 def get_short_url(self):
     site = Site.objects.get_current()
     return 'http://%s/%s' % (site.domain, dehydrate(self.id))
 def setUp(self):
     self.link = Link.objects.create_link('http://allissonazevedo.com/')
     self.url = reverse('shorturl_redirect_link', args=[dehydrate(self.link.id)])