'''
Created on 12-10-2011

@author: lennyn
'''

import urlparse
from django.template import Library
from django.template.defaulttags import URLNode, url
from bibmate.settings import ROOT_URL, STATIC_URL, LOGO_URL
from bibmate.helpers.publist_utils import get_domain
from django.core.urlresolvers import reverse
from urlparse import urlparse

import bibmate.settings as settings

register = Library()

@register.simple_tag
def domain_url():
    return get_domain(settings.ROOT_URL)
    #~ parse = urlparse(settings.ROOT_URL)
    #~ domain = parse.netloc
    #~ if parse.scheme:
        #~ domain = parse.scheme + '://' + domain
    #~ return domain
