[web2py] Prevent user from modifying a form field that already has a default value

2013-11-02 Thread Rupesh Pradhan
This is the table definition: db.define_table('school_session', Field('school_session', 'reference session_master'), Field('admission_number', 'integer', notnull=True), Field('class_name', 'reference class_master'), Field('roll_number', 'integer', notnull=True)) This is the

[web2py] Re: Prevent user from modifying a form field that already has a default value

2013-11-02 Thread Rupesh Pradhan
Also, is there a way of making the entire form read only without having to make 'writable = False' for each field in that form? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] view says that a variable defined in controller does not exist

2013-11-02 Thread Rupesh Pradhan
The table definition: db.define_table('student', Field('admission_number', 'integer', notnull=True, unique=True), Field('name', 'string', length=255, notnull=True)) db.define_table('school_session', Field('school_session', 'reference session_master'), Field('admission_number',

[web2py] Re: Prevent user from modifying a form field that already has a default value

2013-11-02 Thread Rupesh Pradhan
Model db.define_table('student', Field('admission_number', 'integer', notnull=True, unique=True), Field('name', 'string', length=255, notnull=True)) Controller student = db.student(row.id) form = SQLFORM(db.student, student, readonly=True) All the three fields of the table show up when

[web2py] Re: view says that a variable defined in controller does not exist

2013-11-02 Thread Rupesh Pradhan
Please give a suggestion too. -- 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] Re: type 'exceptions.SyntaxError' invalid table/column name log is a ALL reserved SQL/NOSQL keywor

2013-11-01 Thread Rupesh Pradhan
So, do you think it is better to avoid using reserved words completely and avoid the headache afterwords? -- 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)

[web2py] Re: Upgrading to web2py_win_1.91.6 caused a problem: Massimo, help!

2011-02-18 Thread Rupesh Pradhan
Yes, the script is buggy, alright. To begin with, the field ID was supposed to be skipped altogether according to the code. The line if field[0] == 'id': should have been if field[0].lower() == 'id': for the ID field to be skipped successfully. Anyway, its a relief that the my app does not

[web2py] Re: Importing an already existing MySQL database

2011-02-17 Thread Rupesh Pradhan
I have web2py_win_1.91.6 and Windows XP Professional OS

[web2py] Re: Importing an already existing MySQL database

2011-02-17 Thread Rupesh Pradhan
I have web2py_win_1.91.6 and Windows XP Professional OS. Or do you mean the script folder is in the source code version of Web2Py? I am downloading that now and checking it.

[web2py] Re: Importing an already existing MySQL database

2011-02-17 Thread Rupesh Pradhan
Okay, I found it. The .py file was in the src version of web2py. Anyway, the script is giving the following error, whereas the original script worked fine. Given below is the traceback. C:\Documents and Settings\rupeshpradhan\Desktop\scriptspython extract_mysql_models.py

[web2py] Upgrading to web2py_win_1.91.6 caused a problem: Massimo, help!

2011-02-17 Thread Rupesh Pradhan
I made the table definition script using the script that was in the following post: https://groups.google.com/d/topic/web2py/AnJ0iPH0WaI/discussion of an existing MySQL table. web2py_win_1.91.6 did not complain about the following table definition and work just fine. db.define_table('admin',

[web2py] extract_mysql_models.py is throwing an error

2011-02-17 Thread Rupesh Pradhan
The script 'extract_mysql_models' provided in the script folder of the src version of web2py is giving the following error. The original script that was first given in the URL below worked fine. https://groups.google.com/d/topic/web2py/AnJ0iPH0WaI/discussion Given below is the traceback.

[web2py] Re: Upgrading to web2py_win_1.91.6 caused a problem: Massimo, help!

2011-02-17 Thread Rupesh Pradhan
That's probably because I used a script to generate a DAL script using a script that was written 2 years ago (2009)!!! URL: https://groups.google.com/d/topic/web2py/AnJ0iPH0WaI/discussion Anyway, what is you recommendation, Massimo? 1. Do I change my table definition script and remove the ID

[web2py] Re: Importing an already existing MySQL database

2011-02-16 Thread Rupesh Pradhan
I could not find the folder or file under web2py folder? Where is it?

[web2py] Re: Importing an already existing MySQL database

2011-02-15 Thread Rupesh Pradhan
Sweet! Boriel!! Just what the doctor ordered! Hey, If you happen to polish the script any further and have a new version of the same, just remember, I am here to put it to good use. I have subscribed to this thread, so that I know if you have put up anything here. Also, Massimo, have you put

[web2py] Why does the output file not have any content? Doing an import test here.

2011-02-15 Thread Rupesh Pradhan
The 'input_sheet.py' module placed in site-packages: def write_to_file(file_name, content): file = open(file_name, 'w') file.write(content) file.close() def main(): file_name = 'output.txt' content = 'This is the output text.' return file_name, content if __name__ == '__main__': file_name,

[web2py] Help me with the coding for making a table

2011-02-11 Thread Rupesh Pradhan
I want using the data below, generate a table: header=['roll', 'name', 'absent'] data=[['1', ''], ['2', ''], ['3', ''], ['4', '']] table width=200 border=1 tr th scope=colRoll/th th scope=colName/th th scope=colpAbsent/p p label( input type=checkbox name=absentall id=absentall

[web2py] Can anyone recommend a good python forum in google groups or elsewhere?

2011-02-06 Thread Rupesh Pradhan
Can anyone recommend a good python forum in google groups or elsewhere?

Re: [web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-02-03 Thread Rupesh Pradhan
How about you show me couple (say 5) of the database structures of the applications that you have already written? I can go through it and get some practical ideas.

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-01-31 Thread Rupesh Pradhan
I am trying to standardize my naming schemes for my database, table and fields. I am trying to follow the one given below. Please share with me your scheme. Standard Database Table Naming Scheme = Table name: --- small caps with underscore look-up

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-01-31 Thread Rupesh Pradhan
I have seen that before. Its about python coding style. I am trying to discuss database table and field naming style here. Care to comment on the following table structure, please: db.define_table('lu_address_type', Field('name')) db.define_table('contact', Field('name'))

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-01-27 Thread Rupesh Pradhan
Thanks a lot for sharing the philosophy behind coding!!! I get the point. Now for some *real* help by nitpicking at my coding!

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-01-27 Thread Rupesh Pradhan
Thanks a lot MARTIN for the nitpick. REALLY needed that! Inspite of what you mentioned that you are relatively new to web2py, that was a lot of help. I don't know if other are going to help me out as much as you did. But since you did take the trouble to pore through my code, I was hoping that

[web2py] controller function to a generalized download function csv/text files

2011-01-24 Thread Rupesh Pradhan
I am trying to learn how to download text/csv files. This test function works fine. def download(): # import and assign handle import cStringIO content = cStringIO.StringIO() # write dummy content for i in range(0, 10): content.write(This is the text+\r\n)

[web2py] Re: WARNING:root:failure to stat applications

2011-01-19 Thread Rupesh Pradhan
Ok. Thanks for the response. On Jan 19, 8:59 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Please upgrade. 1.91.4 has known bugs. If you still have the problem, we will look furtherinot this. On Jan 18, 9:59 pm, Rupesh Pradhan rupeshkrprad...@gmail.com wrote: My Computer

[web2py] WARNING:root:failure to stat applications

2011-01-18 Thread Rupesh Pradhan
My Computer Configuration: CPU: Intel Motheboard: ASUS OS: Windows XP Profession, SP2 Web2Py version: 1.91.4 (2010-12-22) Why am I getting this error? WARNING:root:failure to stat applications\admin\sessions\127.0.0.1- f6f76cfb-49b1-4b04-af6b-f0fae01c7d5d: expected a character buffer object

[web2py] Link to mod_wsgi.so download for py25 not working

2010-12-22 Thread Rupesh Pradhan
The following link from the web2py online book is not working. http://adal.chiriliuc.com/mod_wsgi/revision_1018_2.3/mod_wsgi_py25_apache22/mod_wsgi.so Any alternate URL? Rupesh

[web2py] Re: Deployment of web2py on an intranet

2010-12-09 Thread Rupesh Pradhan
OK. I will give it a try and get back to you On Dec 7, 8:13 pm, mdipierro mdipie...@cs.depaul.edu wrote: When you start web2py you need to specify the IP address web2py.py -i 192.168.0.1 -p 8000 -a 'password' On Dec 7, 5:28 am,RupeshPradhan rupeshkrprad...@gmail.com wrote: I have two

[web2py] Deployment of web2py on an intranet

2010-12-07 Thread Rupesh Pradhan
I have two computers networked together using LAN cable with name 'server'(192.168.0.1) and 'machine01'(192.168.0.2) I have installed web2py on the 'server'. After running the 'web2py_no_console' on the server (the http://localhost:8000 shows the welcome page), I tried to access the webpage