I don't think you can use 2 views on the same page. what you can do is pass 2 values to the same page to display.
so in the 2nd view you will do as follows: return render_to_response("kundendaten.html", { 'row': row,'current_date': now }, context_instance=RequestContext(request)) and make sure that you have a variable for now in the 2nd view. Hope this helps. V. On Thu, Nov 15, 2012 at 2:33 PM, Nebros <markuschriste...@gmail.com> wrote: > Are there not more intput? pls help me, I do not go any further...! > > Am Mittwoch, 14. November 2012 10:50:04 UTC+1 schrieb Nebros: > >> 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... >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/Fxv5JtTBvnAJ. > > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Simplicity is the ultimate sophistication. - Leonardo da Vinci Life is really simple, but we insist on making it complicated. - Confucius -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.