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()


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.