maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How to create an offline web form using Python? (https://talk.maemo.org/showthread.php?t=39625)

maya 2010-01-07 18:29

How to create an offline web form using Python?
 
Well, I do not know where to post about this subject, if I'm wrong, please move to the most appropriate.

I have a site with data system in php / mysql and I have a Nokia N900 (with Maemo 5 OS, natively supports Python)
.
I need to create a Python application for N900 containing a form 'offline' to include (and store) data and / photos for future upload to the database of this site. Ideal also have a version for offline query data.
.
The model form is already in php, and the lookup table. The work is to adapt this form Python to store the data offline and upload to the system mysql site.

Unfortunately I have no knowledge of programming (Python, Linux) and ask for help to develop this application.

I believe that an application in Python will be more stable and reliable than using apache or lighttpd, right?

Thanks!!

maya 2010-01-29 18:07

Re: How to create an offline web form using Python?
 
ok, if don't is python, maybe in other format. (html, C+, ??)
I need send the complete formulary, but hours after, but how to store this informations?
I thought of something like the format of MaStory or even a simple html page which then connects to my site (php / mysql)
Suggestions?
thanks

maya 2010-01-30 12:13

Re: How to create an offline web form using Python?
 
For developers of Python.
I found this blog which explains how to work the codes wordpy an older version. http://www.learningpython.com/2006/0...ython-library/
With this information it would be possible to build a form offline, with db to connect and send to the site php / mysql?
Or much more complicated than that? ;);)

fatalsaint 2010-01-30 20:48

Re: How to create an offline web form using Python?
 
Theoretically possible. You can create whatever interface you want, store it on a local db file using SQLite or the like.. then create or use a module for communicating and POSTing data to a website. PyGTK should work fine on the N900.. I haven't used an sqlite db in python on the N900 yet to know if it works right or not.

Slocan 2010-01-30 21:00

Re: How to create an offline web form using Python?
 
The way I'd do it would be to create a simple GTK/Hildon interface (see http://wiki.maemo.org/PyMaemo for some docs), and then use urllib2 to make the POST call to a PHP script on the server.

Jaffa 2010-01-31 16:19

Re: How to create an offline web form using Python?
 
You may be interested in fpp's series of blog posts on his coding in Python using a lightweight web server for offline use:

http://fredp.lautre.net/blog/

maya 2010-02-01 00:26

Re: How to create an offline web form using Python?
 
Quote:

Originally Posted by Jaffa (Post 503899)
You may be interested in fpp's series of blog posts on his coding in Python using a lightweight web server for offline use:

http://fredp.lautre.net/blog/

Hum, but what are fpp's series?:confused:

maya 2010-02-01 00:30

Re: How to create an offline web form using Python?
 
Quote:

Originally Posted by Slocan (Post 503004)
The way I'd do it would be to create a simple GTK/Hildon interface (see http://wiki.maemo.org/PyMaemo for some docs), and then use urllib2 to make the POST call to a PHP script on the server.


The next idea is build a table with filter options for such data.
I do not know if in db (some sql) or XML. What would be faster?

maya 2010-02-01 00:38

Re: How to create an offline web form using Python?
 
Quote:

Originally Posted by fatalsaint (Post 502992)
Theoretically possible. You can create whatever interface you want, store it on a local db file using SQLite or the like.. then create or use a module for communicating and POSTing data to a website. PyGTK should work fine on the N900.. I haven't used an sqlite db in python on the N900 yet to know if it works right or not.

well, I do not know how the MaStory (wordpy) the question database. But I found very interesting operationally.


All times are GMT. The time now is 07:40.

vBulletin® Version 3.8.8