Changeset 305c6d0


Ignore:
Timestamp:
Jun 24, 2011 9:55:54 AM (3 years ago)
Author:
yomguy <yomguy@…>
Branches:
master, crem, crem2, crem3, dev, dev2, diadems, dj1.6, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, forma, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, search, security, server, social, storage, telecaster, test, video
Children:
66bbeee
Parents:
83c03be
git-author:
yomguy <yomguy@…> (24/06/2011 09:55:54)
git-committer:
yomguy <yomguy@…> (24/06/2011 09:55:54)
Message:

fix dc domain with site.domain parsing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • telemeta/models/dublincore.py

    r3805de7 r305c6d0  
    3535from telemeta.models.core import Duration 
    3636from telemeta.models.media import MediaItem, MediaCollection 
     37from django.contrib.sites.models import Site 
    3738from django.conf import settings 
    3839 
     
    141142 
    142143def media_identifier(media): 
    143     return 'http://' + settings.TELEMETA_OAI_HOST + '/' + media.element_type + 's/' + unicode(media.id) 
     144    sites = Site.objects.all() 
     145    domain = sites[0].domain 
     146    return 'http://' + domain + '/' + media.element_type + 's/' + unicode(media.id) 
    144147 
    145148def express_collection(collection): 
Note: See TracChangeset for help on using the changeset viewer.