Hello, I already host designer.bojanka.net and that is not a problem at all for me (it is hosted on GAE anyway) I'm "maintainer" of web2py sql "appliance" version - that means 2 files (attached) that you should add into scaffolding application to make it work as self hosted application with your other application on same web2py instance.
And finally after long night and day i can say it is working perfectly under GAE (report errors if found :-) ). HOWTO for GAE *only* (not needed for normal local deploy): use enclosed *app.yaml*, *default.py* and *routes.py* and put them in correct places (change according to your application layout) I am planing to really make it multi user system in near future until than it is only this schema :) http://designer.bojanka.net/designer.html?keyword=web2pydesigner On Tue, Sep 15, 2009 at 3:34 PM, Joe Barnhart <[email protected]>wrote: > Really? I've only seen the appliances on the web2py page. I didn't see > any that linked to another site. Massimo already features a link to a live > instance of SQL Designer running at http://designer.bojanka.net/ . I hope > there isn't a problem with finding a place for this appliance because I > think it makes web2py at least 25% more useful RoR (and 100% more impressive > to new users)! > > On Tue, Sep 15, 2009 at 2:22 AM, Fran <[email protected]> wrote: > >> >> Massimo prefers people to host appliances themslves where possible as >> that helps show that they're responsible for maintenance - Massimo >> then provides a link. >> > > > > > > -- "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."-Albert Einstein for words in '' clean up forwarded e-mail before forwarding it to your friends '';do BR=$(($( od -N 2 -t o2 /dev/urandom |grep -v 0000002|cut -d " " -f 2|cut -b 3) + 1)) ; printf "%0.${BR}s %s\n" ">>>>>" ${words} ;done --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---
# coding: utf8
#########################################################################
## This is a samples controller
## - index is the default action of any application
## - user is required for authentication and authorization
## - download is for downloading files uploaded in the db (does streaming)
## - call exposes all registered services (none by default)
#########################################################################
def index():
"""
example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html
"""
redirect(URL(r=request,c='static',f='designer/index.html', vars=request.vars))
def user():
"""
exposes:
http://..../[app]/default/user/login
http://..../[app]/default/user/logout
http://..../[app]/default/user/register
http://..../[app]/default/user/profile
http://..../[app]/default/user/retrieve_password
http://..../[app]/default/user/change_password
use @auth.requires_login()
@auth.requires_membership('group name')
@auth.requires_permission('read','table name',record_id)
to decorate functions that need access control
"""
return dict(form=auth())
def download():
"""
allows downloading of uploaded files
http://..../[app]/default/download/[filename]
"""
return response.download(request,db)
def call():
"""
exposes services. for example:
http://..../[app]/default/call/jsonrpc
decorate with @services.jsonrpc the functions to expose
supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv
"""
session.forget()
return service()
def backend():
import re
if request.vars.action == "save": # api is URL?action=save&keyword=schemaname
if re.compile('[^0-9a-zA-Z]').findall(request.vars.keyword):
raise HTTP(503, 'NOT SAVED! use [0-9a-zA-Z] for project names only... ')
name = db(db.tbldata.tblname == request.vars.keyword).select(db.tbldata.tblname)
if len(name) != 0:
db(db.tbldata.tblname==request.vars.keyword).update(
tblname=request.vars.keyword,
changed=request.now,
xmldata=request.body.read()
)
else:
db.tbldata.insert(tblname=request.vars.keyword,
changed=request.now,
xmldata=request.body.read()
)
raise HTTP(201, "Model has been saved...")
#request.body.read()
elif request.vars.action == "list": # api is URL?action=list
rows = db().select(db.tbldata.ALL)
names = ""
for row in rows:
if names == "":
names = row.tblname
continue
names = names + "\n" + row.tblname
response.headers['Content-Type'] = 'text/plain'
return names
elif request.vars.action == "load": # api is URL?action=load&keyword=schemaname
row = db(db.tbldata.tblname == request.get_vars.keyword).select(db.tbldata.xmldata)
if len(row) != 0 :
response.headers['Content-Type'] = 'application/xml'
return "%s" % row[0].xmldata
#return row[0].xmldata
else:
raise HTTP(404,T('Model Not found...'))
elif request.vars.action == "import": # api is URL?action=import&database=somedatabasename
raise HTTP(501,T("Not implemented"))
#!/usr/bin/python
# -*- coding: utf-8 -*-
# routes_in is a tuple of tuples. The first item in each is a regexp that will
# be used to match the incoming request URL. The second item in the tuple is
# what it will be replaced with. This mechanism allows you to redirect incoming
# routes to different web2py locations
#
# Example: If you wish for your entire website to use init's static directory:
#
# routes_in=( ('/static/(?P<file>[\w\./_-]+)','/init/static/\g<file>') )
#
#routes_in = (('.*:/favicon.ico', '/examples/static/favicon.ico'),
# ('.*:/robots.txt', '/examples/static/robots.txt'),
# ('/','/init/default/index'))
# ('/designer.html?keyword=$zika','/init/static/designer/index.html?keyword=$zika'))
# routes_out, like routes_in translates URL paths created with the web2py URL()
# function in the same manner that route_in translates inbound URL paths.
#
routes_in=(('.*:/designer.html','/init/default/index'),
('.*:/favicon.ico', '/init/static/favicon.ico'),
('.*:/robots.txt', '/init/static/robots.txt'),)
routes_out=()
#routes_out = ()
# Error-handling redirects all HTTP errors (status codes >= 400) to a specified
# path. If you wish to use error-handling redirects, uncomment the tuple
# below. You can customize responses by adding a tuple entry with the first
# value in 'appName/HTTPstatusCode' format. ( Only HTTP codes >= 400 are
# routed. ) and the value as a path to redirect the user to. You may also use
# '*' as a wildcard.
#
# The error handling page is also passed the error code and ticket as
# variables. Traceback information will be stored in the ticket.
#
# routes_onerror = [
# ('init/400', '/init/default/login')
# ,('init/*', '/init/static/fail.html')
# ,('*/404', '/init/static/cantfind.html')
# ,('*/*', '/init/error/index')
# ]
# specify action in charge of error handling
#
# error_handler = dict(application='error',
# controller='default',
# function='index')
# In the event that the error-handling page itself returns an error, web2py will
# fall back to its old static responses. You can customize them here.
# ErrorMessageTicket takes a string format dictionary containing (only) the
# "ticket" key.
# error_message = '<html><body><h1>Invalid request</h1></body></html>'
# error_message_ticket = '<html><body><h1>Internal error</h1>Ticket issued: <a href="/admin/default/ticket/%(ticket)s" target="_blank">%(ticket)s</a></body></html>'
app.yaml
Description: Binary data

