Good morning
I have 2 diffrent views, every one i just needet on one page... till now.
view one-----output is the time-----------------
@csrf_protect
def portal(request):
now = datetime.datetime.now()
return render_to_response('portal.html', {'current_date': now}, context_instance=RequestContext(request))
---------------------------------------------------------
view two-----output are data out of a mssql db--------------
def kundendaten(request):
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=MAURITIUS;DATABASE=baan5c;UID=***;PWD=*****')
cursor = cnxn.cursor()
cursor.execute("SELECT x.t_name, y.t_mail FROM tttaad200000 as x, tttcmf200000 as y WHERE (x.t_name = y.t_name) AND (x.t_user = 'niedereh')")
row = cursor.fetchall()
return render_to_response("kundendaten.html", { 'row': row }, context_instance=RequestContext(request))
---------------------------------------------------------------------------
in addition, i have to set the x.t_user as a variable. the value will be given from the page before. (form/post/submit)
how can i use this two now on one page? (i know these are two render_to_response and i cant just use:
{% block content %}<p>Zeit der Aktualisierung {{ current_date }}</p>{% endblock %}
and
{% block content %}<p>Kundendaten {{ row }}.</p>{% endblock %}
on one page)...
I just failed by the try to change them...