def render(self, context): try: value = self.domain.resolve(context) context[self.varname] = Target.get_or_create_object(value) except template.VariableDoesNotExist: pass return ''
def mywot_scorecard(url): ''' Return the MyWOT Scorecard for the specified domain. ''' ## return the mywot scorecard of the extracted domain target = Target.get_or_create_object(url) return render_to_string( 'mywot/mywot_scorecard.html', { 'target':target }, )