# {{ app_name }} - views.py
# (c) cavaliba.com



from app_home.log import DEBUG, log
from app_data.aaa import start_view
from django.shortcuts import redirect, render

# -----------

# return redirect("anonymous")
# context={}
# return render(request, '{{ app_name }}/index.html', context)

# log(DEBUG, aaa=aaa, app="log", view="private", action="list", status="OK", data="")


# -----------------------------------------
# index - public page
#-----------------------------------------
# def index(request):

# 	context={}
# 	return render(request, '{{ app_name }}/index.html', context)


# def anonymous(request):

#     context={}
#     return render(request, '{{ app_name }}/anonymous.html', context)


def private(request):

    context = start_view(request, app="xxxxxxx", view="private", noauth="app_sirene:index", perm="pxxxx", noauthz="app_sirene:index")
    if context["redirect"]:
        return redirect(context["redirect"])
    aaa = context["aaa"]



    log(DEBUG, aaa=aaa, app="TEMPLATE", view="private", action="list", status="OK", data="")

    return render(request, '{{ app_name }}/private.html', context)



# def list(request):

#     context={}
#     return render(request, '{{ app_name }}/list.html', context)


# def detail(request):

#     context={}
#     return render(request, '{{ app_name }}/detail.html', context)


# edit
# new
# api
