ABOUT 0000644 0001750 0001750 00000000650 11215551217 010372 0 ustar user user Write something about this app.
Developed with web2py.
About static/jquery.flot.pack.js
--------------------------------
Flot is a Javascript plotting library for jQuery. Read more at the
website:
http://code.google.com/p/flot/
Take a look at the examples linked from above, they should give a good
impression of what Flot can do and the source code of the examples is
probably the fastest way to learn how to use Flot. cache/ 0000755 0001750 0001750 00000000000 11215533724 010642 5 ustar user user cache/cache.lock 0000644 0001750 0001750 00000000000 11215533724 012545 0 ustar user user controllers/ 0000755 0001750 0001750 00000000000 11216021176 012137 5 ustar user user controllers/default.py 0000644 0001750 0001750 00000000420 11216021062 014123 0 ustar user user # coding: utf8
def index():
obj=P3D()
obj.test_cube()
return dict(obj=XML(obj.js(400,400)))
def download():
"""
allows downloading of uploaded files
http://..../[app]/default/download/[filename]
"""
return response.download(request,db)
controllers/appadmin.py 0000644 0001750 0001750 00000017506 11215465627 014327 0 ustar user user # coding: utf8
# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################
import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils
# ## crytical --- make a copy of the environment
global_env = copy.copy(globals())
global_env['datetime'] = datetime
http_host = request.env.http_host.split(':')[0]
remote_addr = request.env.remote_addr
try:
hosts = (http_host, socket.gethostbyname(remote_addr))
except:
hosts = (http_host, )
if remote_addr not in hosts:
raise HTTP(400)
if not gluon.fileutils.check_credentials(request):
redirect('/admin')
ignore_rw = True
response.view = 'appadmin.html'
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
args=[request.application])], [T('db'), False,
URL(r=request, f='index')], [T('state'), False,
URL(r=request, f='state')]]
# ##########################################################
# ## auxiliary functions
# ###########################################################
def get_databases(request):
dbs = {}
for (key, value) in global_env.items():
cond = False
try:
cond = isinstance(value, GQLDB)
except:
cond = isinstance(value, SQLDB)
if cond:
dbs[key] = value
return dbs
databases = get_databases(None)
def eval_in_global_env(text):
exec ('_ret=%s' % text, {}, global_env)
return global_env['_ret']
def get_database(request):
if request.args and request.args[0] in databases:
return eval_in_global_env(request.args[0])
else:
session.flash = T('invalid request')
redirect(URL(r=request, f='index'))
def get_table(request):
db = get_database(request)
if len(request.args) > 1 and request.args[1] in db.tables:
return (db, request.args[1])
else:
session.flash = T('invalid request')
redirect(URL(r=request, f='index'))
def get_query(request):
try:
return eval_in_global_env(request.vars.query)
except Exception:
return None
# ##########################################################
# ## list all databases and tables
# ###########################################################
def index():
return dict(databases=databases)
# ##########################################################
# ## insert a new record
# ###########################################################
def insert():
(db, table) = get_table(request)
form = SQLFORM(db[table], ignore_rw=ignore_rw)
if form.accepts(request.vars, session):
response.flash = T('new record inserted')
return dict(form=form)
# ##########################################################
# ## list all records in table and insert new record
# ###########################################################
def download():
import os
db = get_database(request)
return response.download(request,db)
def csv():
import gluon.contenttype
response.headers['Content-Type'] = \
gluon.contenttype.contenttype('.csv')
db = get_database(request)
query = get_query(request)
if not query:
return None
response.headers['Content-disposition'] = 'attachment; filename=%s_%s.csv'\
% tuple(request.vars.query.split('.')[:2])
return str(db(query).select())
def import_csv(table, file):
table.import_from_csv_file(file)
def select():
import re
db = get_database(request)
dbname = request.args[0]
regex = re.compile('(?P
\w+)\.(?P\w+)=(?P\d+)')
if request.vars.query:
match = regex.match(request.vars.query)
if match:
request.vars.query = '%s.%s.%s==%s' % (request.args[0],
match.group('table'), match.group('field'),
match.group('value'))
else:
request.vars.query = session.last_query
query = get_query(request)
if request.vars.start:
start = int(request.vars.start)
else:
start = 0
nrows = 0
stop = start + 100
table = None
rows = []
orderby = request.vars.orderby
if orderby:
orderby = dbname + '.' + orderby
if orderby == session.last_orderby:
if orderby[0] == '~':
orderby = orderby[1:]
else:
orderby = '~' + orderby
session.last_orderby = orderby
session.last_query = request.vars.query
form = FORM(TABLE(TR(T('Query:'), '', INPUT(_style='width:400px',
_name='query', _value=request.vars.query or '',
requires=IS_NOT_EMPTY(error_message=T("Cannot be empty")))), TR(T('Update:'),
INPUT(_name='update_check', _type='checkbox',
value=False), INPUT(_style='width:400px',
_name='update_fields', _value=request.vars.update_fields
or '')), TR(T('Delete:'), INPUT(_name='delete_check',
_class='delete', _type='checkbox', value=False), ''),
TR('', '', INPUT(_type='submit', _value='submit'))),
_action=URL(r=request,args=request.args))
if request.vars.csvfile != None:
try:
import_csv(db[request.vars.table],
request.vars.csvfile.file)
response.flash = T('data uploaded')
except:
response.flash = T('unable to parse csv file')
if form.accepts(request.vars, formname=None):
regex = re.compile(request.args[0] + '\.(?P
\w+)\.id\>0')
match = regex.match(form.vars.query.strip())
if match:
table = match.group('table')
try:
nrows = db(query).count()
if form.vars.update_check and form.vars.update_fields:
db(query).update(**eval_in_global_env('dict(%s)'
% form.vars.update_fields))
response.flash = T('%s rows updated', nrows)
elif form.vars.delete_check:
db(query).delete()
response.flash = T('%s rows deleted', nrows)
nrows = db(query).count()
if orderby:
rows = db(query).select(limitby=(start, stop),
orderby=eval_in_global_env(orderby))
else:
rows = db(query).select(limitby=(start, stop))
except:
(rows, nrows) = ([], 0)
response.flash = T('Invalid Query')
return dict(
form=form,
table=table,
start=start,
stop=stop,
nrows=nrows,
rows=rows,
query=request.vars.query,
)
# ##########################################################
# ## edit delete one record
# ###########################################################
def update():
(db, table) = get_table(request)
try:
id = int(request.args[2])
record = db(db[table].id == id).select()[0]
except:
session.flash = T('record does not exist')
redirect(URL(r=request, f='select', args=request.args[:1],
vars=dict(query='%s.%s.id>0'
% tuple(request.args[:2]))))
form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'), ignore_rw=ignore_rw,
linkto=URL(r=request, f='select',
args=request.args[:1]), upload=URL(r=request,
f='download', args=request.args[:1]))
if form.accepts(request.vars, session):
response.flash = T('done!')
redirect(URL(r=request, f='select', args=request.args[:1],
vars=dict(query='%s.%s.id>0'
% tuple(request.args[:2]))))
return dict(form=form)
# ##########################################################
# ## get global variables
# ###########################################################
def state():
return dict()
controllers/default.py.bak 0000644 0001750 0001750 00000004256 11215555024 014703 0 ustar user user # 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)
#########################################################################
exec('from applications.%s.modules.computingd import Interface' % request.application)
def index():
"""
example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html
"""
response.flash = T('Welcome to web2py')
return dict(message=T('Hello World'))
def ls():
return Interface('http://localhost:8001')('ls -l',output="xxx")
def append():
return Interface('http://localhost:8001').append(request.args(0),'test')
def replace():
return Interface('http://localhost:8001').replace(request.args(0),'test',1)
def get():
return Interface('http://localhost:8001')[request.args(0)]
def set():
Interface('http://localhost:8001')[request.args(0)] = request.args(1)
return 'done'
def plot():
return dict()
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
"""
return service()
cron/ 0000755 0001750 0001750 00000000000 11215511121 010523 5 ustar user user databases/ 0000755 0001750 0001750 00000000000 11216021542 011515 5 ustar user user databases/storage.sqlite 0000644 0000000 0000000 00000000000 11216021542 014352 0 ustar root root errors/ 0000755 0001750 0001750 00000000000 11216021343 011101 5 ustar user user __init__.py 0000644 0001750 0001750 00000000000 11203316461 011670 0 ustar user user __init__.pyc 0000644 0001750 0001750 00000000221 11215533724 012046 0 ustar user user
1
Jc @ s d S( N( ( ( ( s: /Users/mdipierro/web2py/applications/computing/__init__.pys s languages/ 0000755 0001750 0001750 00000000000 11215511121 011530 5 ustar user user languages/pt.py 0000644 0001750 0001750 00000005417 11202315701 012536 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s linhas eliminadas',
'%s rows updated': '%s linhas actualizadas',
'Available databases and tables': 'Available databases and tables',
'Cannot be empty': 'Cannot be empty',
'Check to delete': 'Check to delete',
'Current request': 'Current request',
'Current response': 'Current response',
'Current session': 'Current session',
'Delete:': 'Delete:',
'Edit current record': 'Edit current record',
'Hello World': 'Ol\xc3\xa1 Mundo',
'Import/Export': 'Import/Export',
'Internal State': 'Internal State',
'Invalid Query': 'Consulta Inv\xc3\xa1lida',
'New Record': 'New Record',
'No databases in this application': 'No databases in this application',
'Query:': 'Query:',
'Rows in table': 'Rows in table',
'Rows selected': 'Rows selected',
'Sure you want to delete this object?': 'Tem a certeza que deseja eliminar este objecto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Update:': 'Update:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Welcome to web2py',
'click here for online examples': 'Clique aqui para exemplos online',
'click here for the administrative interface': 'Clique aqui para o painel administrativo',
'data uploaded': 'informa\xc3\xa7\xc3\xa3o enviada',
'database': 'database',
'database %s select': 'database %s select',
'db': 'bd',
'design': 'design',
'done!': 'conclu\xc3\xaddo!',
'export as csv file': 'export as csv file',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'invalid request': 'Pedido Inv\xc3\xa1lido',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'next 100 rows',
'or import from csv file': 'or import from csv file',
'previous 100 rows': 'previous 100 rows',
'record does not exist': 'registo inexistente',
'record id': 'record id',
'selected': 'selected',
'state': 'estado',
'table': 'table',
'unable to parse csv file': 'n\xc3\xa3o foi poss\xc3\xadvel carregar ficheiro csv',
}
languages/pt-br.py 0000644 0001750 0001750 00000005634 11206032053 013140 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" \xc3\xa9 uma express\xc3\xa3o opcional como "campo1=\'novovalor\'". Voc\xc3\xaa n\xc3\xa3o pode atualizar ou apagar os resultados de um JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s linhas apagadas',
'%s rows updated': '%s linhas atualizadas',
'Available databases and tables': 'Bancos de dados e tabelas dispon\xc3\xadveis',
'Cannot be empty': 'N\xc3\xa3o pode ser vazio',
'Check to delete': 'Marque para apagar',
'Current request': 'Requisi\xc3\xa7\xc3\xa3o atual',
'Current response': 'Resposta atual',
'Current session': 'Sess\xc3\xa3o atual',
'Delete:': 'Apagar:',
'Edit current record': 'Editar o registro atual',
'Hello World': 'Ol\xc3\xa1 Mundo',
'Import/Export': 'Importar/Exportar',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta Inv\xc3\xa1lida',
'Login': 'Autentique-se',
'Lost Password': 'Esqueceu sua senha?',
'New Record': 'Novo Registro',
'No databases in this application': 'Sem bancos de dados nesta aplica\xc3\xa7\xc3\xa3o',
'Query:': 'Consulta:',
'Register': 'Registre-se',
'Rows in table': 'Linhas na tabela',
'Rows selected': 'Linhas selecionadas',
'Sure you want to delete this object?': 'Est\xc3\xa1 certo(a) que deseja apagar esse objeto ?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'Uma "consulta" \xc3\xa9 uma condi\xc3\xa7\xc3\xa3o como "db.tabela1.campo1==\'valor\'". Express\xc3\xb5es como "db.tabela1.campo1==db.tabela2.campo2" resultam em um JOIN SQL.',
'Update:': 'Atualizar:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, e ~(...) para NOT para construir consultas mais complexas.',
'Welcome to web2py': 'Bem vindo ao web2py',
'click here for online examples': 'clique aqui para ver alguns exemplos',
'click here for the administrative interface': 'clique aqui para acessar a interface administrativa',
'customize me!': 'Personalize-me!',
'data uploaded': 'dados enviados',
'database': 'banco de dados',
'database %s select': 'Selecionar banco de dados %s',
'db': 'db',
'design': 'design',
'done!': 'conclu\xc3\xaddo!',
'export as csv file': 'exportar como um arquivo csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'requisi\xc3\xa7\xc3\xa3o inv\xc3\xa1lida',
'new record inserted': 'novo registro inserido',
'next 100 rows': 'pr\xc3\xb3ximas 100 linhas',
'or import from csv file': 'ou importar de um arquivo csv',
'previous 100 rows': '100 linhas anteriores',
'record does not exist': 'registro n\xc3\xa3o existe',
'record id': 'id do registro',
'selected': 'selecionado',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'n\xc3\xa3o foi poss\xc3\xadvel analisar arquivo csv',
}
languages/pt-pt.py 0000644 0001750 0001750 00000005417 11202315736 013167 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s linhas eliminadas',
'%s rows updated': '%s linhas actualizadas',
'Available databases and tables': 'Available databases and tables',
'Cannot be empty': 'Cannot be empty',
'Check to delete': 'Check to delete',
'Current request': 'Current request',
'Current response': 'Current response',
'Current session': 'Current session',
'Delete:': 'Delete:',
'Edit current record': 'Edit current record',
'Hello World': 'Ol\xc3\xa1 Mundo',
'Import/Export': 'Import/Export',
'Internal State': 'Internal State',
'Invalid Query': 'Consulta Inv\xc3\xa1lida',
'New Record': 'New Record',
'No databases in this application': 'No databases in this application',
'Query:': 'Query:',
'Rows in table': 'Rows in table',
'Rows selected': 'Rows selected',
'Sure you want to delete this object?': 'Tem a certeza que deseja eliminar este objecto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Update:': 'Update:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Welcome to web2py',
'click here for online examples': 'Clique aqui para exemplos online',
'click here for the administrative interface': 'Clique aqui para o painel administrativo',
'data uploaded': 'informa\xc3\xa7\xc3\xa3o enviada',
'database': 'database',
'database %s select': 'database %s select',
'db': 'bd',
'design': 'design',
'done!': 'conclu\xc3\xaddo!',
'export as csv file': 'export as csv file',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'invalid request': 'Pedido Inv\xc3\xa1lido',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'next 100 rows',
'or import from csv file': 'or import from csv file',
'previous 100 rows': 'previous 100 rows',
'record does not exist': 'registo inexistente',
'record id': 'record id',
'selected': 'selected',
'state': 'estado',
'table': 'table',
'unable to parse csv file': 'n\xc3\xa3o foi poss\xc3\xadvel carregar ficheiro csv',
}
languages/pl.py 0000644 0001750 0001750 00000006172 11214730602 012531 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuni\xc4\x99tych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'Available databases and tables': 'Dost\xc4\x99pne bazy danych i tabele',
'Cannot be empty': 'Nie mo\xc5\xbce by\xc4\x87 puste',
'Change Password': 'Change Password',
'Check to delete': 'Zaznacz aby usun\xc4\x85\xc4\x87',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'Delete:': 'Usu\xc5\x84:',
'Edit Profile': 'Edit Profile',
'Edit current record': 'Edytuj aktualny rekord',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Login': 'Zaloguj',
'Logout': 'Logout',
'Lost Password': 'Przypomnij has\xc5\x82o',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Query:': 'Zapytanie:',
'Register': 'Zarejestruj',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Sure you want to delete this object?': 'Czy na pewno chcesz usun\xc4\x85\xc4\x87 ten obiekt?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'warto\xc5\x9b\xc4\x87\'". Takie co\xc5\x9b jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'Update:': 'Uaktualnij:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'U\xc5\xbcyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...) jako NOT do tworzenia bardziej skomplikowanych zapyta\xc5\x84.',
'Welcome to web2py': 'Witaj w web2py',
'click here for online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'click here for the administrative interface': 'Kliknij aby przej\xc5\x9b\xc4\x87 do panelu administracyjnego',
'customize me!': 'dostosuj mnie!',
'data uploaded': 'dane wys\xc5\x82ane',
'database': 'baza danych',
'database %s select': 'wyb\xc3\xb3r z bazy danych %s',
'db': 'baza danych',
'design': 'projektuj',
'done!': 'zrobione!',
'export as csv file': 'eksportuj jako plik csv',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'invalid request': 'B\xc5\x82\xc4\x99dne \xc5\xbc\xc4\x85danie',
'new record inserted': 'nowy rekord zosta\xc5\x82 wstawiony',
'next 100 rows': 'nast\xc4\x99pne 100 wierszy',
'or import from csv file': 'lub zaimportuj z pliku csv',
'previous 100 rows': 'poprzednie 100 wierszy',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}
languages/it-it.py 0000644 0001750 0001750 00000005220 11202315603 013132 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s records cancellati',
'%s rows updated': '*** %s records modificati',
'Available databases and tables': 'Available databases and tables',
'Cannot be empty': 'Cannot be empty',
'Check to delete': 'Check to delete',
'Current request': 'Current request',
'Current response': 'Current response',
'Current session': 'Current session',
'Delete:': 'Delete:',
'Edit current record': 'Edit current record',
'Hello World': 'Salve Mondo',
'Import/Export': 'Import/Export',
'Internal State': 'Internal State',
'Invalid Query': 'Query invalida',
'New Record': 'New Record',
'No databases in this application': 'No databases in this application',
'Query:': 'Query:',
'Rows in table': 'Rows in table',
'Rows selected': 'Rows selected',
'Sure you want to delete this object?': 'Sicuro che vuoi cancellare questo oggetto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Update:': 'Update:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Welcome to web2py': 'Ciao da wek2py',
'click here for online examples': 'clicca per vedere gli esempi',
'click here for the administrative interface': "clicca per l'interfaccia administrativa",
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'done!': 'fatto!',
'export as csv file': 'export as csv file',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'invalid request': 'richiesta invalida!',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'next 100 rows',
'or import from csv file': 'or import from csv file',
'previous 100 rows': 'previous 100 rows',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'selected': 'selected',
'state': 'stato',
'table': 'table',
'unable to parse csv file': 'non so leggere questo csv file',
}
languages/pl-pl.py 0000644 0001750 0001750 00000006172 11214730605 013145 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyra\xc5\xbceniem postaci "pole1=\'nowawarto\xc5\x9b\xc4\x87\'". Nie mo\xc5\xbcesz uaktualni\xc4\x87 lub usun\xc4\x85\xc4\x87 wynik\xc3\xb3w z JOIN:',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': 'Wierszy usuni\xc4\x99tych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'Available databases and tables': 'Dost\xc4\x99pne bazy danych i tabele',
'Cannot be empty': 'Nie mo\xc5\xbce by\xc4\x87 puste',
'Change Password': 'Change Password',
'Check to delete': 'Zaznacz aby usun\xc4\x85\xc4\x87',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'Delete:': 'Usu\xc5\x84:',
'Edit Profile': 'Edit Profile',
'Edit current record': 'Edytuj aktualny rekord',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Login': 'Zaloguj',
'Logout': 'Logout',
'Lost Password': 'Przypomnij has\xc5\x82o',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Query:': 'Zapytanie:',
'Register': 'Zarejestruj',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Sure you want to delete this object?': 'Czy na pewno chcesz usun\xc4\x85\xc4\x87 ten obiekt?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Zapytanie" jest warunkiem postaci "db.tabela1.pole1==\'warto\xc5\x9b\xc4\x87\'". Takie co\xc5\x9b jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'Update:': 'Uaktualnij:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'U\xc5\xbcyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...) jako NOT do tworzenia bardziej skomplikowanych zapyta\xc5\x84.',
'Welcome to web2py': 'Witaj w web2py',
'click here for online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'click here for the administrative interface': 'Kliknij aby przej\xc5\x9b\xc4\x87 do panelu administracyjnego',
'customize me!': 'dostosuj mnie!',
'data uploaded': 'dane wys\xc5\x82ane',
'database': 'baza danych',
'database %s select': 'wyb\xc3\xb3r z bazy danych %s',
'db': 'baza danych',
'design': 'projektuj',
'done!': 'zrobione!',
'export as csv file': 'eksportuj jako plik csv',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'invalid request': 'B\xc5\x82\xc4\x99dne \xc5\xbc\xc4\x85danie',
'new record inserted': 'nowy rekord zosta\xc5\x82 wstawiony',
'next 100 rows': 'nast\xc4\x99pne 100 wierszy',
'or import from csv file': 'lub zaimportuj z pliku csv',
'previous 100 rows': 'poprzednie 100 wierszy',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}
languages/fr-fr.py 0000644 0001750 0001750 00000005434 11202315640 013130 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s rang\xc3\xa9es effac\xc3\xa9es',
'%s rows updated': '%s rang\xc3\xa9es mises \xc3\xa0 jour',
'Available databases and tables': 'Available databases and tables',
'Cannot be empty': 'Cannot be empty',
'Check to delete': 'Check to delete',
'Current request': 'Current request',
'Current response': 'Current response',
'Current session': 'Current session',
'Delete:': 'Delete:',
'Edit current record': 'Edit current record',
'Hello World': 'Bonjour Monde',
'Import/Export': 'Import/Export',
'Internal State': 'Internal State',
'Invalid Query': 'Requ\xc3\xaate Invalide',
'New Record': 'New Record',
'No databases in this application': 'No databases in this application',
'Query:': 'Query:',
'Rows in table': 'Rows in table',
'Rows selected': 'Rows selected',
'Sure you want to delete this object?': 'Souhaitez vous vraiment effacercet objet?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Update:': 'Update:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Welcome to web2py': 'Bienvenue sur web2py',
'click here for online examples': 'cliquez ici pour voir des exemples enligne',
'click here for the administrative interface': "cliquez ici pour aller\xc3\xa0 l'interface d'administration",
'data uploaded': 'donn\xc3\xa9es t\xc3\xa9l\xc3\xa9charg\xc3\xa9es',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'design',
'done!': 'fait!',
'export as csv file': 'export as csv file',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'invalid request': 'requ\xc3\xaate invalide',
'new record inserted': 'nouvelle archive ins\xc3\xa9r\xc3\xa9e',
'next 100 rows': 'next 100 rows',
'or import from csv file': 'or import from csv file',
'previous 100 rows': 'previous 100 rows',
'record does not exist': "l'archive n'existe pas",
'record id': 'record id',
'selected': 'selected',
'state': '\xc3\xa9tat',
'table': 'table',
'unable to parse csv file': "incapable d'analyser le fichier cvs",
}
languages/it.py 0000644 0001750 0001750 00000005220 11202315655 012527 0 ustar user user {
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s records cancellati',
'%s rows updated': '*** %s records modificati',
'Available databases and tables': 'Available databases and tables',
'Cannot be empty': 'Cannot be empty',
'Check to delete': 'Check to delete',
'Current request': 'Current request',
'Current response': 'Current response',
'Current session': 'Current session',
'Delete:': 'Delete:',
'Edit current record': 'Edit current record',
'Hello World': 'Salve Mondo',
'Import/Export': 'Import/Export',
'Internal State': 'Internal State',
'Invalid Query': 'Query invalida',
'New Record': 'New Record',
'No databases in this application': 'No databases in this application',
'Query:': 'Query:',
'Rows in table': 'Rows in table',
'Rows selected': 'Rows selected',
'Sure you want to delete this object?': 'Sicuro che vuoi cancellare questo oggetto?',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.',
'Update:': 'Update:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.',
'Welcome to web2py': 'Ciao da wek2py',
'click here for online examples': 'clicca per vedere gli esempi',
'click here for the administrative interface': "clicca per l'interfaccia administrativa",
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'done!': 'fatto!',
'export as csv file': 'export as csv file',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'invalid request': 'richiesta invalida!',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'next 100 rows',
'or import from csv file': 'or import from csv file',
'previous 100 rows': 'previous 100 rows',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'selected': 'selected',
'state': 'stato',
'table': 'table',
'unable to parse csv file': 'non so leggere questo csv file',
}
LICENSE 0000644 0001750 0001750 00000000207 11201222575 010575 0 ustar user user This is a sample license. You can write here anything you want
as long as you do not violate web2py copyright, trademark and license.
models/ 0000755 0001750 0001750 00000000000 11216025043 011051 5 ustar user user models/menu.py 0000644 0001750 0001750 00000005561 11216022306 012375 0 ustar user user # coding: utf8
#########################################################################
## Customize your APP title, subtitle and menus here
#########################################################################
response.title = '3D visualization'
response.subtitle = 'A thin 3D layer on top of processing.js'
##########################################
## this is the authentication menu
## remove if not necessary
##########################################
if 'auth' in globals():
if not auth.is_logged_in():
response.menu_auth = [
[T('Login'), False, auth.settings.login_url,
[
[T('Register'), False,
URL(request.application,'default','user/register')],
[T('Lost Password'), False,
URL(request.application,'default','user/retrieve_password')]]
],
]
else:
response.menu_auth = [
['User: '+auth.user.first_name,False,None,
[
[T('Logout'), False,
URL(request.application,'default','user/logout')],
[T('Edit Profile'), False,
URL(request.application,'default','user/profile')],
[T('Change Password'), False,
URL(request.application,'default','user/change_password')]]
],
]
##########################################
## this is the main applicaiton menu
## add/remove items as required
##########################################
response.menu = [
['Index', False,
URL(request.application,'default','index'), []],
]
##########################################
## this is here to provide shortcuts
## during development. remove in production
##########################################
response.menu_edit=[
['Edit', False, URL('admin', 'default', 'design/%s' % request.application),
[
['Controller', False,
URL('admin', 'default', 'edit/%s/controllers/default.py' \
% request.application)],
['View', False,
URL('admin', 'default', 'edit/%s/views/%s' \
% (request.application,response.view))],
['Layout', False,
URL('admin', 'default', 'edit/%s/views/layout.html' \
% request.application)],
['Stylesheet', False,
URL('admin', 'default', 'edit/%s/static/base.css' \
% request.application)],
['DB Model', False,
URL('admin', 'default', 'edit/%s/models/db.py' \
% request.application)],
['Menu Model', False,
URL('admin', 'default', 'edit/%s/models/menu.py' \
% request.application)],
['Database', False,
URL(request.application, 'appadmin', 'index')],
]
],
]
models/db.py 0000644 0001750 0001750 00000006137 11216014225 012017 0 ustar user user # coding: utf8
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################
if request.env.web2py_runtime_gae: # if running on Google App Engine
from gluon.contrib.gql import *
### connect to Google BigTable
db = GQLDB()
## and store sessions and tickets there
session.connect(request, response, db=db)
### or use the following lines to store sessions in Memcache
# from gluon.contrib.memdb import MEMDB
# from google.appengine.api.memcache import Client
# session.connect(request, response, db=MEMDB(Client()))
else: # else use a normal relational database
# if not, use SQLite or other DB
db = SQLDB('sqlite://storage.sqlite')
#########################################################################
## uncomment the following line if you do not want sessions
#session.forget()
#########################################################################
#########################################################################
## Define your tables below, for example
##
## >>> db.define_table('mytable',SQLField('myfield','string'))
##
## Fields can be 'string','text','password','integer','double','boolean'
## 'date','time','datetime','blob','upload', 'reference TABLENAME'
## There is an implicit 'id integer autoincrement' field
## Consult manual for more options, validators, etc.
##
## More API examples for controllers:
##
## >>> db.mytable.insert(myfield='value')
## >>> rows=db(db.mytbale.myfield=='value).select(db.mytable.ALL)
## >>> for row in rows: print row.id, row.myfield
#########################################################################
#########################################################################
## Here is sample code if you need:
## - email capabilities
## - authentication (registration, login, logout, ... )
## - authorization (role based authorization)
## - services (xml, csv, json, xmlrpc, jsonrpc, amf, rss)
## - crud actions
## comment/uncomment as needed
#########################################################################
from gluon.tools import *
#auth=Auth(globals(),db) # authentication/authorization
#auth.define_tables() # creates all needed tables
#crud=Crud(globals(),db) # for CRUD helpers using auth
#service=Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc
## uncomment as necessary or consult docs for more options
#crud.settings.auth=auth # (optional) enforces authorization on crud
#mail=Mail() # mailer
#mail.settings.server='smtp.gmail.com:587' # your SMTP server
#mail.settings.sender='you@gmail.com' # your email
#mail.settings.login='username:password' # your credentials
#auth.settings.mailer=mail # for user email verification
#auth.settings.registration_requires_verification = True
#auth.settings.registration_requires_approval = True
#auth.messages.verify_email = \
# 'Click on the link http://.../verify_email/%(key)s to verify your email'
models/p3d.py 0000644 0001750 0001750 00000006415 11216025015 012116 0 ustar user user class P3D:
def __init__(self):
self.lines=[]
self.spheres=[]
self.triangles=[]
def line(self,x0,y0,z0,x1,y1,z1,stroke=1,red=255,green=255,blue=255):
self.lines.append((x0,y0,z0,x1,y1,z1,stroke,red,green,blue))
def sphere(self,x0,y0,z0,radius=5,red=255,green=255,blue=255):
self.spheres.append((x0,y0,z0,radius,red,green,blue))
def triangle(self,x0,y0,z0,x1,y1,z1,x2,y2,z2,red=255,green=255,blue=255):
self.triangles.append((x0,y0,z0,x1,y1,z1,x2,y2,z2,red,green,blue))
def test_cube(self):
for x in xrange(-100,200,200):
for y in xrange(-100,200,200):
for z in xrange(-100,200,200):
if x>0: self.line(x,y,z,-x,y,z)
if y>0: self.line(x,y,z,x,-y,z)
if z>0: self.line(x,y,z,x,y,-z)
self.sphere(x,y,z,radius=10,green=0)
self.triangle(0,0,0,0,y,z,x,y,z,red=0)
def lin(self,v):
return ','.join([str(int(x)) for x in v])
def js(self, width=400, height=400):
lines=','.join([self.lin(x) for x in self.lines])
spheres=','.join([self.lin(x) for x in self.spheres])
triangles=','.join([self.lin(x) for x in self.triangles])
return """
""" % (lines, spheres, triangles, width, height, width, height)
modules/ 0000755 0001750 0001750 00000000000 11216021500 011230 5 ustar user user modules/__init__.py 0000644 0001750 0001750 00000000000 11201222575 013340 0 ustar user user private/ 0000755 0001750 0001750 00000000000 11215511121 011234 5 ustar user user sessions/ 0000755 0001750 0001750 00000000000 11216113017 011433 5 ustar user user sessions/75-101-217-4-8030cc54-eefc-422f-aad9-0b93084ff06e 0000644 0000000 0000000 00000000003 11216113017 017525 0 ustar root root (d. static/ 0000755 0001750 0001750 00000000000 11216113043 011053 5 ustar user user static/processing.init.js 0000755 0001750 0001750 00000001643 11215634744 014555 0 ustar user user /*
* This code searches for all the
{{if request.function=='index':}}
{{=T("Available databases and tables")}}
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
{{for db in sorted(databases):}}
{{for table in databases[db].tables:}}
{{if table:}}
[ {{=A(str(T('insert new %s'))%table,_href=URL(r=request,f='insert',args=[request.args[0],table]))}} ]
{{=T("Rows in table")}}
{{else:}}
{{=T("Rows selected")}}
{{pass}}
{{=form}}
{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}
{{=BEAUTIFY(session)}}
{{pass}}
views/generic.rss 0000644 0001750 0001750 00000000754 11210247525 013103 0 ustar user user {{
###
# response._vars contains the dictionary returned by the controller action
# for this to work the action must return something like
#
# dict(title=...,link=...,description=...,created_on='...',items=...)
#
# items is a list of dictionaries each with title, link, description, pub_date.
###
try:
from gluon.serializers import rss
response.write(rss(response._vars),escape=False)
response.headers['Content-Type']='application/rss+xml'
except:
raise HTTP(405,'no rss')
}} views/layout.html 0000644 0001750 0001750 00000004470 11215547407 013147 0 ustar user user
{{=response.title or 'response.title'}}
{{include 'web2py_ajax.html'}}
views/generic.html 0000644 0001750 0001750 00000001411 11210247540 013224 0 ustar user user {{extend 'layout.html'}}
{{"""
You should not modify this file.
It is used as default when a view is not provided for your controllers
"""}}
{{=BEAUTIFY(response._vars)}}
request
{{=BEAUTIFY(request)}}
session
{{=BEAUTIFY(session)}}
response
{{=BEAUTIFY(response)}}
views/web2py_ajax.html 0000644 0001750 0001750 00000004621 11210244352 014027 0 ustar user user {{import os}}
views/default/ 0000755 0001750 0001750 00000000000 11216113006 012344 5 ustar user user views/default/user.html 0000644 0001750 0001750 00000000431 11201233324 014206 0 ustar user user {{extend 'layout.html'}}
{{=form}}
{{if request.args[0]=='login':}}
register lost password
{{pass}}
views/default/index.html 0000644 0001750 0001750 00000003325 11216112755 014356 0 ustar user user {{extend 'layout.html'}}
Use the mouse to rotate
{{=obj}}
About
This is a web2py scaffolding app that includes a pure javascript widget for
3D visualization in the browser.
It is based on and includes the processing.js library developed by John Resig. You can rotate the image using the mouse. It can handle up to 1500 geometric primitives (lines, sheres, triangles). It is licensed under BSD license. The license does not cover nor overrides the processing.js license (in the code).
The widget (implemented in class P3D in file p3d.py) consists of server side Python code for building the object and client-side javascript code.
It DOES NOT REQUIRE web2py and can be used with any Python web framework.
{{=CODE("""
## each point coordinate (x,y,z) has to be in -100,100 range.
def index():
obj=P3D()
obj.line(-100,-100,-100, 100,100,100, red=255,green=0,blue=0)
obj.sphere(0,0,0, radius=20,red=0,green=255,blue=0)
obj.triangle(0,0,0, 100,0,0, 100,100,0, red=255,green=0,blue=0)
return dict(obj=XML(obj.js()))
""".strip(),language="web2py")}}