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

Why isn't web2py more readily adopted?

I have been playing with python and different web frameworks. I started with Django, but am not in so deep that I am entrenched. I really quite like python but have not found that "perfect" web solution. My qualifications of perfect would…
harwalan
  • 847
  • 2
  • 9
  • 12
4
votes
4 answers

What's the most productive frontend framework to use with SOLR as the backend?

Want to build a web app using SOLR as the only backend. Most of the data will be stored in SOLR via offline jobs although there is some need for CRUD. Looking at popular web frameworks today like Rails, Django, web2py etc. despite NoSQL the sweet…
HarryF
  • 196
  • 6
4
votes
2 answers

Web2py ticket invalid links

I started playing around with web2py the other day for a new project. I really like the structure and the whole concept which feels like a breath of fresh air after spending a few years with PHP frameworks. The only thing (currently) that is…
Fredrik
  • 301
  • 3
  • 10
4
votes
1 answer

How to setup web2py fixtures

I'm trying to find a way to create fixtures for my web2py application. I came across http://thadeusb.com/weblog/2010/4/21/using_fixtures_in_web2py that suggests creating a x_fixtures.py file to place all the fixtures in. The problem is that after a…
blastthisinferno
  • 529
  • 1
  • 6
  • 18
4
votes
1 answer

Using web2py on Eclipse

I am trying to use the steps I found on the net to make web2py work on Eclipse, but I must have something setup wrong because Eclipse gives me error on the imports. For instance the instructions say to do this at the top of controllers: if 0: …
arinte
  • 3,660
  • 10
  • 45
  • 65
4
votes
1 answer

Web2py - Howto Auto Convert Username field to uppercase

I am looking to have all users that sign in have their name converted(Transformed) to uppercase in the DB records or before it hits the DB. Currently I am using LDAP. So people are free to use sign ins like…
Preactive
  • 310
  • 1
  • 13
4
votes
3 answers

running web2py scheduler in production

I know that I can run the scheduler manually by using python web2py.py -K myapp But where should this be specified in production environment? I am using standard web2py deployment script for apache, on ubuntu.
Euphorbium
  • 1,177
  • 5
  • 17
  • 35
4
votes
2 answers

web2py server-side comments

In a web2py view, how do I comment out server-side code? In ASP.NET, I can surround any HTML or code tags with <%-- and --%> and that block will not be compiled or sent to the client. Velocity does the same thing with #* and *#. Is there an…
MikeWyatt
  • 7,842
  • 10
  • 50
  • 71
4
votes
0 answers

Extremely slow raw SQL queries on web2py

db.executesql() takes 30 seconds to return a result, despite the fact that same query takes 0.5-1 second if I try it on the MySQL console or with the same code on the web2py debug console or on the web2py shell. dbs._timings #From the first test…
Mehmet A.
  • 41
  • 2
4
votes
1 answer

Pyjamas & JavaScript: Too much recursion

I'm doing a Pyjamas example and get this error: TodoApp InternalError: too much recursion Here is the significant portion of TodoApp.py from the linked tutorial (please ignore indentation from the copy/paste): class TodoApp: def…
Matt Norris
  • 8,596
  • 14
  • 59
  • 90
4
votes
2 answers

How do I get the current url in web2py?

In web2py how do I get the complete url of the current page? I want the (possibly rewritten) url that appears in the browser address bar. e.g. http://www.example.com/products/televisions?sort=price&page=2
User
  • 62,498
  • 72
  • 186
  • 247
4
votes
2 answers

web2py check if exist in db insert or update

I'm trying to perform a check to see if a record exist first before inserting the record so I won't get an error. If it exists, i'll update a field. mydb(mydb.myitems.itemNumber==int(row)).update(oldImageName=fileName) or…
user3211229
  • 111
  • 3
  • 15
4
votes
1 answer

Using Nose & NoseXUnit on a Python package

This is a previous post detailing a CI setup for Python. The asker and answerer detail the use of Nose and NoseXUnit with Hudson for their builds. However, NoseXUnit throws an error when run on any source folder where init.py is present: File…
Matt Norris
  • 8,596
  • 14
  • 59
  • 90
4
votes
2 answers

Created Date of file via ftp

Good Day! How to get created date of a file via ftp?. Im using web2py,python,ftplib and filezilla as a ftp server. I can get the modified date via f.sendcmd('MDTM '+filename). Any suggestions? Thanks!
user3005006
  • 41
  • 1
  • 2
4
votes
1 answer

Web2py Import Once per Session

I'm using Web2Py and i want to import my program simply once per session... not everytime the page is loaded. is this possible ? such as "import Client" being used on the page but only import it once per session..
user233864
  • 1,727
  • 2
  • 13
  • 12