def get_media_path(self, filename):
    pages = self.placeholder.page_set.all()
    if pages.count():
        return pages[0].get_media_path(filename)
    else:
        today = date.today()
        return os.path.join(get_cms_setting('PAGE_MEDIA_PATH'), str(today.year), str(today.month), str(today.day), filename)
def get_media_path(self, filename):
    pages = self.placeholder.page_set.all()
    if pages.count():
        return pages[0].get_media_path(filename)
    else:
        today = date.today()
        return os.path.join(get_cms_setting('PAGE_MEDIA_PATH'), str(today.year), str(today.month), str(today.day), filename)