from django.shortcuts import HttpResponse, get_object_or_404, render
from iconolab.models import Annotation
from django.http import Http404
from django.contrib.auth.decorators import login_required

@login_required
def index(request):
	print(request.user)
	return HttpResponse("<p>Home</p>");


def detail_annotation(request, pk):
	pass

def draw_fragment(request, pk):
	annotation = get_object_or_404(Annotation, pk=pk)
	return render(request, 'iconolab/fragment_draw.html', {'annotation': annotation})

def create_annotation(request):
	return render(request, 'iconolab/create_annotation.html')
	# reprendre les paths
	# reprendre le ratio
	pass

def edit_annotation(request, pk):
	pass