Re: [web2py] Eclipse and autocomplete

2012-04-05 Thread Xiaofeng Tang
I use PyDev and add web2py src into "PyDev - PythonPath" to resolve the
incorrect refs and enable autocompletion.

Alternatively, u could install the path of web2py src into systeml
envirnoment vairable "pythonpath".

--- on 2012/4/5 22:51:41, Rod Watkins  wrote:
> I know this has been asked before. I don't mean to be an annoyance.
> I've done the searches are read numerous posts about how to handle
> this. But the advice conflicts and I've yet to actually fix the problem.
>
> What is the best way to handle imports for eclipse to get autocomplete
> to work properly (as well as rid eclipse of all the incorrect error
> messages?
>
> I rather like having autocomplete functioning since, as a beginner, it
> helps me discover functionality that I might otherwise miss (besides
> saving some typing).
>
> Please accept my thanks in advance for any help on this.
>
> Cordially,
> Rod Watkins



Re: [web2py] Getting error " No module named facebook.modules.facebook"

2012-04-05 Thread Xiaofeng Tang
Error message is clear: it failed to look up the module. Can u change
into the directory and import it on the console?

--- on 2012/4/5 22:41:15, Amit  wrote:
>
>
> Hi,
> I have downloaded and extracted Facebook sdk and trying to use in my
> web2py application, I have uploaded facebook.py in my application's
> Modules and trying to import using the statement
> "from applications.facebook.modules.facebook import * " in default.py
> class and when i try to run its giving error " 'exceptions.ImportError'> No module named facebook.modules.facebook".
> I am new to web2py development so not sure whether i did something
> wrong or not, so please guide me to resolve this issue.
>
> Regards,
> Amit



Re: [web2py] 2.6, 2.7, 3.2, PyPy ... wich one to use?

2012-03-29 Thread Xiaofeng Tang
2012/3/29 20:39:38 Xiaofeng Tang :

Sergi Pons Freixes Wrote:
> 2012/3/29 Jonathan Lundell :
>> Latest 2.7.
> I thought 2.5 was the recommended option for web2py. From the book:
> "...on Python versions 2.4, 2.5, 2.6, and 2.7, although "officially"
> it only supports 2.5 so that we can guarantee backward compatibility
> for applications."
There're no much breaking changes between latest version (2.7) and 2.5.


[web2py] Re: Web-page freezes on db.define_table

2012-03-29 Thread Xiaofeng Tang
try use migrate=false to fit into legacy db. otherwise, it will try to 
create it. (pls refer to official doc on section: dal -> legacy db)
(one more hit that may not be related to this issue: define_table will 
create an id column automatically.)

在 2011年12月21日星期三UTC+8下午6时23分56秒,Axel写道:
>
> Hi,
>
> I have just started with web2py, setting up a simple page with MySQL.
>
> In db.py I added/changed the following:
> db = DAL('mysql://root:xxx@localhost:3306/test')
>
> db.define_table('testdata',Field('idtestdata'),Field('nyckel'),Field('data'))
>
> But when accessing the app I get an error ticket:
> Ticket ID
> 127.0.0.1.2011-12-21.11-11-59.27d5caca-b9cf-4f73-b3e7-4a7a61318e19
>  (1060, u"Duplicate 
> column name 
> 'nyckel'")
>
> Shouldn't define_table create or just use the table which is already 
> present in 
> the database?
>
> Any suggestions are welcome.
>
> Regards,
> Axel
>
>