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

Redirect URL with parameters in web2py controller

I am trying to redirect to a URL('form','results') from forminput.html with parameters (in my case, it's a huge dictionary i.e. output). But when the web page is redirected to results.html, all the parameters are also included in the web Url itself,…
3
votes
2 answers

Integrating smartgwt and web2py

I'd like to build an application using smartgwt and web2py. I am new to both. Ultimately what I would like to do is display objects obtained from a web2py backend in a smartgwt TileGrid. Can anyone enumerate the broad strokes of what needs to be…
carrier
  • 32,209
  • 23
  • 76
  • 99
3
votes
2 answers

Web2py scheduler - Best practices to rerun task continuously and to add task at startup

I want to add a task to the queue at app startup, currently adding a scheduler.queue_task(...) to the main db.py file. This is not ideal as I had to define the task function in this file. I also want the task to repeat every 2 minutes…
frage
  • 719
  • 7
  • 15
3
votes
3 answers

How to get windows user id in web2py for an intranet application?

I'm using web2py for an intranet site and need to get current login windows user id in my controller. Whether any function is available?
mac
  • 31
  • 2
3
votes
2 answers

Limiting access to a static file with GAE

I have a static file that I don't want to be publicly available. Is there a way to limit access with app.yaml so that it can only be loaded by its own domain? web2py based solutions are also welcomed as I'm using it on top of GAE. Thanks!
Dane
  • 874
  • 12
  • 18
3
votes
1 answer

How to run the Google app engine server using Dockerfile

I'm new to docker, i need to run the web2py application in google app engine server using Dockerfile for this i created the dockerfile to install the python, gae server and my web2py source folder. my issues are one how to start the gae server using…
Chandu
  • 51
  • 1
  • 7
3
votes
0 answers

nginx proxy_pass gives extra slash

I need to convert this: http://mydomain.nl/wp/welcome to this (to run web2py): http://127.0.0.1:8000/welcome but this proxy: location /wp { proxy_bind 127.0.0.1; proxy_pass http://localhost:8000/; } results to this URL…
Roland
  • 4,619
  • 7
  • 49
  • 81
3
votes
1 answer

Handling login form in modal using web2py

I have been trying to make modal login form , but as validation of credentials are done after pressing submit the dialog box gets closed , and when I open it again I get to see errors like - invalid username or password . Here is my…
Abhishek Singh
  • 87
  • 2
  • 13
3
votes
2 answers

In web2py, can I specify an existing named field as the autonumber ID in a legacy database?

I have dozens of tables in an existing MSSQL database all with autonumber ID primary keys, but none that are named 'id'. They are instead named PropertyID, ClientID, etc. The official documentation seems to suggest renaming each of these fields to…
mwolfe02
  • 23,787
  • 9
  • 91
  • 161
3
votes
0 answers

Web2Py Fedora: 403 ( You don't have permission to access / )

http://web2py.com/books/default/chapter/29/13/deployment-recipes#One-step-production-deployment Having trouble with: wget http://web2py.googlecode.com/hg/scripts/setup-web2py-fedora.sh chmod +x setup-web2py-fedora.sh sudo ./setup-web2py-fedora.sh I…
Preactive
  • 310
  • 1
  • 13
3
votes
2 answers

web2py external libraries

how can i import other external libraries in web2py? is it possible to load up libs in the static file? can somebody give me an example? thanks peter
Peter
  • 31
  • 1
  • 2
3
votes
1 answer

Web2py Authentication for Restful service and also application users

In web2py we can have restful services as mentioned below, auth.settings.allow_basic_login = True @auth.requires_login() @request.restful() def api(): def GET(s): return 'access granted, you said %s' % s return locals() This service…
Vikash
  • 89
  • 8
3
votes
1 answer

Web2Py on AWS EC2 Linux

I have an instance running Linux at Amazon AWS EC2 after carefully following the instructions provided by Amazon here: Setting Up to Host a Web App on AWS. I have set-up the security groups as mentioned in the documentation provided by Amazon. The…
Toren
  • 442
  • 3
  • 13
3
votes
2 answers

Unit testing in Web2py

I'm following the instructions from this post but cannot get my methods recognized globally. The error message: ERROR: test_suggest_performer (__builtin__.TestSearch) ---------------------------------------------------------------------- Traceback…
Matt Norris
  • 8,596
  • 14
  • 59
  • 90
3
votes
1 answer

web2py sqlform grid modify edit view

How do I modify the edit view in my SQLFORM.grid - size of input fields, drip down menus, etc. Documentation is poorly written so any examples would be a big help. Thank you
Yebach
  • 1,661
  • 8
  • 31
  • 58