Commit 37ca7227 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Removed weird serverurl variable in favour of dynamic access

parent a122202a
......@@ -27,7 +27,10 @@ class URL( models.Model ):
ordering = ['short']
def get_absolute_url(self):
return "%s/%s" % (settings.SERVERURL, self.short)
from django.contrib.sites.models import Site
current_site = Site.objects.get_current()
site_url = current_site.domain
return "%s/%s" % (site_url, self.short)
@staticmethod
def generate_valid_short():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment