Custom application to MWS Framework
to give the possibility to add custom applications to the mws framework and the online tutorial is quite good and the right way! also the first steps are absolutly clear and my application already appears in the menu structur!
however I have big problems to add my application as I don´t use PSP templates!
under "Reducing bandwidth usage" in the online tutorial ([url]http://wiki.forum.nokia.com/index.php/Mobile_Web_Server_Tutorial_for_custom_applications#Reducing_bandwidth_usage[/url]) there is the description how to manage it, if you don´t use PSP templates and AJAX functionality, but I for me this information is not clear and hard to follow! i mean to don´t use PSP templates and to use my own css stylesheet!
for example:
def get_stylesheet(self):
return self.link("C:\\Data\\Web server\\htdocs\\Web_Applications\\ProjectFolder\\viewer\\default.css")
leads to this error:
File "C:/Data/Web server/htdocs/Web_Applications\ProjectFolder\ProjectController.py", line 30, in get_stylesheet
return self.link("file://C:\\Data\\Web server\\htdocs\\Web_Applications\\ProjectFolder\\viewer\\default.css")
File "J:\Framework\WebAppController.py", line 246, in link
AttributeError: 'NoneType' object has no attribute 'uri'
however, the structur of my origin application looks like:
projectfolder:
- pythonsource1.py
- pythonsource2.py
- pythonsourceN.py
- javascriptforajax.js
- index.html
- default.css
so..how is it possible to let the index.html appear in the "application area" using its javascript file and its css stylesheet! THANKS for help!
regards, Askin
Re: Custom application to MWS Framework
Hi.
Regarding to the CSS error I got answer that you shouldn't use self.link call to URL that is already "complete". Something like this should be correct in your case:
def get_stylesheet(self):
return "file://C:\\Data\\Web server\\htdocs\\Web_Applications\\ProjectFolder\\viewer\\default.css"
For the index part we have to get back to you later, when someone has tried out it successfully.
Re: Custom application to MWS Framework
thanks for your reply...I wait for your answer of the index part.
best regards,
Askin
Re: Custom application to MWS Framework
[QUOTE=_Askin_;544618]thanks for your reply...I wait for your answer of the index part.
best regards,
Askin[/QUOTE]
Guess that'll be two people waiting. Seems we need abit more articles on the wiki.
Would be shocking if the whole forum nokia site resided on a phone !
Re: Custom application to MWS Framework
Hello.
This might be a bit stupid suggestion but how about renaming your index.html into index.psp and moving that to the viewer folder? You don't have to do Python there as the SkeletonApp example demonstrates. How do you use the py files you mentioned or are those the required framework files?
Did you manage to get your own stylesheets working?
Re: Custom application to MWS Framework
hola,
the error with the css has gone with your suggestion, but it still doesn´t work. I mean the css formatting doesn´t work. I already have chanced the index.html to index.psp, but just the plain text appears, as I said without css formatting and without functionality.
i have one python file as request handler, which processes the requests from the website, and one for data fetching, like making a foto or get data from the accelerometer!!!
best regards,
Askin