Re: [web2py] Re: Dropdown

2015-08-03 Thread Chaitu P
But, how can I access it. Tablename.myfield is giving None. On Aug 3, 2015 10:32 PM, Anthony abasta...@gmail.com wrote: Field('myfield', requires=IS_IN_SET(['Yes', 'No'])) On Monday, August 3, 2015 at 9:52:32 PM UTC-4, reddyreddy wrote: Hello all, I want to create a dropdown field in

Re: [web2py] Re: Compile and run java programs

2015-07-09 Thread Chaitu P
Hello, With the below code I was able to compile and run my c programs that were uploaded, where rfile and ofile are input and output files. for submission in submissions: subprocess.call([gcc,C:\\web2py\\applications\\dropbox1\\uploads\\+submission.file,-o,x]) subprocess.call([./x],

Re: [web2py] Re: get fullpath of uploaded files

2015-07-09 Thread Chaitu P
I want to get the complete path If I do in this way Iam getting only from applications\appname But inorder to give it to c compiler I need full path of the file like c:\web2py\.etc Here is my db.py: import os db = DAL(sqlite://storage.sqlite) db.define_table('document',

Re: [web2py] Compile and run java programs

2015-07-09 Thread Chaitu P
Thank you. I have one more question to you. Instead of passing the file I want to pass line by line as input and write the corresponding output to newline in outputfile. lines = list(rfile) subprocess.call(['gcc',pathnew,'-o','x']) L=list() for line in lines: subprocess.call([./x], stdin = line,

Re: [web2py] Re: get fullpath of uploaded files

2015-07-09 Thread Chaitu P
Thank you so much I have been trying to get this since yesterday. On Thu, Jul 9, 2015 at 9:53 AM, Anthony abasta...@gmail.com wrote: Looks like you are on Windows. Are you running this via the shell or the command line? In that case, I think web2py uses the relative path for request.folder.

Re: [web2py] Re: get fullpath of uploaded files

2015-07-08 Thread Chaitu P
Iam not sure how to use it. I guess I was not clear in my earlier question. For the files that were uploaded, I want full path of the each. Because I want to give that path to the gcc so that my files get executed. Can you please explain me little more. On Tue, Jul 7, 2015 at 9:11 PM, Anthony

Re: [web2py] Re: sending email

2015-07-07 Thread Chaitu P
Thank you so much, that got worked. On Sun, Jul 5, 2015 at 4:47 PM, Jose C houdinihoun...@gmail.com wrote: Hmm...are you running your code on a webfaction server or on another machine? If not running on a webfaction server you'll need to connect to port 587 like so: mail.settings.server =

Re: [web2py] Re: sending email

2015-07-05 Thread Chaitu P
Hello, Thank you for the reply. Iam still getting the below error. WARNING:web2py:Mail.send failure:[Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or estab lished connection failed because connected host has failed to

Re: [web2py] Re: date question

2015-07-04 Thread Chaitu P
Thanku I got the mistake I was doing. On Fri, Jul 3, 2015 at 1:03 PM, 黄祥 steve.van.chris...@gmail.com wrote: i think you can use logical operator or e.g. rows = db((db.problem.Duedate == request.now + datetime.timedelta(days = 1) ) | (db.problem.Duedate == request.now -

Re: [web2py] How to refer uploads files

2015-06-30 Thread Chaitu P
]) subprocess.call([./x], stdout=ofile) row.update_record(status='executed') db.commit() time.sleep(60) # check every minute ofile.close() On Fri, Jun 26, 2015 at 3:19 AM, Manuele Pesenti manuele.pese...@gmail.com wrote: Il 24/06/15 21:23, Chaitu P ha scritto: I want to compile the files that were

[web2py] Dynamic upload folder path

2015-06-30 Thread Chaitu P
Hello all, I have a form for student name, email and upload. For each student I want to create a seperate folder and save his upload dynamically. Can anyone let me know how can I do this. Thanks in advance. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] How to refer uploads files

2015-06-30 Thread Chaitu P
: #subprocess.call([gcc,C:\web2py\hello.c,-o,x]) subprocess.call([./x], stdout=ofile) row.update_record(status='executed') db.commit() time.sleep(60) # check every minute ofile.close() On Friday, June 26, 2015 at 3:19:49 AM UTC-5, Manuele wrote: Il 24/06/15 21:23, Chaitu P ha scritto: I want to compile

[web2py] multifile uploading

2015-06-30 Thread Chaitu P
In my application, I want the user to upload as may files as he wants. I have seen few of the websites. But those seem to be more difficult. Is there a better way to do this. -- Chaitanya Pochampally -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Suggestions for multiple files upload in form

2015-06-28 Thread Chaitu P
can anyone help. I have copied all the files. But still not working. When i clicked on the + button it is not showing popup window to choose files. On Fri, Jun 26, 2015 at 11:43 AM, Chaitu P chaitanya.pochampa...@gmail.com wrote: Hi Paolo, I have installed your application and it is working

Re: [web2py] Re: Layout problem

2015-06-28 Thread Chaitu P
+03:00 Chaitu P chaitanya.pochampa...@gmail.com: Thank you for reply. Iam using windows operating system. I have created a new application in web2py and copied all the .html, controller, db files and it is working fine. Iam just anxious to know the reason why it was happend. I don't think

Re: [web2py] Re: subprocess.call output to a file

2015-06-28 Thread Chaitu P
Thank you that worked.. On Thu, Jun 25, 2015 at 11:46 AM, Leonel Câmara leonelcam...@gmail.com wrote: You need to set stdout to be a file like object, so just open a file in write mode and use that as the stdout. Something like: ofile = open(path_to_the_output_file, 'w')

Re: [web2py] Suggestions for multiple files upload in form

2015-06-26 Thread Chaitu P
Hi Paolo, I have installed your application and it is working perfectly. I want have same multiimage upload functionality in my application. So I changed one of the table names. But unfortunately it is not working. Iam not sure what Iam missing I have copied the css and js files as well. Is

Re: [web2py] Re: Layout problem

2015-06-26 Thread Chaitu P
()}} {{pass}} /ol p On Thu, Jun 25, 2015 at 1:33 PM, JorgeH jorgeh...@gmail.com wrote: what is your development enviroment? Operating system Web server.. On Thursday, June 25, 2015 at 3:17:13 AM UTC-5, Chaitu P wrote: Does anyone have idea why web2py default layout not working

[web2py] How to refer uploads files

2015-06-25 Thread Chaitu P
I want to compile the files that were uploaded. But the files are getting uploaded with some random name. So how can I refer them. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Layout problem

2015-06-25 Thread Chaitu P
Does anyone have idea why web2py default layout not working. -- 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

Re: [web2py] Re: subprocess.call output to a file

2015-06-25 Thread Chaitu P
still I didn't get it. On Tue, Jun 23, 2015 at 1:23 PM, Dave S snidely@gmail.com wrote: On Tuesday, June 23, 2015 at 8:43:03 AM UTC-7, Chaitu P wrote: hello, I want to write the the output of subprocess.call to a file. How can I do that. Here is my code. #subprocess.call([gcc,C

[web2py] image open instead of download

2015-06-25 Thread Chaitu P
Hello all, In my application when I want to create a hyperlink which should display the corresponding uploaded image when it is clicked. Right now Iam able to only download the image. Can anyone please help??? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: sending email

2015-06-23 Thread Chaitu P
thank you for your reply Stifan. Iam able to send it to the console. But when Iam trying to send it to gmail, its getting failed. This is the code I used. from gluon.tools import Mail mail = Mail() mail.settings.server = 'logging' mail.settings.sender = 'y...@example.com' mail.settings.login =

[web2py] subprocess.call output to a file

2015-06-23 Thread Chaitu P
hello, I want to write the the output of subprocess.call to a file. How can I do that. Here is my code. #subprocess.call([gcc,C:\web2py\hello.c,-o,x]) subprocess.call([./x]) Here after executing c program I want to send the output to a file instead of console. -- Chaitanya Pochampally --

[web2py] sending email

2015-06-21 Thread Chaitu P
Hello all, Iam the beginner of web2py. Iam trying to send email using web2py. Iam following the we2py book http://web2py.com/books/default/chapter/34/08/email-and-sms. Can any one please please let me know what exactly need to do. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] how to disable the form.

2015-06-21 Thread Chaitu P
Is there any way that I can disable complete form instead of each element.Because I want to have the same format in both the cases. Here is my code of view... {{=question.body}} /p {{if datetime.timedelta(days=2)(t-question.created_on):}} {{=form}} {{else:}} form Name input type=text

[web2py] Multi file upload

2015-06-21 Thread Chaitu P
Hello,, I want implement a functionality where by clicking button user should be able to upload as many files as he wants. And these should be saved in database as well. User should be able delete those uploads as well. Can any one please let me know how to implement this. -- Resources: -

[web2py] Compile and run c program

2015-06-21 Thread Chaitu P
Hello all, Iam creating a web application using web2py where teacher can post questions and students can submit the solution .c file. Now my application should run that file. can anyone suggest me how to priceed with compilation? -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: How to pass arguments with a form

2015-06-09 Thread Chaitu P
On Sunday, June 7, 2015 at 8:46:33 PM UTC-4, Chaitu P wrote: Hello, This is my web page. Iam showing the questions using loop. If for example student has answered for 1st question I should be able to save answer for that corresponding id.Also I want to save the student id as well. I would

Re: [web2py] Re: How to pass arguments with a form

2015-06-07 Thread Chaitu P
, 2015 at 8:33 AM, JorgeH jorgeh...@gmail.com wrote: can you share the code you have at the moment? or at least a screenshot of the webpage you mention.. On Thursday, June 4, 2015 at 11:26:00 PM UTC-5, Chaitu P wrote: I have a situation where I have several questions displayed on a page

[web2py] How to pass arguments with a form

2015-06-04 Thread Chaitu P
I have a situation where I have several questions displayed on a page and below each of the question there will be a form like student name and email. Once the student clicks on the submit button I want to pass the corresponding question id in the URL. I have seen several examples to pass

[web2py] Allow users to comment only for certain period of time

2015-06-04 Thread Chaitu P
Hi Iam new to Python. Iam creating a blog where I want to allow users to comment only for one week from the time I have posted. Can any one let me know how can I use arithmetic operations on date.? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -