#def editor(request): #now = datetime.datetime.now() #headers = request.headers #print("headers", headers) #request.headers['User-Agent'] #return JsonResponse({"status": "Kommunikation ok!", "sucess": "true", "time": now}) from django.http import HttpResponse from django.template import loader from django.http import JsonResponse import datetime import json import importlib from django.shortcuts import redirect import os import inspect import re import platform from summarize import summarize def creation_date(path_to_file): """ Try to get the date that a file was created, falling back to when it was last modified if that isn't possible. See http://stackoverflow.com/a/39501288/1709587 for explanation. """ if platform.system() == 'Windows': return datetime.datetime.fromtimestamp(os.path.getctime(path_to_file)) else: stat = os.stat(path_to_file) try: return datetime.datetime.fromtimestamp(stat.st_birthtime) except AttributeError: # We're probably on Linux. No easy way to get creation dates here, # so we'll settle for when its content was last modified. return datetime.datetime.fromtimestamp(stat.st_ctime) def index_ae(request, str='chatbot/chatbot'): name= request.path print(name) template = loader.get_template('template_ae.html') return HttpResponse(template.render({}, request)) def index_ben(request, str='chatbot/barrierefrei'): name= request.path print(name) template = loader.get_template('template_ben.html') return HttpResponse(template.render({}, request))