# -*- coding: utf-8 -*-

from __future__ import division

from django.conf import settings
from django.shortcuts import render
from django_logit import logit

from group.models import GroupPhotoInfo


@logit
def group_detail(request, group_id):
    return render(request, 'page/kodo_user_{}_download.html'.format('ios' if request.iOS else 'adr'), {})


@logit
def group_photo_detail(request, photo_id):
    photo = GroupPhotoInfo.objects.get(photo_id=photo_id)
    return render(request, 'photo/photo_detail.html', {'photo_url': photo.photo_url, 'api_domain': settings.API_DOMAIN})


@logit
def tgu_group_detail(request, admin_id):
    return render(request, 'page/kodo_tourguide_{}_download.html'.format('ios' if request.iOS else 'adr'), {})


@logit
def tgu_group_user_detail(request, admin_id):
    return render(request, 'page/kodo_user_{}_download.html'.format('ios' if request.iOS else 'adr'), {})
