# model email = models.EmailField(max_length=75, blank=True) def emailname(self): email = self.email.rpartition('@') return email[0] def emailserver(self): emailserver = self.email.rpartition('@') return emailserver[2] # template {% if object.email %} <script type="text/javascript"> emailname = "{{ object.emailname }}"; emailserver = "{{ object.emailserver }}"; document.write("<a href=\'mailto:" + emailname + "@" + emailserver + "\'>" + emailname + "@" + emailserver + "</a>"); </script> {% endif %} # browser name@server.com