title: How can I refer to static variables across all of my HTML templates?
body: <p>I'm just learning Django and Python and want to be sure I'm doing things the right DRY way and I'm sure there's a MUCH easier way to do this...</p>
  
  <p>Right now, I have the following <code>base_template_tags.py</code> as it's own app (added into settings.py and loaded on the HTML template <code>{% load ... %}</code> that allows me to access the year as an HTML tag via <code>{% cd_year %}</code> and/or the email address as <code>{ cd_email }</code>.  It works... but it's a hack.</p>
  
  <p>Is there a better way?</p>
  
  <pre><code>from datetime import datetime
  from django import template
  
  register = template.Library()
  
  @register.simple_tag
  def current_time(format_string):
      return datetime.datetime.now().strftime(format_string)
  
  @register.simple_tag
  def cd_year():
      return datetime.now().year
  
  @register.simple_tag
  def cd_email():
      return 'pp@pp.com'
  </code></pre>