Initial commit

This commit is contained in:
ferdzo
2023-04-18 02:04:19 +02:00
commit 34f0fe7cac
21 changed files with 609 additions and 0 deletions

14
serviceCRM/views.py Normal file
View File

@@ -0,0 +1,14 @@
from django.http import HttpResponse
from .models import Insert
from django.template import loader
def index(request):
proba = Insert.objects.order_by("name")
return HttpResponse(proba)
def detail(request,question_id):
proba = Insert.objects.get(id=question_id)
template = loader.get_template("serviceCRM/id.html")
context = {"name":proba.name, "phone":proba.phone,"desc":proba.description,"date":proba.date}
return HttpResponse(template.render(context, request))