Template tag to create mailto links with options
A {% mailto %}{% endmailto %} template tag that requires an e-mail destination and optionally accepts subject, cc and bcc. It will then wrap whatever is within the tag in an `<a href="mailto:..."> </a>` HTML tag. See the docstring in the code for the {% mailto %} usage and some examples. You will need to load this template tag to your template. You can find detailed instructions [here](http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#code-layout). But in a nutshell: 1. Create a templatetags package (meaning a directory with a __init__.py file in it) on the same level as your application's model.py 2. Put the code for this tag in a module (example: extra_tags.py) 3. On your template use {% load extra_tags %} -- note: the app where the templatetags package was created needs to be in INSTALLED_APPS 4. Use {% mailto user.email 'You subject here for {{user.get_full_name}}' %}blah{% endmailto %} This is my first django template tag. I am also NOT tremendously experienced with Python. Criticism and corrections are more than welcome.
- template
- tag
- templatetag
- mailto