Questions tagged [web2py]

web2py is a open-source full-stack web framework written in Python.

web2py is a free, open-source web framework for agile development of secure database-driven web applications; it is written in Python.

web2py is a full-stack framework. It includes an ORM (called the Data Abstraction Layer), its own template engine and typical form widget helpers and controls.

Created by a team of professionals and academics, one of its key principles is no backward incompatible changes. Development is led by Massimo Di Pierro, Associate Professor in Computer Science at DePaul University in Chicago.

Additional resources:

  1. Project Website
  2. Documentation
  3. Source Code
  4. Sample Websites
  5. Wikipedia Page
  6. Google Group

Simple Example (from What is web2py?):

Model Definition:

db=DAL('sqlite://storage.db')
db.define_table('image', 
    Field('name'),
    Field('file','upload'))

Controller:

def index():
    form = SQLFORM(db.image)
    if form.process().accepted:
        response.flash = 'image uploaded'
    return dict(form = form,counter=None,_class='boxCode')

View:

{{extend 'layout.html'}}
<h1>Image upload form</h1>
{{form}}
2141 questions
11
votes
1 answer

web2py Custom User Profile?

What is the 'correct' way to extend the base auth_user table/the whole auth system in order to support a number of custom user profile fields (such as username, location, birthday, etc.)? I've caught glances of approaches from Googling, but no…
orlade
  • 2,060
  • 4
  • 24
  • 35
11
votes
2 answers

Web2py: How should I display an uploaded image that is stored in a database?

Is there a web2py way of displaying images from a database table? Example: The model: db.define_table=('images',Field('picture', 'upload' )) The controller: def somefunction(): to get the image. How exactly should I "read" a picture from the…
Florin
  • 3,779
  • 5
  • 18
  • 15
11
votes
1 answer

Web2py and python 3

Does web2py function with python 3.3 or python 3.4? I have installed web2py but it cannot run with the python3.4 that I use. I get an error after trying to run the 'web2py.exe - S welcome' that says, syntax error
user3346746
  • 327
  • 3
  • 14
11
votes
5 answers

Python Selenium 2.39 and Firefox 26

im trying to execute some selenium with unittest scripts but i get the following error Starting at: "Sat Dec 07 14:43:17 2013" E ====================================================================== ERROR: test_template…
Ben Ishak
  • 669
  • 3
  • 11
  • 27
10
votes
11 answers

Which web development framework works best with Google App Engine?

Now that Google allows Java on App Engine, I'm wondering what effect this has on a choice of web framework for App Engine. I realize Google provides the webapp framework which is pretty barebones. And the .96 version of django that's available for…
10
votes
2 answers

Is web2py suitable for a large public website?

Web2py looks like a very nice Python framework but I am wondering if it is suitable to use for a large public web site. What sorts of issues might I run into? I'm not worried about technical scalability so much as UI/UX limitations, ability to…
pbreitenbach
  • 11,261
  • 3
  • 33
  • 24
10
votes
3 answers

Web2py controllers with parameters?

I am building an app using Web2py framework... I don't want to have to use the request object to get all of the querystring parameters, instead I'd like to build my controller with named parameters and have the router unpack the querystring (or form…
Nicholas Franceschina
  • 6,009
  • 6
  • 36
  • 51
9
votes
2 answers

Multi-Column Unique Constraint with web2py

It is possible to mark a particular column as unique=true. What is the most correct way to handle multi-column unique constraints in web2py? For example, say I have an exchange rate table. It could have columns from-currency, to-currency and the…
carrier
  • 32,209
  • 23
  • 76
  • 99
9
votes
2 answers

Google app engine users Auth: Djangoappengine Vs Web2py Vs Webpy

I'm going to develop a small web application on Gae with a registration section, login\logout and stuff like that. Since Google app Engine does not support session out of the box and I don't want to restrict access using google Accounts, I am forced…
systempuntoout
  • 71,966
  • 47
  • 171
  • 241
9
votes
2 answers

Web2py default app

I am planning to publish my site soon on Dreamhost using passenger WSGI as mentioned in the dreamhost setup documentation. My issue is that I am wanting www.mydomain.com to go directly to my new application, instead of needing to go to…
chills42
  • 14,201
  • 3
  • 42
  • 77
9
votes
7 answers

Is Google App Engine right for me?

I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to…
felix
  • 11,304
  • 13
  • 69
  • 95
8
votes
1 answer

representation format in web2py database

db.define_table('person', Field('name'), format='%(name)s') What does this format do here?
Jensen
  • 1,653
  • 4
  • 26
  • 42
8
votes
3 answers

Asynchronous background processes with web2py

I need to to handle a large (time and memory-consuming) process asynchronously in a web2py application called inside a controller method. My specific use case is to call a process via stdlib.subprocess and wait for it to exit without blocking the…
Kenny Meyer
  • 7,849
  • 6
  • 45
  • 66
8
votes
1 answer

Correct method to initialize a database table with web2py DAL.define_table()

I am trying to dynamically build tables called db.blog and db.code with exactly the same SQL definitions. After I define them, I want to populate them with 10 rows of random data, and never execute that initialization code again. My problem is that…
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
8
votes
3 answers

Install Python Module in local install of web2py

I am running web2py on a Windows machine. I'm working on an application, but it keeps erroring because it says the module I'm trying to use isn't installed. It is however installed in my local python install. How can I install modules so that…
Parth
  • 1,226
  • 7
  • 28
  • 49