Commit 55b3c575 authored by fred's avatar fred

use relative imports for models

parent 9512f287
......@@ -16,7 +16,7 @@ def maybe_resize(image_path):
def whatsonair():
from models import Diffusion, Schedule, Nonstop
from .models import Diffusion, Schedule, Nonstop
now = datetime.now()
# get program of today minus a few hours, as radio days are not from
......@@ -55,7 +55,7 @@ def whatsonair():
def period_program(date_start, date_end, prefetch_sounds=True,
prefetch_categories=True, include_nonstop=True):
from models import Diffusion, Schedule, Nonstop, WeekdayMixin, SoundFile, Absence
from .models import Diffusion, Schedule, Nonstop, WeekdayMixin, SoundFile, Absence
diffusions = Diffusion.objects.select_related().filter(
datetime__range=(date_start, date_end)).order_by('datetime')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment