Django: Get Current Site & Display It


/ Published in: Python
Save to your folder(s)

In template: http://{{ site.domain }}


Copy this code and paste it in your HTML
  1. from django.contrib.sites.models import Site
  2. Site.objects.get_current()

URL: http://docs.djangoproject.com/en/dev/ref/contrib/sites/

Report this snippet


Comments


You need to login to view comments.