Commits

Philippe Marichal committed aeef943

Added 'tweet this' tweeter button

Comments (0)

Files changed (1)

 from django.views.generic import date_based, list_detail
 from django.http import Http404, HttpResponseRedirect
 from django.contrib.auth import REDIRECT_FIELD_NAME
+from django.contrib.sites.models import Site
 
 from blog.models import Entry, Category
 
     user is not anonymous.
     
     """
+    if "extra_context" in kwargs:
+        kwargs["extra_context"]["site_url"] = Site.objects.get_current().domain
+    else:
+        kwargs["extra_context"] = { "site_url": Site.objects.get_current().domain }
     entry = get_object_or_404(Entry, slug__exact=slug, 
                                 pub_date__year=year,
                                 pub_date__month=month,