Looks like my email client screwed up the indentation.... I've added some 
indents...

random_media.py
-----------------------------
from django import template
from random import choice

register = template.Library()

def media_url():
    media_urls = ['site1.example.com', 'site2.example.com', 
'site3.example.com']
    return choice(media_urls)
register.simple_tag(media_url)


in some template
------------------
{% load random_media %}
{% media_url %}





====================================
Steven L Smith, Web Developer
Department of Information Technology Services
Nazareth College of Rochester
585-389-2085 begin_of_the_skype_highlighting              585-389-2085      
end_of_the_skype_highlighting | ssmit...@naz.edu
http://www.naz.edu/pub/~ssmith46
====================================

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to