Hey, I just got the web framework django running on a Windows Mobile 5 PDA. I'm running under python 2.5 from here.
There is a bit of messing about which I'll blog about later but mostly it's installing stuff and getting around the lack of the command line shell. The only other tip is to start the development server with --noreload.
As sqlite3 is available it should be possible to build a proper web app but I haven't tried that just yet.
Update: mentioned on the Django blog!
Wow, I am so proud to be mentioned on the django site, thanks very much.
Here's my startup script that lets you use the server over WiFi. To run it you open it in File Explorer:
ipPort = "%s:%d" % (socket.gethostbyname(socket.gethostname()), 8000)
from django.core.management import execute_manager
import settings # Assumed to be in the same directory.
# so we can see any error
I installed Python on a compact flash card. Here's the layout from the "Program Files" directory down. I simply copied the django directory over from another machine.
Way cool! I have been playing with Python on my WM5 device as well and now I am truely inspired. Thanks for your efforts and willingness to let the world know. Please post more details when you get a chance, particularly if you get sqlite3 working.
Will do. Glad to hear there's some interest.
I got it to share on the WiFi interface so we can use the app from desktops on the lan as well.
Cool. BTW, I followed your link for Python 2.5 on Mobile 5, but only saw 2.2 and 2.3. Where's 2.5?
I've fixed the link to Python 2.5 on Windows CE. Thanks.
Hi, I'm new to pythonce. Could you please describe the installation process of pythonce+Django on PPC in more detail? Thanks a million.
Not much to say. I installed Python to the compact flash card and dragged the django directory over as shown in the image.
Have a go and let me know if it doesn't work.
I got it to work on an old iPaq 5500 under Windows Mobile 2003. Just one problem. When transferring the django folder, WM2003 converts all file and folder names that are 8 characters long or less to upper case. I had to change them all back to lower case. It took a while, but having done it, django worked fine with Python 2.5.
I transferred the files by mounting the compact flash on my desktop (MacOS) and copying that way.
My understanding is that Windows CE (or whatever it's called this week) has "modern" long file name capabilities so I suspect the problem was in the software that transferred the files.
Thanks for the comment.
That's the way that I did it. I put the SD card into the slot on my laptop (WinXP) and simply dragged the folder over. On the laptop, all names were in lower case, but on the iPaq some had been converted to upeer case. Put the card back in the laptop and they were all lower case. Bizarre.
One to look out for if you are using Windows Mobile 2003.
Regarding sqlite3 under pythonce:
Although not used under django, however I had written a raw application that would use lissard template for generating html. For the same had used sqlite3. So yes sqlite3 worked there and should work here as well.
I did it step by step but python said to me "ImportError: No module named django.core.management".
That isn't cool to me... jejeje
Gosh Rómulo, this post is a couple of years old and Django changed a bit when it went 1.0. I'm sorry but I don't have Windows mobile any more.
If you figure it out please let me know.
I am continuing with the latest version of django and it does work on wm 6.5.
If you get error 'ImportError: No module named django.core.management' use this code to rename uppercased django files:
names = os.listdir(dir)
for name in names:
nam = os.path.join(dir, name)
os.rename(nam, '%s_' % os.path.join(dir, name.lower()))
os.rename('%s_' % os.path.join(dir, name.lower()), os.path.join(dir, name.lower()))
rename('\\Storage Card\\Program Files\\Python25\\Lib\\django')
Considerably, this post is really the sweetest on this notable topic. I harmonise with your conclusions and will thirstily look forward to your incoming updates. Saying thanks will not just be sufficient, for the phenomenal clarity in your writing. I will directly grab your rss feed to stay informed of any updates. Admirable work and much success in your business dealings!? Please excuse my poor English as it is not my first tongue.
Indubitably, this comment is either one of the most notable I have been honoured with in recent times or alternately the product of some sort of automatic comment generation system designed to ascertain if moderation is switched on.
I shall await the influx of fascinating spam in the near future.
I wanted to thank you for this special read. I definitely savored every little bit of it
Post a Comment