| Store | Cart

html tags and python

From: Hansan <n...@box30.activestate.com>
Sat, 26 Mar 2005 16:40:43 +0100
Hi and thanks for the replies.

It is starting to make a little sense. But its still not that clear...

If I import the DateTime or install and import the mx package.
Where should I then change something in my code?
I guess that I will have to see if the entered number is valid when the user 
clicks the submit button.
So it must be when I run my insertevent.py script.
So will I have to import the DateTime modul in my form.script or in my 
insertevent.script

And this maybe sound stupid, but will one pls give me an example of what the 
code could be for maybe January and February.

I just cant figure out how they work together, the DateTime modul and the 
html form.
The user can enter a number in the month field and in the day field. Then 
there have to be a tjeck to see if the entered numbers are valid. If the 
number entered in the month field is 1 and the number entered in the day 
field is 32, there have to come anerror report, and the user will get a 
second try to enter the right numbers.

And then if the entered numbers are correct, the data will be inserted in 
the database ( But I will work on this if condition myself, I think I can 
figure that out:)

So it is just the tjeck to see if the entered numer are valid, I need help 
with.

Thanks for all help, it is highly appreciated, and helps me to understand 
this new strange but fascinating world of programming.








<gene.tani at gmail.com> wrote in message 
news:1111837773.193649.94920 at g14g2000cwa.googlegroups.com...
> get the mx package here:> http://www.egenix.com/files/python/eGenix-mx-Extensions.html#Download-mxBASE> =========================================>>>> import mx.DateTime>>>> print mx.DateTime.DateTime(2004,2,31)   # Feb. 31?> Traceback (most recent call last):>  File "<stdin>", line 1, in ?> mx.DateTime.RangeError: day out of range: 31>>>>> 

Recent Messages in this Thread
Hansan Mar 25, 2005 10:16 pm
Kane Mar 25, 2005 11:46 pm
Hansan Mar 26, 2005 12:13 am
Swaroop C H Mar 28, 2005 02:27 pm
Dan Bishop Mar 26, 2005 03:46 am
Tim Roberts Mar 26, 2005 09:12 am
Hansan Mar 26, 2005 10:57 am
Patrik Andreasen Mar 26, 2005 11:38 am
gene...@gmail.com Mar 26, 2005 11:49 am
Hansan Mar 26, 2005 03:40 pm
gene...@gmail.com Mar 26, 2005 05:09 pm
EP Mar 27, 2005 02:07 am
Timo Virkkala Mar 30, 2005 05:38 pm
Jeremy Bowers Mar 27, 2005 02:25 am
Hansan Mar 28, 2005 08:12 am
Hansan Mar 28, 2005 04:25 pm
Messages in this thread