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
3
votes
1 answer

Google Fonts and web2py

I have this simple page:
thiago
  • 49
  • 1
  • 6
3
votes
3 answers

web2py or grok (zope) on a big portal,

I am planning to make some big project (1 000 000 users, approximately 500 request pre second - in hot time). For performance I'm going to use no relational dbms (each request could cost lot of instructions in relational dbms like mysql) - so i…
Robert
  • 81
  • 2
3
votes
1 answer

Remote Debugging of Openstack

I'm working on openstack, we are connecting client hosts through VPN. How do I debug that openstack running in my local, I tried some links but not successful. In which way I go...?
user1097153
  • 81
  • 1
  • 5
3
votes
1 answer

Web2py when deployed on Pythonanywhere not automatically picking up views for function

I am new to web2py but it has made me curious. Today i tried making a simple function in default.py say testFunction() on local host the url TestApplication/default/testFunction worked but after deployment to pythonanywhere it showed me…
amar
  • 4,285
  • 8
  • 40
  • 52
3
votes
1 answer

Call controller's method from another controller

I have an application in web2py. I have two controllers in it. Now I want to call a method written in one controller from other controller. How do I do that. Example - In controller 1: def controller1method(): return 'something' In controller…
gliese581g
  • 433
  • 8
  • 21
3
votes
0 answers

Bad Request upload image in iPad/iOS to web2py server

I am developing a web browser application where the user must upload a image file to a web2py server. I am using the traditional way for file input, which, in the iPad, gives the option to either upload an existing picture or take a new one from…
MobileCushion
  • 7,065
  • 7
  • 42
  • 62
3
votes
1 answer

web2py git integration - localhost & pythonanywhere

I have absolutely no idea how to integrate Github into web2py. I have web2py installed on a usb and also on pythonanywhere. The web2py overview document chapter3 http://web2py.com/books/default/chapter/29/03/overview says : Git integration The…
3
votes
2 answers

Need a web framework for generating editable, sortable, filterable HTML tables

We need to design a Web application. We have data which we want to represent in the form of editable/sortable/filterable grids. We will communicate with our framework written in Python, so Python frameworks are natural choice. The two main Python…
user2136491
  • 31
  • 1
  • 4
3
votes
2 answers

web2py dropdown menu generate from database with main and sub categories

I've been trying to get a dropdown menu created from my database which has main categories and subcategories. For example Animals would be the main with dogs and cats as the subs. I also have a main title for the menu that I set first. Basically…
3
votes
3 answers

Web2Py Working Directory

Well I want to use WEb2Py because it's pretty nice.. I just need to change the working directory to the directory where all my modules/libraries/apps are so i can use them. I want to be able to import my real program when I use the web2py…
user233864
  • 1,727
  • 2
  • 13
  • 12
3
votes
1 answer

how can I make 'between' query with web2py.DAL?

I'm trying to make a query function that accepts two datetime.date object(start_date and end_date), and return all records with a related field that's between start_date and end_date. However, I found nothing like a between function in the web2py…
satoru
  • 31,822
  • 31
  • 91
  • 141
3
votes
1 answer

How to get url string params in Web2Py?

Really stupid question here... but I can't seem to figure it out. In PHP when passing url params for say: www.mysit.com/index?name=steve I would use: $_GET["name"] In web2py I know you can get stuff via request.vars.someNameAttribute for stuff…
Steel Nation
  • 510
  • 8
  • 26
3
votes
2 answers

web2py: How can I execute code before calling the controllers?

In web2py, is there a way to have a piece of common code be executed before all controllers are called? For example, I want to add some code that will log client IPs to a log of requests to enable analysis. I could simply make the first line of…
srmark
  • 7,942
  • 13
  • 63
  • 74
3
votes
2 answers

web2py webserver - Best way to keep connection to external SQL server?

I have a simple web2py server that we use to visualize data from our PostgreSQL Server. The following functions are all part of the global models in web2py. The current solution to fetch data is very simple. Every time I connect, and after I get the…
hirolau
  • 13,451
  • 8
  • 35
  • 47
3
votes
1 answer

mod_wsgi, wsgi daemon visible behind _both_ http and https

I have apache vhost configured with SSL and mod_wsgi its working fine: < VirtualHost 127.0.0.1:443 > #[...] SSLEngine on #[...] WSGIScriptAlias / /home/maciek/workspace/imid2py/wsgihandler.py WSGIDaemonProcess web2py user=maciek group=www-data \ …
macieksk
  • 365
  • 3
  • 10