This is a backward compatibility problem in the latest web2py. Should be fixed in the nightly build (for testers)
On Friday, 27 March 2015 15:56:05 UTC-5, Ron Chatterjee wrote: > > This is an old web2py blog. > > http://www.web2py.com/AlterEgo/default/show/189 > > Did anyone went through the steps and was able to generate the tables? I > tried but it failed. It didn't work. Is it only valid for polls example > only or any django models can be used in web2py this way? Not sure. > > I know its not a recommended and I will never deploy an application using > this method. But wanted to try few django projects and code them up in > web2py to learn more but I am and kind of feeling lazy to write the table > from scratch. thought copy and paste will be nice if I can get this method > to work. Any web2pier wants to try and see what I am doing wrong? > > *I get an error saying:* > > models/db.py" > <http://127.0.0.1:8000/admin/default/edit/try_django_polls/models/db.py>, > line 62, in <module> > class Poll(Model): > File "applications\try_django_polls\modules\django.py", line 145, in __new__ > fields=[db.Field(key,**value.serial(name,db)) for key,value in > attrs.items() if hasattr(value,'serial') and not > isinstance(value,ManyToManyField)] > File "...\Desktop\web2py_src\web2py\gluon\dal\base.py", line 893, in > __getattr__ > return ogetattr(self, key) > > AttributeError: 'DAL' object has no attribute 'Field' > -- 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 unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.