Ok So this is kinda a long question. I am using ExtJS and Django to create a websiteish. Ive search the internet on how to add query parameters to the url when get an IFrame. So bascily I have this which creates a panel in ExtJS which has an html page with in it. I want to be able to pass a port number with in the url so that when it calls the html it will automaticly have the port number to connect to with vnc. My VNC client is noVNC
var noVNC = Ext.create('Ext.panel.Panel', {
title: "noVNC",
frame: false,
title: false,
width: '100%',
height: '100%',
layout: 'fit',
items: [{
xtype: "component",
autoEl: {
tag: "iframe",
src: "/noVNC"
}
}]
});
At first I thought that I could just do
src: "/noVNC?port=5900"
However, (through research) I realized you have to edit views.py and urls.py I think i have urls.py correct
from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^$', 'kfe.views.index'),
url(r'^index$', 'kfe.views.index'),
url(r'^noVNC/(?P<port>\d+)/$' , 'kfe.views.noVNC'),
)
But I am not sure how to use the views.py
def noVNC(request):
return render(request, 'noVNC_Auto.html', content_type='text/html')
hope that is enough info. If not just tell me
Thanks