Design a form

46 views
Skip to first unread message

Madhvi gupta

unread,
Mar 20, 2012, 2:45:48 PM3/20/12
to web.py
I am trying to use web.py to design an web app. As a first step I
tried to use example given at http://webpy.org/form#example, but I am
not able to do so. I am confused in where to keep sample
formtest.html. I am working on mac OS X and python 2.6. Please help me
as I am new to this.

Regards,
Madhvi

Anand Chitipothu

unread,
Mar 20, 2012, 9:51:24 PM3/20/12
to we...@googlegroups.com
తేదిన 21 మార్చి 2012 12:15 ఉ, Madhvi gupta <madhv...@iiitd.ac.in> వ్రాశారు:

I think that will go into templates/ directory.

Anand

Madhvi gupta

unread,
Mar 21, 2012, 2:53:27 AM3/21/12
to we...@googlegroups.com
I read that it goes in templates directory but where to make this directory.


--
You received this message because you are subscribed to the Google Groups "web.py" group.
To post to this group, send email to we...@googlegroups.com.
To unsubscribe from this group, send email to webpy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webpy?hl=en.


Anand Chitipothu

unread,
Mar 21, 2012, 2:58:50 AM3/21/12
to we...@googlegroups.com
> I read that it goes in templates directory but where to make this directory.

The templates/ directory typically be in the same place where your code is.

Anand

Madhvi gupta

unread,
Mar 21, 2012, 3:19:13 AM3/21/12
to we...@googlegroups.com
Sorry for bothering you but I am not getting what is wrong.
I made two file one is code.py and formtest.html according to http://webpy.org/form. I kept formtest.html in templates folder. Then I compiled code. py by using command python code.py and then open the local host. It gave me a number of errors PFA. I am not getting what is wrong here please help me.



Anand

Screen shot 2012-03-21 at 12.49.48 PM.png

Anand Chitipothu

unread,
Mar 21, 2012, 4:03:00 AM3/21/12
to we...@googlegroups.com
తేదిన 21 మార్చి 2012 12:49 సా, Madhvi gupta <madhv...@iiitd.ac.in> వ్రాశారు:

> Sorry for bothering you but I am not getting what is wrong.
> I made two file one is code.py and formtest.html according to
> http://webpy.org/form. I kept formtest.html in templates folder. Then I
> compiled code. py by using command python code.py and then open the local
> host. It gave me a number of errors PFA. I am not getting what is wrong here
> please help me.

Looks like you have "$def with (form)" in the middle of the template.
That is supposed to be start of the template.

Have you added anything more to the formtest.html?

Anand

Madhvi gupta

unread,
Mar 21, 2012, 4:34:05 AM3/21/12
to we...@googlegroups.com
I checked it is in the starting of the file only. And I have not added anything to formtest.html.


Anand

Anand Chitipothu

unread,
Mar 21, 2012, 5:23:34 AM3/21/12
to we...@googlegroups.com
తేదిన 21 మార్చి 2012 2:04 సా, Madhvi gupta <madhv...@iiitd.ac.in> వ్రాశారు:

> I checked it is in the starting of the file only. And I have not added
> anything to formtest.html.

From the stack trace it looks like you have the following line in your template.

<p class="p1">$def with (form)</p>

Madhvi gupta

unread,
Mar 21, 2012, 5:32:02 AM3/21/12
to we...@googlegroups.com
Thanx a lot! That was textedit problem it was introducing some formatting on its own.

Regards,
Madhvi

Madhvi gupta

unread,
Mar 21, 2012, 2:14:56 PM3/21/12
to we...@googlegroups.com
Hello,
       I want to make a web app using web.py which takes input from user that is username and password, and in turn communicates with google server. I am not sure how should I proceed. I thought of making a form which ask for username and password and then pass it to that python function. Please tell me if I am on right path?

Regards,
Madhvi

Anand Chitipothu

unread,
Mar 22, 2012, 12:22:55 AM3/22/12
to we...@googlegroups.com
Hello,
       I want to make a web app using web.py which takes input from user that is username and password, and in turn communicates with google server. I am not sure how should I proceed. I thought of making a form which ask for username and password and then pass it to that python function. Please tell me if I am on right path?

I don't think taking username/password is a good idea. You should use OAuth instead. That will take a user to google login page and redirects to your app with a token, which you can use to talk to google services.

Anand

Madhvi gupta

unread,
Mar 22, 2012, 12:44:16 AM3/22/12
to we...@googlegroups.com
I have written a python script which communicates with google server using gdata API. Now I want to write a google chrome extension which only allows java script and html. So, I thought of hosting a web app using web.py which fulfill my requirement. Please guide me how should I proceed further.

Regards,
Madhvi

--
Reply all
Reply to author
Forward
0 new messages