Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does web2py have these?

Tags:

python

web2py

I am finishing up a project in PHP with Yii and phing. Even though Yii is the best web framework I've used to date, I prefer writing Python over PHP. So, I've been looking at web2py and have some questions:

  1. Does web2py provide Javascript form validation? Yii has http://www.yiiframework.com/extension/jformvalidate/
  2. Does web2py have a mongo db plugin? Something comparable to http://www.yiiframework.com/extension/yiimongodbsuite/
  3. Can you write console applications using web2py?
  4. Does web2py auto generate SQL from model classes, or can you generate model classes from a SQL schema? I prefer the latter.
  5. What deployment tools are available for Python web apps? Is there anything like phing? Yes, I'm aware I could use ant, Maven, or even phing, but I'd rather use something implemented in Python.
like image 801
Simian Avatar asked Apr 08 '11 00:04

Simian


People also ask

Does web2py support Python 3?

web2py runs with CPython (the C implementation) and PyPy (Python written in Python), on Python 2.7 and Python 3.

What is the use of web2py?

Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

Is web2py open source?

Free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications.

Is web2py better than Django?

If you're a beginner programmer, or a newbie at web dev, web2py is definitely for you. However, if you're fluent in Python and you need to meet a close deadline, Django would be the better option.


1 Answers

Does web2py provide Javascript form validation?

Out of the box web2py does server-side validation, client side js pre-validation of int, double and calendar popup for date/time/datetime. There are jQuery plugins to add more client-side validation. web2py is mostly serverside, not clientside.

Does web2py have a mongo db plugin? Something comparable to ...

Web2py is written in Python and there is a python module to access mongodb. Web2py has a database abstraction layer that supports 10 relational databases and Google Big Tables. DLA support for couchdb and mondogo is in but only partial and experimental. Will be completed in the next couple of months.

Can you write console applications using web2py?

Web2py apps must run in the browser. You can build normal python console and gui apps that use any of the web2py modules, for example its template language and database abstraction layer.

Does web2py auto generate SQL from model classes, or can you generate model classes from a SQL schema? I prefer the latter.

It can partially do the latter for mysql and postgresql but only partially because its goal is the the opposite: have users write no SQL but use the database abstraction layer for creating tables. The DAL is not an ORM, models are not classes. Web2py has more field types than SQL provides (for example a type password, a type upload, etc.). They affect how the content of the field is handled in forms and they cannot be inferred from an SQL schema.

What deployment tools are available for Python web apps? Is there anything like phing?

web2py has a web based IDE with mercurial integration. You can also use any other development tool that works with Python. I do know phing so I do not know how they compare.

You know... it would be easy to just try web2py. :-) Good luck with Yii anyway. I am sure it is great too.

like image 164
Massimo Avatar answered Sep 18 '22 17:09

Massimo