mirror of
https://github.com/ferdzo/serviceCRM.git
synced 2026-04-05 13:16:24 +00:00
Initial commit
This commit is contained in:
14
serviceCRM/views.py
Normal file
14
serviceCRM/views.py
Normal 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))
|
||||
|
||||
Reference in New Issue
Block a user