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
5
votes
2 answers

pip install web2py

I tried to install Web2py with pip. The installation is completed successfully. But after that I don't know how to start the server. I know there are three apps which are 'w2p_clone', 'w2p_apps' and 'w2p_run'. I don't know how to use these three…
user1067671
  • 231
  • 1
  • 5
  • 10
5
votes
2 answers

Simplest way to setup remote admin access to a web2py process

Ok my question here should've been more to the point. The bottom line is: I have a remote linux box and I started up web2py on it just fine - it's prompting me to visit port 8000 on the localhost. However, when I try to visit that port remotely, I…
Terrence Brannon
  • 4,760
  • 7
  • 42
  • 61
5
votes
3 answers

Change default delimiters in ember.js

(This question is related to this one) I have a web2py application which I want to extend with some ember.js code. The delimiters of the templating systems in web2py and ember.js conflict (both are {{ and }}). Since my application has no ember.js…
blueFast
  • 41,341
  • 63
  • 198
  • 344
4
votes
3 answers

How do I use web2py on Heroku?

I'm having a lot of trouble with getting web2py to work on Heroku. I can't even get a basic app to work. Whenever I go to my herokuapp page, it says Application Error An error occurred in the application and your page could not be served. Please…
confused.js
  • 41
  • 1
  • 3
4
votes
1 answer

Running web2py as a WSGI app on GAE with Python2.7

How do I set up Web2Py [Version 1.99.4 (2011-12-14 14:46:14) stable] to run as a WSGI app on GAE with Python2.7.2? Currently, my app.yaml file looks like: # For Google App Engine deployment, copy this file to app.yaml # and edit as required # See…
S P
  • 1,801
  • 6
  • 32
  • 55
4
votes
1 answer

Exec format error: apache + mod_wsgi on Mac OS X Lion

I am trying to set up a web development environment using Python 2.7, apache, mod_wsgi, and web2py on an iMac running Lion (Mac OS X 10.7.3). I downloaded and installed mod_wsgi v. 3.3 (./configure; make; sudo make install) It installed in…
david193
  • 155
  • 1
  • 10
4
votes
1 answer

query for null values in web2py DAL

Using the web2py DAL, how do a create a query to select for records will NULL values in a particular field?
David Nehme
  • 21,379
  • 8
  • 78
  • 117
4
votes
1 answer

Is it possible to change a web2py view on the fly?

Can you change the view being used by web2py in the controller? Ideally I'd be interested in doing something like: response.view = 'NewViewName'
Chris
  • 5,876
  • 3
  • 43
  • 69
4
votes
1 answer

Customized web2py registration

I am new to web2py. I want to make an application that has one admin (super user) account. I want to restrict 'only admin can register user'. So that once Admin logs into the app, he will see different menus like 'Home', 'Setting', and 'Register…
Ganesh W
  • 75
  • 1
  • 7
4
votes
1 answer

How do I deploy web2py on PythonAnywhere but from Dropbox shared folder?

I have tried to use this link How do I deploy web2py on PythonAnywhere? to deploy Web2py on Pythonanywhere but from Dropbox's shared folder. path = '/home/my_username/Dropbox/web2py' The result is ... Internal Server Error The server encountered…
4
votes
1 answer

Post-login redirection in web2py

I'm having trouble controlling post-login redirection behavior in web2py. According to this, web2py handles post-login redirection differently, depending on whether the login was initiated by the system (e.g. when accessing a auth-protected…
Yarin
  • 173,523
  • 149
  • 402
  • 512
4
votes
1 answer

How to change view/edit pages of the smartgrid component in web2py

Smartgrid component in web2py is very powerful. I wonder if it is possible to add any additional markup into the View/Edit pages of the smartgrid. Normall, in web2py we need to create a view html file corresponding to a function in the controller.…
Mert Nuhoglu
  • 9,695
  • 16
  • 79
  • 117
4
votes
1 answer

What does T.lazy do in web2py?

I am studying web2py. I read example open source code. In one application (storpy), the programmer uses T.lazy repeatedly inside the models file db.py such as this: ... Field('comment', 'text'), Field('cover', 'upload', autodelete=True)) T.lazy =…
Mert Nuhoglu
  • 9,695
  • 16
  • 79
  • 117
4
votes
2 answers

Web2Py won't connect to MSSQL

I'm unable to get web2py to connect to mssql. (Failure to connect, tried 5 times: 'NoneType' object has no attribute 'connect') My connection string is: db = DAL('mssql://testUser:password1@localhost/testDB')…
cjmarques
  • 632
  • 1
  • 7
  • 17
4
votes
1 answer

Allow %20 in web2py requests args

I am trying to get requests to pass on encoded strings in a URL. For example: /application/controller/function/hello%20world so that in my function I can access request.args and get a string that I can unquote(). I tried modifying rewrite.py to…
Charles L.
  • 5,795
  • 10
  • 40
  • 60