[web2py] What's my error here such that image resize gives error?

2016-04-13 Thread Stephen Duisberg
def changedp(): dpform=SQLFORM.factory(Field('img','upload', uploadfolder=os.path.join(request.folder,'uploads/')),table_name='info').process() if dpform.accepts(request.vars,session,formname="dpformm"): basewidth = 300 img = Image.open("{{=URL('uploads',dpform.vars.img)}}"

[web2py] How to not let user input some particular values in the name field in this db?

2016-04-13 Thread Stephen Duisberg
db.define_table('person', Field('name'), Field('pic','upload') ) What should I do such that the name field won't accept names with some words like 'the', 'rock' and all. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-04-12 Thread Stephen Duisberg
On Monday, March 14, 2016 at 5:58:13 PM UTC+5:30, Mirek Zvolský wrote: > > allwaysdata.com, but has only 10M place (about 6M after you install > web2py-min), good ssh, cron, no problem to install everything. > forpsi.com paid, but only 2$/month for full VM > > but forpsi isnt for web2py,right? >

[web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-04-12 Thread Stephen Duisberg
On Monday, March 14, 2016 at 5:58:13 PM UTC+5:30, Mirek Zvolský wrote: > > allwaysdata.com, but has only 10M place (about 6M after you install > web2py-min), good ssh, cron, no problem to install everything. > forpsi.com paid, but only 2$/month for full VM > > > > Which one's the best to go for?

[web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-04-12 Thread Stephen Duisberg
but forpsi isn't for web2py , right? On Monday, March 14, 2016 at 5:58:13 PM UTC+5:30, Mirek Zvolský wrote: > > allwaysdata.com, but has only 10M place (about 6M after you install > web2py-min), good ssh, cron, no problem to install everything. > forpsi.com paid, but only 2$/month for full VM > >

[web2py] In mobile view how to show each response menu items in horizontal manner and not vertical like this?

2016-04-12 Thread Stephen Duisberg
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsub

[web2py] I find pythonwhere hosting costly. What are other alternatives?

2016-04-12 Thread Stephen Duisberg
I am from India. Which will be best for me. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Go

[web2py] Why is the sound not playing at all? What's the syntax error here?

2016-04-08 Thread Stephen Duisberg
def index(): # These code snippets use an open-source library. response_post = unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key=key1";, headers={ "X-Mashape-Key": "key2", "Content-Type": "application/x-www-form-urlencoded" }, params={ "c": "mp3", "f":

[web2py] Re: How to make markin2html work in web2py?

2016-04-07 Thread Stephen Duisberg
t; > Markmin is already available in the environment. > > {{extend 'layout.html'}} > {{=MARKMIN(m)}} > > > On Thursday, 7 April 2016 12:23:59 UTC+1, Stephen Duisberg wrote: >> >> I am doing this but I get errors because markmin isn't there. >>

[web2py] How to make markin2html work in web2py?

2016-04-07 Thread Stephen Duisberg
I am doing this but I get errors because markmin isn't there. from markmin import markmin2html def index(): m = "Hello **world** [[link http://web2py.com]]"; return locals() {{extend 'layout.html'}} {{=markmin2html(m)}} name 'markmin2html' is not defined -- Resources: - http://web2py.

[web2py] How to make two css work for a view such that one is for pc and the other for mobiles?

2016-04-05 Thread Stephen Duisberg
Can we write two css files for the same? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Googl

[web2py] Re: Why I am getting an error when I reload the page to play the sound?

2016-04-05 Thread Stephen Duisberg
Yeah exactly I wanted to do that. What should I do now to play sound through the browser? On Tuesday, April 5, 2016 at 9:02:48 PM UTC+5:30, Anthony wrote: > > On Monday, April 4, 2016 at 5:03:44 AM UTC-4, Stephen Duisberg wrote: >> >> def rough(): >> e = pyttsx.in

[web2py] How to convert a string with html tags to work normally as html elements in the view?

2016-04-04 Thread Stephen Duisberg
I am reading an api which is giving me strings as follows: "It cannot be a one-way affair. If Beijing is blocking our efforts on the international fora aimed at addressing our security concerns, may behttp://timesofindia.indiatimes.com/business/india-business/UN-veto-Traders-warn-to-boycott-Chines

[web2py] How to convert unirest reponse to get json data?

2016-04-04 Thread Stephen Duisberg
response_post = unirest.get(" http://timesofindia.indiatimes.com/feeds/newsdefaultfeeds.cms?feedtype=sjson ", headers={ "X-Mashape-Key": "key", "Accept": "application/json" }, ) x=response_post.raw_bod

[web2py] How to convert unirest reponse to get json data?

2016-04-04 Thread Stephen Duisberg
response_post = unirest.get("http://timesofindia.indiatimes.com/feeds/newsdefaultfeeds.cms?feedtype=sjson";, headers={ "X-Mashape-Key": "TmlbmJ9Xo9mshlu42U223N0Y17Xzp17df0GjsnDvv9o4uNZLNO", "Accept": "application/json" },

[web2py] Why I am getting an error when I reload the page to play the sound?

2016-04-04 Thread Stephen Duisberg
def rough(): e = pyttsx.init() e.say('Sally sells seashells by the seashore.') e.say('The quick brown fox jumped over the lazy dog.') return locals() {{extend 'layout.html'}} {{e.runAndWait()}} {{e.stop()}} -- Resources: - http://web2py.com - http://web2py.com/book (Documen

[web2py] What is this token error which doesn't show up when we run web2py from source but in pythonanywhere?

2016-04-04 Thread Stephen Duisberg
This problem arises only when I write 'import unirest' in the controller. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message becaus

[web2py] As I use web2py from source with some modules from my pc,will those module work on pythonanywhere?

2016-04-03 Thread Stephen Duisberg
For example, my app uses unirest which is working because I have installed unirest on my pc. Do I have to install it in the app module too or pythonanywhere has all sorts of python modules inbuilt? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we

[web2py] Re: @Anthony, can you please check what's wrong with the unirest module?

2016-04-03 Thread Stephen Duisberg
Thank you, it worked! On Sunday, April 3, 2016 at 3:48:51 PM UTC+5:30, Leonel Câmara wrote: > > You are shadowing web2py's response in your code with a response from a > unirest call. Call it something else. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://g

[web2py] Re: @Anthony, can you please check what's wrong with the unirest module?

2016-04-03 Thread Stephen Duisberg
Hi Leonel. Thanks, I didn't get you though . How is this wrong? What am I missing here? response = unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key=secret1";, headers={ "X-Mashape-Key": "secret2", "Content-Type": "application/x-www-form-urlencoded" }, params={ "

[web2py] @Anthony, can you please check what's wrong with the unirest module?

2016-04-03 Thread Stephen Duisberg
each time I use it for any purpose I get the same error as: Traceback (most recent call last): File "C:\web2py\gluon\main.py", line 450, in wsgibase serve_controller(request, response, session) File "C:\web2py\gluon\main.py", line 192, in serve_controller run_view_in(response._view_en

[web2py] Re: In the dropdown here how to remove Profile?

2016-04-03 Thread Stephen Duisberg
Is it possible to add extra stuffs into the table as I asked earlier? On Tuesday, March 29, 2016 at 6:27:45 AM UTC+5:30, 黄祥 wrote: > > pardon, not sure what do you mean with 'add extra fields to the dropdown > table' > > best regards, > stifan > -- Resources: - http://web2py.com - http://web2py

[web2py] Re: Why unirest doesn't work? What kind of error is this?

2016-04-03 Thread Stephen Duisberg
Why does unirest doesn't work? On Sunday, April 3, 2016 at 10:13:10 AM UTC+5:30, Stephen Duisberg wrote: > > my code: > > import unirest > > def index(): > response = > unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key= > <https://vo

[web2py] Why unirest doesn't work? What kind of error is this?

2016-04-02 Thread Stephen Duisberg
my code: import unirest def index(): response = unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key= secret", "X-Mashape-Key": "key", "Content-Type": "application/x-www-form-urlencode