def render(self, context): object = Variable(self.object).resolve(context) if not self.url: url = object.get_absolute_url() else: url = Variable(self.url).resolve(context) #Make sure the variable exists so we can add to it if not 'countthis' in context['request'].META: context['request'].META['countthis'] = [] #Add the object's path, model name, and id, each object is separated by a ; context['request'].META['countthis'].append("%s~%s~%s" % (url, ContentType.objects.get_for_model(object).pk, object.id)) return ''