Gary Roach
unread,Nov 19, 2016, 5:01:38 PM11/19/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-users
Hi all,
I am really stumbling around with my project at present. I am relatively
new to both Python and Django and have started a major project with both
(retired and have plenty of time).
I have set up a main.html page that has logos and such at the top of the
page and has some more logo stuff and copyright stuff at the bottom. I
have an iframe that fills the center of the page. There are several
control buttons at the top - but outside - of the iframe. I wish to be
able to push one of the control buttons and have the selected content
appear in the iframe. The pertinent code is:
Debian os, kde4 desktop, Django 1.9, Python 3.5, Postgresql 9.1
Project archive
urls.py
from django.conf.urls import url
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^$', views.mainPage),
url(r'^welcome/', views.welcome),
url(r'^first/', views.readMeFirst),
url(r'^admin/', admin.site.urls),
]
views.py
from django.shortcuts import render
def mainPage(request):
return render(request, 'main/main.html')
def welcome(request):
return render(request, 'main/welcome.html')
def readMeFirst(request):
return render(request, 'main/readMeFirst.html')
main.html (parts)
switch(bn) {
case "b1":
jQuery.get("views.welcome");
break;
case "b2":
break;
case "b3":
break;
case "b4":
break;
and later
<div >
<iframe id="iframe1" src="" >
</iframe>
</div>
I have no idea how to tie all of this together. I'm probably way off
base and need advise. The object is to push buttons and have the
appropriate pages show up in the iframe. These pages may have active
elements withing them or may have data fetched from the database included.
Any help will be sincerely appreciated.
Gary R.