code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
sessions2trash.py
Run this script in a web2py environment shell e.g. python web2py.py -S app
If models are loaded (-M option) auth.settings.expiration is assumed
for sessions without an expiration. If models are not loaded, sessions older
than 60 minutes are removed. Use the --expiration option to override these
values.
Typical usage:
# Delete expired sessions every 5 minutes
nohup python web2py.py -S app -M -R scripts/sessions2trash.py &
# Delete sessions older than 60 minutes regardless of expiration,
# with verbose output, then exit.
python web2py.py -S app -M -R scripts/sessions2trash.py -A -o -x 3600 -f -v
# Delete all sessions regardless of expiry and exit.
python web2py.py -S app -M -R scripts/sessions2trash.py -A -o -x 0
"""
from gluon.storage import Storage
from optparse import OptionParser
import cPickle
import datetime
import os
import stat
import time
EXPIRATION_MINUTES = 60
SLEEP_MINUTES = 5
VERSION = 0.3
def main():
"""Main processing."""
usage = '%prog [options]' + '\nVersion: %s' % VERSION
parser = OptionParser(usage=usage)
parser.add_option('-o', '--once',
action='store_true', dest='once', default=False,
help='Delete sessions, then exit.',
)
parser.add_option('-s', '--sleep',
dest='sleep', default=SLEEP_MINUTES * 60, type="int",
help='Number of seconds to sleep between executions. Default 300.',
)
parser.add_option('-x', '--expiration',
dest='expiration', default=None, type="int",
help='Expiration value for sessions without expiration (in seconds)',
)
parser.add_option('-f', '--force',
action='store_true', dest='force', default=False,
help=('Ignore session expiration. '
'Force expiry based on -x option or auth.settings.expiration.')
)
parser.add_option('-v', '--verbose',
action='store_true', dest='verbose', default=False,
help='Print verbose output.',
)
(options, unused_args) = parser.parse_args()
expiration = options.expiration
if expiration is None:
try:
expiration = auth.settings.expiration
except:
expiration = EXPIRATION_MINUTES * 60
while True:
trash_session_files(expiration, options.force, options.verbose)
if options.once:
break
else:
time.sleep(options.sleep)
def trash_session_files(expiration, force=False, verbose=False):
"""
Trashes expired session files.
Arguments::
expiration: integer, expiration value to use for sessions without one.
force: If True, ignores session expiration and use value of
expiration argument.
verbose: If True, print names of sessions trashed.
"""
now = datetime.datetime.now()
path = os.path.join(request.folder, 'sessions')
for file in os.listdir(path):
filename = os.path.join(path, file)
last_visit = datetime.datetime.fromtimestamp(
os.stat(filename)[stat.ST_MTIME])
if expiration > 0:
try:
f = open(filename, 'rb+')
try:
session = Storage()
session.update(cPickle.load(f))
finally:
f.close()
if session.auth:
if session.auth.expiration and not force:
expiration = session.auth.expiration
if session.auth.last_visit:
last_visit = session.auth.last_visit
except:
pass
if expiration == 0 or \
total_seconds(now - last_visit) > expiration:
os.unlink(filename)
if verbose:
print('Session trashed: %s' % file)
def total_seconds(delta):
"""
Adapted from Python 2.7's timedelta.total_seconds() method.
Args:
delta: datetime.timedelta instance.
"""
return (delta.microseconds + (delta.seconds + (delta.days * 24 * 3600)) * \
10 ** 6) / 10 ** 6
main()
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# TODO: Comment this code
import sys
import shutil
import os
from gluon.languages import findT
sys.path.insert(0, '.')
file = sys.argv[1]
apps = sys.argv[2:]
d = {}
for app in apps:
path = 'applications/%s/' % app
findT(path, file)
langfile = open(os.path.join(path, 'languages', '%s.py' % file))
try:
data = eval(langfile.read())
finally:
langfile.close()
d.update(data)
path = 'applications/%s/' % apps[-1]
file1 = os.path.join(path, 'languages', '%s.py' % file)
f = open(file1, 'w')
try:
f.write('{\n')
keys = d.keys()
keys.sort()
for key in keys:
f.write('%s:%s,\n' % (repr(key), repr(str(d[key]))))
f.write('}\n')
finally:
f.close()
oapps = reversed(apps[:-1])
for app in oapps:
path2 = 'applications/%s/' % app
file2 = os.path.join(path2, 'languages', '%s.py' % file)
shutil.copyfile(file1, file2)
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create web2py model (python code) to represent PostgreSQL tables.
Features:
* Uses ANSI Standard INFORMATION_SCHEMA (might work with other RDBMS)
* Detects legacy "keyed" tables (not having an "id" PK)
* Connects directly to running databases, no need to do a SQL dump
* Handles notnull, unique and referential constraints
* Detects most common datatypes and default values
* Support PostgreSQL columns comments (ie. for documentation)
Requeriments:
* Needs PostgreSQL pyscopg2 python connector (same as web2py)
* If used against other RDBMS, import and use proper connector (remove pg_ code)
Created by Mariano Reingart, based on a script to "generate schemas from dbs"
(mysql) by Alexandre Andrade
"""
_author__ = "Mariano Reingart <reingart@gmail.com>"
HELP = """
USAGE: extract_pgsql_models db host port user passwd
Call with PostgreSQL database connection parameters,
web2py model will be printed on standard output.
EXAMPLE: python extract_pgsql_models.py mydb localhost 5432 reingart saraza
"""
# Config options
DEBUG = False # print debug messages to STDERR
SCHEMA = 'public' # change if not using default PostgreSQL schema
# Constant for Field keyword parameter order (and filter):
KWARGS = ('type', 'length', 'default', 'required', 'ondelete',
'notnull', 'unique', 'label', 'comment')
import sys
def query(conn, sql,*args):
"Execute a SQL query and return rows as a list of dicts"
cur = conn.cursor()
ret = []
try:
if DEBUG: print >> sys.stderr, "QUERY: ", sql % args
cur.execute(sql, args)
for row in cur:
dic = {}
for i, value in enumerate(row):
field = cur.description[i][0]
dic[field] = value
if DEBUG: print >> sys.stderr, "RET: ", dic
ret.append(dic)
return ret
finally:
cur.close()
def get_tables(conn, schema=SCHEMA):
"List table names in a given schema"
rows = query(conn, """SELECT table_name FROM information_schema.tables
WHERE table_schema = %s
ORDER BY table_name""", schema)
return [row['table_name'] for row in rows]
def get_fields(conn, table):
"Retrieve field list for a given table"
if DEBUG: print >> sys.stderr, "Processing TABLE", table
rows = query(conn, """
SELECT column_name, data_type,
is_nullable,
character_maximum_length,
numeric_precision, numeric_precision_radix, numeric_scale,
column_default
FROM information_schema.columns
WHERE table_name=%s
ORDER BY ordinal_position""", table)
return rows
def define_field(conn, table, field, pks):
"Determine field type, default value, references, etc."
f={}
ref = references(conn, table, field['column_name'])
if ref:
f.update(ref)
elif field['column_default'] and \
field['column_default'].startswith("nextval") and \
field['column_name'] in pks:
# postgresql sequence (SERIAL) and primary key!
f['type'] = "'id'"
elif field['data_type'].startswith('character'):
f['type'] = "'string'"
if field['character_maximum_length']:
f['length'] = field['character_maximum_length']
elif field['data_type'] in ('text', ):
f['type'] = "'text'"
elif field['data_type'] in ('boolean', 'bit'):
f['type'] = "'boolean'"
elif field['data_type'] in ('integer', 'smallint', 'bigint'):
f['type'] = "'integer'"
elif field['data_type'] in ('double precision', 'real' ):
f['type'] = "'double'"
elif field['data_type'] in ('timestamp', 'timestamp without time zone'):
f['type'] = "'datetime'"
elif field['data_type'] in ('date', ):
f['type'] = "'date'"
elif field['data_type'] in ('time', 'time without time zone'):
f['type'] = "'time'"
elif field['data_type'] in ('numeric', 'currency'):
f['type'] = "'decimal'"
f['precision'] = field['numeric_precision']
f['scale'] = field['numeric_scale'] or 0
elif field['data_type'] in ('bytea', ):
f['type'] = "'blob'"
elif field['data_type'] in ('point', 'lseg', 'polygon', 'unknown', 'USER-DEFINED'):
f['type'] = "" # unsupported?
else:
raise RuntimeError("Data Type not supported: %s " % str(field))
try:
if field['column_default']:
if field['column_default']=="now()":
d = "request.now"
elif field['column_default']=="true":
d = "True"
elif field['column_default']=="false":
d = "False"
else:
d = repr(eval(field['column_default']))
f['default'] = str(d)
except (ValueError, SyntaxError):
pass
except Exception, e:
raise RuntimeError("Default unsupported '%s'" % field['column_default'])
if not field['is_nullable']:
f['notnull'] = "True"
comment = get_comment(conn, table, field)
if comment is not None:
f['comment'] = repr(comment)
return f
def is_unique(conn, table, field):
"Find unique columns (incomplete support)"
rows = query(conn, """
SELECT information_schema.constraint_column_usage.column_name
FROM information_schema.table_constraints
NATURAL JOIN information_schema.constraint_column_usage
WHERE information_schema.table_constraints.table_name=%s
AND information_schema.constraint_column_usage.column_name=%s
AND information_schema.table_constraints.constraint_type='UNIQUE'
;""", table, field['column_name'])
return rows and True or False
def get_comment(conn, table, field):
"Find the column comment (postgres specific)"
rows = query(conn, """
SELECT d.description AS comment
FROM pg_class c
JOIN pg_description d ON c.oid=d.objoid
JOIN pg_attribute a ON c.oid = a.attrelid
WHERE c.relname=%s AND a.attname=%s
AND a.attnum = d.objsubid
;""", table, field['column_name'])
return rows and rows[0]['comment'] or None
def primarykeys(conn, table):
"Find primary keys"
rows = query(conn, """
SELECT information_schema.constraint_column_usage.column_name
FROM information_schema.table_constraints
NATURAL JOIN information_schema.constraint_column_usage
WHERE information_schema.table_constraints.table_name=%s
AND information_schema.table_constraints.constraint_type='PRIMARY KEY'
;""", table)
return [row['column_name'] for row in rows]
def references(conn, table, field):
"Find a FK (fails if multiple)"
rows1 = query(conn, """
SELECT table_name, column_name, constraint_name,
update_rule, delete_rule, ordinal_position
FROM information_schema.key_column_usage
NATURAL JOIN information_schema.referential_constraints
NATURAL JOIN information_schema.table_constraints
WHERE information_schema.key_column_usage.table_name=%s
AND information_schema.key_column_usage.column_name=%s
AND information_schema.table_constraints.constraint_type='FOREIGN KEY'
;""", table, field)
if len(rows1)==1:
rows2 = query(conn, """
SELECT table_name, column_name, *
FROM information_schema.constraint_column_usage
WHERE constraint_name=%s
""", rows1[0]['constraint_name'])
row = None
if len(rows2)>1:
row = rows2[int(rows1[0]['ordinal_position'])-1]
keyed = True
if len(rows2)==1:
row = rows2[0]
keyed = False
if row:
if keyed: # THIS IS BAD, DON'T MIX "id" and primarykey!!!
ref = {'type': "'reference %s.%s'" % (row['table_name'],
row['column_name'])}
else:
ref = {'type': "'reference %s'" % (row['table_name'],)}
if rows1[0]['delete_rule']!="NO ACTION":
ref['ondelete'] = repr(rows1[0]['delete_rule'])
return ref
elif rows2:
raise RuntimeError("Unsupported foreign key reference: %s" %
str(rows2))
elif rows1:
raise RuntimeError("Unsupported referential constraint: %s" %
str(rows1))
def define_table(conn, table):
"Output single table definition"
fields = get_fields(conn, table)
pks = primarykeys(conn, table)
print "db.define_table('%s'," % (table, )
for field in fields:
fname = field['column_name']
fdef = define_field(conn, table, field, pks)
if fname not in pks and is_unique(conn, table, field):
fdef['unique'] = "True"
if fdef['type']=="'id'" and fname in pks:
pks.pop(pks.index(fname))
print " Field('%s', %s)," % (fname,
', '.join(["%s=%s" % (k, fdef[k]) for k in KWARGS
if k in fdef and fdef[k]]))
if pks:
print " primarykey=[%s]," % ", ".join(["'%s'" % pk for pk in pks])
print " migrate=migrate)"
print
def define_db(conn, db, host, port, user, passwd):
"Output database definition (model)"
dal = 'db = DAL("postgres://%s:%s@%s:%s/%s", pool_size=10)'
print dal % (user, passwd, host, port, db)
print
print "migrate = False"
print
for table in get_tables(conn):
define_table(conn, table)
if __name__ == "__main__":
if len(sys.argv) < 6:
print HELP
else:
# Parse arguments from command line:
db, host, port, user, passwd = sys.argv[1:6]
# Make the database connection (change driver if required)
import psycopg2
cnn = psycopg2.connect(database=db, host=host, port=port,
user=user, password=passwd,
)
# Start model code generation:
define_db(cnn, db, host, port, user, passwd)
| Python |
import sys
import re
def cleancss(text):
text=re.compile('\s+').sub(' ', text)
text=re.compile('\s*(?P<a>,|:)\s*').sub('\g<a> ', text)
text=re.compile('\s*;\s*').sub(';\n ', text)
text=re.compile('\s*\{\s*').sub(' {\n ', text)
text=re.compile('\s*\}\s*').sub('\n}\n\n', text)
return text
def cleanhtml(text):
text=text.lower()
r=re.compile('\<script.+?/script\>', re.DOTALL)
scripts=r.findall(text)
text=r.sub('<script />', text)
r=re.compile('\<style.+?/style\>', re.DOTALL)
styles=r.findall(text)
text=r.sub('<style />', text)
text=re.compile(
'<(?P<tag>(input|meta|link|hr|br|img|param))(?P<any>[^\>]*)\s*(?<!/)>')\
.sub('<\g<tag>\g<any> />', text)
text=text.replace('\n', ' ')
text=text.replace('>', '>\n')
text=text.replace('<', '\n<')
text=re.compile('\s*\n\s*').sub('\n', text)
lines=text.split('\n')
(indent, newlines)=(0, [])
for line in lines:
if line[:2]=='</': indent=indent-1
newlines.append(indent*' '+line)
if not line[:2]=='</' and line[-1:]=='>' and \
not line[-2:] in ['/>', '->']: indent=indent+1
text='\n'.join(newlines)
text=re.compile('\<div(?P<a>( .+)?)\>\s+\</div\>').sub('<div\g<a>></div>',text)
text=re.compile('\<a(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</a\>').sub('<a\g<a>>\g<b></a>',text)
text=re.compile('\<b(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</b\>').sub('<b\g<a>>\g<b></b>',text)
text=re.compile('\<i(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</i\>').sub('<i\g<a>>\g<b></i>',text)
text=re.compile('\<span(?P<a>( .+)?)\>\s+(?P<b>[\w\s\(\)\/]+?)\s+\</span\>').sub('<span\g<a>>\g<b></span>',text)
text=re.compile('\s+\<br(?P<a>.*?)\/\>').sub('<br\g<a>/>',text)
text=re.compile('\>(?P<a>\s+)(?P<b>[\.\,\:\;])').sub('>\g<b>\g<a>',text)
text=re.compile('\n\s*\n').sub('\n',text)
for script in scripts:
text=text.replace('<script />', script, 1)
for style in styles:
text=text.replace('<style />', cleancss(style), 1)
return text
def read_file(filename):
f = open(filename, 'r')
try:
return f.read()
finally:
f.close()
file=sys.argv[1]
if file[-4:]=='.css':
print cleancss(read_file(file))
if file[-5:]=='.html':
print cleanhtml(read_file(file))
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import re
filename = sys.argv[1]
datafile = open(filename, 'r')
try:
data = datafile.read()
finally:
datafile.close()
data = re.compile('\s*{\s*').sub(' { ', data)
data = re.compile('\s*;\s*').sub('; ', data)
data = re.compile('\s*}\s*').sub(' }\n', data)
data = re.compile('[ ]+').sub(' ', data)
print data
| Python |
'''
Create the web2py code needed to access your mysql legacy db.
To make this work all the legacy tables you want to access need to have an "id" field.
This plugin needs:
mysql
mysqldump
installed and globally available.
Under Windows you will probably need to add the mysql executable directory to the PATH variable,
you will also need to modify mysql to mysql.exe and mysqldump to mysqldump.exe below.
Just guessing here :)
Access your tables with:
legacy_db(legacy_db.mytable.id>0).select()
If the script crashes this is might be due to that fact that the data_type_map dictionary below is incomplete.
Please complete it, improve it and continue.
Created by Falko Krause, minor modifications by Massimo Di Pierro and Ron McOuat
'''
import subprocess
import re
import sys
data_type_map = dict(
varchar = 'string',
int = 'integer',
integer = 'integer',
tinyint = 'integer',
smallint = 'integer',
mediumint = 'integer',
bigint = 'integer',
float = 'double',
double = 'double',
char = 'string',
decimal = 'integer',
date = 'date',
#year = 'date',
time = 'time',
timestamp = 'datetime',
datetime = 'datetime',
binary = 'blob',
blob = 'blob',
tinyblob = 'blob',
mediumblob = 'blob',
longblob = 'blob',
text = 'text',
tinytext = 'text',
mediumtext = 'text',
longtext = 'text',
)
def mysql(database_name, username, password):
p = subprocess.Popen(['mysql',
'--user=%s' % username,
'--password=%s'% password,
'--execute=show tables;',
database_name],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
sql_showtables, stderr = p.communicate()
tables = [re.sub('\|\s+([^\|*])\s+.*', '\1', x) for x in sql_showtables.split()[1:]]
connection_string = "legacy_db = DAL('mysql://%s:%s@localhost/%s')"%(username, password, database_name)
legacy_db_table_web2py_code = []
for table_name in tables:
#get the sql create statement
p = subprocess.Popen(['mysqldump',
'--user=%s' % username,
'--password=%s' % password,
'--skip-add-drop-table',
'--no-data', database_name,
table_name], stdin=subprocess.PIPE, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
sql_create_stmnt,stderr = p.communicate()
if 'CREATE' in sql_create_stmnt:#check if the table exists
#remove garbage lines from sql statement
sql_lines = sql_create_stmnt.split('\n')
sql_lines = [x for x in sql_lines if not(x.startswith('--') or x.startswith('/*') or x =='')]
#generate the web2py code from the create statement
web2py_table_code = ''
table_name = re.search('CREATE TABLE .(\S+). \(', sql_lines[0]).group(1)
fields = []
for line in sql_lines[1:-1]:
if re.search('KEY', line) or re.search('PRIMARY', line) or re.search(' ID', line) or line.startswith(')'):
continue
hit = re.search('(\S+)\s+(\S+)(,| )( .*)?', line)
if hit!=None:
name, d_type = hit.group(1), hit.group(2)
d_type = re.sub(r'(\w+)\(.*',r'\1',d_type)
name = re.sub('`','',name)
web2py_table_code += "\n Field('%s','%s'),"%(name,data_type_map[d_type])
web2py_table_code = "legacy_db.define_table('%s',%s\n migrate=False)"%(table_name,web2py_table_code)
legacy_db_table_web2py_code.append(web2py_table_code)
#----------------------------------------
#write the legacy db to file
legacy_db_web2py_code = connection_string+"\n\n"
legacy_db_web2py_code += "\n\n#--------\n".join(legacy_db_table_web2py_code)
return legacy_db_web2py_code
regex = re.compile('(.*?):(.*?)@(.*)')
if len(sys.argv)<2 or not regex.match(sys.argv[1]):
print 'USAGE:\n\n extract_mysql_models.py username:password@data_basename\n\n'
else:
m = regex.match(sys.argv[1])
print mysql(m.group(3),m.group(1),m.group(2))
| Python |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
autoroutes writes routes for you based on a simpler routing
configuration file called routes.conf. Example:
----- BEGIN routes.conf-------
127.0.0.1 /examples/default
domain1.com /app1/default
domain2.com /app2/default
domain3.com /app3/default
----- END ----------
It maps a domain (the left-hand side) to an app (one app per domain),
and shortens the URLs for the app by removing the listed path prefix. That means:
http://domain1.com/index is mapped to /app1/default/index
http://domain2.com/index is mapped to /app2/default/index
It preserves admin, appadmin, static files, favicon.ico and robots.txt:
http://domain1.com/favicon.ico /welcome/static/favicon.ico
http://domain1.com/robots.txt /welcome/static/robots.txt
http://domain1.com/admin/... /admin/...
http://domain1.com/appadmin/... /app1/appadmin/...
http://domain1.com/static/... /app1/static/...
and vice-versa.
To use, cp scripts/autoroutes.py routes.py
and either edit the config string below, or set config = "" and edit routes.conf
'''
config = '''
127.0.0.1 /examples/default
domain1.com /app1/default
domain2.com /app2/default
domain3.com /app3/defcon3
'''
if not config.strip():
try:
config_file = open('routes.conf','r')
try:
config = config_file.read()
finally:
config_file.close()
except:
config=''
def auto_in(apps):
routes = [
('/robots.txt','/welcome/static/robots.txt'),
('/favicon.ico','/welcome/static/favicon.ico'),
('/admin$anything','/admin$anything'),
]
for domain,path in [x.strip().split() for x in apps.split('\n') if x.strip() and not x.strip().startswith('#')]:
if not path.startswith('/'): path = '/'+path
if path.endswith('/'): path = path[:-1]
app = path.split('/')[1]
routes += [
('.*:https?://(.*\.)?%s:$method /' % domain,'%s' % path),
('.*:https?://(.*\.)?%s:$method /static/$anything' % domain,'/%s/static/$anything' % app),
('.*:https?://(.*\.)?%s:$method /appadmin/$anything' % domain,'/%s/appadmin/$anything' % app),
('.*:https?://(.*\.)?%s:$method /$anything' % domain,'%s/$anything' % path),
]
return routes
def auto_out(apps):
routes = []
for domain,path in [x.strip().split() for x in apps.split('\n') if x.strip() and not x.strip().startswith('#')]:
if not path.startswith('/'): path = '/'+path
if path.endswith('/'): path = path[:-1]
app = path.split('/')[1]
routes += [
('/%s/static/$anything' % app,'/static/$anything'),
('/%s/appadmin/$anything' % app, '/appadmin/$anything'),
('%s/$anything' % path, '/$anything'),
]
return routes
routes_in = auto_in(config)
routes_out = auto_out(config)
def __routes_doctest():
'''
Dummy function for doctesting autoroutes.py.
Use filter_url() to test incoming or outgoing routes;
filter_err() for error redirection.
filter_url() accepts overrides for method and remote host:
filter_url(url, method='get', remote='0.0.0.0', out=False)
filter_err() accepts overrides for application and ticket:
filter_err(status, application='app', ticket='tkt')
>>> filter_url('http://domain1.com/favicon.ico')
'http://domain1.com/welcome/static/favicon.ico'
>>> filter_url('https://domain2.com/robots.txt')
'https://domain2.com/welcome/static/robots.txt'
>>> filter_url('http://domain3.com/fcn')
'http://domain3.com/app3/defcon3/fcn'
>>> filter_url('http://127.0.0.1/fcn')
'http://127.0.0.1/examples/default/fcn'
>>> filter_url('HTTP://DOMAIN.COM/app/ctr/fcn')
'http://domain.com/app/ctr/fcn'
>>> filter_url('http://domain.com/app/ctr/fcn?query')
'http://domain.com/app/ctr/fcn?query'
>>> filter_url('http://otherdomain.com/fcn')
'http://otherdomain.com/fcn'
>>> regex_filter_out('/app/ctr/fcn')
'/app/ctr/fcn'
>>> regex_filter_out('/app1/ctr/fcn')
'/app1/ctr/fcn'
>>> filter_url('https://otherdomain.com/app1/default/fcn', out=True)
'/fcn'
>>> filter_url('http://otherdomain.com/app2/ctr/fcn', out=True)
'/app2/ctr/fcn'
>>> filter_url('http://domain1.com/app1/default/fcn?query', out=True)
'/fcn?query'
>>> filter_url('http://domain2.com/app3/defcon3/fcn#anchor', out=True)
'/fcn#anchor'
'''
pass
if __name__ == '__main__':
try:
import gluon.main
except ImportError:
import sys, os
os.chdir(os.path.dirname(os.path.dirname(__file__)))
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import gluon.main
from gluon.rewrite import regex_select, load, filter_url, regex_filter_out
regex_select() # use base routing parameters
load(routes=__file__) # load this file
import doctest
doctest.testmod()
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cStringIO
import re
import sys
import tarfile
import urllib
import xml.parsers.expat as expat
"""
Update script for contenttype.py module.
Usage: python contentupdate.py /path/to/contenttype.py
If no path is specified, script will look for contenttype.py in current
working directory.
Internet connection is required to perform the update.
"""
OVERRIDE = [
('.pdb', 'chemical/x-pdb'),
('.xyz', 'chemical/x-pdb')
]
class MIMEParser(dict):
def __start_element_handler(self, name, attrs):
if name == 'mime-type':
if self.type:
for extension in self.extensions:
self[extension] = self.type
self.type = attrs['type'].lower()
self.extensions = []
elif name == 'glob':
pattern = attrs['pattern']
if pattern.startswith('*.'):
self.extensions.append(pattern[1:].lower())
def __init__(self, fileobj):
dict.__init__(self)
self.type = ''
self.extensions = ''
parser = expat.ParserCreate()
parser.StartElementHandler = self.__start_element_handler
parser.ParseFile(fileobj)
for extension, contenttype in OVERRIDE:
self[extension] = contenttype
if __name__ == '__main__':
try:
path = sys.argv[1]
except:
path = 'contenttype.py'
vregex = re.compile('database version (?P<version>.+?)\.?\n')
sys.stdout.write('Checking contenttype.py database version:')
sys.stdout.flush()
try:
pathfile = open(path)
try:
current = pathfile.read()
finally:
pathfile.close()
cversion = re.search(vregex, current).group('version')
sys.stdout.write('\t[OK] version %s\n' % cversion)
except Exception, e:
sys.stdout.write('\t[ERROR] %s\n' % e)
exit()
sys.stdout.write('Checking freedesktop.org database version:')
sys.stdout.flush()
try:
search = re.search('(?P<url>http://freedesktop.org/.+?/shared-mime-info-(?P<version>.+?)\.tar\.(?P<type>[gb]z2?))',
urllib.urlopen('http://www.freedesktop.org/wiki/Software/shared-mime-info').read())
url = search.group('url')
assert url != None
nversion = search.group('version')
assert nversion != None
ftype = search.group('type')
assert ftype != None
sys.stdout.write('\t[OK] version %s\n' % nversion)
except:
sys.stdout.write('\t[ERROR] unknown version\n')
exit()
if cversion == nversion:
sys.stdout.write('\nContenttype.py database is up to date\n')
exit()
try:
raw_input('\nContenttype.py database updates are available from:\n%s (approx. 0.5MB)\nPress enter to continue or CTRL-C to quit now\nWARNING: this will replace contenttype.py file content IN PLACE' % url)
except:
exit()
sys.stdout.write('\nDownloading new database:')
sys.stdout.flush()
fregex = re.compile('^.*/freedesktop\.org\.xml$')
try:
io = cStringIO.StringIO()
io.write(urllib.urlopen(url).read())
sys.stdout.write('\t[OK] done\n')
except Exception, e:
sys.stdout.write('\t[ERROR] %s\n' % e)
exit()
sys.stdout.write('Installing new database:')
sys.stdout.flush()
try:
tar = tarfile.TarFile.open(fileobj=io, mode='r:%s' % ftype)
try:
for content in tar.getnames():
if fregex.match(content):
xml = tar.extractfile(content)
break
finally:
tar.close()
data = MIMEParser(xml)
io = cStringIO.StringIO()
io.write('CONTENT_TYPE = {\n')
for key in sorted(data):
io.write(' \'%s\': \'%s\',\n' % (key, data[key]))
io.write(' }')
io.seek(0)
contenttype = open('contenttype.py', 'w')
try:
contenttype.write(re.sub(vregex, 'database version %s.\n' % nversion, re.sub('CONTENT_TYPE = \{(.|\n)+?\}', io.getvalue(), current)))
finally:
contenttype.close()
if not current.closed:
current.close()
sys.stdout.write('\t\t\t[OK] done\n')
except Exception, e:
sys.stdout.write('\t\t\t[ERROR] %s\n' % e)
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import time
import stat
import datetime
from gluon.utils import md5_hash
from gluon.restricted import RestrictedError
from gluon.tools import Mail
path = os.path.join(request.folder, 'errors')
hashes = {}
mail = Mail()
### CONFIGURE HERE
SLEEP_MINUTES = 5
ALLOW_DUPLICATES = True
mail.settings.server = 'localhost:25'
mail.settings.sender = 'you@localhost'
administrator_email = 'you@localhost'
### END CONFIGURATION
while 1:
for file in os.listdir(path):
filename = os.path.join(path, file)
if not ALLOW_DUPLICATES:
fileobj = open(filename, 'r')
try:
file_data = fileobj.read()
finally:
fileobj.close()
key = md5_hash(file_data)
if key in hashes:
continue
hashes[key] = 1
error = RestrictedError()
error.load(request, request.application, filename)
mail.send(to=administrator_email, subject='new web2py ticket', message=error.traceback)
os.unlink(filename)
time.sleep(SLEEP_MINUTES * 60)
| Python |
import sys, glob
def read_fileb(filename, mode='rb'):
f = open(filename, mode)
try:
return f.read()
finally:
f.close()
def write_fileb(filename, value, mode='wb'):
f = open(filename, mode)
try:
f.write(value)
finally:
f.close()
for filename in glob.glob(sys.argv[1]):
data1 = read_fileb(filename)
write_fileb(filename + '.bak2', data1)
data2lines = read_fileb(filename).split('\n')
data2 = '\n'.join([line.rstrip() for line in data2lines])+'\n'
write_fileb(filename, data2)
print filename, len(data1)-len(data2)
| Python |
import os,sys
from collections import deque
import string
import argparse
import cStringIO,operator
import cPickle as pickle
from collections import deque
import math
import re
import cmd
import readline
try:
from gluon import DAL
except ImportError as err:
print('gluon path not found')
class refTable(object):
def __init__(self):
self.columns = None
self.rows = None
def getcolHeader(self,colHeader):
return "{0}".format(' | '.join([string.join(string.strip('**{0}**'.format(item)),
'') for item in colHeader]))
def wrapTable(self,rows, hasHeader=False, headerChar='-', delim=' | ', justify='left',
separateRows=False, prefix='', postfix='', wrapfunc=lambda x:x):
def rowWrapper(row):
'''---
newRows is returned like
[['w'], ['x'], ['y'], ['z']]
---'''
newRows = [wrapfunc(item).split('\n') for item in row]
self.rows = newRows
'''---
rowList gives like newRows but
formatted like [[w, x, y, z]]
---'''
rowList = [[substr or '' for substr in item] for item in map(None,*newRows)]
return rowList
logicalRows = [rowWrapper(row) for row in rows]
columns = map(None,*reduce(operator.add,logicalRows))
self.columns = columns
maxWidths = [max(\
[len(str\
(item)) for \
item in column]\
) for column \
in columns]
rowSeparator = headerChar * (len(prefix) + len(postfix) + sum(maxWidths) + \
len(delim)*(len(maxWidths)-1))
justify = {'center'\
:str\
.center,
'right'\
:str\
.rjust,
'left'\
:str.\
ljust\
}[justify\
.lower(\
)]
output=cStringIO.StringIO()
if separateRows:
print >> output, rowSeparator
for physicalRows in logicalRows:
for row in physicalRows:
print >> output,\
prefix + delim.join([\
justify(str(item),width) for (\
item,width) in zip(row,maxWidths)]\
) + postfix
if separateRows or hasHeader:
print >> output, rowSeparator; hasHeader=False
return output.getvalue()
def wrap_onspace(self,text,width):
return reduce(lambda line, word, width=width: '{0}{1}{2}'\
.format(line\
,' \n'[(len(\
line[line.rfind('\n'\
) + 1:]) + len(\
word.split('\n',1)[0]) >=\
width)],word),text.split(' '))
def wrap_onspace_strict(self,text,width):
wordRegex = re.compile(r'\S{'+str(width)+r',}')
return self.wrap_onspace(\
wordRegex.sub(\
lambda m: self.\
wrap_always(\
m.group(),width),text\
),width)
def wrap_always(self,text,width):
return '\n'.join(\
[ text[width*i:width*(i+1\
)] for i in xrange(\
int(math.ceil(1.*len(\
text)/width))) ])
class tableHelper():
def __init__(self):
self.oTable = refTable()
def getAsRows(self,data):
return [row.strip().split(',') for row in data.splitlines()]
def getTable_noWrap(self,data,header=None):
rows = self.getAsRows(data)
if header is not None:hRows = [header]+rows
else:hRows = rows
table = self.oTable.wrapTable(hRows, hasHeader=True)
return table
def getTable_Wrap(self,data,wrapStyle,header=None,width=65):
wrapper = None
if len(wrapStyle) > 1:
rows = self.getAsRows(data)
if header is not None:hRows = [header]+rows
else:hRows = rows
for wrapper in (self.oTable.wrap_always,
self.oTable.wrap_onspace,
self.oTable.wrap_onspace_strict):
return self.oTable.wrapTable(hRows\
,hasHeader=True\
,separateRows=True\
,prefix='| '\
,postfix=' |'\
,wrapfunc\
=lambda x:\
wrapper(x,width))
else:
return self.getTable_noWrap(data,header)
def getAsErrorTable(self,err):
return self.getTable_Wrap(err,None)
class console:
def __init__(self,prompt,banner=None):
self.prompt=prompt
self.banner=banner
self.commands={}
self.commandSort=[]
self.db=None
for i in dir(self):
if "cmd_"==i[:4]:
cmd=i.split("cmd_")[1].lower()
self.commands[cmd]=getattr(self,i)
try:self.commandSort.append((int(self\
.commands[cmd].__doc__.split(\
"|")[0]),cmd))
except:pass
self.commandSort.sort()
self.commandSort=[i[1] for i in self.commandSort]
self.var_DEBUG=False
self.var_tableStyle=''
self.configvars={}
for i in dir(self):
if "var_"==i[:4]:
var=i.split("var_")[1]
self.configvars[var]=i
def setBanner(self,banner):
self.banner=banner
def execCmd(self,db):
self.db=db
print self.banner
while True:
try:
command=raw_input(self.prompt)
try:
self.execCommand(command)
except:
self.execute(command)
except KeyboardInterrupt:break
except EOFError:break
except Exception,a:self.printError (a)
print ("\r\n\r\nBye!...")
sys.exit(0)
def printError(self,err):
sys.stderr.write("Error: {0}\r\n".format(str(err),))
if self.var_DEBUG:pass
def execute(self,cmd):
try:
if not '-table ' in cmd:
exec '{0}'.format(cmd)
else:
file=None
table=None
fields=[]
items=string.split(cmd,' ')
invalidParams=[]
table=self.getTable(items[1])
allowedParams=['fields','file']
for i in items:
if '=' in i and not string.split(i,'=')[0] in allowedParams:
try:
invalidParams.append(i)
except Exception, err:
raise Exception, 'invalid parameter\n{0}'.format(i)
else:
if 'file=' in i:
file=os.path.abspath(string.strip(string.split(i,'=')[1]))
if 'fields=' in i:
for field in string.split(string.split(i,'=')[1],','):
if field in self.db[table].fields:
fields.append(string.strip(field))
if len(invalidParams)>0:
print('the following parameter(s) is not valid\n{0}'.format(\
string.join(invalidParams,',')))
else:
try:
self.cmd_table(table,file,fields)
except Exception, err:
print('could not generate table for table {0}\n{1}'\
.format(table,err))
except Exception, err:
print('sorry, can not do that!\n{0}'.format(err))
def getTable(self,tbl):
for mTbl in db.tables:
if tbl in mTbl:
if mTbl.startswith(tbl):
return mTbl
def execCommand(self,cmd):
words=cmd.split(" ")
words=[i for i in words if i]
if not words:return
cmd,parameters=words[0].lower(),words[1:]
if not cmd in self.commands:
raise Exception("Command {0} not found. Try 'help'\r\n".format(cmd))
self.commands[cmd](*parameters)
'''---
DEFAULT COMMANDS (begins with cmd_)
---'''
def cmd_clear(self,numlines=100):
"""-5|clear|clear the screen"""
if os.name == "posix":
'''---
Unix/Linux/MacOS/BSD/etc
---'''
os.system('clear')
elif os.name in ("nt", "dos", "ce"):
'''---
Windows
---'''
os.system('CLS')
else:
'''---
Fallback for other operating systems.
---'''
print '\n'*numlines
def cmd_table(self,tbl,file=None,fields=[]):
"""-4|-table [TABLENAME] optional[file=None] [fields=None]|\
the default tableStyle is no_wrap - use the 'set x y' command to change the style\n\
style choices:
\twrap_always
\twrap_onspace
\twrap_onspace_strict
\tno_wrap (value '')\n
\t the 2nd optional param is a path to a file where the table will be written
\t the 3rd optional param is a list of fields you want displayed\n"""
table=None
for mTbl in db.tables:
if tbl in mTbl:
if mTbl.startswith(tbl):
table=mTbl
break
oTable=tableHelper()
'''---
tablestyle:
wrap_always
wrap_onspace
wrap_onspace_strict
or set set to "" for no wrapping
---'''
tableStyle=self.var_tableStyle
filedNotFound=[]
table_fields=None
if len(fields)==0:
table_fields=self.db[table].fields
else:
table_fields=fields
for field in fields:
if not field in self.db[table].fields:
filedNotFound.append(field)
if len(filedNotFound)==0:
rows=self.db(self.db[table].id>0).select()
rows_data=[]
for row in rows:
rowdata=[]
for f in table_fields:
rowdata.append('{0}'.format(row[f]))
rows_data.append(string.join(rowdata,','))
data=string.join(rows_data,'\n')
dataTable=oTable.getTable_Wrap(data,tableStyle,table_fields)
print('TABLE {0}\n{1}'.format(table,dataTable))
if file!=None:
try:
tail,head=os.path.split(file)
try:
os.makedirs(tail)
except:'do nothing, folders exist'
oFile=open(file,'w')
oFile.write('TABLE: {0}\n{1}'.format(table,dataTable))
oFile.close()
print('{0} has been created and populated with all available data from table {1}\n'.format(file,table))
except Exception, err:
print("EXCEPTION: could not create table {0}\n{1}".format(table,err))
else:
print('the following fields are not valid [{0}]'.format(string.join(filedNotFound,',')))
def cmd_help(self,*args):
'''-3|help|Show's help'''
alldata=[]
lengths=[]
for i in self.commandSort:alldata.append(\
self.commands[i].__doc__.split("|")[1:])
for i in alldata:
if len(i) > len(lengths):
for j in range(len(i)\
-len(lengths)):
lengths.append(0)
j=0
while j<len(i):
if len(i[j])>lengths[j]:
lengths[j]=len(i[j])
j+=1
print ("-"*(lengths[0]+lengths[1]+4))
for i in alldata:
print (("%-"+str(lengths[0])+"s - %-"+str(lengths[1])+"s") % (i[0],i[1]))
if len(i)>2:
for j in i[2:]:print (("%"+str(lengths[0]+9)+"s* %s") % (" ",j))
print
def cmd_vars(self,*args):
'''-2|vars|Show variables'''
print ("variables\r\n"+"-"*79)
for i,j in self.configvars.items():
value=self.parfmt(repr(getattr(self,j)),52)
print ("| %20s | %52s |" % (i,value[0]))
for k in value[1:]:print ("| %20s | %52s |" % ("",k))
if len(value)>1:print("| %20s | %52s |" % ("",""))
print ("-"*79)
def parfmt(self,txt,width):
res=[]
pos=0
while True:
a=txt[pos:pos+width]
if not a:break
res.append(a)
pos+=width
return res
def cmd_set(self,*args):
'''-1|set [variable_name] [value]|Set configuration variable value|Values are an expressions (100 | string.lower('ABC') | etc.'''
value=" ".join(args[1:])
if args[0] not in self.configvars:
setattr(self,"var_{0}".format(args[0]),eval(value))
setattr(self,"var_{0}".format(args[0]),eval(value))
def cmd_clearscreen(self,numlines=50):
'''---Clear the console.
---'''
if os.name == "posix":
'''---
Unix/Linux/MacOS/BSD/etc
---'''
os.system('clear')
elif os.name in ("nt", "dos", "ce"):
'''---
Windows
---'''
os.system('CLS')
else:
'''---
Fallback for other operating systems.
---'''
print '\n'*numlines
class dalShell(console):
def __init__(self):
pass
def shell(self,db):
console.__init__(self,prompt=">>> ",banner='dal interactive shell')
self.execCmd(db)
class setCopyDB():
def __init__(self):
'''---
non source or target specific vars
---'''
self.strModel=None
self.dalPath=None
self.db=None
'''---
source vars
---'''
self.sourceModel=None
self.sourceFolder=None
self.sourceConnectionString=None
self.sourcedbType=None
self.sourcedbName=None
'''---
target vars
---'''
self.targetdbType=None
self.targetdbName=None
self.targetModel=None
self.targetFolder=None
self.targetConnectionString=None
self.truncate=False
def _getDal(self):
mDal=None
if self.dalPath is not None:
global DAL
sys.path.append(self.dalPath)
mDal=__import__('dal',globals={},locals={},fromlist=['DAL'],level=0)
DAL=mDal.DAL
return mDal
def instDB(self,storageFolder,storageConnectionString,autoImport):
self.db=DAL(storageConnectionString,folder=os.path.abspath(storageFolder),auto_import=autoImport)
return self.db
def delete_DB_tables(self,storageFolder,storageType):
print 'delete_DB_tablesn\n\t{0}\n\t{1}'.format(storageFolder,storageType)
dataFiles=[storageType,"sql.log"]
try:
for f in os.listdir(storageFolder):
if ".table" in f:
fTable="{0}/{1}".format(storageFolder,f)
os.remove(fTable)
print('deleted {0}'.format(fTable))
for dFile in dataFiles:
os.remove("{0}/{1}".format(storageFolder,dFile))
print('deleted {0}'.format("{0}/{1}".format(storageFolder,dFile)))
except Exception, errObj:
print(str(errObj))
def truncatetables(self,tables=[]):
if len(tables)!=0:
try:
print 'table value: {0}'.format(tables)
for tbl in self.db.tables:
for mTbl in tables:
if mTbl.startswith(tbl):
self.db[mTbl].truncate()
except Exception, err:
print('EXCEPTION: {0}'.format(err))
else:
try:
for tbl in self.db.tables:
self.db[tbl].truncate()
except Exception, err:
print('EXCEPTION: {0}'.format(err))
def copyDB(self):
other_db=DAL("{0}://{1}".format(self.targetdbType,self.targetdbName),folder=self.targetFolder)
print 'creating tables...'
for table in self.db:
other_db.define_table(table._tablename,*[field for field in table])
'''
should there be an option to truncAte target DB?
if yes, then change args to allow for choice
and set self.trancate to the art value
if self.truncate==True:
other_db[table._tablename].truncate()
'''
print 'exporting data...'
self.db.export_to_csv_file(open('tmp.sql','wb'))
print 'importing data...'
other_db.import_from_csv_file(open('tmp.sql','rb'))
other_db.commit()
print 'done!'
print 'Attention: do not run this program again or you end up with duplicate records'
def createfolderPath(self,folder):
try:
if folder!=None:os.makedirs(folder)
except Exception, err:
pass
if __name__ == '__main__':
oCopy=setCopyDB()
db=None
targetDB=None
dbfolder=None
clean=False
model=None
truncate=False
parser=argparse.ArgumentParser(description='\
samplecmd line:\n\
-f ./blueLite/db_storage -i -y sqlite://storage.sqlite -Y sqlite://storage2.sqlite -d ./blueLite/pyUtils/sql/blueSQL -t True',
epilog = '')
reqGroup=parser.add_argument_group('Required arguments')
reqGroup.add_argument('-f','--sourceFolder'\
,required=True\
,help="path to the 'source' folder of the 'source' DB")
reqGroup.add_argument('-F','--targetFolder'\
,required=False\
,help="path to the 'target' folder of the 'target' DB")
reqGroup.add_argument('-y','--sourceConnectionString'\
,required=True\
,help="source db connection string ()\n\
------------------------------------------------\n\
\
sqlite://storage.db\n\
mysql://username:password@localhost/test\n\
postgres://username:password@localhost/test\n\
mssql://username:password@localhost/test\n\
firebird://username:password@localhost/test\n\
oracle://username/password@test\n\
db2://username:password@test\n\
ingres://username:password@localhost/test\n\
informix://username:password@test\n\
\
------------------------------------------------")
reqGroup.add_argument('-Y','--targetConnectionString'\
,required=True\
,help="target db type (sqlite,mySql,etc.)")
autoImpGroup=parser.add_argument_group('optional args (auto_import)')
autoImpGroup.add_argument('-a','--autoimport'\
,required=False\
,help='set to True to bypass loading of the model')
"""
*** removing -m/-M options for now --> i need a
better regex to match db.define('bla')...with optional db.commit()
modelGroup=parser.add_argument_group('optional args (create model)')
modelGroup.add_argument('-m','--sourcemodel'\
,required=False\
,help='to create a model from an existing model, point to the source model')
modelGroup.add_argument('-M','--targetmodel'\
,required=False\
,help='to create a model from an existing model, point to the target model')
"""
miscGroup=parser.add_argument_group('optional args/tasks')
miscGroup.add_argument('-i','--interactive'\
,required=False\
,action='store_true'\
,help='run in interactive mode')
miscGroup.add_argument('-d','--dal'\
,required=False\
,help='path to dal.py')
miscGroup.add_argument('-t','--truncate'\
,choices=['True','False']\
,help='delete the records but *not* the table of the SOURCE DB')
miscGroup.add_argument('-b','--tables'\
,required=False\
,type=list\
,help='optional list (comma delimited) of SOURCE tables to truncate, defaults to all')
miscGroup.add_argument('-c','--clean'\
,required=False\
,help='delete the DB,tables and the log file, WARNING: this is unrecoverable')
args=parser.parse_args()
db=None
mDal=None
try:
oCopy.sourceFolder=args.sourceFolder
oCopy.targetFolder=args.sourceFolder
sourceItems=string.split(args.sourceConnectionString,'://')
oCopy.sourcedbType=sourceItems[0]
oCopy.sourcedbName=sourceItems[1]
targetItems=string.split(args.targetConnectionString,'://')
oCopy.targetdbType=sourceItems[0]
oCopy.targetdbName=sourceItems[1]
except Exception, err:
print('EXCEPTION: {0}'.format(err))
if args.dal:
try:
autoImport=True
if args.autoimport:autoImport=args.autoimport
#sif not DAL in globals:
#if not sys.path.__contains__():
oCopy.dalPath=args.dal
mDal=oCopy._getDal()
db=oCopy.instDB(args.sourceFolder,args.sourceConnectionString,autoImport)
except Exception, err:
print('EXCEPTION: could not set DAL\n{0}'.format(err))
if args.truncate:
try:
if args.truncate:
if args.tables:tables=string.split(string.strip(args.tables),',')
else:oCopy.truncatetables([])
except Exception, err:
print('EXCEPTION: could not truncate tables\n{0}'.format(err))
try:
if args.clean:oCopy.delete_DB_tables(oCopy.targetFolder,oCopy.targetType)
except Exception, err:
print('EXCEPTION: could not clean db\n{0}'.format(err))
"""
*** goes with -m/-M options... removed for now
if args.sourcemodel:
try:
oCopy.sourceModel=args.sourcemodel
oCopy.targetModel=args.sourcemodel
oCopy.createModel()
except Exception, err:
print('EXCEPTION: could not create model\n\
source model: {0}\n\
target model: {1}\n\
{2}'.format(args.sourcemodel,args.targetmodel,err))
"""
if args.sourceFolder:
try:
oCopy.sourceFolder=os.path.abspath(args.sourceFolder)
oCopy.createfolderPath(oCopy.sourceFolder)
except Exception, err:
print('EXCEPTION: could not create folder path\n{0}'.format(err))
else:oCopy.dbStorageFolder=os.path.abspath(os.getcwd())
if args.targetFolder:
try:
oCopy.targetFolder=os.path.abspath(args.targetFolder)
oCopy.createfolderPath(oCopy.targetFolder)
except Exception, err:
print('EXCEPTION: could not create folder path\n{0}'.format(err))
if not args.interactive:
try:
oCopy.copyDB()
except Exception, err:
print('EXCEPTION: could not make a copy of the database\n{0}'.format(err))
else:
s=dalShell()
s.shell(db) | Python |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# routers are dictionaries of URL routing parameters.
#
# For each request, the effective router is:
# the built-in default base router (shown below),
# updated by the BASE router in routes.py routers,
# updated by the app-specific router in routes.py routers (if any),
# updated by the app-specific router from applications/app/routes.py routers (if any)
#
#
# Router members:
#
# default_application: default application name
# applications: list of all recognized applications, or 'ALL' to use all currently installed applications
# Names in applications are always treated as an application names when they appear first in an incoming URL.
# Set applications=None to disable the removal of application names from outgoing URLs.
# domains: optional dict mapping domain names to application names
# The domain name can include a port number: domain.com:8080
# The application name can include a controller: appx/ctlrx
# Example:
# domains = { "domain.com" : "app",
# "x.domain.com" : "appx",
# },
# path_prefix: a path fragment that is prefixed to all outgoing URLs and stripped from all incoming URLs
#
# Note: default_application, applications, domains & path_prefix are permitted only in the BASE router,
# and domain makes sense only in an application-specific router.
# The remaining members can appear in the BASE router (as defaults for all applications)
# or in application-specific routers.
#
# default_controller: name of default controller
# default_function: name of default function (in all controllers)
# controllers: list of valid controllers in selected app
# or "DEFAULT" to use all controllers in the selected app plus 'static'
# or None to disable controller-name removal.
# Names in controllers are always treated as controller names when they appear in an incoming URL after
# the (optional) application and language names.
# functions: list of valid functions in the default controller (default None)
# If present, the default function name will be omitted when the controller is the default controller
# and the first arg does not create an ambiguity.
# languages: list of all supported languages
# Names in languages are always treated as language names when they appear in an incoming URL after
# the (optional) application name.
# default_language
# The language code (for example: en, it-it) optionally appears in the URL following
# the application (which may be omitted). For incoming URLs, the code is copied to
# request.language; for outgoing URLs it is taken from request.language.
# If languages=None, language support is disabled.
# The default_language, if any, is omitted from the URL.
# root_static: list of static files accessed from root (by default, favicon.ico & robots.txt)
# (mapped to the default application's static/ directory)
# Each default (including domain-mapped) application has its own root-static files.
# domain: the domain that maps to this application (alternative to using domains in the BASE router)
# exclusive_domain: If True (default is False), an exception is raised if an attempt is made to generate
# an outgoing URL with a different application without providing an explicit host.
# map_hyphen: If True (default is False), hyphens in incoming /a/c/f fields are converted
# to underscores, and back to hyphens in outgoing URLs.
# Language, args and the query string are not affected.
# map_static: By default, the default application is not stripped from static URLs.
# Set map_static=True to override this policy.
# acfe_match: regex for valid application, controller, function, extension /a/c/f.e
# file_match: regex for valid file (used for static file names)
# args_match: regex for valid args
# This validation provides a measure of security.
# If it is changed, the application perform its own validation.
#
#
# The built-in default router supplies default values (undefined members are None):
#
# default_router = dict(
# default_application = 'init',
# applications = 'ALL',
# default_controller = 'default',
# controllers = 'DEFAULT',
# default_function = 'index',
# functions = None,
# default_language = None,
# languages = None,
# root_static = ['favicon.ico', 'robots.txt'],
# domains = None,
# map_hyphen = False,
# acfe_match = r'\w+$', # legal app/ctlr/fcn/ext
# file_match = r'(\w+[-=./]?)+$', # legal file (path) name
# args_match = r'([\w@ -]+[=.]?)+$', # legal arg in args
# )
#
# See rewrite.map_url_in() and rewrite.map_url_out() for implementation details.
# This simple router set overrides only the default application name,
# but provides full rewrite functionality.
routers = dict(
# base router
BASE = dict(
default_application = 'welcome',
),
)
# 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 = [
# (r'init/400', r'/init/default/login')
# ,(r'init/*', r'/init/static/fail.html')
# ,(r'*/404', r'/init/static/cantfind.html')
# ,(r'*/*', r'/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>%s</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>'
def __routes_doctest():
'''
Dummy function for doctesting routes.py.
Use filter_url() to test incoming or outgoing routes;
filter_err() for error redirection.
filter_url() accepts overrides for method and remote host:
filter_url(url, method='get', remote='0.0.0.0', out=False)
filter_err() accepts overrides for application and ticket:
filter_err(status, application='app', ticket='tkt')
>>> import os
>>> import gluon.main
>>> from gluon.rewrite import load, filter_url, filter_err, get_effective_router
>>> load(routes=os.path.basename(__file__))
>>> filter_url('http://domain.com/abc', app=True)
'welcome'
>>> filter_url('http://domain.com/welcome', app=True)
'welcome'
>>> os.path.relpath(filter_url('http://domain.com/favicon.ico'))
'applications/welcome/static/favicon.ico'
>>> filter_url('http://domain.com/abc')
'/welcome/default/abc'
>>> filter_url('http://domain.com/index/abc')
"/welcome/default/index ['abc']"
>>> filter_url('http://domain.com/default/abc.css')
'/welcome/default/abc.css'
>>> filter_url('http://domain.com/default/index/abc')
"/welcome/default/index ['abc']"
>>> filter_url('http://domain.com/default/index/a bc')
"/welcome/default/index ['a bc']"
>>> filter_url('https://domain.com/app/ctr/fcn', out=True)
'/app/ctr/fcn'
>>> filter_url('https://domain.com/welcome/ctr/fcn', out=True)
'/ctr/fcn'
>>> filter_url('https://domain.com/welcome/default/fcn', out=True)
'/fcn'
>>> filter_url('https://domain.com/welcome/default/index', out=True)
'/'
>>> filter_url('https://domain.com/welcome/appadmin/index', out=True)
'/appadmin'
>>> filter_url('http://domain.com/welcome/default/fcn?query', out=True)
'/fcn?query'
>>> filter_url('http://domain.com/welcome/default/fcn#anchor', out=True)
'/fcn#anchor'
>>> filter_url('http://domain.com/welcome/default/fcn?query#anchor', out=True)
'/fcn?query#anchor'
>>> filter_err(200)
200
>>> filter_err(399)
399
>>> filter_err(400)
400
'''
pass
if __name__ == '__main__':
import doctest
doctest.testmod()
| Python |
EXPIRATION_MINUTES=60
DIGITS=('0','1','2','3','4','5','6','7','8','9')
import os, time, stat, logging
path=os.path.join(request.folder,'sessions')
if not os.path.exists(path):
os.mkdir(path)
now=time.time()
for filename in os.listdir(path):
fullpath=os.path.join(path,filename)
try:
if os.path.isfile(fullpath):
t=os.stat(fullpath)[stat.ST_MTIME]
if now-t>EXPIRATION_MINUTES*60 and filename.startswith(DIGITS):
try:
os.unlink(fullpath)
except Exception,e:
logging.warn('failure to unlink %s: %s' % (fullpath,e))
except Exception, e:
logging.warn('failure to stat %s: %s' % (fullpath,e))
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Update" ist ein optionaler Ausdruck wie "Feld1 = \'newvalue". JOIN Ergebnisse können nicht aktualisiert oder gelöscht werden',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s Zeilen gelöscht',
'%s rows updated': '%s Zeilen aktualisiert',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(so etwas wie "it-it")',
'A new version of web2py is available': 'Eine neue Version von web2py ist verfügbar',
'A new version of web2py is available: %s': 'Eine neue Version von web2py ist verfügbar: %s',
'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\n': 'Eine neue Version von web2py ist verfügbar: Version 1.85.3 (2010-09-18 07:07:46)\n',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ACHTUNG: Die Einwahl benötigt eine sichere (HTTPS) Verbindung. Es sei denn sie läuft Lokal(localhost).',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ACHTUNG: Testen ist nicht threadsicher. Führen sie also nicht mehrere Tests gleichzeitig aus.',
'ATTENTION: This is an experimental feature and it needs more testing.': 'ACHTUNG: Dies ist eine experimentelle Funktion und benötigt noch weitere Tests.',
'ATTENTION: you cannot edit the running application!': 'ACHTUNG: Eine laufende Anwendung kann nicht editiert werden!',
'About': 'Über',
'About application': 'Über die Anwendung',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
'Admin is disabled because unsecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
'Admin language': 'Admin language',
'Administrator Password:': 'Administrator Passwort:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Sind Sie sich sicher, dass Sie diese Datei löschen wollen "%s"?',
'Are you sure you want to uninstall application "%s"': 'Sind Sie sich sicher, dass Sie diese Anwendung deinstallieren wollen "%s"',
'Are you sure you want to uninstall application "%s"?': 'Sind Sie sich sicher, dass Sie diese Anwendung deinstallieren wollen "%s"?',
'Are you sure you want to upgrade web2py now?': 'Sind Sie sich sicher, dass Sie web2py jetzt upgraden möchten?',
'Authentication': 'Authentifizierung',
'Available databases and tables': 'Verfügbare Datenbanken und Tabellen',
'Cannot be empty': 'Darf nicht leer sein',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Nicht Kompilierbar:Es sind Fehler in der Anwendung. Beseitigen Sie die Fehler und versuchen Sie es erneut.',
'Change Password': 'Passwort ändern',
'Check to delete': 'Markiere zum löschen',
'Checking for upgrades...': 'Auf Updates überprüfen...',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Controllers': 'Controller',
'Copyright': 'Urheberrecht',
'Create new simple application': 'Erzeuge neue Anwendung',
'Current request': 'Aktuelle Anfrage (request)',
'Current response': 'Aktuelle Antwort (response)',
'Current session': 'Aktuelle Sitzung (session)',
'DB Model': 'DB Modell',
'DESIGN': 'design',
'Database': 'Datenbank',
'Date and Time': 'Datum und Uhrzeit',
'Delete': 'Löschen',
'Delete:': 'Löschen:',
'Deploy on Google App Engine': 'Auf Google App Engine installieren',
'Description': 'Beschreibung',
'Design for': 'Design für',
'E-mail': 'E-mail',
'EDIT': 'BEARBEITEN',
'Edit': 'Bearbeiten',
'Edit Profile': 'Bearbeite Profil',
'Edit This App': 'Bearbeite diese Anwendung',
'Edit application': 'Bearbeite Anwendung',
'Edit current record': 'Bearbeite aktuellen Datensatz',
'Editing Language file': 'Sprachdatei bearbeiten',
'Editing file': 'Bearbeite Datei',
'Editing file "%s"': 'Bearbeite Datei "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Fehlerprotokoll für "%(app)s"',
'Exception instance attributes': 'Atribute der Ausnahmeinstanz',
'Expand Abbreviation': 'Kürzel erweitern',
'First name': 'Vorname',
'Functions with no doctests will result in [passed] tests.': 'Funktionen ohne doctests erzeugen [passed] in Tests',
'Go to Matching Pair': 'gehe zum übereinstimmenden Paar',
'Group ID': 'Gruppen ID',
'Hello World': 'Hallo Welt',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Falls der obere Test eine Fehler-Ticketnummer enthält deutet das auf einen Fehler in der Ausführung des Controllers hin, noch bevor der Doctest ausgeführt werden konnte. Gewöhnlich führen fehlerhafte Einrückungen oder fehlerhafter Code ausserhalb der Funktion zu solchen Fehlern. Ein grüner Titel deutet darauf hin, dass alle Test(wenn sie vorhanden sind) erfolgreich durchlaufen wurden. In diesem Fall werden die Testresultate nicht angezeigt.',
'If you answer "yes", be patient, it may take a while to download': '',
'If you answer yes, be patient, it may take a while to download': 'If you answer yes, be patient, it may take a while to download',
'Import/Export': 'Importieren/Exportieren',
'Index': 'Index',
'Installed applications': 'Installierte Anwendungen',
'Internal State': 'interner Status',
'Invalid Query': 'Ungültige Abfrage',
'Invalid action': 'Ungültige Aktion',
'Invalid email': 'Ungültige Email',
'Key bindings': 'Tastenbelegungen',
'Key bindings for ZenConding Plugin': 'Tastenbelegungen für das ZenConding Plugin',
'Language files (static strings) updated': 'Sprachdatei (statisch Strings) aktualisiert',
'Languages': 'Sprachen',
'Last name': 'Nachname',
'Last saved on:': 'Zuletzt gespeichert am:',
'Layout': 'Layout',
'License for': 'Lizenz für',
'Login': 'Anmelden',
'Login to the Administrative Interface': 'An das Administrations-Interface anmelden',
'Logout': 'Abmeldung',
'Lost Password': 'Passwort vergessen',
'Main Menu': 'Menú principal',
'Match Pair': 'Paare finden',
'Menu Model': 'Menü Modell',
'Merge Lines': 'Zeilen zusammenfügen',
'Models': 'Modelle',
'Modules': 'Module',
'NO': 'NEIN',
'Name': 'Name',
'New Record': 'Neuer Datensatz',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'Next Edit Point': 'nächster Bearbeitungsschritt',
'No databases in this application': 'Keine Datenbank in dieser Anwendung',
'Origin': 'Herkunft',
'Original/Translation': 'Original/Übersetzung',
'Password': 'Passwort',
'Peeking at file': 'Dateiansicht',
'Plugin "%s" in application': 'Plugin "%s" in Anwendung',
'Plugins': 'Plugins',
'Powered by': 'Unterstützt von',
'Previous Edit Point': 'vorheriger Bearbeitungsschritt',
'Query:': 'Abfrage:',
'Record ID': 'Datensatz ID',
'Register': 'registrieren',
'Registration key': 'Registrierungsschlüssel',
'Reset Password key': 'Passwortschlüssel zurücksetzen',
'Resolve Conflict file': 'bereinige Konflikt-Datei',
'Role': 'Rolle',
'Rows in table': 'Zeilen in Tabelle',
'Rows selected': 'Zeilen ausgewählt',
'Save via Ajax': 'via Ajax sichern',
'Saved file hash:': 'Gespeicherter Datei-Hash:',
'Searching:': 'Searching:',
'Static files': 'statische Dateien',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Wollen Sie das Objekt wirklich löschen?',
'TM': 'TM',
'Table name': 'Tabellen Name',
'Testing application': 'Teste die Anwendung',
'Testing controller': 'teste Controller',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'Die "query" ist eine Bedingung wie "db.table1.field1 == \'Wert\'". Etwas wie "db.table1.field1 db.table2.field2 ==" führt zu einem SQL JOIN.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The output of the file is a dictionary that was rendered by the view': 'The output of the file is a dictionary that was rendered by the view',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'Keine Controller vorhanden',
'There are no models': 'Keine Modelle vorhanden',
'There are no modules': 'Keine Module vorhanden',
'There are no plugins': 'There are no plugins',
'There are no static files': 'Keine statischen Dateien vorhanden',
'There are no translators, only default language is supported': 'Keine Übersetzungen vorhanden, nur die voreingestellte Sprache wird unterstützt',
'There are no views': 'Keine Views vorhanden',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is a copy of the scaffolding application': 'Dies ist eine Kopie einer Grundgerüst-Anwendung',
'This is the %(filename)s template': 'Dies ist das Template %(filename)s',
'Ticket': 'Ticket',
'Timestamp': 'Timestamp',
'To create a plugin, name a file/folder plugin_[name]': 'Um ein Plugin zu erstellen benennen Sie eine(n) Datei/Ordner plugin_[Name]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'überprüfen von Upgrades nicht möglich',
'Unable to download': 'herunterladen nicht möglich',
'Unable to download app': 'herunterladen der Anwendung nicht möglich',
'Update:': 'Aktualisiere:',
'Upload & install packed application': 'Verpackte Anwendung hochladen und installieren',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'lade existierende Anwendung hoch',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Benutze (...)&(...) für AND, (...)|(...) für OR, und ~(...) für NOT, um komplexe Abfragen zu erstellen.',
'Use an url:': 'Use an url:',
'User ID': 'Benutzer ID',
'Version': 'Version',
'View': 'View',
'Views': 'Views',
'Welcome %s': 'Willkommen %s',
'Welcome to web2py': 'Willkommen zu web2py',
'Which called the function': 'Which called the function',
'Wrap with Abbreviation': 'mit Kürzel einhüllen',
'YES': 'JA',
'You are successfully running web2py': 'web2by wird erfolgreich ausgeführt',
'You can modify this application and adapt it to your needs': 'Sie können diese Anwendung verändern und Ihren Bedürfnissen anpassen',
'You visited the url': 'Sie besuchten die URL',
'about': 'Über',
'additional code for your application': 'zusätzlicher Code für Ihre Anwendung',
'admin disabled because no admin password': ' admin ist deaktiviert, weil kein Admin-Passwort gesetzt ist',
'admin disabled because not supported on google apps engine': 'admin ist deaktiviert, es existiert dafür keine Unterstützung auf der google apps engine',
'admin disabled because unable to access password file': 'admin ist deaktiviert, weil kein Zugriff auf die Passwortdatei besteht',
'administrative interface': 'administrative interface',
'and rename it (required):': 'und benenne sie um (erforderlich):',
'and rename it:': ' und benenne sie um:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'Appadmin ist deaktiviert, wegen der Benutzung eines unsicheren Kanals',
'application "%s" uninstalled': 'Anwendung "%s" deinstalliert',
'application compiled': 'Anwendung kompiliert',
'application is compiled and cannot be designed': 'Die Anwendung ist kompiliert kann deswegen nicht mehr geändert werden',
'arguments': 'arguments',
'back': 'zurück',
'beautify': 'beautify',
'cache': 'Cache',
'cache, errors and sessions cleaned': 'Zwischenspeicher (cache), Fehler und Sitzungen (sessions) gelöscht',
'call': 'call',
'cannot create file': 'Kann Datei nicht erstellen',
'cannot upload file "%(filename)s"': 'Kann Datei nicht Hochladen "%(filename)s"',
'change admin password': 'Administrator-Passwort ändern',
'change password': 'Passwort ändern',
'check all': 'alles auswählen',
'check for upgrades': 'check for upgrades',
'clean': 'löschen',
'click here for online examples': 'hier klicken für online Beispiele',
'click here for the administrative interface': 'hier klicken für die Administrationsoberfläche ',
'click to check for upgrades': 'hier klicken um nach Upgrades zu suchen',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'kompilieren',
'compiled application removed': 'kompilierte Anwendung gelöscht',
'controllers': 'Controllers',
'create': 'erstellen',
'create file with filename:': 'erzeuge Datei mit Dateinamen:',
'create new application:': 'erzeuge neue Anwendung:',
'created by': 'created by',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'des derzeit gespeicherten oder',
'customize me!': 'pass mich an!',
'data uploaded': 'Daten hochgeladen',
'database': 'Datenbank',
'database %s select': 'Datenbank %s ausgewählt',
'database administration': 'Datenbankadministration',
'db': 'db',
'defines tables': 'definiere Tabellen',
'delete': 'löschen',
'delete all checked': 'lösche alle markierten',
'delete plugin': 'Plugin löschen',
'deploy': 'deploy',
'design': 'design',
'direction: ltr': 'direction: ltr',
'documentation': 'Dokumentation',
'done!': 'fertig!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'bearbeiten',
'edit controller': 'Bearbeite Controller',
'edit profile': 'bearbeite Profil',
'edit views:': 'Views bearbeiten:',
'errors': 'Fehler',
'escape': 'escape',
'export as csv file': 'Exportieren als CSV-Datei',
'exposes': 'stellt zur Verfügung',
'extends': 'erweitert',
'failed to reload module': 'neu laden des Moduls fehlgeschlagen',
'file "%(filename)s" created': 'Datei "%(filename)s" erstellt',
'file "%(filename)s" deleted': 'Datei "%(filename)s" gelöscht',
'file "%(filename)s" uploaded': 'Datei "%(filename)s" hochgeladen',
'file "%(filename)s" was not deleted': 'Datei "%(filename)s" wurde nicht gelöscht',
'file "%s" of %s restored': 'Datei "%s" von %s wiederhergestellt',
'file changed on disk': 'Datei auf Festplatte geändert',
'file does not exist': 'Datei existiert nicht',
'file saved on %(time)s': 'Datei gespeichert am %(time)s',
'file saved on %s': 'Datei gespeichert auf %s',
'files': 'files',
'filter': 'filter',
'help': 'Hilfe',
'htmledit': 'htmledit',
'includes': 'Einfügen',
'index': 'index',
'insert new': 'neu einfügen',
'insert new %s': 'neu einfügen %s',
'install': 'installieren',
'internal error': 'interner Fehler',
'invalid password': 'Ungültiges Passwort',
'invalid request': 'ungültige Anfrage',
'invalid ticket': 'ungültiges Ticket',
'language file "%(filename)s" created/updated': 'Sprachdatei "%(filename)s" erstellt/aktualisiert',
'languages': 'Sprachen',
'languages updated': 'Sprachen aktualisiert',
'loading...': 'lade...',
'located in the file': 'located in Datei',
'login': 'anmelden',
'logout': 'abmelden',
'lost password?': 'Passwort vergessen?',
'merge': 'verbinden',
'models': 'Modelle',
'modules': 'Module',
'new application "%s" created': 'neue Anwendung "%s" erzeugt',
'new record inserted': 'neuer Datensatz eingefügt',
'next 100 rows': 'nächsten 100 Zeilen',
'or import from csv file': 'oder importieren von cvs Datei',
'or provide app url:': 'oder geben Sie eine Anwendungs-URL an:',
'or provide application url:': 'oder geben Sie eine Anwendungs-URL an:',
'overwrite installed app': 'installierte Anwendungen überschreiben',
'pack all': 'verpacke alles',
'pack compiled': 'Verpacke kompiliert',
'pack plugin': 'Plugin verpacken',
'please wait!': 'bitte warten!',
'plugins': 'plugins',
'previous 100 rows': 'vorherige 100 zeilen',
'record': 'Datensatz',
'record does not exist': 'Datensatz existiert nicht',
'record id': 'Datensatz id',
'register': 'Registrierung',
'remove compiled': 'kompilat gelöscht',
'restore': 'wiederherstellen',
'revert': 'zurückkehren',
'save': 'sichern',
'selected': 'ausgewählt(e)',
'session expired': 'Sitzung Abgelaufen',
'shell': 'shell',
'site': 'Seite',
'some files could not be removed': 'einige Dateien konnten nicht gelöscht werden',
'start wizard': 'start wizard',
'state': 'Status',
'static': 'statische Dateien',
'submit': 'Absenden',
'table': 'Tabelle',
'test': 'Test',
'test_def': 'test_def',
'test_for': 'test_for',
'test_if': 'test_if',
'test_try': 'test_try',
'the application logic, each URL path is mapped in one exposed function in the controller': 'Die Logik der Anwendung, jeder URL-Pfad wird auf eine Funktion abgebildet die der Controller zur Verfügung stellt',
'the data representation, define database tables and sets': 'Die Datenrepräsentation definiert Mengen von Tabellen und Datenbanken ',
'the presentations layer, views are also known as templates': 'Die Präsentationsschicht, Views sind auch bekannt als Vorlagen/Templates',
'these files are served without processing, your images go here': 'Diese Dateien werden ohne Verarbeitung ausgeliefert. Beispielsweise Bilder kommen hier hin.',
'to previous version.': 'zu einer früheren Version.',
'translation strings for the application': 'Übersetzungs-Strings für die Anwendung',
'try': 'versuche',
'try something like': 'versuche so etwas wie',
'unable to create application "%s"': 'erzeugen von Anwendung "%s" nicht möglich',
'unable to delete file "%(filename)s"': 'löschen von Datein "%(filename)s" nicht möglich',
'unable to parse csv file': 'analysieren der cvs Datei nicht möglich',
'unable to uninstall "%s"': 'deinstallieren von "%s" nicht möglich',
'uncheck all': 'alles demarkieren',
'uninstall': 'deinstallieren',
'update': 'aktualisieren',
'update all languages': 'aktualisiere alle Sprachen',
'upgrade web2py now': 'jetzt web2py upgraden',
'upload': 'upload',
'upload application:': 'lade Anwendung hoch:',
'upload file:': 'lade Datei hoch:',
'upload plugin file:': 'Plugin-Datei hochladen:',
'user': 'user',
'variables': 'variables',
'versioning': 'Versionierung',
'view': 'View',
'views': 'Views',
'web2py Recent Tweets': 'neuste Tweets von web2py',
'web2py is up to date': 'web2py ist auf dem neuesten Stand',
'xml': 'xml',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników 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ętych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(coś podobnego do "it-it")',
'A new version of web2py is available': 'Nowa wersja web2py jest dostępna',
'A new version of web2py is available: %s': 'A new version of web2py is available: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'UWAGA: Wymagane jest bezpieczne (HTTPS) połączenie lub połączenia z lokalnego adresu.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.',
'ATTENTION: you cannot edit the running application!': 'UWAGA: nie można edytować uruchomionych aplikacji!',
'About': 'Informacje o',
'About application': 'Informacje o aplikacji',
'Admin is disabled because insecure channel': 'Admin is disabled because insecure channel',
'Admin is disabled because unsecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
'Admin language': 'Admin language',
'Administrator Password:': 'Hasło administratora:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Czy na pewno chcesz usunąć plik "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
'Are you sure you want to uninstall application "%s"': 'Czy na pewno chcesz usunąć aplikację "%s"',
'Are you sure you want to uninstall application "%s"?': 'Czy na pewno chcesz usunąć aplikację "%s"?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Dostępne bazy danych i tabele',
'Cannot be empty': 'Nie może być puste',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Nie można skompilować: w Twojej aplikacji są błędy . Znajdź je, popraw a następnie spróbój ponownie.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Zaznacz aby usunąć',
'Checking for upgrades...': 'Checking for upgrades...',
'Controllers': 'Kontrolery',
'Create new simple application': 'Utwórz nową aplikację',
'Current request': 'Aktualne żądanie',
'Current response': 'Aktualna odpowiedź',
'Current session': 'Aktualna sesja',
'DESIGN': 'PROJEKTUJ',
'Date and Time': 'Data i godzina',
'Delete': 'Usuń',
'Delete:': 'Usuń:',
'Deploy on Google App Engine': 'Umieść na Google App Engine',
'Design for': 'Projekt dla',
'EDIT': 'EDYTUJ',
'Edit application': 'Edycja aplikacji',
'Edit current record': 'Edytuj aktualny rekord',
'Editing Language file': 'Editing Language file',
'Editing file': 'Edycja pliku',
'Editing file "%s"': 'Edycja pliku "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Wpisy błędów dla "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Functions with no doctests will result in [passed] tests.',
'Hello World': 'Witaj Świecie',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Importuj/eksportuj',
'Installed applications': 'Zainstalowane aplikacje',
'Internal State': 'Stan wewnętrzny',
'Invalid Query': 'Błędne zapytanie',
'Invalid action': 'Błędna akcja',
'Language files (static strings) updated': 'Language files (static strings) updated',
'Languages': 'Tłumaczenia',
'Last saved on:': 'Ostatnio zapisany:',
'License for': 'Licencja dla',
'Login': 'Zaloguj',
'Login to the Administrative Interface': 'Logowanie do panelu administracyjnego',
'Models': 'Modele',
'Modules': 'Moduły',
'NO': 'NIE',
'New Record': 'Nowy rekord',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Original/Translation': 'Oryginał/tłumaczenie',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Podgląd pliku',
'Plugin "%s" in application': 'Plugin "%s" in application',
'Plugins': 'Plugins',
'Powered by': 'Powered by',
'Query:': 'Zapytanie:',
'Resolve Conflict file': 'Resolve Conflict file',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wierszy wybranych',
'Saved file hash:': 'Suma kontrolna zapisanego pliku:',
'Static files': 'Pliki statyczne',
'Sure you want to delete this object?': 'Czy na pewno chcesz usunąć ten obiekt?',
'TM': 'TM',
'Testing application': 'Testing application',
'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ść\'". Takie coś jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'There are no controllers': 'Brak kontrolerów',
'There are no models': 'Brak modeli',
'There are no modules': 'Brak modułów',
'There are no static files': 'Brak plików statycznych',
'There are no translators, only default language is supported': 'Brak plików tłumaczeń, wspierany jest tylko domyślny język',
'There are no views': 'Brak widoków',
'This is the %(filename)s template': 'To jest szablon %(filename)s',
'Ticket': 'Bilet',
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
'Unable to check for upgrades': 'Nie można sprawdzić aktualizacji',
'Unable to download': 'Nie można ściągnąć',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Uaktualnij:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'Wyślij istniejącą aplikację',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Użyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...) jako NOT do tworzenia bardziej skomplikowanych zapytań.',
'Use an url:': 'Use an url:',
'Version': 'Version',
'Views': 'Widoki',
'Welcome to web2py': 'Witaj w web2py',
'YES': 'TAK',
'about': 'informacje',
'additional code for your application': 'dodatkowy kod Twojej aplikacji',
'admin disabled because no admin password': 'panel administracyjny wyłączony z powodu braku hasła administracyjnego',
'admin disabled because not supported on google app engine': 'admin disabled because not supported on google apps engine',
'admin disabled because unable to access password file': 'panel administracyjny wyłączony z powodu braku dostępu do pliku z hasłem',
'administrative interface': 'administrative interface',
'and rename it (required):': 'i nadaj jej nową nazwę (wymagane):',
'and rename it:': 'i nadaj mu nową nazwę:',
'appadmin': 'administracja aplikacji',
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
'application "%s" uninstalled': 'aplikacja "%s" została odinstalowana',
'application compiled': 'aplikacja została skompilowana',
'application is compiled and cannot be designed': 'aplikacja jest skompilowana i nie może być projektowana',
'arguments': 'arguments',
'back': 'back',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pamięć podręczna, bilety błędów oraz pliki sesji zostały wyczyszczone',
'cannot create file': 'nie można utworzyć pliku',
'cannot upload file "%(filename)s"': 'nie można wysłać pliku "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'zaznacz wszystko',
'check for upgrades': 'check for upgrades',
'clean': 'oczyść',
'click here for online examples': 'kliknij aby przejść do interaktywnych przykładów',
'click here for the administrative interface': 'kliknij aby przejść do panelu administracyjnego',
'click to check for upgrades': 'kliknij aby sprawdzić aktualizacje',
'code': 'code',
'compile': 'skompiluj',
'compiled application removed': 'skompilowana aplikacja została usunięta',
'controllers': 'kontrolery',
'create': 'create',
'create file with filename:': 'utwórz plik o nazwie:',
'create new application:': 'utwórz nową aplikację:',
'created by': 'created by',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'aktualnie zapisany lub',
'data uploaded': 'dane wysłane',
'database': 'baza danych',
'database %s select': 'wybór z bazy danych %s',
'database administration': 'administracja bazy danych',
'db': 'baza danych',
'defines tables': 'zdefiniuj tabele',
'delete': 'usuń',
'delete all checked': 'usuń wszystkie zaznaczone',
'delete plugin': 'delete plugin',
'deploy': 'deploy',
'design': 'projektuj',
'direction: ltr': 'direction: ltr',
'done!': 'zrobione!',
'edit': 'edytuj',
'edit controller': 'edytuj kontroler',
'edit views:': 'edit views:',
'errors': 'błędy',
'export as csv file': 'eksportuj jako plik csv',
'exposes': 'eksponuje',
'extends': 'rozszerza',
'failed to reload module': 'nie udało się przeładować modułu',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'plik "%(filename)s" został utworzony',
'file "%(filename)s" deleted': 'plik "%(filename)s" został usunięty',
'file "%(filename)s" uploaded': 'plik "%(filename)s" został wysłany',
'file "%(filename)s" was not deleted': 'plik "%(filename)s" nie został usunięty',
'file "%s" of %s restored': 'plik "%s" z %s został odtworzony',
'file changed on disk': 'plik na dysku został zmieniony',
'file does not exist': 'plik nie istnieje',
'file saved on %(time)s': 'plik zapisany o %(time)s',
'file saved on %s': 'plik zapisany o %s',
'help': 'pomoc',
'htmledit': 'edytuj HTML',
'includes': 'zawiera',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'install': 'install',
'internal error': 'wewnętrzny błąd',
'invalid password': 'błędne hasło',
'invalid request': 'błędne zapytanie',
'invalid ticket': 'błędny bilet',
'language file "%(filename)s" created/updated': 'plik tłumaczeń "%(filename)s" został utworzony/uaktualniony',
'languages': 'pliki tłumaczeń',
'languages updated': 'pliki tłumaczeń zostały uaktualnione',
'loading...': 'wczytywanie...',
'login': 'zaloguj',
'logout': 'wyloguj',
'merge': 'merge',
'models': 'modele',
'modules': 'moduły',
'new application "%s" created': 'nowa aplikacja "%s" została utworzona',
'new plugin installed': 'new plugin installed',
'new record inserted': 'nowy rekord został wstawiony',
'next 100 rows': 'następne 100 wierszy',
'no match': 'no match',
'or import from csv file': 'lub zaimportuj z pliku csv',
'or provide app url:': 'or provide app url:',
'or provide application url:': 'lub podaj url aplikacji:',
'overwrite installed app': 'overwrite installed app',
'pack all': 'spakuj wszystko',
'pack compiled': 'spakuj skompilowane',
'pack plugin': 'pack plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'record',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'remove compiled': 'usuń skompilowane',
'restore': 'odtwórz',
'revert': 'przywróć',
'save': 'zapisz',
'selected': 'zaznaczone',
'session expired': 'sesja wygasła',
'shell': 'powłoka',
'site': 'strona główna',
'some files could not be removed': 'niektóre pliki nie mogły zostać usunięte',
'start wizard': 'start wizard',
'state': 'stan',
'static': 'pliki statyczne',
'submit': 'submit',
'table': 'tabela',
'test': 'testuj',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logika aplikacji, każda ścieżka URL jest mapowana na jedną z funkcji eksponowanych w kontrolerze',
'the data representation, define database tables and sets': 'reprezentacja danych, definicje zbiorów i tabel bazy danych',
'the presentations layer, views are also known as templates': 'warstwa prezentacji, widoki zwane są również szablonami',
'these files are served without processing, your images go here': 'pliki obsługiwane bez interpretacji, to jest miejsce na Twoje obrazy',
'to previous version.': 'do poprzedniej wersji.',
'translation strings for the application': 'ciągi tłumaczeń dla aplikacji',
'try': 'spróbój',
'try something like': 'spróbój czegos takiego jak',
'unable to create application "%s"': 'nie można utworzyć aplikacji "%s"',
'unable to delete file "%(filename)s"': 'nie można usunąć pliku "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
'unable to parse csv file': 'nie można sparsować pliku csv',
'unable to uninstall "%s"': 'nie można odinstalować "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'odznacz wszystko',
'uninstall': 'odinstaluj',
'update': 'uaktualnij',
'update all languages': 'uaktualnij wszystkie pliki tłumaczeń',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': 'wyślij plik aplikacji:',
'upload file:': 'wyślij plik:',
'upload plugin file:': 'upload plugin file:',
'variables': 'variables',
'versioning': 'versioning',
'view': 'widok',
'views': 'widoki',
'web2py Recent Tweets': 'najnowsze tweety web2py',
'web2py is up to date': 'web2py jest aktualne',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s filas eliminadas',
'%s rows updated': '%s filas actualizadas',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENCION: Inicio de sesión requiere una conexión segura (HTTPS) o localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENCION: NO EJECUTE VARIAS PRUEBAS SIMULTANEAMENTE, NO SON THREAD SAFE.',
'ATTENTION: you cannot edit the running application!': 'ATENCION: no puede modificar la aplicación que se ejecuta!',
'About': 'Acerca de',
'About application': 'Acerca de la aplicación',
'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
'Administrator Password:': 'Contraseña del Administrador:',
'Are you sure you want to delete file "%s"?': '¿Está seguro que desea eliminar el archivo "%s"?',
'Are you sure you want to delete plugin "%s"?': '¿Está seguro que quiere eliminar el plugin "%s"?',
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
'Are you sure you want to uninstall application "%s"?': '¿Está seguro que desea desinstalar la aplicación "%s"?',
'Are you sure you want to upgrade web2py now?': '¿Está seguro que desea actualizar web2py ahora?',
'Available databases and tables': 'Bases de datos y tablas disponibles',
'Cannot be empty': 'No puede estar vacío',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
'Cannot compile: there are errors in your app:': 'No se puede compilar: hay errores en su aplicación:',
'Change Password': 'Cambie Contraseña',
'Check to delete': 'Marque para eliminar',
'Checking for upgrades...': 'Buscando actulizaciones...',
'Click row to expand traceback': 'Click row to expand traceback',
'Client IP': 'IP del Cliente',
'Controllers': 'Controladores',
'Count': 'Count',
'Create new application using the Wizard': 'Create new application using the Wizard',
'Create new simple application': 'Cree una nueva aplicación',
'Current request': 'Solicitud en curso',
'Current response': 'Respuesta en curso',
'Current session': 'Sesión en curso',
'DESIGN': 'DISEÑO',
'Date and Time': 'Fecha y Hora',
'Delete': 'Elimine',
'Delete:': 'Elimine:',
'Deploy on Google App Engine': 'Instale en Google App Engine',
'Description': 'Descripción',
'Design for': 'Diseño para',
'E-mail': 'Correo electrónico',
'EDIT': 'EDITAR',
'Edit Profile': 'Editar Perfil',
'Edit application': 'Editar aplicación',
'Edit current record': 'Edite el registro actual',
'Editing Language file': 'Editando archivo de lenguaje',
'Editing file': 'Editando archivo',
'Editing file "%s"': 'Editando archivo "%s"',
'Enterprise Web Framework': 'Armazón Empresarial para Internet',
'Error': 'Error',
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
'Exception instance attributes': 'Atributos de la instancia de Excepción',
'File': 'File',
'First name': 'Nombre',
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
'Group ID': 'ID de Grupo',
'Hello World': 'Hola Mundo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Si el reporte anterior contiene un número de tiquete este indica un falla en la ejecución del controlador, antes de cualquier intento de ejecutat doctests. Esto generalmente se debe a un error en la indentación o un error por fuera del código de la función.\r\nUn titulo verde indica que todas las pruebas pasaron (si existen). En dicho caso los resultados no se muestran.',
'Import/Export': 'Importar/Exportar',
'Installed applications': 'Aplicaciones instaladas',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta inválida',
'Invalid action': 'Acción inválida',
'Invalid email': 'Correo inválido',
'Language files (static strings) updated': 'Archivos de lenguaje (cadenas estáticas) actualizados',
'Languages': 'Lenguajes',
'Last name': 'Apellido',
'Last saved on:': 'Guardado en:',
'License for': 'Licencia para',
'Login': 'Inicio de sesión',
'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
'Logout': 'Fin de sesión',
'Lost Password': 'Contraseña perdida',
'Models': 'Modelos',
'Modules': 'Módulos',
'NO': 'NO',
'Name': 'Nombre',
'New Record': 'Registro nuevo',
'No databases in this application': 'No hay bases de datos en esta aplicación',
'Origin': 'Origen',
'Original/Translation': 'Original/Traducción',
'PAM authenticated user, cannot change password here': 'usuario autenticado por PAM, no puede cambiar la contraseña aquí',
'Password': 'Contraseña',
'Peeking at file': 'Visualizando archivo',
'Plugin "%s" in application': 'Plugin "%s" en aplicación',
'Plugins': 'Plugins',
'Powered by': 'Este sitio usa',
'Query:': 'Consulta:',
'Record ID': 'ID de Registro',
'Register': 'Registrese',
'Registration key': 'Contraseña de Registro',
'Resolve Conflict file': 'archivo Resolución de Conflicto',
'Role': 'Rol',
'Rows in table': 'Filas en la tabla',
'Rows selected': 'Filas seleccionadas',
'Saved file hash:': 'Hash del archivo guardado:',
'Static files': 'Archivos estáticos',
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
'TM': 'MR',
'Table name': 'Nombre de la tabla',
'Testing application': 'Probando aplicación',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.',
'There are no controllers': 'No hay controladores',
'There are no models': 'No hay modelos',
'There are no modules': 'No hay módulos',
'There are no static files': 'No hay archivos estáticos',
'There are no translators, only default language is supported': 'No hay traductores, sólo el lenguaje por defecto es soportado',
'There are no views': 'No hay vistas',
'This is the %(filename)s template': 'Esta es la plantilla %(filename)s',
'Ticket': 'Tiquete',
'Timestamp': 'Timestamp',
'To create a plugin, name a file/folder plugin_[name]': 'Para crear un plugin, nombre un archivo/carpeta plugin_[nombre]',
'Unable to check for upgrades': 'No es posible verificar la existencia de actualizaciones',
'Unable to download': 'No es posible la descarga',
'Unable to download app': 'No es posible descargar la aplicación',
'Unable to download app because:': 'No es posible descargar la aplicación porque:',
'Unable to download because': 'No es posible descargar porque',
'Update:': 'Actualice:',
'Upload & install packed application': 'Suba e instale aplicación empaquetada',
'Upload existing application': 'Suba esta aplicación',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para crear consultas más complejas.',
'User ID': 'ID de Usuario',
'Version': 'Versión',
'Views': 'Vistas',
'Welcome to web2py': 'Bienvenido a web2py',
'YES': 'SI',
'about': 'acerca de',
'additional code for your application': 'código adicional para su aplicación',
'admin disabled because no admin password': ' por falta de contraseña',
'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
'and rename it (required):': 'y renombrela (requerido):',
'and rename it:': ' y renombrelo:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
'application compiled': 'aplicación compilada',
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
'arguments': 'argumentos',
'back': 'atrás',
'browse': 'buscar',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
'cannot create file': 'no es posible crear archivo',
'cannot upload file "%(filename)s"': 'no es posible subir archivo "%(filename)s"',
'change admin password': 'cambie contraseña admin',
'check all': 'marcar todos',
'clean': 'limpiar',
'click here for online examples': 'haga clic aquí para ver ejemplos en línea',
'click here for the administrative interface': 'haga clic aquí para usar la interfaz administrativa',
'click to check for upgrades': 'haga clic para buscar actualizaciones',
'click to open': 'click to open',
'code': 'código',
'commit (mercurial)': 'commit (mercurial)',
'compile': 'compilar',
'compiled application removed': 'aplicación compilada removida',
'controllers': 'controladores',
'create': 'crear',
'create file with filename:': 'cree archivo con nombre:',
'create new application:': 'nombre de la nueva aplicación:',
'created by': 'creado por',
'crontab': 'crontab',
'currently saved or': 'actualmente guardado o',
'customize me!': 'Adaptame!',
'data uploaded': 'datos subidos',
'database': 'base de datos',
'database %s select': 'selección en base de datos %s',
'database administration': 'administración base de datos',
'db': 'db',
'defines tables': 'define tablas',
'delete': 'eliminar',
'delete all checked': 'eliminar marcados',
'delete plugin': 'eliminar plugin',
'design': 'modificar',
'direction: ltr': 'direction: ltr',
'done!': 'listo!',
'edit': 'editar',
'edit controller': 'editar controlador',
'edit views:': 'editar vistas:',
'errors': 'errores',
'export as csv file': 'exportar como archivo CSV',
'exposes': 'expone',
'extends': 'extiende',
'failed to reload module': 'recarga del módulo ha fallado',
'failed to reload module because:': 'no es posible recargar el módulo por:',
'file "%(filename)s" created': 'archivo "%(filename)s" creado',
'file "%(filename)s" deleted': 'archivo "%(filename)s" eliminado',
'file "%(filename)s" uploaded': 'archivo "%(filename)s" subido',
'file "%(filename)s" was not deleted': 'archivo "%(filename)s" no fué eliminado',
'file "%s" of %s restored': 'archivo "%s" de %s restaurado',
'file changed on disk': 'archivo modificado en el disco',
'file does not exist': 'archivo no existe',
'file saved on %(time)s': 'archivo guardado %(time)s',
'file saved on %s': 'archivo guardado %s',
'help': 'ayuda',
'htmledit': 'htmledit',
'includes': 'incluye',
'insert new': 'inserte nuevo',
'insert new %s': 'inserte nuevo %s',
'install': 'instalar',
'internal error': 'error interno',
'invalid password': 'contraseña inválida',
'invalid request': 'solicitud inválida',
'invalid ticket': 'tiquete inválido',
'language file "%(filename)s" created/updated': 'archivo de lenguaje "%(filename)s" creado/actualizado',
'languages': 'lenguajes',
'languages updated': 'lenguajes actualizados',
'loading...': 'cargando...',
'login': 'inicio de sesión',
'logout': 'fin de sesión',
'manage': 'manage',
'merge': 'combinar',
'models': 'modelos',
'modules': 'módulos',
'new application "%s" created': 'nueva aplicación "%s" creada',
'new plugin installed': 'nuevo plugin instalado',
'new record inserted': 'nuevo registro insertado',
'next 100 rows': '100 filas siguientes',
'no match': 'no encontrado',
'or import from csv file': 'o importar desde archivo CSV',
'or provide app url:': 'o provea URL de la aplicación:',
'or provide application url:': 'o provea URL de la aplicación:',
'overwrite installed app': 'sobreescriba aplicación instalada',
'pack all': 'empaquetar todo',
'pack compiled': 'empaquete compiladas',
'pack plugin': 'empaquetar plugin',
'password changed': 'contraseña cambiada',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" eliminado',
'previous 100 rows': '100 filas anteriores',
'record': 'registro',
'record does not exist': 'el registro no existe',
'record id': 'id de registro',
'remove compiled': 'eliminar compiladas',
'restore': 'restaurar',
'revert': 'revertir',
'save': 'guardar',
'selected': 'seleccionado(s)',
'session expired': 'sesión expirada',
'shell': 'shell',
'site': 'sitio',
'some files could not be removed': 'algunos archivos no pudieron ser removidos',
'state': 'estado',
'static': 'estáticos',
'submit': 'enviar',
'table': 'tabla',
'test': 'probar',
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos',
'the presentations layer, views are also known as templates': 'la capa de presentación, las vistas también son llamadas plantillas',
'these files are served without processing, your images go here': 'estos archivos son servidos sin procesar, sus imágenes van aquí',
'to previous version.': 'a la versión previa.',
'translation strings for the application': 'cadenas de caracteres de traducción para la aplicación',
'try': 'intente',
'try something like': 'intente algo como',
'unable to create application "%s"': 'no es posible crear la aplicación "%s"',
'unable to delete file "%(filename)s"': 'no es posible eliminar el archivo "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'no es posible eliminar plugin "%(plugin)s"',
'unable to parse csv file': 'no es posible analizar el archivo CSV',
'unable to uninstall "%s"': 'no es posible instalar "%s"',
'unable to upgrade because "%s"': 'no es posible actualizar porque "%s"',
'uncheck all': 'desmarcar todos',
'uninstall': 'desinstalar',
'update': 'actualizar',
'update all languages': 'actualizar todos los lenguajes',
'upgrade web2py now': 'actualize web2py ahora',
'upload application:': 'subir aplicación:',
'upload file:': 'suba archivo:',
'upload plugin file:': 'suba archivo de plugin:',
'variables': 'variables',
'versioning': 'versiones',
'view': 'vista',
'views': 'vistas',
'web2py Recent Tweets': 'Tweets Recientes de web2py',
'web2py is up to date': 'web2py está actualizado',
'web2py upgraded; please restart it': 'web2py actualizado; favor reiniciar',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(qualcosa simile a "it-it")',
'A new version of web2py is available: %s': 'È disponibile una nuova versione di web2py: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': "ATTENZIONE: L'accesso richiede una connessione sicura (HTTPS) o l'esecuzione di web2py in locale (connessione su localhost)",
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTZIONE: NON ESEGUIRE PIÙ TEST IN PARALLELO (I TEST NON SONO "THREAD SAFE")',
'ATTENTION: you cannot edit the running application!': "ATTENZIONE: non puoi modificare l'applicazione correntemente in uso ",
'About': 'Informazioni',
'About application': "Informazioni sull'applicazione",
'Admin is disabled because insecure channel': 'amministrazione disabilitata: comunicazione non sicura',
'Admin language': 'Admin language',
'Administrator Password:': 'Password Amministratore:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Confermi di voler cancellare il file "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Confermi di voler cancellare il plugin "%s"?',
'Are you sure you want to uninstall application "%s"?': 'Confermi di voler disinstallare l\'applicazione "%s"?',
'Are you sure you want to upgrade web2py now?': 'Confermi di voler aggiornare web2py ora?',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Cannot compile: there are errors in your app:': "Compilazione fallita: ci sono errori nell'applicazione.",
'Check to delete': 'Seleziona per cancellare',
'Checking for upgrades...': 'Controllo aggiornamenti in corso...',
'Controller': 'Controller',
'Controllers': 'Controllers',
'Copyright': 'Copyright',
'Create new simple application': 'Crea nuova applicazione',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Date and Time': 'Data and Ora',
'Delete': 'Cancella',
'Delete:': 'Cancella:',
'Deploy on Google App Engine': 'Installa su Google App Engine',
'EDIT': 'MODIFICA',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit application': 'Modifica applicazione',
'Edit current record': 'Modifica record corrente',
'Editing Language file': 'Modifica file linguaggio',
'Editing file "%s"': 'Modifica del file "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Log degli errori per "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'I test delle funzioni senza "doctests" risulteranno sempre [passed].',
'Hello World': 'Salve Mondo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Installed applications': 'Applicazioni installate',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid action': 'Azione non valida',
'Language files (static strings) updated': 'Linguaggi (documenti con stringhe statiche) aggiornati',
'Languages': 'Linguaggi',
'Last saved on:': 'Ultimo salvataggio:',
'Layout': 'Layout',
'License for': 'Licenza relativa a',
'Login': 'Accesso',
'Login to the Administrative Interface': "Accesso all'interfaccia amministrativa",
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Models': 'Modelli',
'Modules': 'Moduli',
'NO': 'NO',
'New Record': 'Nuovo elemento (record)',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Original/Translation': 'Originale/Traduzione',
'PAM authenticated user, cannot change password here': 'utente autenticato tramite PAM, impossibile modificare password qui',
'Peeking at file': 'Uno sguardo al file',
'Plugin "%s" in application': 'Plugin "%s" nell\'applicazione',
'Plugins': 'I Plugins',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Resolve Conflict file': 'File di risoluzione conflitto',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Saved file hash:': 'Hash del file salvato:',
'Static files': 'Files statici',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'TM': 'TM',
'Testing application': 'Test applicazione in corsg',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'There are no controllers': 'Non ci sono controller',
'There are no models': 'Non ci sono modelli',
'There are no modules': 'Non ci sono moduli',
'There are no static files': 'Non ci sono file statici',
'There are no translators, only default language is supported': 'Non ci sono traduzioni, viene solo supportato il linguaggio di base',
'There are no views': 'Non ci sono viste ("view")',
'This is the %(filename)s template': 'Questo è il template %(filename)s',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'Per creare un plugin, chiamare un file o cartella plugin_[nome]',
'Unable to check for upgrades': 'Impossibile controllare presenza di aggiornamenti',
'Unable to download app because:': 'Impossibile scaricare applicazione perché',
'Unable to download because': 'Impossibile scaricare perché',
'Unable to download because:': 'Unable to download because:',
'Update:': 'Aggiorna:',
'Upload & install packed application': 'Carica ed installa pacchetto con applicazione',
'Upload a package:': 'Upload a package:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'Use an url:': 'Use an url:',
'Version': 'Versione',
'View': 'Vista',
'Views': 'viste',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'YES': 'SI',
'about': 'informazioni',
'additional code for your application': 'righe di codice aggiuntive per la tua applicazione',
'admin disabled because no admin password': 'amministrazione disabilitata per mancanza di password amministrativa',
'admin disabled because not supported on google app engine': 'amministrazione non supportata da Google Apps Engine',
'admin disabled because unable to access password file': 'amministrazione disabilitata per impossibilità di leggere il file delle password',
'administrative interface': 'administrative interface',
'and rename it (required):': 'e rinominala (obbligatorio):',
'and rename it:': 'e rinominala:',
'appadmin': 'appadmin ',
'appadmin is disabled because insecure channel': 'amministrazione app (appadmin) disabilitata: comunicazione non sicura',
'application "%s" uninstalled': 'applicazione "%s" disinstallata',
'application compiled': 'applicazione compilata',
'application is compiled and cannot be designed': "l'applicazione è compilata e non si può modificare",
'arguments': 'arguments',
'back': 'indietro',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pulitura cache, errori and sessioni ',
'cannot create file': 'impossibile creare il file',
'cannot upload file "%(filename)s"': 'impossibile caricare il file "%(filename)s"',
'change admin password': 'change admin password',
'change password': 'cambia password',
'check all': 'controlla tutto',
'check for upgrades': 'check for upgrades',
'clean': 'pulisci',
'click here for online examples': 'clicca per vedere gli esempi',
'click here for the administrative interface': "clicca per l'interfaccia amministrativa",
'click to check for upgrades': 'clicca per controllare presenza di aggiornamenti',
'code': 'code',
'compile': 'compila',
'compiled application removed': "rimosso il codice compilato dell'applicazione",
'controllers': 'controllers',
'create': 'crea',
'create file with filename:': 'crea un file col nome:',
'create new application:': 'create new application:',
'created by': 'creato da',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'attualmente salvato o',
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'database administration': 'amministrazione database',
'db': 'db',
'defines tables': 'defininisce le tabelle',
'delete': 'Cancella',
'delete all checked': 'cancella tutti i selezionati',
'delete plugin': 'cancella plugin',
'deploy': 'deploy',
'design': 'progetta',
'direction: ltr': 'direction: ltr',
'done!': 'fatto!',
'edit': 'modifica',
'edit controller': 'modifica controller',
'edit profile': 'modifica profilo',
'edit views:': 'modifica viste (view):',
'errors': 'errori',
'export as csv file': 'esporta come file CSV',
'exposes': 'espone',
'extends': 'estende',
'failed to reload module because:': 'ricaricamento modulo fallito perché:',
'file "%(filename)s" created': 'creato il file "%(filename)s"',
'file "%(filename)s" deleted': 'cancellato il file "%(filename)s"',
'file "%(filename)s" uploaded': 'caricato il file "%(filename)s"',
'file "%s" of %s restored': 'ripristinato "%(filename)s"',
'file changed on disk': 'il file ha subito una modifica su disco',
'file does not exist': 'file inesistente',
'file saved on %(time)s': "file salvato nell'istante %(time)s",
'file saved on %s': 'file salvato: %s',
'help': 'aiuto',
'htmledit': 'modifica come html',
'includes': 'include',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'install': 'installa',
'internal error': 'errore interno',
'invalid password': 'password non valida',
'invalid request': 'richiesta non valida',
'invalid ticket': 'ticket non valido',
'language file "%(filename)s" created/updated': 'file linguaggio "%(filename)s" creato/aggiornato',
'languages': 'linguaggi',
'loading...': 'caricamento...',
'login': 'accesso',
'logout': 'uscita',
'merge': 'unisci',
'models': 'modelli',
'modules': 'moduli',
'new application "%s" created': 'creata la nuova applicazione "%s"',
'new plugin installed': 'installato nuovo plugin',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'no match': 'nessuna corrispondenza',
'or import from csv file': 'oppure importa da file CSV',
'or provide app url:': "oppure fornisci url dell'applicazione:",
'overwrite installed app': 'sovrascrivi applicazione installata',
'pack all': 'crea pacchetto',
'pack compiled': 'crea pacchetto del codice compilato',
'pack plugin': 'crea pacchetto del plugin',
'password changed': 'password modificata',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" cancellato',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'ID del record',
'register': 'registrazione',
'remove compiled': 'rimozione codice compilato',
'restore': 'ripristino',
'revert': 'versione precedente',
'selected': 'selezionato',
'session expired': 'sessions scaduta',
'shell': 'shell',
'site': 'sito',
'some files could not be removed': 'non è stato possibile rimuovere alcuni files',
'start wizard': 'start wizard',
'state': 'stato',
'static': 'statico',
'submit': 'invia',
'table': 'tabella',
'test': 'test',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logica dell\'applicazione, ogni percorso "URL" corrisponde ad una funzione esposta da un controller',
'the data representation, define database tables and sets': 'rappresentazione dei dati, definizione di tabelle di database e di "set" ',
'the presentations layer, views are also known as templates': 'Presentazione dell\'applicazione, viste (views, chiamate anche "templates")',
'these files are served without processing, your images go here': 'questi files vengono serviti così come sono, le immagini vanno qui',
'to previous version.': 'torna a versione precedente',
'translation strings for the application': "stringhe di traduzioni per l'applicazione",
'try': 'prova',
'try something like': 'prova qualcosa come',
'unable to create application "%s"': 'impossibile creare applicazione "%s"',
'unable to delete file "%(filename)s"': 'impossibile rimuovere file "%(plugin)s"',
'unable to delete file plugin "%(plugin)s"': 'impossibile rimuovere file di plugin "%(plugin)s"',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
'unable to uninstall "%s"': 'impossibile disinstallare "%s"',
'unable to upgrade because "%s"': 'impossibile aggiornare perché "%s"',
'uncheck all': 'smarca tutti',
'uninstall': 'disinstalla',
'update': 'aggiorna',
'update all languages': 'aggiorna tutti i linguaggi',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': 'carica applicazione:',
'upload file:': 'carica file:',
'upload plugin file:': 'carica file di plugin:',
'variables': 'variables',
'versioning': 'sistema di versioni',
'view': 'vista',
'views': 'viste',
'web2py Recent Tweets': 'Tweets recenti per web2py',
'web2py is up to date': 'web2py è aggiornato',
'web2py upgraded; please restart it': 'web2py aggiornato; prego riavviarlo',
}
| Python |
# coding: utf8
{
'"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 записите бяха изтрити',
'%s rows updated': '%s записите бяха обновени',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(something like "it-it")',
'A new version of web2py is available': 'A new version of web2py is available',
'A new version of web2py is available: %s': 'A new version of web2py is available: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.',
'ATTENTION: you cannot edit the running application!': 'ATTENTION: you cannot edit the running application!',
'About': 'About',
'About application': 'About application',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Admin is disabled because insecure channel',
'Admin is disabled because unsecure channel': 'Admin is disabled because unsecure channel',
'Admin language': 'Admin language',
'Administrator Password:': 'Administrator Password:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Are you sure you want to delete file "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
'Are you sure you want to uninstall application "%s"': 'Are you sure you want to uninstall application "%s"',
'Are you sure you want to uninstall application "%s"?': 'Are you sure you want to uninstall application "%s"?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Available databases and tables',
'Cannot be empty': 'Cannot be empty',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Cannot compile: there are errors in your app. Debug it, correct errors and try again.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Check to delete',
'Checking for upgrades...': 'Checking for upgrades...',
'Controllers': 'Controllers',
'Create new simple application': 'Create new simple application',
'Current request': 'Current request',
'Current response': 'Current response',
'Current session': 'Current session',
'DESIGN': 'DESIGN',
'Date and Time': 'Date and Time',
'Delete': 'Delete',
'Delete:': 'Delete:',
'Deploy on Google App Engine': 'Deploy on Google App Engine',
'Design for': 'Design for',
'EDIT': 'EDIT',
'Edit application': 'Edit application',
'Edit current record': 'Edit current record',
'Editing Language file': 'Editing Language file',
'Editing file': 'Editing file',
'Editing file "%s"': 'Editing file "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Error logs for "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Functions with no doctests will result in [passed] tests.',
'Hello World': 'Здравей, свят',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Import/Export',
'Installed applications': 'Installed applications',
'Internal State': 'Internal State',
'Invalid Query': 'Невалидна заявка',
'Invalid action': 'Invalid action',
'Language files (static strings) updated': 'Language files (static strings) updated',
'Languages': 'Languages',
'Last saved on:': 'Last saved on:',
'License for': 'License for',
'Login': 'Login',
'Login to the Administrative Interface': 'Login to the Administrative Interface',
'Models': 'Models',
'Modules': 'Modules',
'NO': 'NO',
'New Record': 'New Record',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'No databases in this application',
'Original/Translation': 'Original/Translation',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Peeking at file',
'Plugin "%s" in application': 'Plugin "%s" in application',
'Plugins': 'Plugins',
'Powered by': 'Powered by',
'Query:': 'Query:',
'Resolve Conflict file': 'Resolve Conflict file',
'Rows in table': 'Rows in table',
'Rows selected': 'Rows selected',
'Saved file hash:': 'Saved file hash:',
'Searching:': 'Searching:',
'Static files': 'Static files',
'Sure you want to delete this object?': 'Сигурен ли си, че искаш да изтриеш този обект?',
'TM': 'TM',
'Testing application': 'Testing application',
'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.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'There are no controllers',
'There are no models': 'There are no models',
'There are no modules': 'There are no modules',
'There are no plugins': 'There are no plugins',
'There are no static files': 'There are no static files',
'There are no translators, only default language is supported': 'There are no translators, only default language is supported',
'There are no views': 'There are no views',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'This is the %(filename)s template',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Unable to check for upgrades',
'Unable to download': 'Unable to download',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Update:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'Upload existing application',
'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 an url:': 'Use an url:',
'Version': 'Version',
'Views': 'Views',
'Welcome to web2py': 'Добре дошъл в web2py',
'YES': 'YES',
'about': 'about',
'additional code for your application': 'additional code for your application',
'admin disabled because no admin password': 'admin disabled because no admin password',
'admin disabled because not supported on google app engine': 'admin disabled because not supported on google apps engine',
'admin disabled because unable to access password file': 'admin disabled because unable to access password file',
'administrative interface': 'administrative interface',
'and rename it (required):': 'and rename it (required):',
'and rename it:': 'and rename it:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
'application "%s" uninstalled': 'application "%s" uninstalled',
'application compiled': 'application compiled',
'application is compiled and cannot be designed': 'application is compiled and cannot be designed',
'arguments': 'arguments',
'back': 'back',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errors and sessions cleaned',
'cannot create file': 'cannot create file',
'cannot upload file "%(filename)s"': 'cannot upload file "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'check all',
'check for upgrades': 'check for upgrades',
'clean': 'clean',
'click here for online examples': 'щракни тук за онлайн примери',
'click here for the administrative interface': 'щракни тук за административния интерфейс',
'click to check for upgrades': 'click to check for upgrades',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'compile',
'compiled application removed': 'compiled application removed',
'controllers': 'controllers',
'create': 'create',
'create file with filename:': 'create file with filename:',
'create new application:': 'create new application:',
'created by': 'created by',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'currently saved or',
'data uploaded': 'данните бяха качени',
'database': 'database',
'database %s select': 'database %s select',
'database administration': 'database administration',
'db': 'дб',
'defines tables': 'defines tables',
'delete': 'delete',
'delete all checked': 'delete all checked',
'delete plugin': 'delete plugin',
'deploy': 'deploy',
'design': 'дизайн',
'direction: ltr': 'direction: ltr',
'done!': 'готово!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'edit',
'edit controller': 'edit controller',
'edit views:': 'edit views:',
'errors': 'errors',
'export as csv file': 'export as csv file',
'exposes': 'exposes',
'extends': 'extends',
'failed to reload module': 'failed to reload module',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'file "%(filename)s" created',
'file "%(filename)s" deleted': 'file "%(filename)s" deleted',
'file "%(filename)s" uploaded': 'file "%(filename)s" uploaded',
'file "%(filename)s" was not deleted': 'file "%(filename)s" was not deleted',
'file "%s" of %s restored': 'file "%s" of %s restored',
'file changed on disk': 'file changed on disk',
'file does not exist': 'file does not exist',
'file saved on %(time)s': 'file saved on %(time)s',
'file saved on %s': 'file saved on %s',
'files': 'files',
'filter': 'filter',
'help': 'help',
'htmledit': 'htmledit',
'includes': 'includes',
'insert new': 'insert new',
'insert new %s': 'insert new %s',
'install': 'install',
'internal error': 'internal error',
'invalid password': 'invalid password',
'invalid request': 'невалидна заявка',
'invalid ticket': 'invalid ticket',
'language file "%(filename)s" created/updated': 'language file "%(filename)s" created/updated',
'languages': 'languages',
'languages updated': 'languages updated',
'loading...': 'loading...',
'login': 'login',
'logout': 'logout',
'merge': 'merge',
'models': 'models',
'modules': 'modules',
'new application "%s" created': 'new application "%s" created',
'new plugin installed': 'new plugin installed',
'new record inserted': 'новият запис беше добавен',
'next 100 rows': 'next 100 rows',
'no match': 'no match',
'or import from csv file': 'or import from csv file',
'or provide app url:': 'or provide app url:',
'or provide application url:': 'or provide application url:',
'overwrite installed app': 'overwrite installed app',
'pack all': 'pack all',
'pack compiled': 'pack compiled',
'pack plugin': 'pack plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
'plugins': 'plugins',
'previous 100 rows': 'previous 100 rows',
'record': 'record',
'record does not exist': 'записът не съществува',
'record id': 'record id',
'remove compiled': 'remove compiled',
'restore': 'restore',
'revert': 'revert',
'save': 'save',
'selected': 'selected',
'session expired': 'session expired',
'shell': 'shell',
'site': 'site',
'some files could not be removed': 'some files could not be removed',
'start wizard': 'start wizard',
'state': 'състояние',
'static': 'static',
'submit': 'submit',
'table': 'table',
'test': 'test',
'the application logic, each URL path is mapped in one exposed function in the controller': 'the application logic, each URL path is mapped in one exposed function in the controller',
'the data representation, define database tables and sets': 'the data representation, define database tables and sets',
'the presentations layer, views are also known as templates': 'the presentations layer, views are also known as templates',
'these files are served without processing, your images go here': 'these files are served without processing, your images go here',
'to previous version.': 'to previous version.',
'translation strings for the application': 'translation strings for the application',
'try': 'try',
'try something like': 'try something like',
'unable to create application "%s"': 'unable to create application "%s"',
'unable to delete file "%(filename)s"': 'unable to delete file "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
'unable to parse csv file': 'не е възможна обработката на csv файла',
'unable to uninstall "%s"': 'unable to uninstall "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'uncheck all',
'uninstall': 'uninstall',
'update': 'update',
'update all languages': 'update all languages',
'upgrade web2py now': 'upgrade web2py now',
'upload': 'upload',
'upload application:': 'upload application:',
'upload file:': 'upload file:',
'upload plugin file:': 'upload plugin file:',
'variables': 'variables',
'versioning': 'versioning',
'view': 'view',
'views': 'views',
'web2py Recent Tweets': 'web2py Recent Tweets',
'web2py is up to date': 'web2py is up to date',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}
| Python |
# coding: utf8
{
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'(requires internet access)': '(vereis internet toegang)',
'(something like "it-it")': '(iets soos "it-it")',
'About': 'Oor',
'About application': 'Oor program',
'Additional code for your application': 'Additionele kode vir u application',
'Admin language': 'Admin taal',
'Application name:': 'Program naam:',
'Controllers': 'Beheerders',
'Deploy on Google App Engine': 'Stuur na Google App Engine toe',
'Edit application': 'Wysig program',
'Installed applications': 'Geinstalleerde apps',
'Languages': 'Tale',
'License for': 'Lisensie vir',
'Models': 'Modelle',
'Modules': 'Modules',
'New application wizard': 'Nuwe app wizard',
'New simple application': 'Nuwe eenvoudige app',
'Plugins': 'Plugins',
'Powered by': 'Aangedryf deur',
'Searching:': 'Soek:',
'Static files': 'Static files',
'Sure you want to delete this object?': 'Is jy seker jy will hierde object verwyder?',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no plugins': 'Daar is geen plugins',
'These files are served without processing, your images go here': 'Hierdie lêre is sonder veranderinge geserved, jou images gaan hier',
'To create a plugin, name a file/folder plugin_[name]': 'Om ''n plugin te skep, noem ''n lêer/gids plugin_[name]',
'Translation strings for the application': 'Vertaling woorde vir die program',
'Upload & install packed application': 'Oplaai & install gepakte program',
'Upload a package:': 'Oplaai ''n package:',
'Use an url:': 'Gebruik n url:',
'Views': 'Views',
'about': 'oor',
'administrative interface': 'administrative interface',
'and rename it:': 'en verander die naam:',
'change admin password': 'verander admin wagwoord',
'check for upgrades': 'soek vir upgrades',
'clean': 'maak skoon',
'collapse/expand all': 'collapse/expand all',
'compile': 'kompileer',
'controllers': 'beheerders',
'create': 'skep',
'create file with filename:': 'skep lêer met naam:',
'created by': 'geskep deur',
'crontab': 'crontab',
'currently running': 'loop tans',
'database administration': 'database administration',
'deploy': 'deploy',
'direction: ltr': 'direction: ltr',
'download layouts': 'aflaai layouts',
'download plugins': 'aflaai plugins',
'edit': 'wysig',
'errors': 'foute',
'exposes': 'exposes',
'extends': 'extends',
'files': 'lêre',
'filter': 'filter',
'help': 'hulp',
'includes': 'includes',
'install': 'installeer',
'languages': 'tale',
'loading...': 'laai...',
'logout': 'logout',
'models': 'modelle',
'modules': 'modules',
'overwrite installed app': 'skryf oor geinstalleerde program',
'pack all': 'pack alles',
'plugins': 'plugins',
'shell': 'shell',
'site': 'site',
'start wizard': 'start wizard',
'static': 'static',
'test': 'toets',
'uninstall': 'verwyder',
'update all languages': 'update all languages',
'upload': 'oplaai',
'upload file:': 'oplaai lêer:',
'upload plugin file:': 'upload plugin lêer:',
'versioning': 'versioning',
'views': 'views',
'web2py Recent Tweets': 'web2py Onlangse Tweets',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników 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ętych: %s',
'%s rows updated': 'Wierszy uaktualnionych: %s',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(coś podobnego do "it-it")',
'A new version of web2py is available': 'Nowa wersja web2py jest dostępna',
'A new version of web2py is available: %s': 'Nowa wersja web2py jest dostępna: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'UWAGA: Wymagane jest bezpieczne (HTTPS) połączenie lub połączenie z lokalnego adresu.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'UWAGA: TESTOWANIE NIE JEST BEZPIECZNE W ŚRODOWISKU WIELOWĄTKOWYM, TAK WIĘC NIE URUCHAMIAJ WIELU TESTÓW JEDNOCZEŚNIE.',
'ATTENTION: you cannot edit the running application!': 'UWAGA: nie można edytować uruchomionych aplikacji!',
'About': 'Informacje o',
'About application': 'Informacje o aplikacji',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
'Admin is disabled because unsecure channel': 'Panel administracyjny wyłączony z powodu braku bezpiecznego połączenia',
'Administrator Password:': 'Hasło administratora:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Czy na pewno chcesz usunąć plik "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Czy na pewno chcesz usunąć wtyczkę "%s"?',
'Are you sure you want to uninstall application "%s"': 'Czy na pewno chcesz usunąć aplikację "%s"',
'Are you sure you want to uninstall application "%s"?': 'Czy na pewno chcesz usunąć aplikację "%s"?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Dostępne bazy danych i tabele',
'Cannot be empty': 'Nie może być puste',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Nie można skompilować: w Twojej aplikacji są błędy . Znajdź je, popraw a następnie spróbój ponownie.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Zaznacz aby usunąć',
'Checking for upgrades...': 'Sprawdzanie aktualizacji...',
'Controllers': 'Kontrolery',
'Create new simple application': 'Utwórz nową aplikację',
'Current request': 'Aktualne żądanie',
'Current response': 'Aktualna odpowiedź',
'Current session': 'Aktualna sesja',
'DESIGN': 'PROJEKTUJ',
'Date and Time': 'Data i godzina',
'Delete': 'Usuń',
'Delete:': 'Usuń:',
'Deploy on Google App Engine': 'Umieść na Google App Engine',
'Design for': 'Projekt dla',
'EDIT': 'EDYTUJ',
'Edit application': 'Edycja aplikacji',
'Edit current record': 'Edytuj aktualny rekord',
'Editing Language file': 'Edytuj plik tłumaczeń',
'Editing file': 'Edycja pliku',
'Editing file "%s"': 'Edycja pliku "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Wpisy błędów dla "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Funkcje bez doctestów będą dołączone do [zaliczonych] testów.',
'Hello World': 'Witaj Świecie',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Jeżeli powyższy raport zawiera numer biletu błędu, oznacza to błąd podczas wykonywania kontrolera przez próbą uruchomienia doctestów. Zazwyczaj jest to spowodowane nieprawidłowymi wcięciami linii kodu lub błędami w module poza ciałem funkcji.\nTytuł w kolorze zielonym oznacza, ze wszystkie (zdefiniowane) testy zakończyły się sukcesem. W tej sytuacji ich wyniki nie są pokazane.',
'Import/Export': 'Importuj/eksportuj',
'Installed applications': 'Zainstalowane aplikacje',
'Internal State': 'Stan wewnętrzny',
'Invalid Query': 'Błędne zapytanie',
'Invalid action': 'Błędna akcja',
'Language files (static strings) updated': 'Pliki tłumaczeń (ciągi statyczne) zostały uaktualnione',
'Languages': 'Tłumaczenia',
'Last saved on:': 'Ostatnio zapisany:',
'License for': 'Licencja dla',
'Login': 'Zaloguj',
'Login to the Administrative Interface': 'Logowanie do panelu administracyjnego',
'Models': 'Modele',
'Modules': 'Moduły',
'NO': 'NIE',
'New Record': 'Nowy rekord',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Original/Translation': 'Oryginał/tłumaczenie',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Podgląd pliku',
'Plugin "%s" in application': 'Wtyczka "%s" w aplikacji',
'Plugins': 'Wtyczki',
'Powered by': 'Zasilane przez',
'Query:': 'Zapytanie:',
'Resolve Conflict file': 'Rozwiąż konflikt plików',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wierszy wybranych',
'Saved file hash:': 'Suma kontrolna zapisanego pliku:',
'Searching:': 'Searching:',
'Static files': 'Pliki statyczne',
'Sure you want to delete this object?': 'Czy na pewno chcesz usunąć ten obiekt?',
'TM': 'TM',
'Testing application': 'Testowanie aplikacji',
'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ść\'". Takie coś jak "db.tabela1.pole1==db.tabela2.pole2" oznacza SQL JOIN.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'Brak kontrolerów',
'There are no models': 'Brak modeli',
'There are no modules': 'Brak modułów',
'There are no plugins': 'There are no plugins',
'There are no static files': 'Brak plików statycznych',
'There are no translators, only default language is supported': 'Brak plików tłumaczeń, wspierany jest tylko domyślny język',
'There are no views': 'Brak widoków',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'To jest szablon %(filename)s',
'Ticket': 'Bilet',
'To create a plugin, name a file/folder plugin_[name]': 'Aby utworzyć wtyczkę, nazwij plik/katalog plugin_[nazwa]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Nie można sprawdzić aktualizacji',
'Unable to download': 'Nie można ściągnąć',
'Unable to download app': 'Nie można ściągnąć aplikacji',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Uaktualnij:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'Wyślij istniejącą aplikację',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Użyj (...)&(...) jako AND, (...)|(...) jako OR oraz ~(...) jako NOT do tworzenia bardziej skomplikowanych zapytań.',
'Use an url:': 'Use an url:',
'Version': 'Wersja',
'Views': 'Widoki',
'Welcome to web2py': 'Witaj w web2py',
'YES': 'TAK',
'about': 'informacje',
'additional code for your application': 'dodatkowy kod Twojej aplikacji',
'admin disabled because no admin password': 'panel administracyjny wyłączony z powodu braku hasła administracyjnego',
'admin disabled because not supported on google app engine': 'panel administracyjny wyłączony z powodu braku wsparcia na google apps engine',
'admin disabled because unable to access password file': 'panel administracyjny wyłączony z powodu braku dostępu do pliku z hasłem',
'administrative interface': 'administrative interface',
'and rename it (required):': 'i nadaj jej nową nazwę (wymagane):',
'and rename it:': 'i nadaj mu nową nazwę:',
'appadmin': 'administracja aplikacji',
'appadmin is disabled because insecure channel': 'administracja aplikacji wyłączona z powodu braku bezpiecznego połączenia',
'application "%s" uninstalled': 'aplikacja "%s" została odinstalowana',
'application compiled': 'aplikacja została skompilowana',
'application is compiled and cannot be designed': 'aplikacja jest skompilowana i nie może być projektowana',
'arguments': 'arguments',
'back': 'wstecz',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pamięć podręczna, bilety błędów oraz pliki sesji zostały wyczyszczone',
'cannot create file': 'nie można utworzyć pliku',
'cannot upload file "%(filename)s"': 'nie można wysłać pliku "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'zaznacz wszystko',
'check for upgrades': 'check for upgrades',
'clean': 'oczyść',
'click here for online examples': 'kliknij aby przejść do interaktywnych przykładów',
'click here for the administrative interface': 'kliknij aby przejść do panelu administracyjnego',
'click to check for upgrades': 'kliknij aby sprawdzić aktualizacje',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'skompiluj',
'compiled application removed': 'skompilowana aplikacja została usunięta',
'controllers': 'kontrolery',
'create': 'create',
'create file with filename:': 'utwórz plik o nazwie:',
'create new application:': 'utwórz nową aplikację:',
'created by': 'utworzone przez',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'aktualnie zapisany lub',
'data uploaded': 'dane wysłane',
'database': 'baza danych',
'database %s select': 'wybór z bazy danych %s',
'database administration': 'administracja bazy danych',
'db': 'baza danych',
'defines tables': 'zdefiniuj tabele',
'delete': 'usuń',
'delete all checked': 'usuń wszystkie zaznaczone',
'delete plugin': 'usuń wtyczkę',
'deploy': 'deploy',
'design': 'projektuj',
'direction: ltr': 'direction: ltr',
'done!': 'zrobione!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'edytuj',
'edit controller': 'edytuj kontroler',
'edit views:': 'edit views:',
'errors': 'błędy',
'export as csv file': 'eksportuj jako plik csv',
'exposes': 'eksponuje',
'extends': 'rozszerza',
'failed to reload module': 'nie udało się przeładować modułu',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'plik "%(filename)s" został utworzony',
'file "%(filename)s" deleted': 'plik "%(filename)s" został usunięty',
'file "%(filename)s" uploaded': 'plik "%(filename)s" został wysłany',
'file "%(filename)s" was not deleted': 'plik "%(filename)s" nie został usunięty',
'file "%s" of %s restored': 'plik "%s" z %s został odtworzony',
'file changed on disk': 'plik na dysku został zmieniony',
'file does not exist': 'plik nie istnieje',
'file saved on %(time)s': 'plik zapisany o %(time)s',
'file saved on %s': 'plik zapisany o %s',
'files': 'files',
'filter': 'filter',
'help': 'pomoc',
'htmledit': 'edytuj HTML',
'includes': 'zawiera',
'insert new': 'wstaw nowy rekord tabeli',
'insert new %s': 'wstaw nowy rekord do tabeli %s',
'install': 'install',
'internal error': 'wewnętrzny błąd',
'invalid password': 'błędne hasło',
'invalid request': 'błędne zapytanie',
'invalid ticket': 'błędny bilet',
'language file "%(filename)s" created/updated': 'plik tłumaczeń "%(filename)s" został utworzony/uaktualniony',
'languages': 'pliki tłumaczeń',
'languages updated': 'pliki tłumaczeń zostały uaktualnione',
'loading...': 'wczytywanie...',
'login': 'zaloguj',
'logout': 'wyloguj',
'merge': 'zespól',
'models': 'modele',
'modules': 'moduły',
'new application "%s" created': 'nowa aplikacja "%s" została utworzona',
'new plugin installed': 'nowa wtyczka została zainstalowana',
'new record inserted': 'nowy rekord został wstawiony',
'next 100 rows': 'następne 100 wierszy',
'no match': 'no match',
'or import from csv file': 'lub zaimportuj z pliku csv',
'or provide app url:': 'or provide app url:',
'or provide application url:': 'lub podaj url aplikacji:',
'overwrite installed app': 'overwrite installed app',
'pack all': 'spakuj wszystko',
'pack compiled': 'spakuj skompilowane',
'pack plugin': 'spakuj wtyczkę',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'wtyczka "%(plugin)s" została usunięta',
'plugins': 'plugins',
'previous 100 rows': 'poprzednie 100 wierszy',
'record': 'rekord',
'record does not exist': 'rekord nie istnieje',
'record id': 'ID rekordu',
'remove compiled': 'usuń skompilowane',
'restore': 'odtwórz',
'revert': 'przywróć',
'save': 'zapisz',
'selected': 'zaznaczone',
'session expired': 'sesja wygasła',
'shell': 'powłoka',
'site': 'strona główna',
'some files could not be removed': 'niektóre pliki nie mogły zostać usunięte',
'start wizard': 'start wizard',
'state': 'stan',
'static': 'pliki statyczne',
'submit': 'wyślij',
'table': 'tabela',
'test': 'testuj',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logika aplikacji, każda ścieżka URL jest mapowana na jedną z funkcji eksponowanych w kontrolerze',
'the data representation, define database tables and sets': 'reprezentacja danych, definicje zbiorów i tabel bazy danych',
'the presentations layer, views are also known as templates': 'warstwa prezentacji, widoki zwane są również szablonami',
'these files are served without processing, your images go here': 'pliki obsługiwane bez interpretacji, to jest miejsce na Twoje obrazy',
'to previous version.': 'do poprzedniej wersji.',
'translation strings for the application': 'ciągi tłumaczeń dla aplikacji',
'try': 'spróbój',
'try something like': 'spróbój czegos takiego jak',
'unable to create application "%s"': 'nie można utworzyć aplikacji "%s"',
'unable to delete file "%(filename)s"': 'nie można usunąć pliku "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'nie można usunąc pliku wtyczki "%(plugin)s"',
'unable to parse csv file': 'nie można sparsować pliku csv',
'unable to uninstall "%s"': 'nie można odinstalować "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'odznacz wszystko',
'uninstall': 'odinstaluj',
'update': 'uaktualnij',
'update all languages': 'uaktualnij wszystkie pliki tłumaczeń',
'upgrade web2py now': 'upgrade web2py now',
'upload': 'upload',
'upload application:': 'wyślij plik aplikacji:',
'upload file:': 'wyślij plik:',
'upload plugin file:': 'wyślij plik wtyczki:',
'variables': 'variables',
'versioning': 'versioning',
'view': 'widok',
'views': 'widoki',
'web2py Recent Tweets': 'najnowsze tweety web2py',
'web2py is up to date': 'web2py jest aktualne',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(qualcosa simile a "it-it")',
'A new version of web2py is available: %s': 'È disponibile una nuova versione di web2py: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': "ATTENZIONE: L'accesso richiede una connessione sicura (HTTPS) o l'esecuzione di web2py in locale (connessione su localhost)",
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTZIONE: NON ESEGUIRE PIÙ TEST IN PARALLELO (I TEST NON SONO "THREAD SAFE")',
'ATTENTION: you cannot edit the running application!': "ATTENZIONE: non puoi modificare l'applicazione correntemente in uso ",
'About': 'Informazioni',
'About application': "Informazioni sull'applicazione",
'Admin is disabled because insecure channel': 'amministrazione disabilitata: comunicazione non sicura',
'Administrator Password:': 'Password Amministratore:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Confermi di voler cancellare il file "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Confermi di voler cancellare il plugin "%s"?',
'Are you sure you want to uninstall application "%s"?': 'Confermi di voler disinstallare l\'applicazione "%s"?',
'Are you sure you want to upgrade web2py now?': 'Confermi di voler aggiornare web2py ora?',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Cannot compile: there are errors in your app:': "Compilazione fallita: ci sono errori nell'applicazione.",
'Check to delete': 'Seleziona per cancellare',
'Checking for upgrades...': 'Controllo aggiornamenti in corso...',
'Controller': 'Controller',
'Controllers': 'Controllers',
'Copyright': 'Copyright',
'Create new simple application': 'Crea nuova applicazione',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Date and Time': 'Data and Ora',
'Delete': 'Cancella',
'Delete:': 'Cancella:',
'Deploy on Google App Engine': 'Installa su Google App Engine',
'EDIT': 'MODIFICA',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit application': 'Modifica applicazione',
'Edit current record': 'Modifica record corrente',
'Editing Language file': 'Modifica file linguaggio',
'Editing file "%s"': 'Modifica del file "%s"',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Log degli errori per "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'I test delle funzioni senza "doctests" risulteranno sempre [passed].',
'Hello World': 'Salve Mondo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Installed applications': 'Applicazioni installate',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid action': 'Azione non valida',
'Language files (static strings) updated': 'Linguaggi (documenti con stringhe statiche) aggiornati',
'Languages': 'Linguaggi',
'Last saved on:': 'Ultimo salvataggio:',
'Layout': 'Layout',
'License for': 'Licenza relativa a',
'Login': 'Accesso',
'Login to the Administrative Interface': "Accesso all'interfaccia amministrativa",
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Models': 'Modelli',
'Modules': 'Moduli',
'NO': 'NO',
'New Record': 'Nuovo elemento (record)',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Original/Translation': 'Originale/Traduzione',
'PAM authenticated user, cannot change password here': 'utente autenticato tramite PAM, impossibile modificare password qui',
'Peeking at file': 'Uno sguardo al file',
'Plugin "%s" in application': 'Plugin "%s" nell\'applicazione',
'Plugins': 'I Plugins',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Resolve Conflict file': 'File di risoluzione conflitto',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Saved file hash:': 'Hash del file salvato:',
'Static files': 'Files statici',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'TM': 'TM',
'Testing application': 'Test applicazione in corsg',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'There are no controllers': 'Non ci sono controller',
'There are no models': 'Non ci sono modelli',
'There are no modules': 'Non ci sono moduli',
'There are no static files': 'Non ci sono file statici',
'There are no translators, only default language is supported': 'Non ci sono traduzioni, viene solo supportato il linguaggio di base',
'There are no views': 'Non ci sono viste ("view")',
'This is the %(filename)s template': 'Questo è il template %(filename)s',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'Per creare un plugin, chiamare un file o cartella plugin_[nome]',
'Unable to check for upgrades': 'Impossibile controllare presenza di aggiornamenti',
'Unable to download app because:': 'Impossibile scaricare applicazione perché',
'Unable to download because': 'Impossibile scaricare perché',
'Update:': 'Aggiorna:',
'Upload & install packed application': 'Carica ed installa pacchetto con applicazione',
'Upload a package:': 'Upload a package:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'Use an url:': 'Use an url:',
'Version': 'Versione',
'View': 'Vista',
'Views': 'viste',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'YES': 'SI',
'about': 'informazioni',
'additional code for your application': 'righe di codice aggiuntive per la tua applicazione',
'admin disabled because no admin password': 'amministrazione disabilitata per mancanza di password amministrativa',
'admin disabled because not supported on google app engine': 'amministrazione non supportata da Google Apps Engine',
'admin disabled because unable to access password file': 'amministrazione disabilitata per impossibilità di leggere il file delle password',
'administrative interface': 'administrative interface',
'and rename it (required):': 'e rinominala (obbligatorio):',
'and rename it:': 'e rinominala:',
'appadmin': 'appadmin ',
'appadmin is disabled because insecure channel': 'amministrazione app (appadmin) disabilitata: comunicazione non sicura',
'application "%s" uninstalled': 'applicazione "%s" disinstallata',
'application compiled': 'applicazione compilata',
'application is compiled and cannot be designed': "l'applicazione è compilata e non si può modificare",
'arguments': 'arguments',
'back': 'indietro',
'cache': 'cache',
'cache, errors and sessions cleaned': 'pulitura cache, errori and sessioni ',
'cannot create file': 'impossibile creare il file',
'cannot upload file "%(filename)s"': 'impossibile caricare il file "%(filename)s"',
'change admin password': 'change admin password',
'change password': 'cambia password',
'check all': 'controlla tutto',
'check for upgrades': 'check for upgrades',
'clean': 'pulisci',
'click here for online examples': 'clicca per vedere gli esempi',
'click here for the administrative interface': "clicca per l'interfaccia amministrativa",
'click to check for upgrades': 'clicca per controllare presenza di aggiornamenti',
'code': 'code',
'compile': 'compila',
'compiled application removed': "rimosso il codice compilato dell'applicazione",
'controllers': 'controllers',
'create': 'crea',
'create file with filename:': 'crea un file col nome:',
'create new application:': 'create new application:',
'created by': 'creato da',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'attualmente salvato o',
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'database administration': 'amministrazione database',
'db': 'db',
'defines tables': 'defininisce le tabelle',
'delete': 'Cancella',
'delete all checked': 'cancella tutti i selezionati',
'delete plugin': 'cancella plugin',
'deploy': 'deploy',
'design': 'progetta',
'direction: ltr': 'direction: ltr',
'done!': 'fatto!',
'edit': 'modifica',
'edit controller': 'modifica controller',
'edit profile': 'modifica profilo',
'edit views:': 'modifica viste (view):',
'errors': 'errori',
'export as csv file': 'esporta come file CSV',
'exposes': 'espone',
'extends': 'estende',
'failed to reload module because:': 'ricaricamento modulo fallito perché:',
'file "%(filename)s" created': 'creato il file "%(filename)s"',
'file "%(filename)s" deleted': 'cancellato il file "%(filename)s"',
'file "%(filename)s" uploaded': 'caricato il file "%(filename)s"',
'file "%s" of %s restored': 'ripristinato "%(filename)s"',
'file changed on disk': 'il file ha subito una modifica su disco',
'file does not exist': 'file inesistente',
'file saved on %(time)s': "file salvato nell'istante %(time)s",
'file saved on %s': 'file salvato: %s',
'help': 'aiuto',
'htmledit': 'modifica come html',
'includes': 'include',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'install': 'installa',
'internal error': 'errore interno',
'invalid password': 'password non valida',
'invalid request': 'richiesta non valida',
'invalid ticket': 'ticket non valido',
'language file "%(filename)s" created/updated': 'file linguaggio "%(filename)s" creato/aggiornato',
'languages': 'linguaggi',
'loading...': 'caricamento...',
'login': 'accesso',
'logout': 'uscita',
'merge': 'unisci',
'models': 'modelli',
'modules': 'moduli',
'new application "%s" created': 'creata la nuova applicazione "%s"',
'new plugin installed': 'installato nuovo plugin',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'no match': 'nessuna corrispondenza',
'or import from csv file': 'oppure importa da file CSV',
'or provide app url:': "oppure fornisci url dell'applicazione:",
'overwrite installed app': 'sovrascrivi applicazione installata',
'pack all': 'crea pacchetto',
'pack compiled': 'crea pacchetto del codice compilato',
'pack plugin': 'crea pacchetto del plugin',
'password changed': 'password modificata',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" cancellato',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'ID del record',
'register': 'registrazione',
'remove compiled': 'rimozione codice compilato',
'restore': 'ripristino',
'revert': 'versione precedente',
'selected': 'selezionato',
'session expired': 'sessions scaduta',
'shell': 'shell',
'site': 'sito',
'some files could not be removed': 'non è stato possibile rimuovere alcuni files',
'start wizard': 'start wizard',
'state': 'stato',
'static': 'statico',
'submit': 'invia',
'table': 'tabella',
'test': 'test',
'the application logic, each URL path is mapped in one exposed function in the controller': 'logica dell\'applicazione, ogni percorso "URL" corrisponde ad una funzione esposta da un controller',
'the data representation, define database tables and sets': 'rappresentazione dei dati, definizione di tabelle di database e di "set" ',
'the presentations layer, views are also known as templates': 'Presentazione dell\'applicazione, viste (views, chiamate anche "templates")',
'these files are served without processing, your images go here': 'questi files vengono serviti così come sono, le immagini vanno qui',
'to previous version.': 'torna a versione precedente',
'translation strings for the application': "stringhe di traduzioni per l'applicazione",
'try': 'prova',
'try something like': 'prova qualcosa come',
'unable to create application "%s"': 'impossibile creare applicazione "%s"',
'unable to delete file "%(filename)s"': 'impossibile rimuovere file "%(plugin)s"',
'unable to delete file plugin "%(plugin)s"': 'impossibile rimuovere file di plugin "%(plugin)s"',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
'unable to uninstall "%s"': 'impossibile disinstallare "%s"',
'unable to upgrade because "%s"': 'impossibile aggiornare perché "%s"',
'uncheck all': 'smarca tutti',
'uninstall': 'disinstalla',
'update': 'aggiorna',
'update all languages': 'aggiorna tutti i linguaggi',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': 'carica applicazione:',
'upload file:': 'carica file:',
'upload plugin file:': 'carica file di plugin:',
'variables': 'variables',
'versioning': 'sistema di versioni',
'view': 'vista',
'views': 'viste',
'web2py Recent Tweets': 'Tweets recenti per web2py',
'web2py is up to date': 'web2py è aggiornato',
'web2py upgraded; please restart it': 'web2py aggiornato; prego riavviarlo',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression en option tels que "field1 = \'newvalue\'". Vous ne pouvez pas mettre à jour ou supprimer les résultats d\'une jointure "a JOIN"',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
'%s rows deleted': 'lignes %s supprimé',
'%s rows updated': 'lignes %s mis à jour',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(quelque chose comme "it-it") ',
'A new version of web2py is available: %s': 'Une nouvelle version de web2py est disponible: %s ',
'A new version of web2py is available: Version 1.68.2 (2009-10-21 09:59:29)\n': 'Une nouvelle version de web2py est disponible: Version 1.68.2 (2009-10-21 09:59:29)\r\n',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATTENTION: nécessite une connexion sécurisée (HTTPS) ou être en localhost. ',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATTENTION: les tests ne sont pas thread-safe DONC NE PAS EFFECTUER DES TESTS MULTIPLES SIMULTANÉMENT.',
'ATTENTION: you cannot edit the running application!': "ATTENTION: vous ne pouvez pas modifier l'application qui tourne!",
'About': 'À propos',
'About application': "A propos de l'application",
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Admin est désactivé parce que canal non sécurisé',
'Admin language': 'Admin language',
'Administrator Password:': 'Mot de passe Administrateur:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'Etes-vous sûr de vouloir supprimer le fichier «%s»?',
'Are you sure you want to delete plugin "%s"?': 'Etes-vous sûr de vouloir effacer le plugin "%s"?',
'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?',
'Are you sure you want to uninstall application "%s"?': "Êtes-vous sûr de vouloir désinstaller l'application «%s»?",
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': 'Bases de données et tables disponible',
'Cannot be empty': 'Ne peut pas être vide',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Ne peut pas compiler: il y a des erreurs dans votre application. corriger les erreurs et essayez à nouveau.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Check to delete': 'Cocher pour supprimer',
'Checking for upgrades...': 'Vérification des mises à jour ... ',
'Controllers': 'Contrôleurs',
'Create new simple application': 'Créer une nouvelle application',
'Current request': 'Requête actuel',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'Date and Time': 'Date et heure',
'Delete': 'Supprimer',
'Delete this file (you will be asked to confirm deletion)': 'Delete this file (you will be asked to confirm deletion)',
'Delete:': 'Supprimer:',
'Deploy on Google App Engine': 'Déployer sur Google App Engine',
'EDIT': 'MODIFIER',
'Edit application': "Modifier l'application",
'Edit current record': 'Modifier cet entrée',
'Editing Language file': 'Modifier le fichier de langue',
'Editing file': 'Modifier le fichier',
'Editing file "%s"': 'Modifier le fichier "% s" ',
'Enterprise Web Framework': 'Enterprise Web Framework',
'Error logs for "%(app)s"': 'Journal d\'erreurs pour "%(app)s"',
'Exception instance attributes': 'Exception instance attributes',
'Functions with no doctests will result in [passed] tests.': 'Des fonctions sans doctests entraînera tests [passed] .',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': "Si le rapport ci-dessus contient un numéro de ticket, cela indique une défaillance dans l'exécution du contrôleur, avant toute tentative d'exécuter les doctests. Cela est généralement dû à une erreur d'indentation ou une erreur à l'extérieur du code de la fonction.\r\nUn titre verte indique que tous les tests (si définie) passed. Dans ce cas, les résultats des essais ne sont pas affichées.",
'Import/Export': 'Importer/Exporter',
'Installed applications': 'Les applications installées',
'Internal State': 'État Interne',
'Invalid Query': 'Requête non valide',
'Invalid action': 'Action non valide',
'Language files (static strings) updated': 'Fichiers de langue (static strings) Mise à jour ',
'Languages': 'Langues',
'Last saved on:': 'Dernière sauvegarde le:',
'License for': 'Licence pour',
'Login': 'Connexion',
'Login to the Administrative Interface': "Se connecter à l'interface d'administration",
'Models': 'Modèles',
'Modules': 'Modules',
'NO': 'NON',
'New Record': 'Nouvel Entrée',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'Aucune base de données dans cette application',
'Original/Translation': 'Original / Traduction',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Peeking at file': 'Jeter un oeil au fichier',
'Plugin "%s" in application': 'Plugin "%s" dans l\'application',
'Plugins': 'Plugins',
'Powered by': 'Propulsé par',
'Query:': 'Requête: ',
'Resolve Conflict file': 'Résoudre les conflits de fichiers',
'Rows in table': 'Lignes de la table',
'Rows selected': 'Lignes sélectionnées',
"Run tests in this file (to run all files, you may also use the button labelled 'test')": "Run tests in this file (to run all files, you may also use the button labelled 'test')",
'Save': 'Save',
'Saved file hash:': 'Hash du Fichier enregistré:',
'Searching:': 'Searching:',
'Static files': 'Fichiers statiques',
'Sure you want to delete this object?': 'Vous êtes sûr de vouloir supprimer cet objet? ',
'TM': 'MD',
'Testing application': "Test de l'application",
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "requête" est une condition comme "db.table1.field1==\'value\'". Quelque chose comme "db.table1.field1==db.table2.field2" aboutit à un JOIN SQL.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': "Il n'existe pas de contrôleurs",
'There are no models': "Il n'existe pas de modèles",
'There are no modules': "Il n'existe pas de modules",
'There are no plugins': 'There are no plugins',
'There are no static files': "Il n'existe pas de fichiers statiques",
'There are no translators, only default language is supported': "Il n'y a pas de traducteurs, est prise en charge uniquement la langue par défaut",
'There are no views': "Il n'existe pas de vues",
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'Ceci est le modèle %(filename)s ',
'Ticket': 'Ticket',
'To create a plugin, name a file/folder plugin_[name]': 'Pour créer un plugin, créer un fichier /dossier plugin_[nom]',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Impossible de vérifier les mises à niveau',
'Unable to download': 'Impossible de télécharger',
'Unable to download app': 'Impossible de télécharger app',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': 'Mise à jour:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': 'charger une application existante',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Utilisez (...)&(...) pour AND, (...)|(...) pour OR, et ~(...) pour NOT et construire des requêtes plus complexes. ',
'Use an url:': 'Use an url:',
'Version': 'Version',
'Views': 'Vues',
'Web Framework': 'Web Framework',
'YES': 'OUI',
'about': 'à propos',
'additional code for your application': 'code supplémentaire pour votre application',
'admin disabled because no admin password': 'admin désactivé car aucun mot de passe admin',
'admin disabled because not supported on google app engine': 'admin désactivé car non pris en charge sur Google Apps engine',
'admin disabled because unable to access password file': "admin désactivé car incapable d'accéder au fichier mot de passe",
'administrative interface': 'administrative interface',
'and rename it (required):': 'et renommez-la (obligatoire):',
'and rename it:': 'et renommez-le:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'appadmin est désactivé parce que canal non sécurisé',
'application "%s" uninstalled': 'application "%s" désinstallé',
'application %(appname)s installed with md5sum: %(digest)s': 'application %(appname)s installed with md5sum: %(digest)s',
'application compiled': 'application compilée',
'application is compiled and cannot be designed': "l'application est compilée et ne peut être désigné",
'arguments': 'arguments',
'back': 'retour',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, erreurs et sessions nettoyé',
'cannot create file': 'ne peu pas créer de fichier',
'cannot upload file "%(filename)s"': 'ne peu pas charger le fichier "%(filename)s"',
'change admin password': 'change admin password',
'check all': 'tous vérifier ',
'check for upgrades': 'check for upgrades',
'clean': 'nettoyer',
'click to check for upgrades': 'Cliquez pour vérifier les mises à niveau',
'code': 'code',
'collapse/expand all': 'collapse/expand all',
'compile': 'compiler',
'compiled application removed': 'application compilée enlevé',
'controllers': 'contrôleurs',
'create': 'create',
'create file with filename:': 'créer un fichier avec nom de fichier:',
'create new application:': 'créer une nouvelle application:',
'created by': 'créé par',
'crontab': 'crontab',
'currently running': 'currently running',
'currently saved or': 'actuellement enregistrés ou',
'data uploaded': 'données chargées',
'database': 'base de données',
'database %s select': 'base de données %s sélectionner',
'database administration': 'administration base de données',
'db': 'db',
'defines tables': 'définit les tables',
'delete': 'supprimer',
'delete all checked': 'supprimer tout ce qui est cocher',
'delete plugin': ' supprimer plugin',
'deploy': 'deploy',
'design': 'conception',
'direction: ltr': 'direction: ltr',
'docs': 'docs',
'done!': 'fait!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'modifier',
'edit controller': 'modifier contrôleur',
'edit views:': 'edit views:',
'errors': 'erreurs',
'export as csv file': 'exportation au format CSV',
'exposes': 'expose',
'exposes:': 'exposes:',
'extends': 'étend',
'failed to reload module': 'impossible de recharger le module',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': 'fichier "%(filename)s" créé',
'file "%(filename)s" deleted': 'fichier "%(filename)s" supprimé',
'file "%(filename)s" uploaded': 'fichier "%(filename)s" chargé',
'file "%s" of %s restored': 'fichier "%s" de %s restauré',
'file changed on disk': 'fichier modifié sur le disque',
'file does not exist': "fichier n'existe pas",
'file saved on %(time)s': 'fichier enregistré le %(time)s',
'file saved on %s': 'fichier enregistré le %s',
'files': 'files',
'filter': 'filter',
'help': 'aide',
'htmledit': 'edition html',
'includes': 'inclus',
'index': 'index',
'insert new': 'insérer nouveau',
'insert new %s': 'insérer nouveau %s',
'install': 'install',
'internal error': 'erreur interne',
'invalid password': 'mot de passe invalide',
'invalid request': 'Demande incorrecte',
'invalid ticket': 'ticket non valide',
'language file "%(filename)s" created/updated': 'fichier de langue "%(filename)s" créé/mis à jour',
'languages': 'langues',
'loading...': 'Chargement ...',
'login': 'connexion',
'logout': 'déconnexion',
'merge': 'fusionner',
'models': 'modèles',
'modules': 'modules',
'new application "%s" created': 'nouvelle application "%s" créée',
'new plugin installed': 'nouveau plugin installé',
'new record inserted': 'nouvelle entrée inséré',
'next 100 rows': '100 lignes suivantes',
'no match': 'no match',
'or import from csv file': 'ou importer depuis un fichier CSV ',
'or provide app url:': 'or provide app url:',
'or provide application url:': "ou fournir l'URL de l'application:",
'overwrite installed app': 'overwrite installed app',
'pack all': 'tout empaqueter',
'pack compiled': 'paquet compilé',
'pack plugin': 'paquet plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" supprimé',
'plugins': 'plugins',
'previous 100 rows': '100 lignes précédentes',
'record': 'entrée',
'record does not exist': "l'entrée n'existe pas",
'record id': 'id entrée',
'remove compiled': 'retirer compilé',
'restore': 'restaurer',
'revert': 'revenir',
'save': 'sauver',
'selected': 'sélectionnés',
'session expired': 'la session a expiré ',
'shell': 'shell',
'site': 'site',
'some files could not be removed': 'certains fichiers ne peuvent pas être supprimés',
'start wizard': 'start wizard',
'state': 'état',
'static': 'statiques',
'submit': 'envoyer',
'table': 'table',
'test': 'tester',
'the application logic, each URL path is mapped in one exposed function in the controller': "la logique de l'application, chaque route URL est mappé dans une fonction exposée dans le contrôleur",
'the data representation, define database tables and sets': 'la représentation des données, défini les tables de bases de données et sets',
'the presentations layer, views are also known as templates': 'la couche des présentations, les vues sont également connus en tant que modèles',
'these files are served without processing, your images go here': 'ces fichiers sont servis sans transformation, vos images vont ici',
'to previous version.': 'à la version précédente.',
'translation strings for the application': "chaînes de traduction de l'application",
'try': 'essayer',
'try something like': 'essayez quelque chose comme',
'unable to create application "%s"': 'impossible de créer l\'application "%s"',
'unable to delete file "%(filename)s"': 'impossible de supprimer le fichier "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'impossible de supprimer le plugin "%(plugin)s"',
'unable to parse csv file': "impossible d'analyser les fichiers CSV",
'unable to uninstall "%s"': 'impossible de désinstaller "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': 'tout décocher',
'uninstall': 'désinstaller',
'update': 'mettre à jour',
'update all languages': 'mettre à jour toutes les langues',
'upgrade now': 'upgrade now',
'upgrade web2py now': 'upgrade web2py now',
'upload': 'upload',
'upload application:': "charger l'application:",
'upload file:': 'charger le fichier:',
'upload plugin file:': 'charger fichier plugin:',
'user': 'user',
'variables': 'variables',
'versioning': 'versioning',
'view': 'vue',
'views': 'vues',
'web2py Recent Tweets': 'web2py Tweets récentes',
'web2py is up to date': 'web2py est à jour',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"עדכן" הוא ביטוי אופציונאלי, כגון "field1=newvalue". אינך יוכל להשתמש בjoin, בעת שימוש ב"עדכן" או "מחק".',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s רשומות נמחקו',
'%s rows updated': '%s רשומות עודכנו',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(למשל "it-it")',
'A new version of web2py is available: %s': 'גירסא חדשה של web2py זמינה: %s',
'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\n': 'A new version of web2py is available: Version 1.85.3 (2010-09-18 07:07:46)\r\n',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'לתשומת ליבך: ניתן להתחבר רק בערוץ מאובטח (HTTPS) או מlocalhost',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'לתשומת ליבך: אין לערוך מספר בדיקות במקביל, שכן הן עשויות להפריע זו לזו',
'ATTENTION: you cannot edit the running application!': 'לתשומת ליבך: לא ניתן לערוך אפליקציה בזמן הרצתה',
'About': 'אודות',
'About application': 'אודות אפליקציה',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'ממשק האדמין נוטרל בשל גישה לא מאובטחת',
'Admin language': 'Admin language',
'Administrator Password:': 'סיסמת מנהל',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': 'האם אתה בטוח שברצונך למחוק את הקובץ "%s"?',
'Are you sure you want to delete plugin "%s"?': 'האם אתה בטוח שברצונך למחוק את התוסף "%s"?',
'Are you sure you want to uninstall application "%s"?': 'האם אתה בטוח שברצונך להסיר את האפליקציה "%s"?',
'Are you sure you want to upgrade web2py now?': 'האם אתה בטוח שאתה רוצה לשדרג את web2py עכשיו?',
'Available databases and tables': 'מסדי נתונים וטבלאות זמינים',
'Cannot be empty': 'אינו יכול להישאר ריק',
'Cannot compile: there are errors in your app:': 'לא ניתן לקמפל: ישנן שגיאות באפליקציה שלך:',
'Check to delete': 'סמן כדי למחוק',
'Checking for upgrades...': 'מחפש עדכונים',
'Controllers': 'בקרים',
'Create new simple application': 'צור אפליקציה חדשה',
'Current request': 'בקשה נוכחית',
'Current response': 'מענה נוכחי',
'Current session': 'סשן זה',
'Date and Time': 'תאריך ושעה',
'Delete': 'מחק',
'Delete:': 'מחק:',
'Deploy on Google App Engine': 'העלה ל Google App Engine',
'Detailed traceback description': 'Detailed traceback description',
'EDIT': 'ערוך!',
'Edit application': 'ערוך אפליקציה',
'Edit current record': 'ערוך רשומה נוכחית',
'Editing Language file': 'עורך את קובץ השפה',
'Editing file "%s"': 'עורך את הקובץ "%s"',
'Enterprise Web Framework': 'סביבת הפיתוח לרשת',
'Error logs for "%(app)s"': 'דו"ח שגיאות עבור אפליקציה "%(app)s"',
'Error snapshot': 'Error snapshot',
'Error ticket': 'Error ticket',
'Exception instance attributes': 'נתוני החריגה',
'Frames': 'Frames',
'Functions with no doctests will result in [passed] tests.': 'פונקציות שלא הוגדר להן doctest ירשמו כבדיקות ש[עברו בהצלחה].',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'אם בדו"ח לעיל מופיע מספר דו"ח שגיאה, זה מצביע על שגיאה בבקר, עוד לפני שניתן היה להריץ את הdoctest. לרוב מדובר בשגיאת הזחה, או שגיאה שאינה בקוד של הפונקציה.\r\nכותרת ירוקה מצביע על כך שכל הבדיקות (אם הוגדרו) עברו בהצלחה, במידה ותוצאות הבדיקה אינן מופיעות.',
'Import/Export': 'יבא\יצא',
'Installed applications': 'אפליקציות מותקנות',
'Internal State': 'מצב מובנה',
'Invalid Query': 'שאילתה לא תקינה',
'Invalid action': 'הוראה לא קיימת',
'Language files (static strings) updated': 'קובץ השפה (מחרוזות סטאטיות) עודכן',
'Languages': 'שפות',
'Last saved on:': 'לאחרונה נשמר בתאריך:',
'License for': 'רשיון עבור',
'Login': 'התחבר',
'Login to the Administrative Interface': 'התחבר לממשק המנהל',
'Models': 'מבני נתונים',
'Modules': 'מודולים',
'NO': 'לא',
'New Record': 'רשומה חדשה',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': 'אין מסדי נתונים לאפליקציה זו',
'Original/Translation': 'מקור\תרגום',
'PAM authenticated user, cannot change password here': 'שינוי סיסמא באמצעות PAM אינו יכול להתבצע כאן',
'Peeking at file': 'מעיין בקובץ',
'Plugin "%s" in application': 'פלאגין "%s" של אפליקציה',
'Plugins': 'תוספים',
'Powered by': 'מופעל ע"י',
'Query:': 'שאילתה:',
'Resolve Conflict file': 'הסר קובץ היוצר קונפליקט',
'Rows in table': 'רשומות בטבלה',
'Rows selected': 'רשומות נבחרו',
'Saved file hash:': 'גיבוב הקובץ השמור:',
'Static files': 'קבצים סטאטיים',
'Sure you want to delete this object?': 'האם אתה בטוח שברצונך למחוק אובייקט זה?',
'TM': 'סימן רשום',
'Testing application': 'בודק את האפליקציה',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"שאליתה" היא תנאי כגון "db1.table1.filed1=\'value\'" ביטוי כמו db.table1.field1=db.table2.field1 יחולל join',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'אין בקרים',
'There are no models': 'אין מבני נתונים',
'There are no modules': 'אין מודולים',
'There are no plugins': 'There are no plugins',
'There are no static files': 'אין קבצים סטאטיים',
'There are no translators, only default language is supported': 'אין תרגומים. רק שפת ברירת המחדל נתמכת',
'There are no views': 'אין קבצי תצוגה',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'זוהי תבנית הקובץ %(filename)s ',
'Ticket': 'דו"ח שגיאה',
'Ticket ID': 'Ticket ID',
'To create a plugin, name a file/folder plugin_[name]': 'כדי ליצור תוסף, קרא לקובץ או סיפריה בשם לפי התבנית plugin_[name]',
'Traceback': 'Traceback',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'לא ניתן היה לבדוק אם יש שדרוגים',
'Unable to download app because:': 'לא ניתן היה להוריד את האפליקציה כי:',
'Unable to download because': 'לא הצלחתי להוריד כי',
'Update:': 'עדכן:',
'Upload & install packed application': 'העלה והתקן אפליקציה ארוזה',
'Upload a package:': 'Upload a package:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'השתמש ב (...)&(...) עבור תנאי AND, (...)|(...) עבור תנאי OR ו~(...) עבור תנאי NOT ליצירת שאילתות מורכבות',
'Use an url:': 'Use an url:',
'Version': 'גירסא',
'Views': 'מראה',
'YES': 'כן',
'about': 'אודות',
'additional code for your application': 'קוד נוסף עבור האפליקציה שלך',
'admin disabled because no admin password': 'ממשק המנהל מנוטרל כי לא הוגדרה סיסמת מנהל',
'admin disabled because not supported on google app engine': 'ממשק המנהל נוטרל, כי אין תמיכה בGoogle app engine',
'admin disabled because unable to access password file': 'ממשק מנהל נוטרל, כי לא ניתן לגשת לקובץ הסיסמאות',
'administrative interface': 'administrative interface',
'and rename it (required):': 'ושנה את שמו (חובה):',
'and rename it:': 'ושנה את שמו:',
'appadmin': 'מנהל מסד הנתונים',
'appadmin is disabled because insecure channel': 'מנהל מסד הנתונים נוטרל בשל ערוץ לא מאובטח',
'application "%s" uninstalled': 'אפליקציה "%s" הוסרה',
'application compiled': 'אפליקציה קומפלה',
'application is compiled and cannot be designed': 'לא ניתן לערוך אפליקציה מקומפלת',
'arguments': 'פרמטרים',
'back': 'אחורה',
'cache': 'מטמון',
'cache, errors and sessions cleaned': 'מטמון, שגיאות וסשן נוקו',
'cannot create file': 'לא מצליח ליצור קובץ',
'cannot upload file "%(filename)s"': 'לא הצלחתי להעלות את הקובץ "%(filename)s"',
'change admin password': 'סיסמת מנהל שונתה',
'check all': 'סמן הכל',
'check for upgrades': 'check for upgrades',
'clean': 'נקה',
'click to check for upgrades': 'לחץ כדי לחפש עדכונים',
'code': 'קוד',
'collapse/expand all': 'collapse/expand all',
'compile': 'קמפל',
'compiled application removed': 'אפליקציה מקומפלת הוסרה',
'controllers': 'בקרים',
'create': 'צור',
'create file with filename:': 'צור קובץ בשם:',
'create new application:': 'צור אפליקציה חדשה:',
'created by': 'נוצר ע"י',
'crontab': 'משימות מתוזמנות',
'currently running': 'currently running',
'currently saved or': 'נשמר כעת או',
'data uploaded': 'המידע הועלה',
'database': 'מסד נתונים',
'database %s select': 'מסד הנתונים %s נבחר',
'database administration': 'ניהול מסד נתונים',
'db': 'מסד נתונים',
'defines tables': 'הגדר טבלאות',
'delete': 'מחק',
'delete all checked': 'סמן הכל למחיקה',
'delete plugin': 'מחק תוסף',
'deploy': 'deploy',
'design': 'עיצוב',
'direction: ltr': 'direction: rtl',
'done!': 'הסתיים!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'ערוך',
'edit controller': 'ערוך בקר',
'edit views:': 'ערוך קיבצי תצוגה:',
'errors': 'שגיאות',
'export as csv file': 'יצא לקובץ csv',
'exposes': 'חושף את',
'extends': 'הרחבה של',
'failed to reload module because:': 'נכשל בטעינה חוזרת של מודול בגלל:',
'file "%(filename)s" created': 'הקובץ "%(filename)s" נוצר',
'file "%(filename)s" deleted': 'הקובץ "%(filename)s" נמחק',
'file "%(filename)s" uploaded': 'הקובץ "%(filename)s" הועלה',
'file "%s" of %s restored': 'הקובץ "%s" of %s שוחזר',
'file changed on disk': 'קובץ שונה על גבי הדיסק',
'file does not exist': 'קובץ לא נמצא',
'file saved on %(time)s': 'הקובץ נשמר בשעה %(time)s',
'file saved on %s': 'הקובץ נשמר ב%s',
'filter': 'filter',
'help': 'עזרה',
'htmledit': 'עורך ויזואלי',
'includes': 'מכיל',
'insert new': 'הכנס נוסף',
'insert new %s': 'הכנס %s נוסף',
'inspect attributes': 'inspect attributes',
'install': 'התקן',
'internal error': 'שגיאה מובנית',
'invalid password': 'סיסמא שגויה',
'invalid request': 'בקשה לא תקינה',
'invalid ticket': 'דו"ח שגיאה לא קיים',
'language file "%(filename)s" created/updated': 'קובץ השפה "%(filename)s" נוצר\עודכן',
'languages': 'שפות',
'loading...': 'טוען...',
'locals': 'locals',
'login': 'התחבר',
'logout': 'התנתק',
'merge': 'מזג',
'models': 'מבני נתונים',
'modules': 'מודולים',
'new application "%s" created': 'האפליקציה "%s" נוצרה',
'new plugin installed': 'פלאגין חדש הותקן',
'new record inserted': 'הרשומה נוספה',
'next 100 rows': '100 הרשומות הבאות',
'no match': 'לא נמצאה התאמה',
'or import from csv file': 'או יבא מקובץ csv',
'or provide app url:': 'או ספק כתובת url של אפליקציה',
'overwrite installed app': 'התקן על גבי אפלקציה מותקנת',
'pack all': 'ארוז הכל',
'pack compiled': 'ארוז מקומפל',
'pack plugin': 'ארוז תוסף',
'password changed': 'סיסמא שונתה',
'plugin "%(plugin)s" deleted': 'תוסף "%(plugin)s" נמחק',
'plugins': 'plugins',
'previous 100 rows': '100 הרשומות הקודמות',
'record': 'רשומה',
'record does not exist': 'הרשומה אינה קיימת',
'record id': 'מזהה רשומה',
'remove compiled': 'הסר מקומפל',
'request': 'request',
'response': 'response',
'restore': 'שחזר',
'revert': 'חזור לגירסא קודמת',
'selected': 'נבחרו',
'session': 'session',
'session expired': 'תם הסשן',
'shell': 'שורת פקודה',
'site': 'אתר',
'some files could not be removed': 'לא ניתן היה להסיר חלק מהקבצים',
'start wizard': 'start wizard',
'state': 'מצב',
'static': 'קבצים סטאטיים',
'submit': 'שלח',
'table': 'טבלה',
'test': 'בדיקות',
'the application logic, each URL path is mapped in one exposed function in the controller': 'הלוגיקה של האפליקציה, כל url ממופה לפונקציה חשופה בבקר',
'the data representation, define database tables and sets': 'ייצוג המידע, בו מוגדרים טבלאות ומבנים',
'the presentations layer, views are also known as templates': 'שכבת התצוגה, המכונה גם template',
'these files are served without processing, your images go here': 'אלו הם קבצים הנשלחים מהשרת ללא עיבוד. הכנס את התמונות כאן',
'to previous version.': 'אין גירסא קודמת',
'translation strings for the application': 'מחרוזות תרגום עבור האפליקציה',
'try': 'נסה',
'try something like': 'נסה משהו כמו',
'unable to create application "%s"': 'נכשל ביצירת האפליקציה "%s"',
'unable to delete file "%(filename)s"': 'נכשל במחיקת הקובץ "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'נכשל במחיקת התוסף "%(plugin)s"',
'unable to parse csv file': 'לא הצלחתי לנתח את הקלט של קובץ csv',
'unable to uninstall "%s"': 'לא ניתן להסיר את "%s"',
'unable to upgrade because "%s"': 'לא ניתן היה לשדרג כי "%s"',
'uncheck all': 'הסר סימון מהכל',
'uninstall': 'הסר התקנה',
'update': 'עדכן',
'update all languages': 'עדכן את כלל קיבצי השפה',
'upgrade now': 'upgrade now',
'upgrade web2py now': 'שדרג את web2py עכשיו',
'upload': 'upload',
'upload application:': 'העלה אפליקציה:',
'upload file:': 'העלה קובץ:',
'upload plugin file:': 'העלה קובץ תוסף:',
'variables': 'משתנים',
'versioning': 'מנגנון גירסאות',
'view': 'הצג',
'views': 'מראה',
'web2py Recent Tweets': 'ציוצים אחרונים של web2py',
'web2py is up to date': 'web2py מותקנת בגירסתה האחרונה',
'web2py upgraded; please restart it': 'web2py שודרגה; נא אתחל אותה',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novo_valor\'". Não é permitido atualizar ou apagar resultados de um JOIN',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s registros apagados',
'%s rows updated': '%s registros atualizados',
'(requires internet access)': '(requer acesso a internet)',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Está disponível uma nova versão do web2py',
'A new version of web2py is available: %s': 'Está disponível uma nova versão do web2py: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENÇÃO o login requer uma conexão segura (HTTPS) ou executar de localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENÇÃO OS TESTES NÃO THREAD SAFE, NÃO EFETUE MÚLTIPLOS TESTES AO MESMO TEMPO.',
'ATTENTION: you cannot edit the running application!': 'ATENÇÃO: Não pode modificar a aplicação em execução!',
'About': 'Sobre',
'About application': 'Sobre a aplicação',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Admin desabilitado pois o canal não é seguro',
'Admin is disabled because unsecure channel': 'Admin desabilitado pois o canal não é seguro',
'Admin language': 'Linguagem do Admin',
'Administrator Password:': 'Senha de administrador:',
'Application name:': 'Nome da aplicação:',
'Are you sure you want to delete file "%s"?': 'Tem certeza que deseja apagar o arquivo "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Tem certeza que deseja apagar o plugin "%s"?',
'Are you sure you want to uninstall application "%s"': 'Tem certeza que deseja apagar a aplicação "%s"?',
'Are you sure you want to uninstall application "%s"?': 'Tem certeza que deseja apagar a aplicação "%s"?',
'Are you sure you want to upgrade web2py now?': 'Tem certeza que deseja atualizar o web2py agora?',
'Available databases and tables': 'Bancos de dados e tabelas disponíveis',
'Cannot be empty': 'Não pode ser vazio',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Não é possível compilar: Existem erros em sua aplicação. Depure, corrija os errros e tente novamente',
'Cannot compile: there are errors in your app:': 'Não é possível compilar: Existem erros em sua aplicação',
'Change Password': 'Trocar Senha',
'Check to delete': 'Marque para apagar',
'Checking for upgrades...': 'Buscando atualizações...',
'Click row to expand traceback': 'Clique em uma coluna para expandir o log do erro',
'Client IP': 'IP do cliente',
'Controllers': 'Controladores',
'Count': 'Contagem',
'Create new application using the Wizard': 'Criar nova aplicação utilizando o assistente',
'Create new simple application': 'Crie uma nova aplicação',
'Current request': 'Requisição atual',
'Current response': 'Resposta atual',
'Current session': 'Sessão atual',
'DESIGN': 'Projeto',
'Date and Time': 'Data e Hora',
'Delete': 'Apague',
'Delete:': 'Apague:',
'Deploy on Google App Engine': 'Publicar no Google App Engine',
'Description': 'Descrição',
'Design for': 'Projeto de',
'Detailed traceback description': 'Detailed traceback description',
'E-mail': 'E-mail',
'EDIT': 'EDITAR',
'Edit Profile': 'Editar Perfil',
'Edit application': 'Editar aplicação',
'Edit current record': 'Editar o registro atual',
'Editing Language file': 'Editando arquivo de linguagem',
'Editing file': 'Editando arquivo',
'Editing file "%s"': 'Editando arquivo "%s"',
'Enterprise Web Framework': 'Framework web empresarial',
'Error': 'Erro',
'Error logs for "%(app)s"': 'Logs de erro para "%(app)s"',
'Error snapshot': 'Error snapshot',
'Error ticket': 'Error ticket',
'Exception instance attributes': 'Atributos da instancia de excessão',
'File': 'Arquivo',
'First name': 'Nome',
'Frames': 'Frames',
'Functions with no doctests will result in [passed] tests.': 'Funções sem doctests resultarão em testes [aceitos].',
'Group ID': 'ID do Grupo',
'Hello World': 'Olá Mundo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Se o relatório acima contém um número de ticket, isso indica uma falha no controlador em execução, antes de tantar executar os doctests. Isto acontece geralmente por erro de endentação ou erro fora do código da função.\nO titulo em verde indica que os testes (se definidos) passaram. Neste caso os testes não são mostrados.',
'Import/Export': 'Importar/Exportar',
'Installed applications': 'Aplicações instaladas',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta inválida',
'Invalid action': 'Ação inválida',
'Invalid email': 'E-mail inválido',
'Language files (static strings) updated': 'Arquivos de linguagem (textos estáticos) atualizados',
'Languages': 'Linguagens',
'Last name': 'Sobrenome',
'Last saved on:': 'Salvo em:',
'License for': 'Licença para',
'Login': 'Entrar',
'Login to the Administrative Interface': 'Entrar na interface adminitrativa',
'Logout': 'Sair',
'Lost Password': 'Senha perdida',
'Models': 'Modelos',
'Modules': 'Módulos',
'NO': 'NÃO',
'Name': 'Nome',
'New Record': 'Novo registro',
'New application wizard': 'Assistente para novas aplicações ',
'New simple application': 'Nova aplicação básica',
'No databases in this application': 'Não existem bancos de dados nesta aplicação',
'Origin': 'Origem',
'Original/Translation': 'Original/Tradução',
'PAM authenticated user, cannot change password here': 'usuario autenticado por PAM, não pode alterar a senha por aqui',
'Password': 'Senha',
'Peeking at file': 'Visualizando arquivo',
'Plugin "%s" in application': 'Plugin "%s" na aplicação',
'Plugins': 'Plugins',
'Powered by': 'Este site utiliza',
'Query:': 'Consulta:',
'Record ID': 'ID do Registro',
'Register': 'Registrar-se',
'Registration key': 'Chave de registro',
'Resolve Conflict file': 'Arquivo de resolução de conflito',
'Role': 'Papel',
'Rows in table': 'Registros na tabela',
'Rows selected': 'Registros selecionados',
'Saved file hash:': 'Hash do arquivo salvo:',
'Searching:': 'Searching:',
'Static files': 'Arquivos estáticos',
'Sure you want to delete this object?': 'Tem certeza que deseja apaagr este objeto?',
'TM': 'MR',
'Table name': 'Nome da tabela',
'Testing application': 'Testando a aplicação',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "consulta" é uma condição como "db.tabela.campo1==\'valor\'". Algo como "db.tabela1.campo1==db.tabela2.campo2" resulta em um JOIN SQL.',
'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller',
'The data representation, define database tables and sets': 'The data representation, define database tables and sets',
'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates',
'There are no controllers': 'Não existem controllers',
'There are no models': 'Não existem modelos',
'There are no modules': 'Não existem módulos',
'There are no plugins': 'There are no plugins',
'There are no static files': 'Não existem arquicos estáticos',
'There are no translators, only default language is supported': 'Não há traduções, somente a linguagem padrão é suportada',
'There are no views': 'Não existem visões',
'These files are served without processing, your images go here': 'These files are served without processing, your images go here',
'This is the %(filename)s template': 'Este é o template %(filename)s',
'Ticket': 'Ticket',
'Ticket ID': 'Ticket ID',
'Timestamp': 'Data Atual',
'To create a plugin, name a file/folder plugin_[name]': 'Para criar um plugin, nomeio um arquivo/pasta como plugin_[nome]',
'Traceback': 'Traceback',
'Translation strings for the application': 'Translation strings for the application',
'Unable to check for upgrades': 'Não é possível checar as atualizações',
'Unable to download': 'Não é possível efetuar o download',
'Unable to download app': 'Não é possível baixar a aplicação',
'Unable to download app because:': 'Não é possível baixar a aplicação porque:',
'Unable to download because': 'Não é possível baixar porque',
'Update:': 'Atualizar:',
'Upload & install packed application': 'Faça upload e instale uma aplicação empacotada',
'Upload a package:': 'Faça upload de um pacote:',
'Upload existing application': 'Faça upload de uma aplicação existente',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para criar consultas mais complexas.',
'Use an url:': 'Use uma url:',
'User ID': 'ID do Usuario',
'Version': 'Versão',
'Views': 'Visões',
'Welcome to web2py': 'Bem-vindo ao web2py',
'YES': 'SIM',
'about': 'sobre',
'additional code for your application': 'código adicional para sua aplicação',
'admin disabled because no admin password': ' admin desabilitado por falta de senha definida',
'admin disabled because not supported on google app engine': 'admin dehabilitado, não é soportado no GAE',
'admin disabled because unable to access password file': 'admin desabilitado, não foi possível ler o arquivo de senha',
'administrative interface': 'interface administrativa',
'and rename it (required):': 'e renomeie (requerido):',
'and rename it:': ' e renomeie:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin desabilitado, canal inseguro',
'application "%s" uninstalled': 'aplicação "%s" desinstalada',
'application compiled': 'aplicação compilada',
'application is compiled and cannot be designed': 'A aplicação está compilada e não pode ser modificada',
'arguments': 'argumentos',
'back': 'voltar',
'browse': 'buscar',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, erros e sessões eliminadas',
'cannot create file': 'Não é possível criar o arquivo',
'cannot upload file "%(filename)s"': 'não é possível fazer upload do arquivo "%(filename)s"',
'change admin password': 'mudar senha de administrador',
'check all': 'marcar todos',
'check for upgrades': 'checar por atualizações',
'clean': 'limpar',
'click here for online examples': 'clique para ver exemplos online',
'click here for the administrative interface': 'Clique aqui para acessar a interface administrativa',
'click to check for upgrades': 'clique aqui para checar por atualizações',
'click to open': 'clique para abrir',
'code': 'código',
'collapse/expand all': 'collapse/expand all',
'commit (mercurial)': 'commit (mercurial)',
'compile': 'compilar',
'compiled application removed': 'aplicação compilada removida',
'controllers': 'controladores',
'create': 'criar',
'create file with filename:': 'criar um arquivo com o nome:',
'create new application:': 'nome da nova aplicação:',
'created by': 'criado por',
'crontab': 'crontab',
'currently running': 'Executando',
'currently saved or': 'Atualmente salvo ou',
'customize me!': 'Modifique-me',
'data uploaded': 'Dados enviados',
'database': 'banco de dados',
'database %s select': 'Seleção no banco de dados %s',
'database administration': 'administração de banco de dados',
'db': 'db',
'defines tables': 'define as tabelas',
'delete': 'apagar',
'delete all checked': 'apagar marcados',
'delete plugin': 'apagar plugin',
'deploy': 'publicar',
'design': 'modificar',
'direction: ltr': 'direção: ltr',
'done!': 'feito!',
'download layouts': 'download layouts',
'download plugins': 'download plugins',
'edit': 'editar',
'edit controller': 'editar controlador',
'edit views:': 'editar visões:',
'errors': 'erros',
'export as csv file': 'exportar como arquivo CSV',
'exposes': 'expõe',
'extends': 'estende',
'failed to reload module': 'Falha ao recarregar o módulo',
'failed to reload module because:': 'falha ao recarregar o módulo por:',
'file "%(filename)s" created': 'arquivo "%(filename)s" criado',
'file "%(filename)s" deleted': 'arquivo "%(filename)s" apagado',
'file "%(filename)s" uploaded': 'arquivo "%(filename)s" enviado',
'file "%(filename)s" was not deleted': 'arquivo "%(filename)s" não foi apagado',
'file "%s" of %s restored': 'arquivo "%s" de %s restaurado',
'file changed on disk': 'arquivo modificado no disco',
'file does not exist': 'arquivo não existe',
'file saved on %(time)s': 'arquivo salvo em %(time)s',
'file saved on %s': 'arquivo salvo em %s',
'files': 'files',
'filter': 'filter',
'help': 'ajuda',
'htmledit': 'htmledit',
'includes': 'inclui',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'inspect attributes': 'inspect attributes',
'install': 'instalar',
'internal error': 'erro interno',
'invalid password': 'senha inválida',
'invalid request': 'solicitação inválida',
'invalid ticket': 'ticket inválido',
'language file "%(filename)s" created/updated': 'arquivo de linguagem "%(filename)s" criado/atualizado',
'languages': 'linguagens',
'languages updated': 'linguagens atualizadas',
'loading...': 'carregando...',
'locals': 'locals',
'login': 'inicio de sessão',
'logout': 'finalizar sessão',
'manage': 'gerenciar',
'merge': 'juntar',
'models': 'modelos',
'modules': 'módulos',
'new application "%s" created': 'nova aplicação "%s" criada',
'new plugin installed': 'novo plugin instalado',
'new record inserted': 'novo registro inserido',
'next 100 rows': 'próximos 100 registros',
'no match': 'não encontrado',
'or import from csv file': 'ou importar de um arquivo CSV',
'or provide app url:': 'ou forneça a url de uma aplicação:',
'or provide application url:': 'ou forneça a url de uma aplicação:',
'overwrite installed app': 'sobrescrever aplicação instalada',
'pack all': 'criar pacote',
'pack compiled': 'criar pacote compilado',
'pack plugin': 'empacotar plugin',
'password changed': 'senha alterada',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" eliminado',
'plugins': 'plugins',
'previous 100 rows': '100 registros anteriores',
'record': 'registro',
'record does not exist': 'o registro não existe',
'record id': 'id do registro',
'remove compiled': 'eliminar compilados',
'request': 'request',
'response': 'response',
'restore': 'restaurar',
'revert': 'reverter',
'save': 'salvar',
'selected': 'selecionado(s)',
'session': 'session',
'session expired': 'sessão expirada',
'shell': 'Terminal',
'site': 'site',
'some files could not be removed': 'alguns arquicos não puderam ser removidos',
'start wizard': 'iniciar assistente',
'state': 'estado',
'static': 'estáticos',
'submit': 'enviar',
'table': 'tabela',
'test': 'testar',
'the application logic, each URL path is mapped in one exposed function in the controller': 'A lógica da aplicação, cada URL é mapeada para uma função exposta pelo controlador',
'the data representation, define database tables and sets': 'A representação dos dadps, define tabelas e estruturas de dados',
'the presentations layer, views are also known as templates': 'A camada de apresentação, As visões também são chamadas de templates',
'these files are served without processing, your images go here': 'Estes arquivos são servidos sem processamento, suas imagens ficam aqui',
'to previous version.': 'para a versão anterior.',
'translation strings for the application': 'textos traduzidos para a aplicação',
'try': 'tente',
'try something like': 'tente algo como',
'unable to create application "%s"': 'não é possível criar a aplicação "%s"',
'unable to delete file "%(filename)s"': 'não é possível criar o arquico "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'não é possível criar o plugin "%(plugin)s"',
'unable to parse csv file': 'não é possível analisar o arquivo CSV',
'unable to uninstall "%s"': 'não é possível instalar "%s"',
'unable to upgrade because "%s"': 'não é possível atualizar porque "%s"',
'uncheck all': 'desmarcar todos',
'uninstall': 'desinstalar',
'update': 'atualizar',
'update all languages': 'atualizar todas as linguagens',
'upgrade web2py now': 'atualize o web2py agora',
'upload': 'upload',
'upload application:': 'Fazer upload de uma aplicação:',
'upload file:': 'Enviar arquivo:',
'upload plugin file:': 'Enviar arquivo de plugin:',
'variables': 'variáveis',
'versioning': 'versionamento',
'view': 'visão',
'views': 'visões',
'web2py Recent Tweets': 'Tweets Recentes de @web2py',
'web2py is up to date': 'web2py está atualizado',
'web2py upgraded; please restart it': 'web2py atualizado; favor reiniciar',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '已刪除 %s 筆',
'%s rows updated': '已更新 %s 筆',
'(something like "it-it")': '(格式類似 "zh-tw")',
'A new version of web2py is available': '新版的 web2py 已發行',
'A new version of web2py is available: %s': '新版的 web2py 已發行: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '注意: 登入管理帳號需要安全連線(HTTPS)或是在本機連線(localhost).',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '注意: 因為在測試模式不保證多執行緒安全性,也就是說不可以同時執行多個測試案例',
'ATTENTION: you cannot edit the running application!': '注意:不可編輯正在執行的應用程式!',
'About': '關於',
'About application': '關於本應用程式',
'Admin is disabled because insecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Admin is disabled because unsecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Administrator Password:': '管理員密碼:',
'Are you sure you want to delete file "%s"?': '確定要刪除檔案"%s"?',
'Are you sure you want to delete plugin "%s"?': '確定要刪除插件 "%s"?',
'Are you sure you want to uninstall application "%s"': '確定要移除應用程式 "%s"',
'Are you sure you want to uninstall application "%s"?': '確定要移除應用程式 "%s"',
'Are you sure you want to upgrade web2py now?': '確定現在要升級 web2py?',
'Authentication': '驗證',
'Available databases and tables': '可提供的資料庫和資料表',
'Cannot be empty': '不可空白',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': '無法編譯:應用程式中含有錯誤,請除錯後再試一次.',
'Cannot compile: there are errors in your app:': '無法編譯: 在你的應用程式存在錯誤:',
'Change Password': '變更密碼',
'Check to delete': '打勾代表刪除',
'Check to delete:': '打勾代表刪除:',
'Checking for upgrades...': '檢查新版本中...',
'Client IP': '客戶端網址(IP)',
'Controller': '控件',
'Controllers': '控件',
'Copyright': '版權所有',
'Create new simple application': '創建應用程式',
'Current request': '目前網路資料要求(request)',
'Current response': '目前網路資料回應(response)',
'Current session': '目前網路連線資訊(session)',
'DB Model': '資料庫模組',
'DESIGN': '設計',
'Database': '資料庫',
'Date and Time': '日期和時間',
'Delete': '刪除',
'Delete:': '刪除:',
'Deploy on Google App Engine': '配置到 Google App Engine',
'Description': '描述',
'Design for': '設計為了',
'E-mail': '電子郵件',
'EDIT': '編輯',
'Edit': '編輯',
'Edit Profile': '編輯設定檔',
'Edit This App': '編輯本應用程式',
'Edit application': '編輯應用程式',
'Edit current record': '編輯當前紀錄',
'Editing Language file': '編輯語言檔案',
'Editing file': '編輯檔案',
'Editing file "%s"': '編輯檔案"%s"',
'Enterprise Web Framework': '企業網站平台',
'Error logs for "%(app)s"': '"%(app)s"的錯誤紀錄',
'Exception instance attributes': 'Exception instance attributes',
'First name': '名',
'Functions with no doctests will result in [passed] tests.': '沒有 doctests 的函式會顯示 [passed].',
'Group ID': '群組編號',
'Hello World': '嗨! 世界',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': '匯入/匯出',
'Index': '索引',
'Installed applications': '已安裝應用程式',
'Internal State': '內部狀態',
'Invalid Query': '不合法的查詢',
'Invalid action': '不合法的動作(action)',
'Invalid email': '不合法的電子郵件',
'Language files (static strings) updated': '語言檔已更新',
'Languages': '各國語言',
'Last name': '姓',
'Last saved on:': '最後儲存時間:',
'Layout': '網頁配置',
'License for': '許可證',
'Login': '登入',
'Login to the Administrative Interface': '登入到管理員介面',
'Logout': '登出',
'Lost Password': '密碼遺忘',
'Main Menu': '主選單',
'Menu Model': '選單模組(menu)',
'Models': '資料模組',
'Modules': '程式模組',
'NO': '否',
'Name': '名字',
'New Record': '新紀錄',
'No databases in this application': '這應用程式不含資料庫',
'Origin': '原文',
'Original/Translation': '原文/翻譯',
'PAM authenticated user, cannot change password here': 'PAM 授權使用者, 無法在此變更密碼',
'Password': '密碼',
"Password fields don't match": '密碼欄不匹配',
'Peeking at file': '選個文件',
'Plugin "%s" in application': '在應用程式的插件 "%s"',
'Plugins': '插件',
'Powered by': '基於以下技術構建:',
'Query:': '查詢:',
'Record ID': '紀錄編號',
'Register': '註冊',
'Registration key': '註冊金鑰',
'Remember me (for 30 days)': '記住帳號(30 天)',
'Reset Password key': '重設密碼',
'Resolve Conflict file': '解決衝突檔案',
'Role': '角色',
'Rows in table': '在資料表裏的資料',
'Rows selected': '筆資料被選擇',
'Saved file hash:': '檔案雜湊值已紀錄:',
'Static files': '靜態檔案',
'Stylesheet': '網頁風格檔',
'Submit': '傳送',
'Sure you want to delete this object?': '確定要刪除此物件?',
'TM': 'TM',
'Table name': '資料表名稱',
'Testing application': '測試中的應用程式',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"查詢"是一個像 "db.表1.欄位1==\'值\'" 的條件式. 以"db.表1.欄位1==db.表2.欄位2"方式則相當於執行 JOIN SQL.',
'There are no controllers': '沒有控件(controllers)',
'There are no models': '沒有資料庫模組(models)',
'There are no modules': '沒有程式模組(modules)',
'There are no static files': '沒有靜態檔案',
'There are no translators, only default language is supported': '沒有翻譯檔,只支援原始語言',
'There are no views': '沒有視圖',
'This is the %(filename)s template': '這是%(filename)s檔案的樣板(template)',
'Ticket': '問題單',
'Timestamp': '時間標記',
'To create a plugin, name a file/folder plugin_[name]': '檔案或目錄名稱以 plugin_開頭來創建插件',
'Unable to check for upgrades': '無法做升級檢查',
'Unable to download': '無法下載',
'Unable to download app': '無法下載應用程式',
'Unable to download app because:': '無法下載應用程式因為:',
'Unable to download because': '因為下列原因無法下載:',
'Update:': '更新:',
'Upload & install packed application': '上傳並安裝已打包的應用程式',
'Upload existing application': '更新存在的應用程式',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': '使用下列方式來組合更複雜的條件式, (...)&(...) 代表同時存在的條件, (...)|(...) 代表擇一的條件, ~(...)則代表反向條件.',
'User %(id)s Logged-in': '使用者 %(id)s 已登入',
'User %(id)s Registered': '使用者 %(id)s 已註冊',
'User ID': '使用者編號',
'Verify Password': '驗證密碼',
'Version': '版本',
'View': '視圖',
'Views': '視圖',
'Welcome %s': '歡迎 %s',
'Welcome to web2py': '歡迎使用 web2py',
'YES': '是',
'about': '關於',
'additional code for your application': '應用程式額外的程式碼',
'admin disabled because no admin password': '管理介面關閉原因是沒有設定管理員密碼 ',
'admin disabled because not supported on google app engine': '管理介面關閉原因是不支援在google apps engine環境下運作',
'admin disabled because unable to access password file': '管理介面關閉原因是無法存取密碼檔',
'amy_ajax': 'amy_ajax',
'and rename it (required):': '同時更名為(必要的):',
'and rename it:': '同時更名為:',
'appadmin': '應用程式管理員',
'appadmin is disabled because insecure channel': '管理介面關閉理由是連線方式不安全',
'application "%s" uninstalled': '已移除應用程式 "%s"',
'application compiled': '已編譯應用程式',
'application is compiled and cannot be designed': '應用程式已經編譯無法重新設計',
'arguments': 'arguments',
'back': '回復(back)',
'cache': '快取記憶體',
'cache, errors and sessions cleaned': '快取記憶體,錯誤紀錄,連線紀錄已清除',
'cannot create file': '無法創建檔案',
'cannot upload file "%(filename)s"': '無法上傳檔案 "%(filename)s"',
'change admin password': 'change admin password',
'change_password': '變更密碼',
'check all': '全選',
'clean': '清除',
'click here for online examples': '點此處進入線上範例',
'click here for the administrative interface': '點此處進入管理介面',
'click to check for upgrades': '點擊打勾以便升級',
'code': 'code',
'compile': '編譯',
'compiled application removed': '已移除已編譯的應用程式',
'controllers': '控件',
'create': '創建',
'create file with filename:': '創建檔案:',
'create new application:': '創建新應用程式:',
'created by': '創建自',
'crontab': '定時執行表',
'currently saved or': '現在存檔或',
'customize me!': '請調整我!',
'data uploaded': '資料已上傳',
'database': '資料庫',
'database %s select': '已選擇 %s 資料庫',
'database administration': '資料庫管理',
'db': 'db',
'defines tables': '定義資料表',
'delete': '刪除',
'delete all checked': '刪除所有已選擇項目',
'delete plugin': '刪除插件',
'delete_plugin': '刪除插件',
'design': '設計',
'direction: ltr': 'direction: ltr',
'done!': '完成!',
'edit': '編輯',
'edit controller': '編輯控件',
'edit views:': '編輯視圖',
'edit_language': '編輯語言檔',
'errors': '錯誤紀錄',
'export as csv file': '以逗號分隔檔(csv)格式匯出',
'exposes': '外顯',
'extends': '擴展',
'failed to reload module because:': '因為下列原因無法重新載入程式模組:',
'file "%(filename)s" created': '檔案 "%(filename)s" 已創建',
'file "%(filename)s" deleted': '檔案 "%(filename)s" 已刪除',
'file "%(filename)s" uploaded': '檔案 "%(filename)s" 已上傳',
'file "%s" of %s restored': '檔案 %s 的 "%s" 已回存',
'file changed on disk': '在磁碟上檔案已改變',
'file does not exist': '檔案不存在',
'file saved on %(time)s': '檔案已於 %(time)s 儲存',
'file saved on %s': '檔案在 %s 已儲存',
'help': '說明檔',
'htmledit': 'html編輯',
'includes': '包含',
'index': '索引',
'insert new': '插入新資料',
'insert new %s': '插入新資料 %s',
'install': '安裝',
'internal error': '內部錯誤',
'invalid password': '密碼錯誤',
'invalid request': '不合法的網路要求(request)',
'invalid ticket': '不合法的問題單號',
'language file "%(filename)s" created/updated': '語言檔"%(filename)s"已創建或更新',
'languages': '語言檔',
'loading...': '載入中...',
'login': '登入',
'logout': '登出',
'merge': '合併',
'models': '資料庫模組',
'modules': '程式模組',
'new application "%s" created': '已創建新的應用程式 "%s"',
'new plugin installed': '已安裝新插件',
'new record inserted': '已新增新紀錄',
'next 100 rows': '往後 100 筆',
'no match': '無法匹配',
'or import from csv file': '或是從逗號分隔檔(CSV)匯入',
'or provide app url:': '或是提供應用程式的安裝網址:',
'overwrite installed app': '覆蓋已安裝的應用程式',
'pack all': '全部打包',
'pack compiled': '打包已編譯資料',
'pack plugin': '打包插件',
'password changed': '密碼已變更',
'peek': '選取',
'plugin': '插件',
'plugin "%(plugin)s" deleted': '已刪除插件"%(plugin)s"',
'previous 100 rows': '往前 100 筆',
'record': '紀錄',
'record does not exist': '紀錄不存在',
'record id': '紀錄編號',
'register': '註冊',
'remove compiled': '編譯檔案已移除',
'resolve': '解決',
'restore': '回存',
'revert': '反向恢復',
'save': '儲存',
'selected': '已選擇',
'session expired': '連線(session)已過時',
'shell': '命令列操作介面',
'site': '網站',
'some files could not be removed': '部份檔案無法移除',
'state': '狀態',
'static': '靜態檔案',
'submit': '傳送',
'table': '資料表',
'test': '測試',
'the application logic, each URL path is mapped in one exposed function in the controller': '應用程式邏輯 - 每個網址路徑對應到一個控件的函式',
'the data representation, define database tables and sets': '資料展現層 - 用來定義資料表和集合',
'the presentations layer, views are also known as templates': '外觀展現層 - 視圖有時也被稱為樣板',
'these files are served without processing, your images go here': '這些檔案保留未經處理,你的影像檔在此',
'ticket': '問題單',
'to previous version.': '到前一個版本',
'translation strings for the application': '翻譯此應用程式的字串',
'try': '嘗試',
'try something like': '嘗試如',
'unable to create application "%s"': '無法創建應用程式 "%s"',
'unable to delete file "%(filename)s"': '無法刪除檔案 "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': '無法刪查插件檔 "%(plugin)s"',
'unable to parse csv file': '無法解析逗號分隔檔(csv)',
'unable to uninstall "%s"': '無法移除安裝 "%s"',
'unable to upgrade because "%s"': '無法升級因為 "%s"',
'uncheck all': '全不選',
'uninstall': '解除安裝',
'update': '更新',
'update all languages': '將程式中待翻譯語句更新到所有的語言檔',
'upgrade web2py now': 'upgrade web2py now',
'upgrade_web2py': '升級 web2py',
'upload application:': '上傳應用程式:',
'upload file:': '上傳檔案:',
'upload plugin file:': '上傳插件檔:',
'variables': 'variables',
'versioning': '版本管理',
'view': '視圖',
'views': '視圖',
'web2py Recent Tweets': 'web2py 最近的 Tweets',
'web2py is up to date': 'web2py 已經是最新版',
'web2py upgraded; please restart it': '已升級 web2py ; 請重新啟動',
}
| Python |
# coding: utf8
{
'"browse"': '游览',
'"save"': '"保存"',
'"submit"': '"提交"',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新"是可配置项 如 "field1=\'newvalue\'",你无法在JOIN 中更新或删除',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s 行已删',
'%s rows updated': '%s 行更新',
'(requires internet access)': '(requires internet access)',
'(something like "it-it")': '(就酱 "it-it")',
'A new version of web2py is available': '新版本web2py已经可用',
'A new version of web2py is available: %s': '新版本web2py已经可用: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '',
'ATTENTION: you cannot edit the running application!': '注意: 不能修改正在运行中的应用!',
'About': '关于',
'About application': '关于这个应用',
'Admin is disabled because insecure channel': '管理因不安全通道而关闭',
'Admin is disabled because unsecure channel': '管理因不稳定通道而关闭',
'Admin language': 'Admin language',
'Administrator Password:': '管理员密码:',
'Application name:': 'Application name:',
'Are you sure you want to delete file "%s"?': '你真想删除文件"%s"?',
'Are you sure you want to delete plugin "%s"?': 'Are you sure you want to delete plugin "%s"?',
'Are you sure you want to uninstall application "%s"': '你真确定要卸载应用 "%s"',
'Are you sure you want to uninstall application "%s"?': '你真确定要卸载应用 "%s" ?',
'Are you sure you want to upgrade web2py now?': 'Are you sure you want to upgrade web2py now?',
'Available databases and tables': '可用数据库/表',
'Cannot be empty': '不能不填',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': '无法编译: 应用中有错误,请修订后再试.',
'Cannot compile: there are errors in your app:': 'Cannot compile: there are errors in your app:',
'Change Password': '修改密码',
'Check to delete': '检验删除',
'Checking for upgrades...': '是否有升级版本检查ing...',
'Client IP': '客户端IP',
'Controllers': '控制器s',
'Create new simple application': '创建一个新应用',
'Current request': '当前请求',
'Current response': '当前返回',
'Current session': '当前会话',
'DESIGN': '设计',
'Date and Time': '时间日期',
'Delete': '删除',
'Delete:': '删除:',
'Deploy on Google App Engine': '部署到GAE',
'Description': '描述',
'Design for': '设计:',
'E-mail': '邮箱:',
'EDIT': '编辑',
'Edit Profile': '修订配置',
'Edit application': '修订应用',
'Edit current record': '修订当前记录',
'Editing Language file': '修订语言文件',
'Editing file': '修订文件',
'Editing file "%s"': '修订文件 %s',
'Enterprise Web Framework': '强悍的网络开发框架',
'Error logs for "%(app)s"': '"%(app)s" 的错误日志',
'Exception instance attributes': 'Exception instance attributes',
'First name': '姓',
'Functions with no doctests will result in [passed] tests.': '',
'Group ID': '组ID',
'Hello World': '道可道,非常道;名可名,非常名',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.',
'Import/Export': '导入/导出',
'Installed applications': '已安装的应用',
'Internal State': '内部状态',
'Invalid Query': '无效查询',
'Invalid action': '无效动作',
'Invalid email': '无效的email',
'Language files (static strings) updated': '语言文件(静态部分)已更新',
'Languages': '语言',
'Last name': '名',
'Last saved on:': '最后保存于:',
'License for': '许可证',
'Login': '登录',
'Login to the Administrative Interface': '登录到管理员界面',
'Logout': '注销',
'Lost Password': '忘记密码',
'Models': '模型s',
'Modules': '模块s',
'NO': '不',
'Name': '姓名',
'New Record': '新记录',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'No databases in this application': '这应用没有数据库',
'Origin': '起源',
'Original/Translation': '原始文件/翻译文件',
'PAM authenticated user, cannot change password here': 'PAM authenticated user, cannot change password here',
'Password': '密码',
'Peeking at file': '选个文件',
'Plugin "%s" in application': 'Plugin "%s" in application',
'Plugins': 'Plugins',
'Powered by': '',
'Query:': '查询',
'Record ID': '记录ID',
'Register': '注册',
'Registration key': '注册密匙',
'Resolve Conflict file': '解决冲突文件',
'Role': '角色',
'Rows in table': '表行',
'Rows selected': '行选择',
'Saved file hash:': '已存文件Hash:',
'Static files': '静态文件',
'Sure you want to delete this object?': '真的要删除这个对象?',
'TM': '',
'Table name': '表名',
'Testing application': '应用测试',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '',
'There are no controllers': '冇控制器',
'There are no models': '冇模型s',
'There are no modules': '冇模块s',
'There are no static files': '冇静态文件',
'There are no translators, only default language is supported': '没有找到相应翻译,只能使用默认语言',
'There are no views': '冇视图',
'This is the %(filename)s template': '这是 %(filename)s 模板',
'Ticket': '传票',
'Timestamp': '时间戳',
'To create a plugin, name a file/folder plugin_[name]': 'To create a plugin, name a file/folder plugin_[name]',
'Unable to check for upgrades': '无法检查是否需要升级',
'Unable to download': '无法下载',
'Unable to download app': '无法下载应用',
'Unable to download app because:': 'Unable to download app because:',
'Unable to download because': 'Unable to download because',
'Update:': '更新:',
'Upload & install packed application': 'Upload & install packed application',
'Upload a package:': 'Upload a package:',
'Upload existing application': '上传已有应用',
'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 an url:': 'Use an url:',
'User ID': '用户ID',
'Version': '版本',
'Views': '视图',
'Welcome to web2py': '欢迎使用web2py',
'YES': '是',
'about': '关于',
'additional code for your application': '给你的应用附加代码',
'admin disabled because no admin password': '管理员需要设定密码,否则无法管理',
'admin disabled because not supported on google app engine': '未支持GAE,无法管理',
'admin disabled because unable to access password file': '需要可以操作密码文件,否则无法进行管理',
'administrative interface': 'administrative interface',
'and rename it (required):': '重命名为 (必须):',
'and rename it:': ' 重命名为:',
'appadmin': '应用管理',
'appadmin is disabled because insecure channel': '应用管理因非法通道失效',
'application "%s" uninstalled': '应用"%s" 已被卸载',
'application compiled': '应用已编译完',
'application is compiled and cannot be designed': '应用已编译完无法设计',
'arguments': 'arguments',
'back': 'back',
'cache': 'cache',
'cache, errors and sessions cleaned': '缓存、错误、sesiones已被清空',
'cannot create file': '无法创建文件',
'cannot upload file "%(filename)s"': '无法上传文件 "%(filename)s"',
'change admin password': 'change admin password',
'check all': '检查所有',
'check for upgrades': 'check for upgrades',
'clean': '清除',
'click here for online examples': '猛击此处,查看在线实例',
'click here for the administrative interface': '猛击此处,进入管理界面',
'click to check for upgrades': '猛击查看是否有升级版本',
'code': 'code',
'compile': '编译',
'compiled application removed': '已编译应用已移走',
'controllers': '控制器',
'create': 'create',
'create file with filename:': '创建文件用这名:',
'create new application:': '创建新应用:',
'created by': '创建自',
'crontab': '定期事务',
'currently running': 'currently running',
'currently saved or': '保存当前的或',
'customize me!': '定制俺!',
'data uploaded': '数据已上传',
'database': '数据库',
'database %s select': '数据库 %s 选择',
'database administration': '数据库管理',
'db': '',
'defines tables': '已定义表',
'delete': '删除',
'delete all checked': '删除所有选择的',
'delete plugin': 'delete plugin',
'deploy': 'deploy',
'design': '设计',
'direction: ltr': 'direction: ltr',
'done!': '搞定!',
'edit': '修改',
'edit controller': '修订控制器',
'edit views:': 'edit views:',
'errors': '错误',
'export as csv file': '导出为CSV文件',
'exposes': '暴露',
'extends': '扩展',
'failed to reload module': '重新加载模块失败',
'failed to reload module because:': 'failed to reload module because:',
'file "%(filename)s" created': '文件 "%(filename)s" 已创建',
'file "%(filename)s" deleted': '文件 "%(filename)s" 已删除',
'file "%(filename)s" uploaded': '文件 "%(filename)s" 已上传',
'file "%(filename)s" was not deleted': '文件 "%(filename)s" 没删除',
'file "%s" of %s restored': '文件"%s" 有关 %s 已重存',
'file changed on disk': '硬盘上的文件已经修改',
'file does not exist': '文件并不存在',
'file saved on %(time)s': '文件保存于 %(time)s',
'file saved on %s': '文件保存在 %s',
'help': '帮助',
'htmledit': 'html编辑',
'includes': '包含',
'insert new': '新插入',
'insert new %s': '新插入 %s',
'install': 'install',
'internal error': '内部错误',
'invalid password': '无效密码',
'invalid request': '无效请求',
'invalid ticket': '无效传票',
'language file "%(filename)s" created/updated': '语言文件 "%(filename)s"被创建/更新',
'languages': '语言',
'languages updated': '语言已被刷新',
'loading...': '载入中...',
'login': '登录',
'logout': '注销',
'merge': '合并',
'models': '模型s',
'modules': '模块s',
'new application "%s" created': '新应用 "%s"已被创建',
'new plugin installed': 'new plugin installed',
'new record inserted': '新记录被插入',
'next 100 rows': '后100行',
'no match': 'no match',
'or import from csv file': '或者,从csv文件导入',
'or provide app url:': 'or provide app url:',
'or provide application url:': '或者,提供应用所在地址链接:',
'overwrite installed app': 'overwrite installed app',
'pack all': '全部打包',
'pack compiled': '包编译完',
'pack plugin': 'pack plugin',
'password changed': 'password changed',
'plugin "%(plugin)s" deleted': 'plugin "%(plugin)s" deleted',
'previous 100 rows': '前100行',
'record': 'record',
'record does not exist': '记录并不存在',
'record id': '记录ID',
'remove compiled': '已移除',
'restore': '重存',
'revert': '恢复',
'save': '保存',
'selected': '已选',
'session expired': '会话过期',
'shell': '',
'site': '总站',
'some files could not be removed': '有些文件无法被移除',
'start wizard': 'start wizard',
'state': '状态',
'static': '静态文件',
'submit': '提交',
'table': '表',
'test': '测试',
'the application logic, each URL path is mapped in one exposed function in the controller': '应用逻辑:每个URL由控制器暴露的函式完成映射',
'the data representation, define database tables and sets': '数据表达式,定义数据库/表',
'the presentations layer, views are also known as templates': '提交层/视图都在模板中可知',
'these files are served without processing, your images go here': '',
'to previous version.': 'to previous version.',
'to previous version.': '退回前一版本',
'translation strings for the application': '应用的翻译字串',
'try': '尝试',
'try something like': '尝试',
'unable to create application "%s"': '无法创建应用 "%s"',
'unable to delete file "%(filename)s"': '无法删除文件 "%(filename)s"',
'unable to delete file plugin "%(plugin)s"': 'unable to delete file plugin "%(plugin)s"',
'unable to parse csv file': '无法生成 cvs',
'unable to uninstall "%s"': '无法卸载 "%s"',
'unable to upgrade because "%s"': 'unable to upgrade because "%s"',
'uncheck all': '反选全部',
'uninstall': '卸载',
'update': '更新',
'update all languages': '更新所有语言',
'upgrade web2py now': 'upgrade web2py now',
'upload application:': '提交已有的应用:',
'upload file:': '提交文件:',
'upload plugin file:': 'upload plugin file:',
'variables': 'variables',
'versioning': '版本',
'view': '视图',
'views': '视图s',
'web2py Recent Tweets': 'twitter上的web2py进展实播',
'web2py is up to date': 'web2py现在已经是最新的版本了',
'web2py upgraded; please restart it': 'web2py upgraded; please restart it',
}
| Python |
# ###########################################################
# ## generate menu
# ###########################################################
_a = request.application
_c = request.controller
_f = request.function
response.title = '%s %s' % (_f, '/'.join(request.args))
response.subtitle = 'admin'
response.menu = [(T('site'), _f == 'site', URL(_a,'default','site'))]
if request.args:
_t = request.args[0]
response.menu.append((T('edit'), _c == 'default' and _f == 'design',
URL(_a,'default','design',args=_t)))
response.menu.append((T('about'), _c == 'default' and _f == 'about',
URL(_a,'default','about',args=_t)))
response.menu.append((T('errors'), _c == 'default' and _f == 'errors',
URL(_a,'default','errors',args=_t)))
response.menu.append((T('versioning'),
_c == 'mercurial' and _f == 'commit',
URL(_a,'mercurial','commit',args=_t)))
if not session.authorized:
response.menu = [(T('login'), True, '')]
else:
response.menu.append((T('logout'), False,
URL(_a,'default',f='logout')))
response.menu.append((T('help'), False, URL('examples','default','index')))
| Python |
response.files.append(URL('static','plugin_multiselect/jquery.dimensions.js'))
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.js'))
response.files.append(URL('static','plugin_multiselect/jquery.multiselect.css'))
response.files.append(URL('static','plugin_multiselect/start.js'))
| Python |
EXPIRATION = 60 * 60 # logout after 60 minutes of inactivity
CHECK_VERSION = True
WEB2PY_URL = 'http://web2py.com'
WEB2PY_VERSION_URL = WEB2PY_URL+'/examples/default/version'
###########################################################################
# Preferences for EditArea
# the user-interface feature that allows you to edit files in your web
# browser.
## Default editor
TEXT_EDITOR = 'edit_area' or 'amy'
### edit_area
# The default font size, measured in 'points'. The value must be an integer > 0
FONT_SIZE = 10
# Displays the editor in full screen mode. The value must be 'true' or 'false'
FULL_SCREEN = 'false'
# Display a check box under the editor to allow the user to switch
# between the editor and a simple
# HTML text area. The value must be 'true' or 'false'
ALLOW_TOGGLE = 'true'
# Replaces tab characters with space characters.
# The value can be 'false' (meaning that tabs are not replaced),
# or an integer > 0 that specifies the number of spaces to replace a tab with.
REPLACE_TAB_BY_SPACES = 4
# Toggle on/off the code editor instead of textarea on startup
DISPLAY = "onload" or "later"
# if demo mode is True then admin works readonly and does not require login
DEMO_MODE = False
# if visible_apps is not empty only listed apps will be accessible
FILTER_APPS = []
# To upload on google app engine this has to point to the proper appengine
# config file
import os
# extract google_appengine_x.x.x.zip to web2py root directory
#GAE_APPCFG = os.path.abspath(os.path.join('appcfg.py'))
# extract google_appengine_x.x.x.zip to applications/admin/private/
GAE_APPCFG = os.path.abspath(os.path.join('/usr/local/bin/appcfg.py'))
# To use web2py as a teaching tool, set MULTI_USER_MODE to True
MULTI_USER_MODE = False
# configurable twitterbox, set to None/False to suppress
TWITTER_HASH = "web2py"
# parameter for downloading LAYOUTS
LAYOUTS_APP = 'http://web2py.com/layouts'
#LAYOUTS_APP = 'http://127.0.0.1:8000/layouts'
# parameter for downloading PLUGINS
PLUGINS_APP = 'http://web2py.com/plugins'
#PLUGINS_APP = 'http://127.0.0.1:8000/plugins'
# set the language
if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] is None):
T.force(request.cookies['adminLanguage'].value)
| Python |
import os, time
from gluon import portalocker
from gluon.admin import apath
from gluon.fileutils import read_file
# ###########################################################
# ## make sure administrator is on localhost or https
# ###########################################################
http_host = request.env.http_host.split(':')[0]
if request.env.web2py_runtime_gae:
session_db = DAL('gae')
session.connect(request, response, db=session_db)
hosts = (http_host, )
if request.env.http_x_forwarded_for or request.is_https:
session.secure()
elif not request.is_local and not DEMO_MODE:
raise HTTP(200, T('Admin is disabled because insecure channel'))
try:
_config = {}
port = int(request.env.server_port or 0)
restricted(read_file(apath('../parameters_%i.py' % port, request)), _config)
if not 'password' in _config or not _config['password']:
raise HTTP(200, T('admin disabled because no admin password'))
except IOError:
import gluon.fileutils
if request.env.web2py_runtime_gae:
if gluon.fileutils.check_credentials(request):
session.authorized = True
session.last_time = time.time()
else:
raise HTTP(200,
T('admin disabled because not supported on google app engine'))
else:
raise HTTP(200, T('admin disabled because unable to access password file'))
def verify_password(password):
session.pam_user = None
if DEMO_MODE:
return True
elif not 'password' in _config:
return False
elif _config['password'].startswith('pam_user:'):
session.pam_user = _config['password'][9:].strip()
import gluon.contrib.pam
return gluon.contrib.pam.authenticate(session.pam_user,password)
else:
return _config['password'] == CRYPT()(password)[0]
# ###########################################################
# ## handle brute-force login attacks
# ###########################################################
deny_file = os.path.join(request.folder, 'private', 'hosts.deny')
allowed_number_of_attempts = 5
expiration_failed_logins = 3600
def read_hosts_deny():
import datetime
hosts = {}
if os.path.exists(deny_file):
hosts = {}
f = open(deny_file, 'r')
portalocker.lock(f, portalocker.LOCK_SH)
for line in f.readlines():
if not line.strip() or line.startswith('#'):
continue
fields = line.strip().split()
if len(fields) > 2:
hosts[fields[0].strip()] = ( # ip
int(fields[1].strip()), # n attemps
int(fields[2].strip()) # last attempts
)
portalocker.unlock(f)
f.close()
return hosts
def write_hosts_deny(denied_hosts):
f = open(deny_file, 'w')
portalocker.lock(f, portalocker.LOCK_EX)
for key, val in denied_hosts.items():
if time.time()-val[1] < expiration_failed_logins:
line = '%s %s %s\n' % (key, val[0], val[1])
f.write(line)
portalocker.unlock(f)
f.close()
def login_record(success=True):
denied_hosts = read_hosts_deny()
val = (0,0)
if success and request.client in denied_hosts:
del denied_hosts[request.client]
elif not success and not request.is_local:
val = denied_hosts.get(request.client,(0,0))
if time.time()-val[1]<expiration_failed_logins \
and val[0] >= allowed_number_of_attempts:
return val[0] # locked out
time.sleep(2**val[0])
val = (val[0]+1,int(time.time()))
denied_hosts[request.client] = val
write_hosts_deny(denied_hosts)
return val[0]
# ###########################################################
# ## session expiration
# ###########################################################
t0 = time.time()
if session.authorized:
if session.last_time and session.last_time < t0 - EXPIRATION:
session.flash = T('session expired')
session.authorized = False
else:
session.last_time = t0
if not session.authorized and not \
(request.controller == 'default' and \
request.function in ('index','user')):
if request.env.query_string:
query_string = '?' + request.env.query_string
else:
query_string = ''
if request.env.web2py_original_uri:
url = request.env.web2py_original_uri
else:
url = request.env.path_info + query_string
redirect(URL(request.application, 'default', 'index', vars=dict(send=url)))
elif session.authorized and \
request.controller == 'default' and \
request.function == 'index':
redirect(URL(request.application, 'default', 'site'))
if request.controller=='appadmin' and DEMO_MODE:
session.flash = 'Appadmin disabled in demo mode'
redirect(URL('default','sites'))
| Python |
# Template helpers
import os
def button(href, label):
return A(SPAN(label),_class='button',_href=href)
def sp_button(href, label):
return A(SPAN(label),_class='button special',_href=href)
def helpicon():
return IMG(_src=URL('static', 'images/help.png'), _alt='help')
def searchbox(elementid):
return TAG[''](LABEL(IMG(_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))
| Python |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
if MULTI_USER_MODE:
db = DAL('sqlite://storage.sqlite') # if not, use SQLite or other DB
from gluon.tools import *
mail = Mail() # mailer
auth = Auth(globals(),db) # authentication/authorization
crud = Crud(globals(),db) # for CRUD helpers using auth
service = Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc
plugins = PluginManager()
mail.settings.server = 'logging' or 'smtp.gmail.com:587' # your SMTP server
mail.settings.sender = 'you@gmail.com' # your email
mail.settings.login = 'username:password' # your credentials or None
auth.settings.hmac_key = '<your secret key>' # before define_tables()
auth.define_tables() # creates all needed tables
auth.settings.mailer = mail # for user email verification
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = True
auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email'
auth.settings.reset_password_requires_verification = True
auth.messages.reset_password = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s to reset your password'
db.define_table('app',Field('name'),Field('owner',db.auth_user))
if not session.authorized and MULTI_USER_MODE:
if auth.user and not request.function=='user':
session.authorized = True
elif not request.function=='user':
redirect(URL('default','user/login'))
def is_manager():
if not MULTI_USER_MODE:
return True
elif auth.user and auth.user.id==1:
return True
else:
return False
| Python |
import time
import os
import sys
import re
import urllib
import cgi
import difflib
import shutil
import stat
import socket
from textwrap import dedent
try:
from mercurial import ui, hg, cmdutil
have_mercurial = True
except ImportError:
have_mercurial = False
from gluon.utils import md5_hash
from gluon.fileutils import listdir, cleanpath, up
from gluon.fileutils import tar, tar_compiled, untar, fix_newlines
from gluon.languages import findT, update_all_languages
from gluon.myregex import *
from gluon.restricted import *
from gluon.compileapp import compile_application, remove_compiled_application
| Python |
from gluon.fileutils import read_file, write_file
if DEMO_MODE or MULTI_USER_MODE:
session.flash = T('disabled in demo mode')
redirect(URL('default','site'))
if not have_mercurial:
session.flash=T("Sorry, could not find mercurial installed")
redirect(URL('default','design',args=request.args(0)))
_hgignore_content = """\
syntax: glob
*~
*.pyc
*.pyo
*.bak
*.bak2
cache/*
private/*
uploads/*
databases/*
sessions/*
errors/*
"""
def hg_repo(path):
import os
uio = ui.ui()
uio.quiet = True
if not os.environ.get('HGUSER') and not uio.config("ui", "username"):
os.environ['HGUSER'] = 'web2py@localhost'
try:
repo = hg.repository(ui=uio, path=path)
except:
repo = hg.repository(ui=uio, path=path, create=True)
hgignore = os.path.join(path, '.hgignore')
if not os.path.exists(hgignore):
write_file(hgignore, _hgignore_content)
return repo
def commit():
app = request.args(0)
path = apath(app, r=request)
repo = hg_repo(path)
form = FORM('Comment:',INPUT(_name='comment',requires=IS_NOT_EMPTY()),
INPUT(_type='submit',_value='Commit'))
if form.accepts(request.vars,session):
oldid = repo[repo.lookup('.')]
cmdutil.addremove(repo)
repo.commit(text=form.vars.comment)
if repo[repo.lookup('.')] == oldid:
response.flash = 'no changes'
try:
files = TABLE(*[TR(file) for file in repo[repo.lookup('.')].files()])
changes = TABLE(TR(TH('revision'),TH('description')))
for change in repo.changelog:
ctx=repo.changectx(change)
revision, description = ctx.rev(), ctx.description()
changes.append(TR(A(revision,_href=URL('revision',
args=(app,revision))),
description))
except:
files = []
changes = []
return dict(form=form,files=files,changes=changes,repo=repo)
def revision():
app = request.args(0)
path = apath(app, r=request)
repo = hg_repo(path)
revision = request.args(1)
ctx=repo.changectx(revision)
form=FORM(INPUT(_type='submit',_value='revert'))
if form.accepts(request.vars):
hg.update(repo, revision)
session.flash = "reverted to revision %s" % ctx.rev()
redirect(URL('default','design',args=app))
return dict(
files=ctx.files(),
rev=str(ctx.rev()),
desc=ctx.description(),
form=form
)
| Python |
# -*- coding: utf-8 -*-
# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################
import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils
# ## critical --- 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.gethostname(),
socket.gethostbyname(http_host),
'::1','127.0.0.1','::ffff:127.0.0.1')
except:
hosts = (http_host, )
if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
in ['https', 'HTTPS']:
session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
raise HTTP(200, T('appadmin is disabled because insecure channel'))
if (request.application=='admin' and not session.authorized) or \
(request.application!='admin' and not gluon.fileutils.check_credentials(request)):
redirect(URL('admin', 'default', 'index'))
ignore_rw = True
response.view = 'appadmin.html'
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
args=[request.application])], [T('db'), False,
URL('index')], [T('state'), False,
URL('state')], [T('cache'), False,
URL('ccache')]]
# ##########################################################
# ## 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('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('index'))
def get_query(request):
try:
return eval_in_global_env(request.vars.query)
except Exception:
return None
def query_by_table_type(tablename,db,request=request):
keyed = hasattr(db[tablename],'_primarykey')
if keyed:
firstkey = db[tablename][db[tablename]._primarykey[0]]
cond = '>0'
if firstkey.type in ['string', 'text']:
cond = '!=""'
qry = '%s.%s.%s%s' % (request.args[0], request.args[1], firstkey.name, cond)
else:
qry = '%s.%s.id>0' % tuple(request.args[:2])
return qry
# ##########################################################
# ## 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,table=db[table])
# ##########################################################
# ## 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<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
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 Exception, e:
response.flash = DIV(T('unable to parse csv file'),PRE(str(e)))
if form.accepts(request.vars, formname=None):
# regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')
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 Exception, e:
(rows, nrows) = ([], 0)
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
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)
keyed = hasattr(db[table],'_primarykey')
record = None
if keyed:
key = [f for f in request.vars if f in db[table]._primarykey]
if key:
record = db(db[table][key[0]] == request.vars[key[0]]).select().first()
else:
record = db(db[table].id == request.args(2)).select().first()
if not record:
qry = query_by_table_type(table, db)
session.flash = T('record does not exist')
redirect(URL('select', args=request.args[:1],
vars=dict(query=qry)))
if keyed:
for k in db[table]._primarykey:
db[table][k].writable=False
form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'),
ignore_rw=ignore_rw and not keyed,
linkto=URL('select',
args=request.args[:1]), upload=URL(r=request,
f='download', args=request.args[:1]))
if form.accepts(request.vars, session):
session.flash = T('done!')
qry = query_by_table_type(table, db)
redirect(URL('select', args=request.args[:1],
vars=dict(query=qry)))
return dict(form=form,table=db[table])
# ##########################################################
# ## get global variables
# ###########################################################
def state():
return dict()
def ccache():
form = FORM(
P(TAG.BUTTON("Clear CACHE?", _type="submit", _name="yes", _value="yes")),
P(TAG.BUTTON("Clear RAM", _type="submit", _name="ram", _value="ram")),
P(TAG.BUTTON("Clear DISK", _type="submit", _name="disk", _value="disk")),
)
if form.accepts(request.vars, session):
clear_ram = False
clear_disk = False
session.flash = ""
if request.vars.yes:
clear_ram = clear_disk = True
if request.vars.ram:
clear_ram = True
if request.vars.disk:
clear_disk = True
if clear_ram:
cache.ram.clear()
session.flash += "Ram Cleared "
if clear_disk:
cache.disk.clear()
session.flash += "Disk Cleared"
redirect(URL(r=request))
try:
from guppy import hpy; hp=hpy()
except ImportError:
hp = False
import shelve, os, copy, time, math
from gluon import portalocker
ram = {
'bytes': 0,
'objects': 0,
'hits': 0,
'misses': 0,
'ratio': 0,
'oldest': time.time()
}
disk = copy.copy(ram)
total = copy.copy(ram)
for key, value in cache.ram.storage.items():
if isinstance(value, dict):
ram['hits'] = value['hit_total'] - value['misses']
ram['misses'] = value['misses']
try:
ram['ratio'] = ram['hits'] * 100 / value['hit_total']
except (KeyError, ZeroDivisionError):
ram['ratio'] = 0
else:
if hp:
ram['bytes'] += hp.iso(value[1]).size
ram['objects'] += hp.iso(value[1]).count
if value[0] < ram['oldest']:
ram['oldest'] = value[0]
locker = open(os.path.join(request.folder,
'cache/cache.lock'), 'a')
portalocker.lock(locker, portalocker.LOCK_EX)
disk_storage = shelve.open(os.path.join(request.folder, 'cache/cache.shelve'))
try:
for key, value in disk_storage.items():
if isinstance(value, dict):
disk['hits'] = value['hit_total'] - value['misses']
disk['misses'] = value['misses']
try:
disk['ratio'] = disk['hits'] * 100 / value['hit_total']
except (KeyError, ZeroDivisionError):
disk['ratio'] = 0
else:
if hp:
disk['bytes'] += hp.iso(value[1]).size
disk['objects'] += hp.iso(value[1]).count
if value[0] < disk['oldest']:
disk['oldest'] = value[0]
finally:
portalocker.unlock(locker)
locker.close()
disk_storage.close()
total['bytes'] = ram['bytes'] + disk['bytes']
total['objects'] = ram['objects'] + disk['objects']
total['hits'] = ram['hits'] + disk['hits']
total['misses'] = ram['misses'] + disk['misses']
try:
total['ratio'] = total['hits'] * 100 / (total['hits'] + total['misses'])
except (KeyError, ZeroDivisionError):
total['ratio'] = 0
if disk['oldest'] < ram['oldest']:
total['oldest'] = disk['oldest']
else:
total['oldest'] = ram['oldest']
def GetInHMS(seconds):
hours = math.floor(seconds / 3600)
seconds -= hours * 3600
minutes = math.floor(seconds / 60)
seconds -= minutes * 60
seconds = math.floor(seconds)
return (hours, minutes, seconds)
ram['oldest'] = GetInHMS(time.time() - ram['oldest'])
disk['oldest'] = GetInHMS(time.time() - disk['oldest'])
total['oldest'] = GetInHMS(time.time() - total['oldest'])
return dict(form=form, total=total,
ram=ram, disk=disk)
| Python |
import sys
import cStringIO
import gluon.contrib.shell
import code, thread
from gluon.shell import env
if DEMO_MODE or MULTI_USER_MODE:
session.flash = T('disabled in demo mode')
redirect(URL('default','site'))
FE=10**9
def index():
app = request.args(0) or 'admin'
reset()
return dict(app=app)
def callback():
app = request.args[0]
command = request.vars.statement
escape = command[:1]!='!'
history = session['history:'+app] = session.get('history:'+app,gluon.contrib.shell.History())
if not escape:
command = command[1:]
if command == '%reset':
reset()
return '*** reset ***'
elif command[0] == '%':
try:
command=session['commands:'+app][int(command[1:])]
except ValueError:
return ''
session['commands:'+app].append(command)
environ=env(app,True)
output = gluon.contrib.shell.run(history,command,environ)
k = len(session['commands:'+app]) - 1
#output = PRE(output)
#return TABLE(TR('In[%i]:'%k,PRE(command)),TR('Out[%i]:'%k,output))
return 'In [%i] : %s%s\n' % (k + 1, command, output)
def reset():
app = request.args(0) or 'admin'
session['commands:'+app] = []
session['history:'+app] = gluon.contrib.shell.History()
return 'done'
| Python |
### this works on linux only
import re
try:
import fcntl
import subprocess
import signal
import os
import shutil
from gluon.fileutils import read_file, write_file
except:
session.flash='sorry, only on Unix systems'
redirect(URL(request.application,'default','site'))
forever=10**8
def kill():
p = cache.ram('gae_upload',lambda:None,forever)
if not p or p.poll()!=None:
return 'oops'
os.kill(p.pid, signal.SIGKILL)
cache.ram('gae_upload',lambda:None,-1)
class EXISTS(object):
def __init__(self, error_message='file not found'):
self.error_message = error_message
def __call__(self, value):
if os.path.exists(value):
return (value,None)
return (value,self.error_message)
def deploy():
regex = re.compile('^\w+$')
apps = sorted(file for file in os.listdir(apath(r=request)) if regex.match(file))
form = SQLFORM.factory(
Field('appcfg',default=GAE_APPCFG,label='Path to appcfg.py',
requires=EXISTS(error_message=T('file not found'))),
Field('google_application_id',requires=IS_ALPHANUMERIC()),
Field('applications','list:string',
requires=IS_IN_SET(apps,multiple=True),
label=T('web2py apps to deploy')),
Field('email',requires=IS_EMAIL(),label=T('GAE Email')),
Field('password','password',requires=IS_NOT_EMPTY(),label=T('GAE Password')))
cmd = output = errors= ""
if form.accepts(request,session):
try:
kill()
except:
pass
ignore_apps = [item for item in apps \
if not item in form.vars.applications]
regex = re.compile('\(applications/\(.*')
yaml = apath('../app.yaml', r=request)
if not os.path.exists(yaml):
example = apath('../app.example.yaml', r=request)
shutil.copyfile(example,yaml)
data = read_file(yaml)
data = re.sub('application:.*','application: %s' % form.vars.google_application_id,data)
data = regex.sub('(applications/(%s)/.*)|' % '|'.join(ignore_apps),data)
write_file(yaml, data)
path = request.env.applications_parent
cmd = '%s --email=%s --passin update %s' % \
(form.vars.appcfg, form.vars.email, path)
p = cache.ram('gae_upload',
lambda s=subprocess,c=cmd:s.Popen(c, shell=True,
stdin=s.PIPE,
stdout=s.PIPE,
stderr=s.PIPE, close_fds=True),-1)
p.stdin.write(form.vars.password+'\n')
fcntl.fcntl(p.stdout.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
fcntl.fcntl(p.stderr.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
return dict(form=form,command=cmd)
def callback():
p = cache.ram('gae_upload',lambda:None,forever)
if not p or p.poll()!=None:
return '<done/>'
try:
output = p.stdout.read()
except:
output=''
try:
errors = p.stderr.read()
except:
errors=''
return (output+errors).replace('\n','<br/>')
| Python |
import os
from gluon.settings import global_settings, read_file
#
def index():
app = request.args(0)
return dict(app=app)
def profiler():
"""
to use the profiler start web2py with -F profiler.log
"""
KEY = 'web2py_profiler_size'
filename = global_settings.cmd_options.profiler_filename
data = 'profiler disabled'
if filename:
if KEY in request.cookies:
size = int(request.cookies[KEY].value)
else:
size = 0
if os.path.exists(filename):
data = read_file('profiler.log','rb')
if size<len(data):
data = data[size:]
else:
size=0
size += len(data)
response.cookies[KEY] = size
return data
| Python |
# coding: utf8
from gluon.admin import *
from gluon.fileutils import abspath, read_file, write_file
from glob import glob
import shutil
import platform
if DEMO_MODE and request.function in ['change_password','pack','pack_plugin','upgrade_web2py','uninstall','cleanup','compile_app','remove_compiled_app','delete','delete_plugin','create_file','upload_file','update_languages','reload_routes']:
session.flash = T('disabled in demo mode')
redirect(URL('site'))
if not is_manager() and request.function in ['change_password','upgrade_web2py']:
session.flash = T('disabled in multi user mode')
redirect(URL('site'))
if FILTER_APPS and request.args(0) and not request.args(0) in FILTER_APPS:
session.flash = T('disabled in demo mode')
redirect(URL('site'))
def safe_open(a,b):
if DEMO_MODE and 'w' in b:
class tmp:
def write(self,data): pass
return tmp()
return open(a,b)
def safe_read(a, b='r'):
safe_file = safe_open(a, b)
try:
return safe_file.read()
finally:
safe_file.close()
def safe_write(a, value, b='w'):
safe_file = safe_open(a, b)
try:
safe_file.write(value)
finally:
safe_file.close()
def get_app(name=None):
app = name or request.args(0)
if app and (not MULTI_USER_MODE or db(db.app.name==app)(db.app.owner==auth.user.id).count()):
return app
session.flash = 'App does not exist or your are not authorized'
redirect(URL('site'))
def index():
""" Index handler """
send = request.vars.send
if DEMO_MODE:
session.authorized = True
session.last_time = t0
if not send:
send = URL('site')
if session.authorized:
redirect(send)
elif request.vars.password:
if verify_password(request.vars.password):
session.authorized = True
login_record(True)
if CHECK_VERSION:
session.check_version = True
else:
session.check_version = False
session.last_time = t0
if isinstance(send, list): # ## why does this happen?
send = str(send[0])
redirect(send)
else:
times_denied = login_record(False)
if times_denied >= allowed_number_of_attempts:
response.flash = \
T('admin disabled because too many invalid login attempts')
elif times_denied == allowed_number_of_attempts - 1:
response.flash = \
T('You have one more login attempt before you are locked out')
else:
response.flash = T('invalid password.')
return dict(send=send)
def check_version():
""" Checks if web2py is up to date """
session.forget()
session._unlock(response)
new_version, version_number = check_new_version(request.env.web2py_version,
WEB2PY_VERSION_URL)
if new_version == -1:
return A(T('Unable to check for upgrades'), _href=WEB2PY_URL)
elif new_version != True:
return A(T('web2py is up to date'), _href=WEB2PY_URL)
elif platform.system().lower() in ('windows','win32','win64') and os.path.exists("web2py.exe"):
return SPAN('You should upgrade to version %s' % version_number)
else:
return sp_button(URL('upgrade_web2py'), T('upgrade now')) \
+ XML(' <strong class="upgrade_version">%s</strong>' % version_number)
def logout():
""" Logout handler """
session.authorized = None
if MULTI_USER_MODE:
redirect(URL('user/logout'))
redirect(URL('index'))
def change_password():
if session.pam_user:
session.flash = T('PAM authenticated user, cannot change password here')
redirect(URL('site'))
form=SQLFORM.factory(Field('current_admin_password','password'),
Field('new_admin_password','password',requires=IS_STRONG()),
Field('new_admin_password_again','password'))
if form.accepts(request.vars):
if not verify_password(request.vars.current_admin_password):
form.errors.current_admin_password = T('invalid password')
elif form.vars.new_admin_password != form.vars.new_admin_password_again:
form.errors.new_admin_password_again = T('no match')
else:
path = abspath('parameters_%s.py' % request.env.server_port)
safe_write(path, 'password="%s"' % CRYPT()(request.vars.new_admin_password)[0])
session.flash = T('password changed')
redirect(URL('site'))
return dict(form=form)
def site():
""" Site handler """
myversion = request.env.web2py_version
# Shortcut to make the elif statements more legible
file_or_appurl = 'file' in request.vars or 'appurl' in request.vars
if DEMO_MODE:
pass
elif request.vars.filename and not 'file' in request.vars:
# create a new application
appname = cleanpath(request.vars.filename).replace('.', '_')
if app_create(appname, request):
if MULTI_USER_MODE:
db.app.insert(name=appname,owner=auth.user.id)
session.flash = T('new application "%s" created', appname)
redirect(URL('design',args=appname))
else:
session.flash = \
T('unable to create application "%s" (it may exist already)', request.vars.filename)
redirect(URL(r=request))
elif file_or_appurl and not request.vars.filename:
# can't do anything without an app name
msg = 'you must specify a name for the uploaded application'
response.flash = T(msg)
elif file_or_appurl and request.vars.filename:
# fetch an application via URL or file upload
f = None
if request.vars.appurl is not '':
try:
f = urllib.urlopen(request.vars.appurl)
except Exception, e:
session.flash = DIV(T('Unable to download app because:'),PRE(str(e)))
redirect(URL(r=request))
fname = request.vars.appurl
elif request.vars.file is not '':
f = request.vars.file.file
fname = request.vars.file.filename
if f:
appname = cleanpath(request.vars.filename).replace('.', '_')
installed = app_install(appname, f, request, fname,
overwrite=request.vars.overwrite_check)
if f and installed:
msg = 'application %(appname)s installed with md5sum: %(digest)s'
session.flash = T(msg, dict(appname=appname,
digest=md5_hash(installed)))
elif f and request.vars.overwrite_check:
msg = 'unable to install application "%(appname)s"'
session.flash = T(msg, dict(appname=request.vars.filename))
else:
msg = 'unable to install application "%(appname)s"'
session.flash = T(msg, dict(appname=request.vars.filename))
redirect(URL(r=request))
regex = re.compile('^\w+$')
if is_manager():
apps = [f for f in os.listdir(apath(r=request)) if regex.match(f)]
else:
apps = [f.name for f in db(db.app.owner==auth.user_id).select()]
if FILTER_APPS:
apps = [f for f in apps if f in FILTER_APPS]
apps = sorted(apps,lambda a,b:cmp(a.upper(),b.upper()))
return dict(app=None, apps=apps, myversion=myversion)
def pack():
app = get_app()
if len(request.args) == 1:
fname = 'web2py.app.%s.w2p' % app
filename = app_pack(app, request)
else:
fname = 'web2py.app.%s.compiled.w2p' % app
filename = app_pack_compiled(app, request)
if filename:
response.headers['Content-Type'] = 'application/w2p'
disposition = 'attachment; filename=%s' % fname
response.headers['Content-Disposition'] = disposition
return safe_read(filename, 'rb')
else:
session.flash = T('internal error')
redirect(URL('site'))
def pack_plugin():
app = get_app()
if len(request.args) == 2:
fname = 'web2py.plugin.%s.w2p' % request.args[1]
filename = plugin_pack(app, request.args[1], request)
if filename:
response.headers['Content-Type'] = 'application/w2p'
disposition = 'attachment; filename=%s' % fname
response.headers['Content-Disposition'] = disposition
return safe_read(filename, 'rb')
else:
session.flash = T('internal error')
redirect(URL('plugin',args=request.args))
def upgrade_web2py():
if 'upgrade' in request.vars:
(success, error) = upgrade(request)
if success:
session.flash = T('web2py upgraded; please restart it')
else:
session.flash = T('unable to upgrade because "%s"', error)
redirect(URL('site'))
elif 'noupgrade' in request.vars:
redirect(URL('site'))
return dict()
def uninstall():
app = get_app()
if 'delete' in request.vars:
if MULTI_USER_MODE:
if is_manager() and db(db.app.name==app).delete():
pass
elif db(db.app.name==app)(db.app.owner==auth.user.id).delete():
pass
else:
session.flash = T('no permission to uninstall "%s"', app)
redirect(URL('site'))
if app_uninstall(app, request):
session.flash = T('application "%s" uninstalled', app)
else:
session.flash = T('unable to uninstall "%s"', app)
redirect(URL('site'))
elif 'nodelete' in request.vars:
redirect(URL('site'))
return dict(app=app)
def cleanup():
app = get_app()
clean = app_cleanup(app, request)
if not clean:
session.flash = T("some files could not be removed")
else:
session.flash = T('cache, errors and sessions cleaned')
redirect(URL('site'))
def compile_app():
app = get_app()
c = app_compile(app, request)
if not c:
session.flash = T('application compiled')
else:
session.flash = DIV(T('Cannot compile: there are errors in your app:'),
CODE(c))
redirect(URL('site'))
def remove_compiled_app():
""" Remove the compiled application """
app = get_app()
remove_compiled_application(apath(app, r=request))
session.flash = T('compiled application removed')
redirect(URL('site'))
def delete():
""" Object delete handler """
app = get_app()
filename = '/'.join(request.args)
sender = request.vars.sender
if isinstance(sender, list): # ## fix a problem with Vista
sender = sender[0]
if 'nodelete' in request.vars:
redirect(URL(sender))
elif 'delete' in request.vars:
try:
os.unlink(apath(filename, r=request))
session.flash = T('file "%(filename)s" deleted',
dict(filename=filename))
except Exception:
session.flash = T('unable to delete file "%(filename)s"',
dict(filename=filename))
redirect(URL(sender))
return dict(filename=filename, sender=sender)
def peek():
""" Visualize object code """
app = get_app()
filename = '/'.join(request.args)
try:
data = safe_read(apath(filename, r=request)).replace('\r','')
except IOError:
session.flash = T('file does not exist')
redirect(URL('site'))
extension = filename[filename.rfind('.') + 1:].lower()
return dict(app=request.args[0],
filename=filename,
data=data,
extension=extension)
def test():
""" Execute controller tests """
app = get_app()
if len(request.args) > 1:
file = request.args[1]
else:
file = '.*\.py'
controllers = listdir(apath('%s/controllers/' % app, r=request), file + '$')
return dict(app=app, controllers=controllers)
def keepalive():
return ''
def search():
keywords=request.vars.keywords or ''
app = get_app()
def match(filename,keywords):
filename=os.path.join(apath(app, r=request),filename)
if keywords in read_file(filename,'rb'):
return True
return False
path = apath(request.args[0], r=request)
files1 = glob(os.path.join(path,'*/*.py'))
files2 = glob(os.path.join(path,'*/*.html'))
files3 = glob(os.path.join(path,'*/*/*.html'))
files=[x[len(path)+1:].replace('\\','/') for x in files1+files2+files3 if match(x,keywords)]
return response.json({'files':files})
def edit():
""" File edit handler """
# Load json only if it is ajax edited...
app = get_app()
filename = '/'.join(request.args)
# Try to discover the file type
if filename[-3:] == '.py':
filetype = 'python'
elif filename[-5:] == '.html':
filetype = 'html'
elif filename[-5:] == '.load':
filetype = 'html'
elif filename[-4:] == '.css':
filetype = 'css'
elif filename[-3:] == '.js':
filetype = 'js'
else:
filetype = 'html'
# ## check if file is not there
path = apath(filename, r=request)
if request.vars.revert and os.path.exists(path + '.bak'):
try:
data = safe_read(path + '.bak')
data1 = safe_read(path)
except IOError:
session.flash = T('Invalid action')
if 'from_ajax' in request.vars:
return response.json({'error': str(T('Invalid action'))})
else:
redirect(URL('site'))
safe_write(path, data)
file_hash = md5_hash(data)
saved_on = time.ctime(os.stat(path)[stat.ST_MTIME])
safe_write(path + '.bak', data1)
response.flash = T('file "%s" of %s restored', (filename, saved_on))
else:
try:
data = safe_read(path)
except IOError:
session.flash = T('Invalid action')
if 'from_ajax' in request.vars:
return response.json({'error': str(T('Invalid action'))})
else:
redirect(URL('site'))
file_hash = md5_hash(data)
saved_on = time.ctime(os.stat(path)[stat.ST_MTIME])
if request.vars.file_hash and request.vars.file_hash != file_hash:
session.flash = T('file changed on disk')
data = request.vars.data.replace('\r\n', '\n').strip() + '\n'
safe_write(path + '.1', data)
if 'from_ajax' in request.vars:
return response.json({'error': str(T('file changed on disk')),
'redirect': URL('resolve',
args=request.args)})
else:
redirect(URL('resolve', args=request.args))
elif request.vars.data:
safe_write(path + '.bak', data)
data = request.vars.data.replace('\r\n', '\n').strip() + '\n'
safe_write(path, data)
file_hash = md5_hash(data)
saved_on = time.ctime(os.stat(path)[stat.ST_MTIME])
response.flash = T('file saved on %s', saved_on)
data_or_revert = (request.vars.data or request.vars.revert)
# Check compile errors
highlight = None
if filetype == 'python' and request.vars.data:
import _ast
try:
code = request.vars.data.rstrip().replace('\r\n','\n')+'\n'
compile(code, path, "exec", _ast.PyCF_ONLY_AST)
except Exception, e:
start = sum([len(line)+1 for l, line
in enumerate(request.vars.data.split("\n"))
if l < e.lineno-1])
if e.text and e.offset:
offset = e.offset - (len(e.text) - len(e.text.splitlines()[-1]))
else:
offset = 0
highlight = {'start': start, 'end': start + offset + 1}
try:
ex_name = e.__class__.__name__
except:
ex_name = 'unknown exception!'
response.flash = DIV(T('failed to compile file because:'), BR(),
B(ex_name), T(' at line %s') % e.lineno,
offset and T(' at char %s') % offset or '',
PRE(str(e)))
if data_or_revert and request.args[1] == 'modules':
# Lets try to reload the modules
try:
mopath = '.'.join(request.args[2:])[:-3]
exec 'import applications.%s.modules.%s' % (request.args[0], mopath)
reload(sys.modules['applications.%s.modules.%s'
% (request.args[0], mopath)])
except Exception, e:
response.flash = DIV(T('failed to reload module because:'),PRE(str(e)))
edit_controller = None
editviewlinks = None
view_link = None
if filetype == 'html' and len(request.args) >= 3:
cfilename = os.path.join(request.args[0], 'controllers',
request.args[2] + '.py')
if os.path.exists(apath(cfilename, r=request)):
edit_controller = URL('edit', args=[cfilename])
view = request.args[3].replace('.html','')
view_link = URL(request.args[0],request.args[2],view)
elif filetype == 'python' and request.args[1] == 'controllers':
## it's a controller file.
## Create links to all of the associated view files.
app = get_app()
viewname = os.path.splitext(request.args[2])[0]
viewpath = os.path.join(app,'views',viewname)
aviewpath = apath(viewpath, r=request)
viewlist = []
if os.path.exists(aviewpath):
if os.path.isdir(aviewpath):
viewlist = glob(os.path.join(aviewpath,'*.html'))
elif os.path.exists(aviewpath+'.html'):
viewlist.append(aviewpath+'.html')
if len(viewlist):
editviewlinks = []
for v in viewlist:
vf = os.path.split(v)[-1]
vargs = "/".join([viewpath.replace(os.sep,"/"),vf])
editviewlinks.append(A(T(vf.split(".")[0]),\
_href=URL('edit',args=[vargs])))
if len(request.args) > 2 and request.args[1] == 'controllers':
controller = (request.args[2])[:-3]
functions = regex_expose.findall(data)
else:
(controller, functions) = (None, None)
if 'from_ajax' in request.vars:
return response.json({'file_hash': file_hash, 'saved_on': saved_on, 'functions':functions, 'controller': controller, 'application': request.args[0], 'highlight': highlight })
else:
editarea_preferences = {}
editarea_preferences['FONT_SIZE'] = '10'
editarea_preferences['FULL_SCREEN'] = 'false'
editarea_preferences['ALLOW_TOGGLE'] = 'true'
editarea_preferences['REPLACE_TAB_BY_SPACES'] = '4'
editarea_preferences['DISPLAY'] = 'onload'
for key in editarea_preferences:
if globals().has_key(key):
editarea_preferences[key]=globals()[key]
return dict(app=request.args[0],
filename=filename,
filetype=filetype,
data=data,
edit_controller=edit_controller,
file_hash=file_hash,
saved_on=saved_on,
controller=controller,
functions=functions,
view_link=view_link,
editarea_preferences=editarea_preferences,
editviewlinks=editviewlinks)
def resolve():
"""
"""
filename = '/'.join(request.args)
# ## check if file is not there
path = apath(filename, r=request)
a = safe_read(path).split('\n')
try:
b = safe_read(path + '.1').split('\n')
except IOError:
session.flash = 'Other file, no longer there'
redirect(URL('edit', args=request.args))
d = difflib.ndiff(a, b)
def leading(line):
""" """
# TODO: we really need to comment this
z = ''
for (k, c) in enumerate(line):
if c == ' ':
z += ' '
elif c == ' \t':
z += ' '
elif k == 0 and c == '?':
pass
else:
break
return XML(z)
def getclass(item):
""" Determine item class """
if item[0] == ' ':
return 'normal'
if item[0] == '+':
return 'plus'
if item[0] == '-':
return 'minus'
if request.vars:
c = ''.join([item[2:] for (i, item) in enumerate(d) if item[0] \
== ' ' or 'line%i' % i in request.vars])
safe_write(path, c)
session.flash = 'files merged'
redirect(URL('edit', args=request.args))
else:
# Making the short circuit compatible with <= python2.4
gen_data = lambda index,item: not item[:1] in ['+','-'] and "" \
or INPUT(_type='checkbox',
_name='line%i' % index,
value=item[0] == '+')
diff = TABLE(*[TR(TD(gen_data(i,item)),
TD(item[0]),
TD(leading(item[2:]),
TT(item[2:].rstrip())), _class=getclass(item))
for (i, item) in enumerate(d) if item[0] != '?'])
return dict(diff=diff, filename=filename)
def edit_language():
""" Edit language file """
app = get_app()
filename = '/'.join(request.args)
from gluon.languages import read_dict, write_dict
strings = read_dict(apath(filename, r=request))
keys = sorted(strings.keys(),lambda x,y: cmp(x.lower(), y.lower()))
rows = []
rows.append(H2(T('Original/Translation')))
for key in keys:
name = md5_hash(key)
if key==strings[key]:
_class='untranslated'
else:
_class='translated'
if len(key) <= 40:
elem = INPUT(_type='text', _name=name,value=strings[key],
_size=70,_class=_class)
else:
elem = TEXTAREA(_name=name, value=strings[key], _cols=70,
_rows=5, _class=_class)
# Making the short circuit compatible with <= python2.4
k = (strings[key] != key) and key or B(key)
rows.append(P(k, BR(), elem, TAG.BUTTON(T('delete'),
_onclick='return delkey("%s")' % name), _id=name))
rows.append(INPUT(_type='submit', _value=T('update')))
form = FORM(*rows)
if form.accepts(request.vars, keepvalues=True):
strs = dict()
for key in keys:
name = md5_hash(key)
if form.vars[name]==chr(127): continue
strs[key] = form.vars[name]
write_dict(apath(filename, r=request), strs)
session.flash = T('file saved on %(time)s', dict(time=time.ctime()))
redirect(URL(r=request,args=request.args))
return dict(app=request.args[0], filename=filename, form=form)
def about():
""" Read about info """
app = get_app()
# ## check if file is not there
about = safe_read(apath('%s/ABOUT' % app, r=request))
license = safe_read(apath('%s/LICENSE' % app, r=request))
return dict(app=app, about=MARKMIN(about), license=MARKMIN(license))
def design():
""" Application design handler """
app = get_app()
if not response.flash and app == request.application:
msg = T('ATTENTION: you cannot edit the running application!')
response.flash = msg
if request.vars.pluginfile!=None and not isinstance(request.vars.pluginfile,str):
filename=os.path.basename(request.vars.pluginfile.filename)
if plugin_install(app, request.vars.pluginfile.file,
request, filename):
session.flash = T('new plugin installed')
redirect(URL('design',args=app))
else:
session.flash = \
T('unable to create application "%s"', request.vars.filename)
redirect(URL(r=request))
elif isinstance(request.vars.pluginfile,str):
session.flash = T('plugin not specified')
redirect(URL(r=request))
# If we have only pyc files it means that
# we cannot design
if os.path.exists(apath('%s/compiled' % app, r=request)):
session.flash = \
T('application is compiled and cannot be designed')
redirect(URL('site'))
# Get all models
models = listdir(apath('%s/models/' % app, r=request), '.*\.py$')
models=[x.replace('\\','/') for x in models]
defines = {}
for m in models:
data = safe_read(apath('%s/models/%s' % (app, m), r=request))
defines[m] = regex_tables.findall(data)
defines[m].sort()
# Get all controllers
controllers = sorted(listdir(apath('%s/controllers/' % app, r=request), '.*\.py$'))
controllers = [x.replace('\\','/') for x in controllers]
functions = {}
for c in controllers:
data = safe_read(apath('%s/controllers/%s' % (app, c), r=request))
items = regex_expose.findall(data)
functions[c] = items
# Get all views
views = sorted(listdir(apath('%s/views/' % app, r=request), '[\w/\-]+\.\w+$'))
views = [x.replace('\\','/') for x in views]
extend = {}
include = {}
for c in views:
data = safe_read(apath('%s/views/%s' % (app, c), r=request))
items = regex_extend.findall(data)
if items:
extend[c] = items[0][1]
items = regex_include.findall(data)
include[c] = [i[1] for i in items]
# Get all modules
modules = listdir(apath('%s/modules/' % app, r=request), '.*\.py$')
modules = modules=[x.replace('\\','/') for x in modules]
modules.sort()
# Get all static files
statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*')
statics = [x.replace('\\','/') for x in statics]
statics.sort()
# Get all languages
languages = listdir(apath('%s/languages/' % app, r=request), '[\w-]*\.py')
#Get crontab
cronfolder = apath('%s/cron' % app, r=request)
if not os.path.exists(cronfolder): os.mkdir(cronfolder)
crontab = apath('%s/cron/crontab' % app, r=request)
if not os.path.exists(crontab):
safe_write(crontab, '#crontab')
plugins=[]
def filter_plugins(items,plugins):
plugins+=[item[7:].split('/')[0].split('.')[0] for item in items if item.startswith('plugin_')]
plugins[:]=list(set(plugins))
plugins.sort()
return [item for item in items if not item.startswith('plugin_')]
return dict(app=app,
models=filter_plugins(models,plugins),
defines=defines,
controllers=filter_plugins(controllers,plugins),
functions=functions,
views=filter_plugins(views,plugins),
modules=filter_plugins(modules,plugins),
extend=extend,
include=include,
statics=filter_plugins(statics,plugins),
languages=languages,
crontab=crontab,
plugins=plugins)
def delete_plugin():
""" Object delete handler """
app=request.args(0)
plugin = request.args(1)
plugin_name='plugin_'+plugin
if 'nodelete' in request.vars:
redirect(URL('design',args=app))
elif 'delete' in request.vars:
try:
for folder in ['models','views','controllers','static','modules']:
path=os.path.join(apath(app,r=request),folder)
for item in os.listdir(path):
if item.startswith(plugin_name):
filename=os.path.join(path,item)
if os.path.isdir(filename):
shutil.rmtree(filename)
else:
os.unlink(filename)
session.flash = T('plugin "%(plugin)s" deleted',
dict(plugin=plugin))
except Exception:
session.flash = T('unable to delete file plugin "%(plugin)s"',
dict(plugin=plugin))
redirect(URL('design',args=request.args(0)))
return dict(plugin=plugin)
def plugin():
""" Application design handler """
app = get_app()
plugin = request.args(1)
if not response.flash and app == request.application:
msg = T('ATTENTION: you cannot edit the running application!')
response.flash = msg
# If we have only pyc files it means that
# we cannot design
if os.path.exists(apath('%s/compiled' % app, r=request)):
session.flash = \
T('application is compiled and cannot be designed')
redirect(URL('site'))
# Get all models
models = listdir(apath('%s/models/' % app, r=request), '.*\.py$')
models=[x.replace('\\','/') for x in models]
defines = {}
for m in models:
data = safe_read(apath('%s/models/%s' % (app, m), r=request))
defines[m] = regex_tables.findall(data)
defines[m].sort()
# Get all controllers
controllers = sorted(listdir(apath('%s/controllers/' % app, r=request), '.*\.py$'))
controllers = [x.replace('\\','/') for x in controllers]
functions = {}
for c in controllers:
data = safe_read(apath('%s/controllers/%s' % (app, c), r=request))
items = regex_expose.findall(data)
functions[c] = items
# Get all views
views = sorted(listdir(apath('%s/views/' % app, r=request), '[\w/\-]+\.\w+$'))
views = [x.replace('\\','/') for x in views]
extend = {}
include = {}
for c in views:
data = safe_read(apath('%s/views/%s' % (app, c), r=request))
items = regex_extend.findall(data)
if items:
extend[c] = items[0][1]
items = regex_include.findall(data)
include[c] = [i[1] for i in items]
# Get all modules
modules = listdir(apath('%s/modules/' % app, r=request), '.*\.py$')
modules = modules=[x.replace('\\','/') for x in modules]
modules.sort()
# Get all static files
statics = listdir(apath('%s/static/' % app, r=request), '[^\.#].*')
statics = [x.replace('\\','/') for x in statics]
statics.sort()
# Get all languages
languages = listdir(apath('%s/languages/' % app, r=request), '[\w-]*\.py')
#Get crontab
crontab = apath('%s/cron/crontab' % app, r=request)
if not os.path.exists(crontab):
safe_write(crontab, '#crontab')
def filter_plugins(items):
regex=re.compile('^plugin_'+plugin+'(/.*|\..*)?$')
return [item for item in items if regex.match(item)]
return dict(app=app,
models=filter_plugins(models),
defines=defines,
controllers=filter_plugins(controllers),
functions=functions,
views=filter_plugins(views),
modules=filter_plugins(modules),
extend=extend,
include=include,
statics=filter_plugins(statics),
languages=languages,
crontab=crontab)
def create_file():
""" Create files handler """
try:
app = get_app(name=request.vars.location.split('/')[0])
path = apath(request.vars.location, r=request)
filename = re.sub('[^\w./-]+', '_', request.vars.filename)
if path[-11:] == '/languages/':
# Handle language files
if len(filename) == 0:
raise SyntaxError
if not filename[-3:] == '.py':
filename += '.py'
app = path.split('/')[-3]
path=os.path.join(apath(app, r=request),'languages',filename)
if not os.path.exists(path):
safe_write(path, '')
findT(apath(app, r=request), filename[:-3])
session.flash = T('language file "%(filename)s" created/updated',
dict(filename=filename))
redirect(request.vars.sender)
elif path[-8:] == '/models/':
# Handle python models
if not filename[-3:] == '.py':
filename += '.py'
if len(filename) == 3:
raise SyntaxError
text = '# coding: utf8\n'
elif path[-13:] == '/controllers/':
# Handle python controllers
if not filename[-3:] == '.py':
filename += '.py'
if len(filename) == 3:
raise SyntaxError
text = '# coding: utf8\n# %s\ndef index(): return dict(message="hello from %s")'
text = text % (T('try something like'), filename)
elif path[-7:] == '/views/':
if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
filename = 'plugin_%s/%s' % (request.vars.plugin, filename)
# Handle template (html) views
if filename.find('.')<0:
filename += '.html'
extension = filename.split('.')[-1].lower()
if len(filename) == 5:
raise SyntaxError
msg = T('This is the %(filename)s template',
dict(filename=filename))
if extension == 'html':
text = dedent("""
{{extend 'layout.html'}}
<h1>%s</h1>
{{=BEAUTIFY(response._vars)}}""" % msg)
else:
generic = os.path.join(path,'generic.'+extension)
if os.path.exists(generic):
text = read_file(generic)
else:
text = ''
elif path[-9:] == '/modules/':
if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
filename = 'plugin_%s/%s' % (request.vars.plugin, filename)
# Handle python module files
if not filename[-3:] == '.py':
filename += '.py'
if len(filename) == 3:
raise SyntaxError
text = dedent("""
#!/usr/bin/env python
# coding: utf8
from gluon import *\n""")
elif path[-8:] == '/static/':
if request.vars.plugin and not filename.startswith('plugin_%s/' % request.vars.plugin):
filename = 'plugin_%s/%s' % (request.vars.plugin, filename)
text = ''
else:
redirect(request.vars.sender)
full_filename = os.path.join(path, filename)
dirpath = os.path.dirname(full_filename)
if not os.path.exists(dirpath):
os.makedirs(dirpath)
if os.path.exists(full_filename):
raise SyntaxError
safe_write(full_filename, text)
session.flash = T('file "%(filename)s" created',
dict(filename=full_filename[len(path):]))
redirect(URL('edit',
args=[os.path.join(request.vars.location, filename)]))
except Exception, e:
if not isinstance(e,HTTP):
session.flash = T('cannot create file')
redirect(request.vars.sender)
def upload_file():
""" File uploading handler """
try:
filename = None
app = get_app(name=request.vars.location.split('/')[0])
path = apath(request.vars.location, r=request)
if request.vars.filename:
filename = re.sub('[^\w\./]+', '_', request.vars.filename)
else:
filename = os.path.split(request.vars.file.filename)[-1]
if path[-8:] == '/models/' and not filename[-3:] == '.py':
filename += '.py'
if path[-9:] == '/modules/' and not filename[-3:] == '.py':
filename += '.py'
if path[-13:] == '/controllers/' and not filename[-3:] == '.py':
filename += '.py'
if path[-7:] == '/views/' and not filename[-5:] == '.html':
filename += '.html'
if path[-11:] == '/languages/' and not filename[-3:] == '.py':
filename += '.py'
filename = os.path.join(path, filename)
dirpath = os.path.dirname(filename)
if not os.path.exists(dirpath):
os.makedirs(dirpath)
safe_write(filename, request.vars.file.file.read(), 'wb')
session.flash = T('file "%(filename)s" uploaded',
dict(filename=filename[len(path):]))
except Exception:
if filename:
d = dict(filename = filename[len(path):])
else:
d = dict(filename = 'unkown')
session.flash = T('cannot upload file "%(filename)s"', d)
redirect(request.vars.sender)
def errors():
""" Error handler """
import operator
import os
import pickle
import hashlib
app = get_app()
method = request.args(1) or 'new'
if method == 'new':
errors_path = apath('%s/errors' % app, r=request)
delete_hashes = []
for item in request.vars:
if item[:7] == 'delete_':
delete_hashes.append(item[7:])
hash2error = dict()
for fn in listdir(errors_path, '^\w.*'):
fullpath = os.path.join(errors_path, fn)
if not os.path.isfile(fullpath): continue
try:
fullpath_file = open(fullpath, 'r')
try:
error = pickle.load(fullpath_file)
finally:
fullpath_file.close()
except IOError:
continue
hash = hashlib.md5(error['traceback']).hexdigest()
if hash in delete_hashes:
os.unlink(fullpath)
else:
try:
hash2error[hash]['count'] += 1
except KeyError:
error_lines = error['traceback'].split("\n")
last_line = error_lines[-2]
error_causer = os.path.split(error['layer'])[1]
hash2error[hash] = dict(count=1, pickel=error,
causer=error_causer,
last_line=last_line,
hash=hash,ticket=fn)
decorated = [(x['count'], x) for x in hash2error.values()]
decorated.sort(key=operator.itemgetter(0), reverse=True)
return dict(errors = [x[1] for x in decorated], app=app, method=method)
else:
for item in request.vars:
if item[:7] == 'delete_':
os.unlink(apath('%s/errors/%s' % (app, item[7:]), r=request))
func = lambda p: os.stat(apath('%s/errors/%s' % \
(app, p), r=request)).st_mtime
tickets = sorted(listdir(apath('%s/errors/' % app, r=request), '^\w.*'),
key=func,
reverse=True)
return dict(app=app, tickets=tickets, method=method)
def make_link(path):
""" Create a link from a path """
tryFile = path.replace('\\', '/')
if os.path.isabs(tryFile) and os.path.isfile(tryFile):
(folder, filename) = os.path.split(tryFile)
(base, ext) = os.path.splitext(filename)
app = get_app()
editable = {'controllers': '.py', 'models': '.py', 'views': '.html'}
for key in editable.keys():
check_extension = folder.endswith("%s/%s" % (app,key))
if ext.lower() == editable[key] and check_extension:
return A('"' + tryFile + '"',
_href=URL(r=request,
f='edit/%s/%s/%s' % (app, key, filename))).xml()
return ''
def make_links(traceback):
""" Make links using the given traceback """
lwords = traceback.split('"')
# Making the short circuit compatible with <= python2.4
result = (len(lwords) != 0) and lwords[0] or ''
i = 1
while i < len(lwords):
link = make_link(lwords[i])
if link == '':
result += '"' + lwords[i]
else:
result += link
if i + 1 < len(lwords):
result += lwords[i + 1]
i = i + 1
i = i + 1
return result
class TRACEBACK(object):
""" Generate the traceback """
def __init__(self, text):
""" TRACEBACK constructor """
self.s = make_links(CODE(text).xml())
def xml(self):
""" Returns the xml """
return self.s
def ticket():
""" Ticket handler """
if len(request.args) != 2:
session.flash = T('invalid ticket')
redirect(URL('site'))
app = get_app()
myversion = request.env.web2py_version
ticket = request.args[1]
e = RestrictedError()
e.load(request, app, ticket)
return dict(app=app,
ticket=ticket,
output=e.output,
traceback=(e.traceback and TRACEBACK(e.traceback)),
snapshot=e.snapshot,
code=e.code,
layer=e.layer,
myversion=myversion)
def error():
""" Generate a ticket (for testing) """
raise RuntimeError('admin ticket generator at your service')
def update_languages():
""" Update available languages """
app = get_app()
update_all_languages(apath(app, r=request))
session.flash = T('Language files (static strings) updated')
redirect(URL('design',args=app))
def twitter():
session.forget()
session._unlock(response)
import gluon.tools
import gluon.contrib.simplejson as sj
try:
if TWITTER_HASH:
page = gluon.tools.fetch('http://twitter.com/%s?format=json'%TWITTER_HASH)
return sj.loads(page)['#timeline']
else:
return 'disabled'
except Exception, e:
return DIV(T('Unable to download because:'),BR(),str(e))
def user():
if MULTI_USER_MODE:
if not db(db.auth_user).count():
auth.settings.registration_requires_approval = False
return dict(form=auth())
else:
return dict(form=T("Disabled"))
def reload_routes():
""" Reload routes.py """
gluon.rewrite.load()
redirect(URL('site'))
| Python |
# -*- coding: utf-8 -*-
import os, uuid, re, pickle, urllib, glob
from gluon.admin import app_create, plugin_install
from gluon.fileutils import abspath, read_file, write_file
def reset(session):
session.app={
'name':'',
'params':[('title','My New App'),
('subtitle','powered by web2py'),
('author','you'),
('author_email','you@example.com'),
('keywords',''),
('description',''),
('layout_theme','Default'),
('database_uri','sqlite://storage.sqlite'),
('security_key',str(uuid.uuid4())),
('email_server','localhost'),
('email_sender','you@example.com'),
('email_login',''),
('login_method','local'),
('login_config',''),
('plugins',[])],
'tables':['auth_user'],
'table_auth_user':['username','first_name','last_name','email','password'],
'pages':['index','error'],
'page_index':'# Welcome to my new app',
'page_error':'# Error: the document does not exist',
}
if not session.app: reset(session)
def listify(x):
if not isinstance(x,(list,tuple)):
return x and [x] or []
return x
def clean(name):
return re.sub('\W+','_',name.strip().lower())
def index():
response.view='wizard/step.html'
reset(session)
apps=os.listdir(os.path.join(request.folder,'..'))
form=SQLFORM.factory(Field('name',requires=[IS_NOT_EMPTY(),IS_ALPHANUMERIC()]))
if form.accepts(request.vars):
app = form.vars.name
session.app['name'] = app
if MULTI_USER_MODE and db(db.app.name==app)(db.app.owner!=auth.user.id).count():
session.flash = 'App belongs already to other user'
elif app in apps:
meta = os.path.normpath(\
os.path.join(os.path.normpath(request.folder),
'..',app,'wizard.metadata'))
if os.path.exists(meta):
try:
metafile = open(meta,'rb')
try:
session.app = pickle.load(metafile)
finally:
metafile.close()
session.flash = "The app exists, was created by wizard, continue to overwrite!"
except:
session.flash = "The app exists, was NOT created by wizard, continue to overwrite!"
redirect(URL('step1'))
return dict(step='Start',form=form)
def step1():
from gluon.contrib.simplejson import loads
import urllib
if not session.themes:
url=LAYOUTS_APP+'/default/layouts.json'
try:
data = urllib.urlopen(url).read()
session.themes = ['Default'] + loads(data)['layouts']
except:
session.themes = ['Default']
themes = session.themes
if not session.plugins:
url = PLUGINS_APP+'/default/plugins.json'
try:
data = urllib.urlopen(url).read()
session.plugins = loads(data)['plugins']
except:
session.plugins = []
plugins = [x.split('.')[2] for x in session.plugins]
response.view='wizard/step.html'
params = dict(session.app['params'])
form=SQLFORM.factory(
Field('title',default=params.get('title',None),
requires=IS_NOT_EMPTY()),
Field('subtitle',default=params.get('subtitle',None)),
Field('author',default=params.get('author',None)),
Field('author_email',default=params.get('author_email',None)),
Field('keywords',default=params.get('keywords',None)),
Field('description','text',
default=params.get('description',None)),
Field('layout_theme',requires=IS_IN_SET(themes),
default=params.get('layout_theme',themes[0])),
Field('database_uri',default=params.get('database_uri',None)),
Field('security_key',default=params.get('security_key',None)),
Field('email_server',default=params.get('email_server',None)),
Field('email_sender',default=params.get('email_sender',None)),
Field('email_login',default=params.get('email_login',None)),
Field('login_method',requires=IS_IN_SET(('local','janrain')),
default=params.get('login_method','local')),
Field('login_config',default=params.get('login_config',None)),
Field('plugins','list:string',requires=IS_IN_SET(plugins,multiple=True)))
if form.accepts(request.vars):
session.app['params']=[(key,form.vars.get(key,None))
for key,value in session.app['params']]
redirect(URL('step2'))
return dict(step='1: Setting Parameters',form=form)
def step2():
response.view='wizard/step.html'
form=SQLFORM.factory(Field('table_names','list:string',
default=session.app['tables']))
if form.accepts(request.vars):
table_names = [clean(t) for t in listify(form.vars.table_names) if t.strip()]
if [t for t in table_names if t.startswith('auth_') and not t=='auth_user']:
form.error.table_names = T('invalid table names (auth_* tables already defined)')
else:
session.app['tables']=table_names
for table in session.app['tables']:
if not 'table_'+table in session.app:
session.app['table_'+table]=['name']
if not table=='auth_user':
for key in ['create','read','update','select','search']:
name = table+'_'+key
if not name in session.app['pages']:
session.app['pages'].append(name)
session.app['page_'+name]='## %s %s' % (key.capitalize(),table)
if session.app['tables']:
redirect(URL('step3',args=0))
else:
redirect(URL('step4'))
return dict(step='2: Tables',form=form)
def step3():
response.view='wizard/step.html'
n=int(request.args(0) or 0)
m=len(session.app['tables'])
if n>=m: redirect(URL('step2'))
table=session.app['tables'][n]
form=SQLFORM.factory(Field('field_names','list:string',
default=session.app.get('table_'+table,[])))
if form.accepts(request.vars) and form.vars.field_names:
fields=listify(form.vars.field_names)
if table=='auth_user':
for field in ['first_name','last_name','username','email','password']:
if not field in fields:
fields.append(field)
session.app['table_'+table]=[t.strip().lower()
for t in listify(form.vars.field_names)
if t.strip()]
try:
tables=sort_tables(session.app['tables'])
except RuntimeError:
response.flash=T('invalid circual reference')
else:
if n<m-1:
redirect(URL('step3',args=n+1))
else:
redirect(URL('step4'))
return dict(step='3: Fields for table "%s" (%s of %s)' % (table,n+1,m),table=table,form=form)
def step4():
response.view='wizard/step.html'
form=SQLFORM.factory(Field('pages','list:string',
default=session.app['pages']))
if form.accepts(request.vars):
session.app['pages']=[clean(t)
for t in listify(form.vars.pages)
if t.strip()]
if session.app['pages']:
redirect(URL('step5',args=0))
else:
redirect(URL('step6'))
return dict(step='4: Pages',form=form)
def step5():
response.view='wizard/step.html'
n=int(request.args(0) or 0)
m=len(session.app['pages'])
if n>=m: redirect(URL('step4'))
page=session.app['pages'][n]
markmin_url='http://web2py.com/examples/static/markmin.html'
form=SQLFORM.factory(Field('content','text',
default=session.app.get('page_'+page,[]),
comment=A('use markmin',_href=markmin_url,_target='_blank')),
formstyle='table2cols')
if form.accepts(request.vars):
session.app['page_'+page]=form.vars.content
if n<m-1:
redirect(URL('step5',args=n+1))
else:
redirect(URL('step6'))
return dict(step='5: View for page "%s" (%s of %s)' % (page,n+1,m),form=form)
def step6():
response.view='wizard/step.html'
params = dict(session.app['params'])
app = session.app['name']
form=SQLFORM.factory(
Field('generate_model','boolean',default=True),
Field('generate_controller','boolean',default=True),
Field('generate_views','boolean',default=True),
Field('generate_menu','boolean',default=True),
Field('apply_layout','boolean',default=True),
Field('erase_database','boolean',default=True),
Field('populate_database','boolean',default=True))
if form.accepts(request.vars):
if DEMO_MODE:
session.flash = T('Application cannot be generated in demo mode')
redirect(URL('index'))
create(form.vars)
session.flash = 'Application %s created' % app
redirect(URL('generated'))
return dict(step='6: Generate app "%s"' % app,form=form)
def generated():
return dict(app=session.app['name'])
def sort_tables(tables):
import re
regex = re.compile('(%s)' % '|'.join(tables))
is_auth_user = 'auth_user' in tables
d={}
for table in tables:
d[table]=[]
for field in session.app['table_%s' % table]:
d[table]+=regex.findall(field)
tables=[]
if is_auth_user:
tables.append('auth_user')
def append(table,trail=[]):
if table in trail:
raise RuntimeError
for t in d[table]: append(t,trail=trail+[table])
if not table in tables: tables.append(table)
for table in d: append(table)
return tables
def make_table(table,fields):
rawtable=table
if table!='auth_user': table='t_'+table
s=''
s+='\n'+'#'*40+'\n'
s+="db.define_table('%s',\n" % table
s+=" Field('id','id',\n"
s+=" represent=lambda id:SPAN(id,' ',A('view',_href=URL('%s_read',args=id)))),\n"%rawtable
first_field='id'
for field in fields:
items=[x.lower() for x in field.split()]
has = {}
keys = []
for key in ['notnull','unique','integer','double','boolean','float',
'boolean', 'date','time','datetime','text','wiki',
'html','file','upload','image','true',
'hidden','readonly','writeonly','multiple',
'notempty','required']:
if key in items[1:]:
keys.append(key)
has[key] = True
tables = session.app['tables']
refs = [t for t in tables if t in items]
items = items[:1] + [x for x in items[1:] if not x in keys and not x in tables]
barename = name = '_'.join(items)
if table[:2]=='t_': name='f_'+name
if first_field=='id': first_field=name
### determine field type
ftype='string'
deftypes={'integer':'integer','double':'double','boolean':'boolean',
'float':'double','bool':'boolean',
'date':'date','time':'time','datetime':'datetime',
'text':'text','file':'upload','image':'upload','upload':'upload',
'wiki':'text', 'html':'text'}
for key,t in deftypes.items():
if key in has:
ftype = t
if refs:
key = refs[0]
if not key=='auth_user': key='t_'+key
if 'multiple' in has:
ftype='list:reference %s' % key
else:
ftype='reference %s' % key
if ftype=='string' and 'multiple' in has:
ftype='list:string'
elif ftype=='integer' and 'multiple' in has:
ftype='list:integer'
elif name=='password':
ftype='password'
s+=" Field('%s', type='%s'" % (name, ftype)
### determine field attributes
if 'notnull' in has or 'notempty' in has or 'required' in has:
s+=', notnull=True'
if 'unique' in has:
s+=', unique=True'
if ftype=='boolean' and 'true' in has:
s+=",\n default=True"
### determine field representation
if 'image' in has:
s+=",\n represent=lambda x: x and IMG(_alt='image',_src=URL('download',args=x), _width='200px') or ''"
elif ftype in ('file','upload'):
s+=",\n represent=lambda x: x and A('download',_href=URL('download',args=x)) or ''"
elif 'wiki' in has:
s+=",\n represent=lambda x: MARKMIN(x)"
s+=",\n comment='WIKI (markmin)'"
elif 'html' in has:
s+=",\n represent=lambda x: XML(x,sanitize=True)"
s+=",\n comment='HTML (sanitized)'"
### determine field access
if name=='password' or 'writeonly' in has:
s+=",\n readable=False"
elif 'hidden' in has:
s+=",\n writable=False, readable=False"
elif 'readonly' in has:
s+=",\n writable=False"
### make up a label
s+=",\n label=T('%s')),\n" % \
' '.join(x.capitalize() for x in barename.split('_'))
if table!='auth_user':
s+=" Field('is_active','boolean',default=True,\n"
s+=" label=T('Active'),writable=False,readable=False),\n"
s+=" Field('created_on','datetime',default=request.now,\n"
s+=" label=T('Created On'),writable=False,readable=False),\n"
s+=" Field('modified_on','datetime',default=request.now,\n"
s+=" label=T('Modified On'),writable=False,readable=False,\n"
s+=" update=request.now),\n"
if not table=='auth_user' and 'auth_user' in session.app['tables']:
s+=" Field('created_by',db.auth_user,default=auth.user_id,\n"
s+=" label=T('Created By'),writable=False,readable=False),\n"
s+=" Field('modified_by',db.auth_user,default=auth.user_id,\n"
s+=" label=T('Modified By'),writable=False,readable=False,\n"
s+=" update=auth.user_id),\n"
elif table=='auth_user':
s+=" Field('registration_key',default='',\n"
s+=" writable=False,readable=False),\n"
s+=" Field('reset_password_key',default='',\n"
s+=" writable=False,readable=False),\n"
s+=" Field('registration_id',default='',\n"
s+=" writable=False,readable=False),\n"
s+=" format='%("+first_field+")s',\n"
s+=" migrate=settings.migrate)\n\n"
if table=='auth_user':
s+="""
db.auth_user.first_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
db.auth_user.last_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
db.auth_user.password.requires = CRYPT(key=auth.settings.hmac_key)
db.auth_user.username.requires = IS_NOT_IN_DB(db, db.auth_user.username)
db.auth_user.registration_id.requires = IS_NOT_IN_DB(db, db.auth_user.registration_id)
db.auth_user.email.requires = (IS_EMAIL(error_message=auth.messages.invalid_email),
IS_NOT_IN_DB(db, db.auth_user.email))
"""
else:
s+="db.define_table('%s_archive',db.%s,Field('current_record','reference %s'))\n" % (table,table,table)
return s
def fix_db(filename):
params = dict(session.app['params'])
content = read_file(filename,'rb')
if 'auth_user' in session.app['tables']:
auth_user = make_table('auth_user',session.app['table_auth_user'])
content = content.replace('sqlite://storage.sqlite',
params['database_uri'])
content = content.replace('auth.define_tables()',\
auth_user+'auth.define_tables(migrate = settings.migrate)')
content += """
mail.settings.server = settings.email_server
mail.settings.sender = settings.email_sender
mail.settings.login = settings.email_login
"""
if params['login_method']=='janrain':
content+="""
from gluon.contrib.login_methods.rpx_account import RPXAccount
auth.settings.actions_disabled=['register','change_password','request_reset_password']
auth.settings.login_form = RPXAccount(request,
api_key = settings.login_config.split(':')[-1],
domain = settings.login_config.split(':')[0],
url = "http://%s/%s/default/user/login" % (request.env.http_host,request.application))
"""
write_file(filename, content, 'wb')
def make_menu(pages):
s="""
response.title = settings.title
response.subtitle = settings.subtitle
response.meta.author = '%s <%s>' % (settings.author, settings.author_email)
response.meta.keywords = settings.keywords
response.meta.description = settings.description
response.menu = [
"""
for page in pages:
if not page.endswith('_read') and \
not page.endswith('_update') and \
not page.endswith('_search') and \
not page.startswith('_') and not page.startswith('error'):
s+=" (T('%s'),URL('default','%s')==URL(),URL('default','%s'),[]),\n" % \
(' '.join(x.capitalize() for x in page.split('_')),page,page)
s+=']'
return s
def make_page(page,contents):
if 'auth_user' in session.app['tables'] and not page in ('index','error'):
s="@auth.requires_login()\ndef %s():\n" % page
else:
s="def %s():\n" % page
items=page.rsplit('_',1)
if items[0] in session.app['tables'] and len(items)==2:
t=items[0]
if items[1]=='read':
s+=" record = db.t_%s(request.args(0)) or redirect(URL('error'))\n" % t
s+=" form=crud.read(db.t_%s,record)\n" % t
s+=" return dict(form=form)\n\n"
elif items[1]=='update':
s+=" record = db.t_%s(request.args(0),is_active=True) or redirect(URL('error'))\n" % t
s+=" form=crud.update(db.t_%s,record,next='%s_read/[id]',\n" % (t,t)
s+=" ondelete=lambda form: redirect(URL('%s_select')),\n" % t
s+=" onaccept=crud.archive)\n"
s+=" return dict(form=form)\n\n"
elif items[1]=='create':
s+=" form=crud.create(db.t_%s,next='%s_read/[id]')\n" % (t,t)
s+=" return dict(form=form)\n\n"
elif items[1]=='select':
s+=" f,v=request.args(0),request.args(1)\n"
s+=" try: query=f and db.t_%s[f]==v or db.t_%s\n" % (t,t)
s+=" except: redirect(URL('error'))\n"
s+=" rows=db(query)(db.t_%s.is_active==True).select()\n" % t
s+=" return dict(rows=rows)\n\n"
elif items[1]=='search':
s+=" form, rows=crud.search(db.t_%s,query=db.t_%s.is_active==True)\n" % (t,t)
s+=" return dict(form=form, rows=rows)\n\n"
else:
t=None
else:
t=None
if not t:
s+=" return dict()\n\n"
return s
def make_view(page,contents):
s="{{extend 'layout.html'}}\n\n"
s+=str(MARKMIN(contents))
items=page.rsplit('_',1)
if items[0] in session.app['tables'] and len(items)==2:
t=items[0]
if items[1]=='read':
s+="\n{{=A(T('edit %s'),_href=URL('%s_update',args=request.args(0)))}}\n<br/>\n"%(t,t)
s+='\n{{=form}}\n'
s+="{{for t,f in db.t_%s._referenced_by:}}{{if not t[-8:]=='_archive':}}" % t
s+="[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,form.record.id)))}}]"
s+='{{pass}}{{pass}}'
elif items[1]=='create':
s+="\n{{=A(T('select %s'),_href=URL('%s_select'))}}\n<br/>\n"%(t,t)
s+='\n{{=form}}\n'
elif items[1]=='update':
s+="\n{{=A(T('show %s'),_href=URL('%s_read',args=request.args(0)))}}\n<br/>\n"%(t,t)
s+='\n{{=form}}\n'
elif items[1]=='select':
s+="\n{{if request.args:}}<h3>{{=T('For %s #%s' % (request.args(0)[2:],request.args(1)))}}</h3>{{pass}}\n"
s+="\n{{=A(T('create new %s'),_href=URL('%s_create'))}}\n<br/>\n"%(t,t)
s+="\n{{=A(T('search %s'),_href=URL('%s_search'))}}\n<br/>\n"%(t,t)
s+="\n{{if rows:}}"
s+="\n {{headers=dict((str(k),k.label) for k in db.t_%s)}}" % t
s+="\n {{=SQLTABLE(rows,headers=headers)}}"
s+="\n{{else:}}"
s+="\n {{=TAG.blockquote(T('No Data'))}}"
s+="\n{{pass}}\n"
elif items[1]=='search':
s+="\n{{=A(T('create new %s'),_href=URL('%s_create'))}}\n<br/>\n"%(t,t)
s+='\n{{=form}}\n'
s+="\n{{if rows:}}"
s+="\n {{headers=dict((str(k),k.label) for k in db.t_%s)}}" % t
s+="\n {{=SQLTABLE(rows,headers=headers)}}"
s+="\n{{else:}}"
s+="\n {{=TAG.blockquote(T('No Data'))}}"
s+="\n{{pass}}\n"
return s
def populate(tables):
s = 'from gluon.contrib.populate import populate\n'
s+= 'if not db(db.auth_user).count():\n'
for table in sort_tables(tables):
t=table=='auth_user' and 'auth_user' or 't_'+table
s+=" populate(db.%s,10)\n" % t
return s
def create(options):
if DEMO_MODE:
session.flash = T('disabled in demo mode')
redirect(URL('step6'))
params = dict(session.app['params'])
app = session.app['name']
if not app_create(app,request,force=True,key=params['security_key']):
session.flash = 'Failure to create application'
redirect(URL('step6'))
### save metadata in newapp/wizard.metadata
try:
meta = os.path.join(request.folder,'..',app,'wizard.metadata')
file=open(meta,'wb')
pickle.dump(session.app,file)
file.close()
except IOError:
session.flash = 'Failure to write wizard metadata'
redirect(URL('step6'))
### apply theme
if options.apply_layout and params['layout_theme']!='Default':
try:
fn = 'web2py.plugin.layout_%s.w2p' % params['layout_theme']
theme = urllib.urlopen(LAYOUTS_APP+'/static/plugin_layouts/plugins/'+fn)
plugin_install(app, theme, request, fn)
except:
session.flash = T("unable to download layout")
### apply plugins
for plugin in params['plugins']:
try:
plugin_name = 'web2py.plugin.'+plugin+'.w2p'
stream = urllib.urlopen(PLUGINS_APP+'/static/'+plugin_name)
plugin_install(app, stream, request, plugin_name)
except Exception, e:
session.flash = T("unable to download plugin: %s" % plugin)
### write configuration file into newapp/models/0.py
model = os.path.join(request.folder,'..',app,'models','0.py')
file = open(model, 'wb')
try:
file.write("from gluon.storage import Storage\n")
file.write("settings = Storage()\n\n")
file.write("settings.migrate = True\n")
for key,value in session.app['params']:
file.write("settings.%s = %s\n" % (key,repr(value)))
finally:
file.close()
### write configuration file into newapp/models/menu.py
if options.generate_menu:
model = os.path.join(request.folder,'..',app,'models','menu.py')
file = open(model,'wb')
try:
file.write(make_menu(session.app['pages']))
finally:
file.close()
### customize the auth_user table
model = os.path.join(request.folder,'..',app,'models','db.py')
fix_db(model)
### create newapp/models/db_wizard.py
if options.generate_model:
model = os.path.join(request.folder,'..',app,'models','db_wizard.py')
file = open(model,'wb')
try:
file.write('### we prepend t_ to tablenames and f_ to fieldnames for disambiguity\n\n')
tables = sort_tables(session.app['tables'])
for table in tables:
if table=='auth_user': continue
file.write(make_table(table,session.app['table_'+table]))
finally:
file.close()
model = os.path.join(request.folder,'..',app,
'models','db_wizard_populate.py')
if os.path.exists(model): os.unlink(model)
if options.populate_database and session.app['tables']:
file = open(model,'wb')
try:
file.write(populate(session.app['tables']))
finally:
file.close()
### create newapp/controllers/default.py
if options.generate_controller:
controller = os.path.join(request.folder,'..',app,'controllers','default.py')
file = open(controller,'wb')
try:
file.write("""# -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call():
session.forget()
return service()
### end requires
""")
for page in session.app['pages']:
file.write(make_page(page,session.app.get('page_'+page,'')))
finally:
file.close()
### create newapp/views/default/*.html
if options.generate_views:
for page in session.app['pages']:
view = os.path.join(request.folder,'..',app,'views','default',page+'.html')
file = open(view,'wb')
try:
file.write(make_view(page,session.app.get('page_'+page,'')))
finally:
file.close()
if options.erase_database:
path = os.path.join(request.folder,'..',app,'databases','*')
for file in glob.glob(path):
os.unlink(file)
| Python |
APP_ID = "139729456078929"
APP_SECRET = '9add4c1095d74c2d05b61c5702d6cf0c'
FAN_PAGE = "https://www.facebook.com/pages/Systemsthoughts-test/240071796045643?sk=%s" % APP_ID
LANDER = '<center><h2>Howdy Like Our Page To Begin!</h2></center>'#fancy graphic to make them like the page
HEADER = '<center><img src="http://img33.imageshack.us/img33/4262/logossa.png"></center>' # header graphic or html can be empty if ya want.
FOOTER = '<center><img src="http://img542.imageshack.us/img542/7862/blanksssss.png"></center>' # footer graphic or html... can be left blank if so please.
INVITE_TITLE = "share your Prize With Your Friends First! (10)" #title on top the app request dialog
INVITE_MESSAGE = "FarmVille Bonus fanpage" # message sent to invite friend.. probably wanna let them know its a fanpage
FORCE_COUNT_NUMBER = 1
FORCE_HEADER = "required" #title of error window if haven't invited enough friend
FORCE_MESSAGE_BEFORE = "You must invite<font color=red>"# message to show before the number
FORCE_MESSAGE_AFTER = "</font> more friends"# message to show after the number
| Python |
# coding: utf8
{
'"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 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\x8f\xe0\xa4\x81',
'%s rows updated': '%s \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\x85\xe0\xa4\xa6\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xa4\xe0\xa4\xa8',
'Available databases and tables': '\xe0\xa4\x89\xe0\xa4\xaa\xe0\xa4\xb2\xe0\xa4\xac\xe0\xa5\x8d\xe0\xa4\xa7 \xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\x94\xe0\xa4\xb0 \xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe',
'Cannot be empty': '\xe0\xa4\x96\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x80 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\xb8\xe0\xa4\x95\xe0\xa4\xa4\xe0\xa4\xbe',
'Change Password': '\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xac\xe0\xa4\xa6\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'Check to delete': '\xe0\xa4\xb9\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x87\xe0\xa4\x82',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7',
'Current response': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe',
'Current session': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb8\xe0\xa5\x87\xe0\xa4\xb6\xe0\xa4\xa8',
'DB Model': 'DB Model',
'Database': 'Database',
'Delete:': '\xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xbe:',
'Edit': 'Edit',
'Edit Profile': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'Edit This App': 'Edit This App',
'Edit current record': '\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82 ',
'Hello World': 'Hello World',
'Hello from MyApp': 'Hello from MyApp',
'Import/Export': '\xe0\xa4\x86\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4 / \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'Index': 'Index',
'Internal State': '\xe0\xa4\x86\xe0\xa4\x82\xe0\xa4\xa4\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa5\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa4\xbf',
'Invalid Query': '\xe0\xa4\x85\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xaf \xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xa8',
'Layout': 'Layout',
'Login': '\xe0\xa4\xb2\xe0\xa5\x89\xe0\xa4\x97 \xe0\xa4\x87\xe0\xa4\xa8',
'Logout': '\xe0\xa4\xb2\xe0\xa5\x89\xe0\xa4\x97 \xe0\xa4\x86\xe0\xa4\x89\xe0\xa4\x9f',
'Lost Password': '\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xb5\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\x96\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe',
'Main Menu': 'Main Menu',
'Menu Model': 'Menu Model',
'New Record': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1',
'No databases in this application': '\xe0\xa4\x87\xe0\xa4\xb8 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x97 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa5\x8b\xe0\xa4\x88 \xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82',
'Powered by': 'Powered by',
'Query:': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xa8:',
'Register': '\xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x9c\xe0\xa5\x80\xe0\xa4\x95\xe0\xa5\x83\xe0\xa4\xa4 (\xe0\xa4\xb0\xe0\xa4\x9c\xe0\xa4\xbf\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xb0) \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa4\xbe ',
'Rows in table': '\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 ',
'Rows selected': '\xe0\xa4\x9a\xe0\xa4\xaf\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xa4 (\xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa5\x87) \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81 ',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': '\xe0\xa4\xb8\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\x9a\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\x86\xe0\xa4\xaa \xe0\xa4\x87\xe0\xa4\xb8 \xe0\xa4\xb5\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa5\x81 \xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xb9\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\x9a\xe0\xa4\xbe\xe0\xa4\xb9\xe0\xa4\xa4\xe0\xa5\x87 \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82?',
'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:': '\xe0\xa4\x85\xe0\xa4\xa6\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xa4\xe0\xa4\xa8 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa4\xbe:',
'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.',
'View': 'View',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': '\xe0\xa4\xb5\xe0\xa5\x87\xe0\xa4\xac\xe0\xa5\xa8\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\x87 (web2py) \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x86\xe0\xa4\xaa\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\x97\xe0\xa4\xa4 \xe0\xa4\xb9\xe0\xa5\x88',
'appadmin is disabled because insecure channel': '\xe0\xa4\x85\xe0\xa4\xaa \xe0\xa4\x86\xe0\xa4\xa1\xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\xa8 (appadmin) \xe0\xa4\x85\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa4\xae \xe0\xa4\xb9\xe0\xa5\x88 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x82\xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\x85\xe0\xa4\xb8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x9a\xe0\xa5\x88\xe0\xa4\xa8\xe0\xa4\xb2',
'cache': 'cache',
'change password': 'change password',
'Online examples': '\xe0\xa4\x91\xe0\xa4\xa8\xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xa8 \xe0\xa4\x89\xe0\xa4\xa6\xe0\xa4\xbe\xe0\xa4\xb9\xe0\xa4\xb0\xe0\xa4\xa3 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xaf\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'Administrative interface': '\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xb6\xe0\xa4\xbe\xe0\xa4\xb8\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x87\xe0\xa4\x82\xe0\xa4\x9f\xe0\xa4\xb0\xe0\xa4\xab\xe0\xa5\x87\xe0\xa4\xb8 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xaf\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\x81 \xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'customize me!': '\xe0\xa4\xae\xe0\xa5\x81\xe0\xa4\x9d\xe0\xa5\x87 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\x95\xe0\xa5\x82\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\xa4 (\xe0\xa4\x95\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\x9c\xe0\xa4\xbc) \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82!',
'data uploaded': '\xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\x9f\xe0\xa4\xbe \xe0\xa4\x85\xe0\xa4\xaa\xe0\xa4\xb2\xe0\xa5\x8b\xe0\xa4\xa1 \xe0\xa4\xb8\xe0\xa4\xae\xe0\xa5\x8d\xe0\xa4\xaa\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa8 ',
'database': '\xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8',
'database %s select': '\xe0\xa4\xa1\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb8 %s \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x80 \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x88',
'db': 'db',
'design': '\xe0\xa4\xb0\xe0\xa4\x9a\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x82',
'done!': '\xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe!',
'edit profile': 'edit profile',
'export as csv file': 'csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb0\xe0\xa5\x82\xe0\xa4\xaa \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'insert new': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'insert new %s': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe %s \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa5\x87\xe0\xa4\x82',
'invalid request': '\xe0\xa4\x85\xe0\xa4\xb5\xe0\xa5\x88\xe0\xa4\xa7 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7',
'login': 'login',
'logout': 'logout',
'new record inserted': '\xe0\xa4\xa8\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xa1\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbe',
'next 100 rows': '\xe0\xa4\x85\xe0\xa4\x97\xe0\xa4\xb2\xe0\xa5\x87 100 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81',
'or import from csv file': '\xe0\xa4\xaf\xe0\xa4\xbe csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xb8\xe0\xa5\x87 \xe0\xa4\x86\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa4',
'previous 100 rows': '\xe0\xa4\xaa\xe0\xa4\xbf\xe0\xa4\x9b\xe0\xa4\xb2\xe0\xa5\x87 100 \xe0\xa4\xaa\xe0\xa4\x82\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x81',
'record': 'record',
'record does not exist': '\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xae\xe0\xa5\x8c\xe0\xa4\x9c\xe0\xa5\x82\xe0\xa4\xa6 \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x80\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x88',
'record id': '\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 \xe0\xa4\xaa\xe0\xa4\xb9\xe0\xa4\x9a\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbe (\xe0\xa4\x86\xe0\xa4\x88\xe0\xa4\xa1\xe0\xa5\x80)',
'register': 'register',
'selected': '\xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x86',
'state': '\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa5\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa4\xbf',
'table': '\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xbe',
'unable to parse csv file': 'csv \xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe\xe0\xa4\x87\xe0\xa4\xb2 \xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xb8 \xe0\xa4\x95\xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x85\xe0\xa4\xb8\xe0\xa4\xae\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa5',
}
| Python |
# coding: utf8
{
'"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',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'DB Model': 'DB Model',
'Database': 'Database',
'Delete:': 'Usu\xc5\x84:',
'Edit': 'Edit',
'Edit Profile': 'Edit Profile',
'Edit This App': 'Edit This App',
'Edit current record': 'Edytuj aktualny rekord',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Index': 'Index',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Layout': 'Layout',
'Login': 'Zaloguj',
'Logout': 'Logout',
'Lost Password': 'Przypomnij has\xc5\x82o',
'Main Menu': 'Main Menu',
'Menu Model': 'Menu Model',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Powered by': 'Powered by',
'Query:': 'Zapytanie:',
'Register': 'Zarejestruj',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Stylesheet': 'Stylesheet',
'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.',
'View': 'View',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Witaj w web2py',
'appadmin is disabled because insecure channel': 'appadmin is disabled because insecure channel',
'cache': 'cache',
'change password': 'change password',
'Online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'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!',
'edit profile': 'edit profile',
'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',
'login': 'login',
'logout': 'logout',
'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': 'record',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'register': 'register',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s filas eliminadas',
'%s rows updated': '%s filas actualizadas',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Hay una nueva versión de web2py disponible',
'A new version of web2py is available: %s': 'Hay una nueva versión de web2py disponible: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENCION: Inicio de sesión requiere una conexión segura (HTTPS) o localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENCION: NO EJECUTE VARIAS PRUEBAS SIMULTANEAMENTE, NO SON THREAD SAFE.',
'ATTENTION: you cannot edit the running application!': 'ATENCION: no puede modificar la aplicación que se ejecuta!',
'About': 'Acerca de',
'About application': 'Acerca de la aplicación',
'Admin is disabled because insecure channel': 'Admin deshabilitado, el canal no es seguro',
'Admin is disabled because unsecure channel': 'Admin deshabilitado, el canal no es seguro',
'Administrator Password:': 'Contraseña del Administrador:',
'Are you sure you want to delete file "%s"?': '¿Está seguro que desea eliminar el archivo "%s"?',
'Are you sure you want to uninstall application "%s"': '¿Está seguro que desea desinstalar la aplicación "%s"',
'Are you sure you want to uninstall application "%s"?': '¿Está seguro que desea desinstalar la aplicación "%s"?',
'Authentication': 'Autenticación',
'Available databases and tables': 'Bases de datos y tablas disponibles',
'Cannot be empty': 'No puede estar vacío',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'No se puede compilar: hay errores en su aplicación. Depure, corrija errores y vuelva a intentarlo.',
'Change Password': 'Cambie Contraseña',
'Check to delete': 'Marque para eliminar',
'Client IP': 'IP del Cliente',
'Controller': 'Controlador',
'Controllers': 'Controladores',
'Copyright': 'Derechos de autor',
'Create new application': 'Cree una nueva aplicación',
'Current request': 'Solicitud en curso',
'Current response': 'Respuesta en curso',
'Current session': 'Sesión en curso',
'DB Model': 'Modelo "db"',
'DESIGN': 'DISEÑO',
'Database': 'Base de datos',
'Date and Time': 'Fecha y Hora',
'Delete': 'Elimine',
'Delete:': 'Elimine:',
'Deploy on Google App Engine': 'Instale en Google App Engine',
'Description': 'Descripción',
'Design for': 'Diseño para',
'E-mail': 'Correo electrónico',
'EDIT': 'EDITAR',
'Edit': 'Editar',
'Edit Profile': 'Editar Perfil',
'Edit This App': 'Edite esta App',
'Edit application': 'Editar aplicación',
'Edit current record': 'Edite el registro actual',
'Editing file': 'Editando archivo',
'Editing file "%s"': 'Editando archivo "%s"',
'Error logs for "%(app)s"': 'Bitácora de errores en "%(app)s"',
'First name': 'Nombre',
'Functions with no doctests will result in [passed] tests.': 'Funciones sin doctests equivalen a pruebas [aceptadas].',
'Group ID': 'ID de Grupo',
'Hello World': 'Hola Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Indice',
'Installed applications': 'Aplicaciones instaladas',
'Internal State': 'Estado Interno',
'Invalid Query': 'Consulta inválida',
'Invalid action': 'Acción inválida',
'Invalid email': 'Correo inválido',
'Language files (static strings) updated': 'Archivos de lenguaje (cadenas estáticas) actualizados',
'Languages': 'Lenguajes',
'Last name': 'Apellido',
'Last saved on:': 'Guardado en:',
'Layout': 'Diseño de página',
'License for': 'Licencia para',
'Login': 'Inicio de sesión',
'Login to the Administrative Interface': 'Inicio de sesión para la Interfaz Administrativa',
'Logout': 'Fin de sesión',
'Lost Password': 'Contraseña perdida',
'Main Menu': 'Menú principal',
'Menu Model': 'Modelo "menu"',
'Models': 'Modelos',
'Modules': 'Módulos',
'NO': 'NO',
'Name': 'Nombre',
'New Record': 'Registro nuevo',
'No databases in this application': 'No hay bases de datos en esta aplicación',
'Origin': 'Origen',
'Original/Translation': 'Original/Traducción',
'Password': 'Contraseña',
'Peeking at file': 'Visualizando archivo',
'Powered by': 'Este sitio usa',
'Query:': 'Consulta:',
'Record ID': 'ID de Registro',
'Register': 'Registrese',
'Registration key': 'Contraseña de Registro',
'Reset Password key': 'Reset Password key',
'Resolve Conflict file': 'archivo Resolución de Conflicto',
'Role': 'Rol',
'Rows in table': 'Filas en la tabla',
'Rows selected': 'Filas seleccionadas',
'Saved file hash:': 'Hash del archivo guardado:',
'Static files': 'Archivos estáticos',
'Stylesheet': 'Hoja de estilo',
'Sure you want to delete this object?': '¿Está seguro que desea eliminar este objeto?',
'Table name': 'Nombre de la tabla',
'Testing application': 'Probando aplicación',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "consulta" es una condición como "db.tabla1.campo1==\'valor\'". Algo como "db.tabla1.campo1==db.tabla2.campo2" resulta en un JOIN SQL.',
'The output of the file is a dictionary that was rendered by the view': 'La salida del archivo es un diccionario escenificado por la vista',
'There are no controllers': 'No hay controladores',
'There are no models': 'No hay modelos',
'There are no modules': 'No hay módulos',
'There are no static files': 'No hay archivos estáticos',
'There are no translators, only default language is supported': 'No hay traductores, sólo el lenguaje por defecto es soportado',
'There are no views': 'No hay vistas',
'This is a copy of the scaffolding application': 'Esta es una copia de la aplicación de andamiaje',
'This is the %(filename)s template': 'Esta es la plantilla %(filename)s',
'Ticket': 'Tiquete',
'Timestamp': 'Timestamp',
'Unable to check for upgrades': 'No es posible verificar la existencia de actualizaciones',
'Unable to download': 'No es posible la descarga',
'Unable to download app': 'No es posible descarga la aplicación',
'Update:': 'Actualice:',
'Upload existing application': 'Suba esta aplicación',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Use (...)&(...) para AND, (...)|(...) para OR, y ~(...) para NOT, para crear consultas más complejas.',
'User ID': 'ID de Usuario',
'View': 'Vista',
'Views': 'Vistas',
'Welcome': 'Welcome',
'Welcome %s': 'Bienvenido %s',
'Welcome to web2py': 'Bienvenido a web2py',
'Which called the function': 'La cual llamó la función',
'YES': 'SI',
'You are successfully running web2py': 'Usted está ejecutando web2py exitosamente',
'You can modify this application and adapt it to your needs': 'Usted puede modificar esta aplicación y adaptarla a sus necesidades',
'You visited the url': 'Usted visitó la url',
'about': 'acerca de',
'additional code for your application': 'código adicional para su aplicación',
'admin disabled because no admin password': ' por falta de contraseña',
'admin disabled because not supported on google app engine': 'admin deshabilitado, no es soportado en GAE',
'admin disabled because unable to access password file': 'admin deshabilitado, imposible acceder al archivo con la contraseña',
'and rename it (required):': 'y renombrela (requerido):',
'and rename it:': ' y renombrelo:',
'appadmin': 'appadmin',
'appadmin is disabled because insecure channel': 'admin deshabilitado, el canal no es seguro',
'application "%s" uninstalled': 'aplicación "%s" desinstalada',
'application compiled': 'aplicación compilada',
'application is compiled and cannot be designed': 'la aplicación está compilada y no puede ser modificada',
'cache': 'cache',
'cache, errors and sessions cleaned': 'cache, errores y sesiones eliminados',
'cannot create file': 'no es posible crear archivo',
'cannot upload file "%(filename)s"': 'no es posible subir archivo "%(filename)s"',
'change password': 'cambie contraseña',
'check all': 'marcar todos',
'clean': 'limpiar',
'Online examples': 'Ejemplos en línea',
'Administrative interface': 'Interfaz administrativa',
'click to check for upgrades': 'haga clic para buscar actualizaciones',
'compile': 'compilar',
'compiled application removed': 'aplicación compilada removida',
'controllers': 'controladores',
'create file with filename:': 'cree archivo con nombre:',
'create new application:': 'nombre de la nueva aplicación:',
'crontab': 'crontab',
'currently saved or': 'actualmente guardado o',
'customize me!': 'Adaptame!',
'data uploaded': 'datos subidos',
'database': 'base de datos',
'database %s select': 'selección en base de datos %s',
'database administration': 'administración base de datos',
'db': 'db',
'defines tables': 'define tablas',
'delete': 'eliminar',
'delete all checked': 'eliminar marcados',
'design': 'modificar',
'Documentation': 'Documentación',
'done!': 'listo!',
'edit': 'editar',
'edit controller': 'editar controlador',
'edit profile': 'editar perfil',
'errors': 'errores',
'export as csv file': 'exportar como archivo CSV',
'exposes': 'expone',
'extends': 'extiende',
'failed to reload module': 'recarga del módulo ha fallado',
'file "%(filename)s" created': 'archivo "%(filename)s" creado',
'file "%(filename)s" deleted': 'archivo "%(filename)s" eliminado',
'file "%(filename)s" uploaded': 'archivo "%(filename)s" subido',
'file "%(filename)s" was not deleted': 'archivo "%(filename)s" no fué eliminado',
'file "%s" of %s restored': 'archivo "%s" de %s restaurado',
'file changed on disk': 'archivo modificado en el disco',
'file does not exist': 'archivo no existe',
'file saved on %(time)s': 'archivo guardado %(time)s',
'file saved on %s': 'archivo guardado %s',
'help': 'ayuda',
'htmledit': 'htmledit',
'includes': 'incluye',
'insert new': 'inserte nuevo',
'insert new %s': 'inserte nuevo %s',
'internal error': 'error interno',
'invalid password': 'contraseña inválida',
'invalid request': 'solicitud inválida',
'invalid ticket': 'tiquete inválido',
'language file "%(filename)s" created/updated': 'archivo de lenguaje "%(filename)s" creado/actualizado',
'languages': 'lenguajes',
'languages updated': 'lenguajes actualizados',
'loading...': 'cargando...',
'located in the file': 'localizada en el archivo',
'login': 'inicio de sesión',
'logout': 'fin de sesión',
'lost password?': '¿olvido la contraseña?',
'merge': 'combinar',
'models': 'modelos',
'modules': 'módulos',
'new application "%s" created': 'nueva aplicación "%s" creada',
'new record inserted': 'nuevo registro insertado',
'next 100 rows': '100 filas siguientes',
'or import from csv file': 'o importar desde archivo CSV',
'or provide application url:': 'o provea URL de la aplicación:',
'pack all': 'empaquetar todo',
'pack compiled': 'empaquete compiladas',
'previous 100 rows': '100 filas anteriores',
'record': 'registro',
'record does not exist': 'el registro no existe',
'record id': 'id de registro',
'register': 'registrese',
'remove compiled': 'eliminar compiladas',
'restore': 'restaurar',
'revert': 'revertir',
'save': 'guardar',
'selected': 'seleccionado(s)',
'session expired': 'sesión expirada',
'shell': 'shell',
'site': 'sitio',
'some files could not be removed': 'algunos archivos no pudieron ser removidos',
'state': 'estado',
'static': 'estáticos',
'table': 'tabla',
'test': 'probar',
'the application logic, each URL path is mapped in one exposed function in the controller': 'la lógica de la aplicación, cada ruta URL se mapea en una función expuesta en el controlador',
'the data representation, define database tables and sets': 'la representación de datos, define tablas y conjuntos de base de datos',
'the presentations layer, views are also known as templates': 'la capa de presentación, las vistas también son llamadas plantillas',
'these files are served without processing, your images go here': 'estos archivos son servidos sin procesar, sus imágenes van aquí',
'to previous version.': 'a la versión previa.',
'translation strings for the application': 'cadenas de caracteres de traducción para la aplicación',
'try': 'intente',
'try something like': 'intente algo como',
'unable to create application "%s"': 'no es posible crear la aplicación "%s"',
'unable to delete file "%(filename)s"': 'no es posible eliminar el archivo "%(filename)s"',
'unable to parse csv file': 'no es posible analizar el archivo CSV',
'unable to uninstall "%s"': 'no es posible instalar "%s"',
'uncheck all': 'desmarcar todos',
'uninstall': 'desinstalar',
'update': 'actualizar',
'update all languages': 'actualizar todos los lenguajes',
'upload application:': 'subir aplicación:',
'upload file:': 'suba archivo:',
'versioning': 'versiones',
'view': 'vista',
'views': 'vistas',
'web2py Recent Tweets': 'Tweets Recientes de web2py',
'web2py is up to date': 'web2py está actualizado',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Check to delete': 'Seleziona per cancellare',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Delete:': 'Cancella:',
'Description': 'Descrizione',
'E-mail': 'E-mail',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit current record': 'Modifica record corrente',
'First name': 'Nome',
'Group ID': 'ID Gruppo',
'Hello World': 'Salve Mondo',
'Hello World in a flash!': 'Salve Mondo in un flash!',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid email': 'Email non valida',
'Last name': 'Cognome',
'Layout': 'Layout',
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Name': 'Nome',
'New Record': 'Nuovo elemento (record)',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Origin': 'Origine',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Record ID': 'Record ID',
'Registration key': 'Chiave di Registazione',
'Reset Password key': 'Resetta chiave Password ',
'Role': 'Ruolo',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'Table name': 'Nome tabella',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'The output of the file is a dictionary that was rendered by the view': 'L\'output del file è un "dictionary" che è stato visualizzato dalla vista',
'This is a copy of the scaffolding application': "Questa è una copia dell'applicazione di base (scaffold)",
'Timestamp': 'Ora (timestamp)',
'Update:': 'Aggiorna:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'User ID': 'ID Utente',
'View': 'Vista',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'Which called the function': 'che ha chiamato la funzione',
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
'You visited the url': "Hai visitato l'URL",
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
'cache': 'cache',
'change password': 'Cambia password',
'Online examples': 'Vedere gli esempi',
'Administrative interface': "Interfaccia amministrativa",
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'Documentation': 'Documentazione',
'done!': 'fatto!',
'edit profile': 'modifica profilo',
'export as csv file': 'esporta come file CSV',
'hello world': 'salve mondo',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'invalid request': 'richiesta non valida',
'located in the file': 'presente nel file',
'login': 'accesso',
'logout': 'uscita',
'lost password?': 'dimenticato la password?',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'not authorized': 'non autorizzato',
'or import from csv file': 'oppure importa da file CSV',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'register': 'registrazione',
'selected': 'selezionato',
'state': 'stato',
'table': 'tabella',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Изменить" - необязательное выражение вида "field1=\'новое значение\'". Результаты операции JOIN нельзя изменить или удалить.',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s строк удалено',
'%s rows updated': '%s строк изменено',
'Available databases and tables': 'Базы данных и таблицы',
'Cannot be empty': 'Пустое значение недопустимо',
'Change Password': 'Смените пароль',
'Check to delete': 'Удалить',
'Check to delete:': 'Удалить:',
'Client IP': 'Client IP',
'Current request': 'Текущий запрос',
'Current response': 'Текущий ответ',
'Current session': 'Текущая сессия',
'Delete:': 'Удалить:',
'Description': 'Описание',
'E-mail': 'E-mail',
'Edit Profile': 'Редактировать профиль',
'Edit current record': 'Редактировать текущую запись',
'First name': 'Имя',
'Group ID': 'Group ID',
'Hello World': 'Заработало!',
'Import/Export': 'Импорт/экспорт',
'Internal State': 'Внутренне состояние',
'Invalid Query': 'Неверный запрос',
'Invalid email': 'Неверный email',
'Invalid login': 'Неверный логин',
'Invalid password': 'Неверный пароль',
'Last name': 'Фамилия',
'Logged in': 'Вход выполнен',
'Logged out': 'Выход выполнен',
'Login': 'Вход',
'Logout': 'Выход',
'Lost Password': 'Забыли пароль?',
'Name': 'Name',
'New Record': 'Новая запись',
'New password': 'Новый пароль',
'No databases in this application': 'В приложении нет баз данных',
'Old password': 'Старый пароль',
'Origin': 'Происхождение',
'Password': 'Пароль',
"Password fields don't match": 'Пароли не совпадают',
'Query:': 'Запрос:',
'Record ID': 'ID записи',
'Register': 'Зарегистрироваться',
'Registration key': 'Ключ регистрации',
'Remember me (for 30 days)': 'Запомнить меня (на 30 дней)',
'Reset Password key': 'Сбросить ключ пароля',
'Role': 'Роль',
'Rows in table': 'Строк в таблице',
'Rows selected': 'Выделено строк',
'Submit': 'Отправить',
'Sure you want to delete this object?': 'Подтвердите удаление объекта',
'Table name': 'Имя таблицы',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"Запрос" - это условие вида "db.table1.field1==\'значение\'". Выражение вида "db.table1.field1==db.table2.field2" формирует SQL JOIN.',
'Timestamp': 'Отметка времени',
'Update:': 'Изменить:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Для построение сложных запросов используйте операторы "И": (...)&(...), "ИЛИ": (...)|(...), "НЕ": ~(...).',
'User %(id)s Logged-in': 'Пользователь %(id)s вошёл',
'User %(id)s Logged-out': 'Пользователь %(id)s вышел',
'User %(id)s Password changed': 'Пользователь %(id)s сменил пароль',
'User %(id)s Profile updated': 'Пользователь %(id)s обновил профиль',
'User %(id)s Registered': 'Пользователь %(id)s зарегистрировался',
'User ID': 'ID пользователя',
'Verify Password': 'Повторите пароль',
'Welcome to web2py': 'Добро пожаловать в web2py',
'Online examples': 'примеры он-лайн',
'Administrative interface': 'административный интерфейс',
'customize me!': 'настройте внешний вид!',
'data uploaded': 'данные загружены',
'database': 'база данных',
'database %s select': 'выбор базы данных %s',
'db': 'БД',
'design': 'дизайн',
'done!': 'готово!',
'export as csv file': 'экспорт в csv-файл',
'insert new': 'добавить',
'insert new %s': 'добавить %s',
'invalid request': 'неверный запрос',
'login': 'вход',
'logout': 'выход',
'new record inserted': 'новая запись добавлена',
'next 100 rows': 'следующие 100 строк',
'or import from csv file': 'или импорт из csv-файла',
'password': 'пароль',
'previous 100 rows': 'предыдущие 100 строк',
'profile': 'профиль',
'record does not exist': 'запись не найдена',
'record id': 'id записи',
'selected': 'выбрано',
'state': 'состояние',
'table': 'таблица',
'unable to parse csv file': 'нечитаемый csv-файл',
}
| Python |
# coding: utf8
{
'"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',
'Authentication': 'Uwierzytelnienie',
'Available databases and tables': 'Dost\xc4\x99pne bazy danych i tabele',
'Cannot be empty': 'Nie mo\xc5\xbce by\xc4\x87 puste',
'Change Password': 'Zmie\xc5\x84 has\xc5\x82o',
'Check to delete': 'Zaznacz aby usun\xc4\x85\xc4\x87',
'Check to delete:': 'Zaznacz aby usun\xc4\x85\xc4\x87:',
'Client IP': 'IP klienta',
'Controller': 'Kontroler',
'Copyright': 'Copyright',
'Current request': 'Aktualne \xc5\xbc\xc4\x85danie',
'Current response': 'Aktualna odpowied\xc5\xba',
'Current session': 'Aktualna sesja',
'DB Model': 'Model bazy danych',
'Database': 'Baza danych',
'Delete:': 'Usu\xc5\x84:',
'Description': 'Opis',
'E-mail': 'Adres e-mail',
'Edit': 'Edycja',
'Edit Profile': 'Edytuj profil',
'Edit This App': 'Edytuj t\xc4\x99 aplikacj\xc4\x99',
'Edit current record': 'Edytuj obecny rekord',
'First name': 'Imi\xc4\x99',
'Function disabled': 'Funkcja wy\xc5\x82\xc4\x85czona',
'Group ID': 'ID grupy',
'Hello World': 'Witaj \xc5\x9awiecie',
'Import/Export': 'Importuj/eksportuj',
'Index': 'Indeks',
'Internal State': 'Stan wewn\xc4\x99trzny',
'Invalid Query': 'B\xc5\x82\xc4\x99dne zapytanie',
'Invalid email': 'B\xc5\x82\xc4\x99dny adres email',
'Last name': 'Nazwisko',
'Layout': 'Uk\xc5\x82ad',
'Login': 'Zaloguj',
'Logout': 'Wyloguj',
'Lost Password': 'Przypomnij has\xc5\x82o',
'Main Menu': 'Menu g\xc5\x82\xc3\xb3wne',
'Menu Model': 'Model menu',
'Name': 'Nazwa',
'New Record': 'Nowy rekord',
'No databases in this application': 'Brak baz danych w tej aplikacji',
'Origin': '\xc5\xb9r\xc3\xb3d\xc5\x82o',
'Password': 'Has\xc5\x82o',
"Password fields don't match": 'Pola has\xc5\x82a nie s\xc4\x85 zgodne ze sob\xc4\x85',
'Powered by': 'Zasilane przez',
'Query:': 'Zapytanie:',
'Record ID': 'ID rekordu',
'Register': 'Zarejestruj',
'Registration key': 'Klucz rejestracji',
'Role': 'Rola',
'Rows in table': 'Wiersze w tabeli',
'Rows selected': 'Wybrane wiersze',
'Stylesheet': 'Arkusz styl\xc3\xb3w',
'Submit': 'Wy\xc5\x9blij',
'Sure you want to delete this object?': 'Czy na pewno chcesz usun\xc4\x85\xc4\x87 ten obiekt?',
'Table name': 'Nazwa tabeli',
'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.',
'Timestamp': 'Znacznik czasu',
'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.',
'User %(id)s Registered': 'U\xc5\xbcytkownik %(id)s zosta\xc5\x82 zarejestrowany',
'User ID': 'ID u\xc5\xbcytkownika',
'Verify Password': 'Potwierd\xc5\xba has\xc5\x82o',
'View': 'Widok',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Witaj w web2py',
'appadmin is disabled because insecure channel': 'administracja aplikacji wy\xc5\x82\xc4\x85czona z powodu braku bezpiecznego po\xc5\x82\xc4\x85czenia',
'cache': 'cache',
'change password': 'change password',
'Online examples': 'Kliknij aby przej\xc5\x9b\xc4\x87 do interaktywnych przyk\xc5\x82ad\xc3\xb3w',
'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!',
'edit profile': 'edit profile',
'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',
'login': 'login',
'logout': 'logout',
'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': 'rekord',
'record does not exist': 'rekord nie istnieje',
'record id': 'id rekordu',
'register': 'register',
'selected': 'wybranych',
'state': 'stan',
'table': 'tabela',
'unable to parse csv file': 'nie mo\xc5\xbcna sparsowa\xc4\x87 pliku csv',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s righe ("record") cancellate',
'%s rows updated': '%s righe ("record") modificate',
'Available databases and tables': 'Database e tabelle disponibili',
'Cannot be empty': 'Non può essere vuoto',
'Check to delete': 'Seleziona per cancellare',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Richiesta (request) corrente',
'Current response': 'Risposta (response) corrente',
'Current session': 'Sessione (session) corrente',
'DB Model': 'Modello di DB',
'Database': 'Database',
'Delete:': 'Cancella:',
'Description': 'Descrizione',
'E-mail': 'E-mail',
'Edit': 'Modifica',
'Edit This App': 'Modifica questa applicazione',
'Edit current record': 'Modifica record corrente',
'First name': 'Nome',
'Group ID': 'ID Gruppo',
'Hello World': 'Salve Mondo',
'Hello World in a flash!': 'Salve Mondo in un flash!',
'Import/Export': 'Importa/Esporta',
'Index': 'Indice',
'Internal State': 'Stato interno',
'Invalid Query': 'Richiesta (query) non valida',
'Invalid email': 'Email non valida',
'Last name': 'Cognome',
'Layout': 'Layout',
'Main Menu': 'Menu principale',
'Menu Model': 'Menu Modelli',
'Name': 'Nome',
'New Record': 'Nuovo elemento (record)',
'No databases in this application': 'Nessun database presente in questa applicazione',
'Origin': 'Origine',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Richiesta (query):',
'Record ID': 'Record ID',
'Registration key': 'Chiave di Registazione',
'Reset Password key': 'Resetta chiave Password ',
'Role': 'Ruolo',
'Rows in table': 'Righe nella tabella',
'Rows selected': 'Righe selezionate',
'Stylesheet': 'Foglio di stile (stylesheet)',
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
'Table name': 'Nome tabella',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La richiesta (query) è una condizione come ad esempio "db.tabella1.campo1==\'valore\'". Una condizione come "db.tabella1.campo1==db.tabella2.campo2" produce un "JOIN" SQL.',
'The output of the file is a dictionary that was rendered by the view': 'L\'output del file è un "dictionary" che è stato visualizzato dalla vista',
'This is a copy of the scaffolding application': "Questa è una copia dell'applicazione di base (scaffold)",
'Timestamp': 'Ora (timestamp)',
'Update:': 'Aggiorna:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
'User ID': 'ID Utente',
'View': 'Vista',
'Welcome %s': 'Benvenuto %s',
'Welcome to web2py': 'Benvenuto su web2py',
'Which called the function': 'che ha chiamato la funzione',
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
'You visited the url': "Hai visitato l'URL",
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
'cache': 'cache',
'change password': 'Cambia password',
'Online examples': 'Vedere gli esempi',
'Administrative interface': "Interfaccia amministrativa",
'customize me!': 'Personalizzami!',
'data uploaded': 'dati caricati',
'database': 'database',
'database %s select': 'database %s select',
'db': 'db',
'design': 'progetta',
'Documentation': 'Documentazione',
'done!': 'fatto!',
'edit profile': 'modifica profilo',
'export as csv file': 'esporta come file CSV',
'hello world': 'salve mondo',
'insert new': 'inserisci nuovo',
'insert new %s': 'inserisci nuovo %s',
'invalid request': 'richiesta non valida',
'located in the file': 'presente nel file',
'login': 'accesso',
'logout': 'uscita',
'lost password?': 'dimenticato la password?',
'new record inserted': 'nuovo record inserito',
'next 100 rows': 'prossime 100 righe',
'not authorized': 'non autorizzato',
'or import from csv file': 'oppure importa da file CSV',
'previous 100 rows': '100 righe precedenti',
'record': 'record',
'record does not exist': 'il record non esiste',
'record id': 'record id',
'register': 'registrazione',
'selected': 'selezionato',
'state': 'stato',
'table': 'tabella',
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s rangées supprimées',
'%s rows updated': '%s rangées mises à jour',
'About': 'À propos',
'Access Control': 'Contrôle d\'accès',
'Ajax Recipes': 'Recettes Ajax',
'Are you sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Authentication': 'Authentification',
'Available databases and tables': 'Bases de données et tables disponibles',
'Buy this book': 'Acheter ce livre',
'Cannot be empty': 'Ne peut pas être vide',
'Check to delete': 'Cliquez pour supprimer',
'Check to delete:': 'Cliquez pour supprimer:',
'Client IP': 'IP client',
'Community': 'Communauté',
'Controller': 'Contrôleur',
'Copyright': 'Copyright',
'Current request': 'Demande actuelle',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'DB Model': 'Modèle DB',
'Database': 'Base de données',
'Delete:': 'Supprimer:',
'Demo': 'Démo',
'Deployment Recipes': 'Recettes de déploiement',
'Description': 'Description',
'Documentation': 'Documentation',
'Download': 'Téléchargement',
'E-mail': 'E-mail',
'Edit': 'Éditer',
'Edit This App': 'Modifier cette application',
'Edit current record': "Modifier l'enregistrement courant",
'Errors': 'Erreurs',
'FAQ': 'FAQ',
'First name': 'Prénom',
'Forms and Validators': 'Formulaires et Validateurs',
'Free Applications': 'Applications gratuites',
'Function disabled': 'Fonction désactivée',
'Group ID': 'Groupe ID',
'Groups': 'Groups',
'Hello World': 'Bonjour le monde',
'Home': 'Accueil',
'Import/Export': 'Importer/Exporter',
'Index': 'Index',
'Internal State': 'État interne',
'Introduction': 'Introduction',
'Invalid Query': 'Requête Invalide',
'Invalid email': 'E-mail invalide',
'Last name': 'Nom',
'Layout': 'Mise en page',
'Layouts': 'Layouts',
'Live chat': 'Chat live',
'Login': 'Connectez-vous',
'Lost Password': 'Mot de passe perdu',
'Main Menu': 'Menu principal',
'Menu Model': 'Menu modèle',
'Name': 'Nom',
'New Record': 'Nouvel enregistrement',
'No databases in this application': "Cette application n'a pas de bases de données",
'Origin': 'Origine',
'Other Recipes': 'Autres recettes',
'Overview': 'Présentation',
'Password': 'Mot de passe',
"Password fields don't match": 'Les mots de passe ne correspondent pas',
'Plugins': 'Plugiciels',
'Powered by': 'Alimenté par',
'Preface': 'Préface',
'Python': 'Python',
'Query:': 'Requête:',
'Quick Examples': 'Examples Rapides',
'Recipes': 'Recettes',
'Record ID': 'ID d\'enregistrement',
'Register': "S'inscrire",
'Registration key': "Clé d'enregistrement",
'Remember me (for 30 days)': 'Se souvenir de moi (pendant 30 jours)',
'Request reset password': 'Demande de réinitialiser le mot clé',
'Reset Password key': 'Réinitialiser le mot clé',
'Resources': 'Ressources',
'Role': 'Rôle',
'Rows in table': 'Lignes du tableau',
'Rows selected': 'Lignes sélectionnées',
'Semantic': 'Sémantique',
'Services': 'Services',
'Stylesheet': 'Feuille de style',
'Submit': 'Soumettre',
'Support': 'Support',
'Sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Table name': 'Nom du tableau',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "query" est une condition comme "db.table1.champ1==\'valeur\'". Quelque chose comme "db.table1.champ1==db.table2.champ2" résulte en un JOIN SQL.',
'The Core': 'Le noyau',
'The Views': 'Les Vues',
'The output of the file is a dictionary that was rendered by the view': 'La sortie de ce fichier est un dictionnaire qui été restitué par la vue',
'This App': 'Cette Appli',
'This is a copy of the scaffolding application': 'Ceci est une copie de l\'application échafaudage',
'Timestamp': 'Horodatage',
'Twitter': 'Twitter',
'Update:': 'Mise à jour:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Employez (...)&(...) pour AND, (...)|(...) pour OR, and ~(...) pour NOT pour construire des requêtes plus complexes.',
'User %(id)s Logged-in': 'Utilisateur %(id)s connecté',
'User %(id)s Registered': 'Utilisateur %(id)s enregistré',
'User ID': 'ID utilisateur',
'User Voice': 'User Voice',
'Verify Password': 'Vérifiez le mot de passe',
'Videos': 'Vidéos',
'View': 'Présentation',
'Web2py': 'Web2py',
'Welcome': 'Bienvenu',
'Welcome %s': 'Bienvenue %s',
'Welcome to web2py': 'Bienvenue à web2py',
'Which called the function': 'Qui a appelé la fonction',
'You are successfully running web2py': 'Vous roulez avec succès web2py',
'You can modify this application and adapt it to your needs': 'Vous pouvez modifier cette application et l\'adapter à vos besoins',
'You visited the url': 'Vous avez visité l\'URL',
'appadmin is disabled because insecure channel': "appadmin est désactivée parce que le canal n'est pas sécurisé",
'cache': 'cache',
'change password': 'changer le mot de passe',
'Online examples': 'Exemples en ligne',
'Administrative interface': "Interface d'administration",
'customize me!': 'personnalisez-moi!',
'data uploaded': 'données téléchargées',
'database': 'base de données',
'database %s select': 'base de données %s select',
'db': 'db',
'design': 'design',
'Documentation': 'Documentation',
'done!': 'fait!',
'edit profile': 'modifier le profil',
'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
'export as csv file': 'exporter sous forme de fichier csv',
'insert new': 'insérer un nouveau',
'insert new %s': 'insérer un nouveau %s',
'invalid request': 'requête invalide',
'located in the file': 'se trouvant dans le fichier',
'login': 'connectez-vous',
'logout': 'déconnectez-vous',
'lost password': 'mot de passe perdu',
'lost password?': 'mot de passe perdu?',
'new record inserted': 'nouvel enregistrement inséré',
'next 100 rows': '100 prochaines lignes',
'or import from csv file': "ou importer d'un fichier CSV",
'previous 100 rows': '100 lignes précédentes',
'record': 'enregistrement',
'record does not exist': "l'archive n'existe pas",
'record id': "id d'enregistrement",
'register': "s'inscrire",
'selected': 'sélectionné',
'state': 'état',
'table': 'tableau',
'unable to parse csv file': "incapable d'analyser le fichier cvs",
'Readme': "Lisez-moi",
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar 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 eliminadas',
'%s rows updated': '%s linhas actualizadas',
'About': 'About',
'Author Reference Auth User': 'Author Reference Auth User',
'Author Reference Auth User.username': 'Author Reference Auth User.username',
'Available databases and tables': 'bases de dados e tabelas disponíveis',
'Cannot be empty': 'não pode ser vazio',
'Category Create': 'Category Create',
'Category Select': 'Category Select',
'Check to delete': 'seleccione para eliminar',
'Comment Create': 'Comment Create',
'Comment Select': 'Comment Select',
'Content': 'Content',
'Controller': 'Controlador',
'Copyright': 'Direitos de cópia',
'Created By': 'Created By',
'Created On': 'Created On',
'Current request': 'pedido currente',
'Current response': 'resposta currente',
'Current session': 'sessão currente',
'DB Model': 'Modelo de BD',
'Database': 'Base de dados',
'Delete:': 'Eliminar:',
'Edit': 'Editar',
'Edit This App': 'Edite esta aplicação',
'Edit current record': 'Edição de registo currente',
'Email': 'Email',
'First Name': 'First Name',
'For %s #%s': 'For %s #%s',
'Hello World': 'Olá Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Índice',
'Internal State': 'Estado interno',
'Invalid Query': 'Consulta Inválida',
'Last Name': 'Last Name',
'Layout': 'Esboço',
'Main Menu': 'Menu Principal',
'Menu Model': 'Menu do Modelo',
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Name': 'Name',
'New Record': 'Novo Registo',
'No Data': 'No Data',
'No databases in this application': 'Não há bases de dados nesta aplicação',
'Password': 'Password',
'Post Create': 'Post Create',
'Post Select': 'Post Select',
'Powered by': 'Suportado por',
'Query:': 'Interrogação:',
'Replyto Reference Post': 'Replyto Reference Post',
'Rows in table': 'Linhas numa tabela',
'Rows selected': 'Linhas seleccionadas',
'Stylesheet': 'Folha de estilo',
'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.': 'A "query" é uma condição do tipo "db.table1.field1==\'value\'". Algo como "db.table1.field1==db.table2.field2" resultaria num SQL JOIN.',
'Title': 'Title',
'Update:': 'Actualização:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Utilize (...)&(...) para AND, (...)|(...) para OR, e ~(...) para NOT para construir interrogações mais complexas.',
'Username': 'Username',
'View': 'Vista',
'Welcome %s': 'Bem-vindo(a) %s',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Bem-vindo(a) ao web2py',
'When': 'When',
'appadmin is disabled because insecure channel': 'appadmin está desactivada pois o canal é inseguro',
'cache': 'cache',
'change password': 'alterar palavra-chave',
'Online examples': 'Exemplos online',
'Administrative interface': 'Painel administrativo',
'create new category': 'create new category',
'create new comment': 'create new comment',
'create new post': 'create new post',
'customize me!': 'Personaliza-me!',
'data uploaded': 'informação enviada',
'database': 'base de dados',
'database %s select': 'selecção de base de dados %s',
'db': 'bd',
'design': 'design',
'done!': 'concluído!',
'edit category': 'edit category',
'edit comment': 'edit comment',
'edit post': 'edit post',
'edit profile': 'Editar perfil',
'export as csv file': 'exportar como ficheiro csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'Pedido Inválido',
'login': 'login',
'logout': 'logout',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importe a partir de ficheiro csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registo',
'record does not exist': 'registo inexistente',
'record id': 'id de registo',
'register': 'register',
'search category': 'search category',
'search comment': 'search comment',
'search post': 'search post',
'select category': 'select category',
'select comment': 'select comment',
'select post': 'select post',
'selected': 'seleccionado(s)',
'show category': 'show category',
'show comment': 'show comment',
'show post': 'show post',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível carregar ficheiro csv',
}
| Python |
# coding: utf8
{
'"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 sorok t\xc3\xb6rl\xc5\x91dtek',
'%s rows updated': '%s sorok friss\xc3\xadt\xc5\x91dtek',
'Available databases and tables': 'El\xc3\xa9rhet\xc5\x91 adatb\xc3\xa1zisok \xc3\xa9s t\xc3\xa1bl\xc3\xa1k',
'Cannot be empty': 'Nem lehet \xc3\xbcres',
'Check to delete': 'T\xc3\xb6rl\xc3\xa9shez v\xc3\xa1laszd ki',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Jelenlegi lek\xc3\xa9rdez\xc3\xa9s',
'Current response': 'Jelenlegi v\xc3\xa1lasz',
'Current session': 'Jelenlegi folyamat',
'DB Model': 'DB Model',
'Database': 'Adatb\xc3\xa1zis',
'Delete:': 'T\xc3\xb6r\xc3\xb6l:',
'Description': 'Description',
'E-mail': 'E-mail',
'Edit': 'Szerkeszt',
'Edit This App': 'Alkalmaz\xc3\xa1st szerkeszt',
'Edit current record': 'Aktu\xc3\xa1lis bejegyz\xc3\xa9s szerkeszt\xc3\xa9se',
'First name': 'First name',
'Group ID': 'Group ID',
'Hello World': 'Hello Vil\xc3\xa1g',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Internal State',
'Invalid Query': 'Hib\xc3\xa1s lek\xc3\xa9rdez\xc3\xa9s',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Szerkezet',
'Main Menu': 'F\xc5\x91men\xc3\xbc',
'Menu Model': 'Men\xc3\xbc model',
'Name': 'Name',
'New Record': '\xc3\x9aj bejegyz\xc3\xa9s',
'No databases in this application': 'Nincs adatb\xc3\xa1zis ebben az alkalmaz\xc3\xa1sban',
'Origin': 'Origin',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Lek\xc3\xa9rdez\xc3\xa9s:',
'Record ID': 'Record ID',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Role': 'Role',
'Rows in table': 'Sorok a t\xc3\xa1bl\xc3\xa1ban',
'Rows selected': 'Kiv\xc3\xa1lasztott sorok',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Biztos t\xc3\xb6rli ezt az objektumot?',
'Table name': 'Table name',
'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.',
'Timestamp': 'Timestamp',
'Update:': 'Friss\xc3\xadt:',
'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.',
'User ID': 'User ID',
'View': 'N\xc3\xa9zet',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Isten hozott a web2py-ban',
'appadmin is disabled because insecure channel': 'az appadmin a biztons\xc3\xa1gtalan csatorna miatt letiltva',
'cache': 'gyors\xc3\xadt\xc3\xb3t\xc3\xa1r',
'change password': 'jelsz\xc3\xb3 megv\xc3\xa1ltoztat\xc3\xa1sa',
'Online examples': 'online p\xc3\xa9ld\xc3\xa1k\xc3\xa9rt kattints ide',
'Administrative interface': 'az adminisztr\xc3\xa1ci\xc3\xb3s fel\xc3\xbclet\xc3\xa9rt kattints ide',
'customize me!': 'v\xc3\xa1ltoztass meg!',
'data uploaded': 'adat felt\xc3\xb6ltve',
'database': 'adatb\xc3\xa1zis',
'database %s select': 'adatb\xc3\xa1zis %s kiv\xc3\xa1laszt\xc3\xa1s',
'db': 'db',
'design': 'design',
'done!': 'k\xc3\xa9sz!',
'edit profile': 'profil szerkeszt\xc3\xa9se',
'export as csv file': 'export\xc3\xa1l csv f\xc3\xa1jlba',
'insert new': '\xc3\xbaj beilleszt\xc3\xa9se',
'insert new %s': '\xc3\xbaj beilleszt\xc3\xa9se %s',
'invalid request': 'hib\xc3\xa1s k\xc3\xa9r\xc3\xa9s',
'login': 'bel\xc3\xa9p',
'logout': 'kil\xc3\xa9p',
'lost password': 'elveszett jelsz\xc3\xb3',
'new record inserted': '\xc3\xbaj bejegyz\xc3\xa9s felv\xc3\xa9ve',
'next 100 rows': 'k\xc3\xb6vetkez\xc5\x91 100 sor',
'or import from csv file': 'vagy bet\xc3\xb6lt\xc3\xa9s csv f\xc3\xa1jlb\xc3\xb3l',
'previous 100 rows': 'el\xc5\x91z\xc5\x91 100 sor',
'record': 'bejegyz\xc3\xa9s',
'record does not exist': 'bejegyz\xc3\xa9s nem l\xc3\xa9tezik',
'record id': 'bejegyz\xc3\xa9s id',
'register': 'regisztr\xc3\xa1ci\xc3\xb3',
'selected': 'kiv\xc3\xa1lasztott',
'state': '\xc3\xa1llapot',
'table': 't\xc3\xa1bla',
'unable to parse csv file': 'nem lehet a csv f\xc3\xa1jlt beolvasni',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de um JOIN',
'%Y-%m-%d': '%d-%m-%Y',
'%Y-%m-%d %H:%M:%S': '%d-%m-%Y %H:%M:%S',
'%s rows deleted': '%s linhas apagadas',
'%s rows updated': '%s linhas atualizadas',
'About': 'About',
'Access Control': 'Access Control',
'Ajax Recipes': 'Ajax Recipes',
'Available databases and tables': 'Bancos de dados e tabelas disponíveis',
'Buy this book': 'Buy this book',
'Cannot be empty': 'Não pode ser vazio',
'Check to delete': 'Marque para apagar',
'Client IP': 'Client IP',
'Community': 'Community',
'Controller': 'Controlador',
'Copyright': 'Copyright',
'Current request': 'Requisição atual',
'Current response': 'Resposta atual',
'Current session': 'Sessão atual',
'DB Model': 'Modelo BD',
'Database': 'Banco de dados',
'Delete:': 'Apagar:',
'Demo': 'Demo',
'Deployment Recipes': 'Deployment Recipes',
'Description': 'Description',
'Documentation': 'Documentation',
'Download': 'Download',
'E-mail': 'E-mail',
'Edit': 'Editar',
'Edit This App': 'Edit This App',
'Edit current record': 'Editar o registro atual',
'Errors': 'Errors',
'FAQ': 'FAQ',
'First name': 'First name',
'Forms and Validators': 'Forms and Validators',
'Free Applications': 'Free Applications',
'Group ID': 'Group ID',
'Groups': 'Groups',
'Hello World': 'Olá Mundo',
'Home': 'Home',
'Import/Export': 'Importar/Exportar',
'Index': 'Início',
'Internal State': 'Estado Interno',
'Introduction': 'Introduction',
'Invalid Query': 'Consulta Inválida',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Layout',
'Layouts': 'Layouts',
'Live chat': 'Live chat',
'Login': 'Autentique-se',
'Lost Password': 'Esqueceu sua senha?',
'Main Menu': 'Menu Principal',
'Menu Model': 'Modelo de Menu',
'Name': 'Name',
'New Record': 'Novo Registro',
'No databases in this application': 'Sem bancos de dados nesta aplicação',
'Origin': 'Origin',
'Other Recipes': 'Other Recipes',
'Overview': 'Overview',
'Password': 'Password',
'Plugins': 'Plugins',
'Powered by': 'Powered by',
'Preface': 'Preface',
'Python': 'Python',
'Query:': 'Consulta:',
'Quick Examples': 'Quick Examples',
'Recipes': 'Recipes',
'Record ID': 'Record ID',
'Register': 'Registre-se',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Resources': 'Resources',
'Role': 'Role',
'Rows in table': 'Linhas na tabela',
'Rows selected': 'Linhas selecionadas',
'Semantic': 'Semantic',
'Services': 'Services',
'Stylesheet': 'Stylesheet',
'Support': 'Support',
'Sure you want to delete this object?': 'Está certo(a) que deseja apagar esse objeto ?',
'Table name': 'Table name',
'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" é uma condição como "db.tabela1.campo1==\'valor\'". Expressões como "db.tabela1.campo1==db.tabela2.campo2" resultam em um JOIN SQL.',
'The Core': 'The Core',
'The Views': 'The Views',
'The output of the file is a dictionary that was rendered by the view': 'The output of the file is a dictionary that was rendered by the view',
'This App': 'This App',
'This is a copy of the scaffolding application': 'This is a copy of the scaffolding application',
'Timestamp': 'Timestamp',
'Twitter': 'Twitter',
'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.',
'User ID': 'User ID',
'User Voice': 'User Voice',
'Videos': 'Videos',
'View': 'Visualização',
'Web2py': 'Web2py',
'Welcome': 'Welcome',
'Welcome %s': 'Vem vindo %s',
'Welcome to web2py': 'Bem vindo ao web2py',
'Which called the function': 'Which called the function',
'You are successfully running web2py': 'You are successfully running web2py',
'You are successfully running web2py.': 'You are successfully running web2py.',
'You can modify this application and adapt it to your needs': 'You can modify this application and adapt it to your needs',
'You visited the url': 'You visited the url',
'appadmin is disabled because insecure channel': 'Administração desativada devido ao canal inseguro',
'cache': 'cache',
'change password': 'modificar senha',
'Online examples': 'Alguns exemplos',
'Administrative interface': 'Interface administrativa',
'customize me!': 'Personalize-me!',
'data uploaded': 'dados enviados',
'database': 'banco de dados',
'database %s select': 'Selecionar banco de dados %s',
'db': 'bd',
'design': 'design',
'Documentation': 'Documentation',
'done!': 'concluído!',
'edit profile': 'editar perfil',
'export as csv file': 'exportar como um arquivo csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'requisição inválida',
'located in the file': 'located in the file',
'login': 'Entrar',
'logout': 'Sair',
'lost password?': 'lost password?',
'new record inserted': 'novo registro inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importar de um arquivo csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registro',
'record does not exist': 'registro não existe',
'record id': 'id do registro',
'register': 'Registre-se',
'selected': 'selecionado',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível analisar arquivo csv',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOIN',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '%s rangées supprimées',
'%s rows updated': '%s rangées mises à jour',
'About': 'À propos',
'Access Control': "Contrôle d'accès",
'Administrative interface': "Interface d'administration",
'Ajax Recipes': 'Recettes Ajax',
'Are you sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Authentication': 'Authentification',
'Available databases and tables': 'Bases de données et tables disponibles',
'Buy this book': 'Acheter ce livre',
'Cannot be empty': 'Ne peut pas être vide',
'Check to delete': 'Cliquez pour supprimer',
'Check to delete:': 'Cliquez pour supprimer:',
'Client IP': 'IP client',
'Community': 'Communauté',
'Controller': 'Contrôleur',
'Copyright': "Droit d'auteur",
'Current request': 'Demande actuelle',
'Current response': 'Réponse actuelle',
'Current session': 'Session en cours',
'DB Model': 'Modèle DB',
'Database': 'Base de données',
'Delete:': 'Supprimer:',
'Demo': 'Démo',
'Deployment Recipes': 'Recettes de déploiement ',
'Description': 'Descriptif',
'Documentation': 'Documentation',
'Download': 'Téléchargement',
'E-mail': 'Courriel',
'Edit': 'Éditer',
'Edit This App': 'Modifier cette application',
'Edit current record': "Modifier l'enregistrement courant",
'Errors': 'Erreurs',
'FAQ': 'faq',
'First name': 'Prénom',
'Forms and Validators': 'Formulaires et Validateurs',
'Free Applications': 'Applications gratuites',
'Function disabled': 'Fonction désactivée',
'Group %(group_id)s created': '%(group_id)s groupe créé',
'Group ID': 'Groupe ID',
'Group uniquely assigned to user %(id)s': "Groupe unique attribué à l'utilisateur %(id)s",
'Groups': 'Groupes',
'Hello World': 'Bonjour le monde',
'Home': 'Accueil',
'Import/Export': 'Importer/Exporter',
'Index': 'Index',
'Internal State': 'État interne',
'Introduction': 'Présentation',
'Invalid Query': 'Requête Invalide',
'Invalid email': 'Courriel invalide',
'Last name': 'Nom',
'Layout': 'Mise en page',
'Layouts': 'layouts',
'Live chat': 'Clavardage en direct',
'Logged in': 'Connecté',
'Login': 'Connectez-vous',
'Lost Password': 'Mot de passe perdu',
'Main Menu': 'Menu principal',
'Menu Model': 'Menu modèle',
'Name': 'Nom',
'New Record': 'Nouvel enregistrement',
'No databases in this application': "Cette application n'a pas de bases de données",
'Online examples': 'Exemples en ligne',
'Origin': 'Origine',
'Other Recipes': 'Autres recettes',
'Overview': 'Présentation',
'Password': 'Mot de passe',
"Password fields don't match": 'Les mots de passe ne correspondent pas',
'Plugins': 'Plugiciels',
'Powered by': 'Alimenté par',
'Preface': 'Préface',
'Python': 'Python',
'Query:': 'Requête:',
'Quick Examples': 'Examples Rapides',
'Readme': 'Lisez-moi',
'Recipes': 'Recettes',
'Record %(id)s created': 'Record %(id)s created',
'Record %(id)s updated': 'Record %(id)s updated',
'Record Created': 'Record Created',
'Record ID': "ID d'enregistrement",
'Record Updated': 'Record Updated',
'Register': "S'inscrire",
'Registration key': "Clé d'enregistrement",
'Registration successful': 'Inscription réussie',
'Remember me (for 30 days)': 'Se souvenir de moi (pendant 30 jours)',
'Request reset password': 'Demande de réinitialiser le mot clé',
'Reset Password key': 'Réinitialiser le mot clé',
'Resources': 'Ressources',
'Role': 'Rôle',
'Rows in table': 'Lignes du tableau',
'Rows selected': 'Lignes sélectionnées',
'Semantic': 'Sémantique',
'Services': 'Services',
'Stylesheet': 'Feuille de style',
'Submit': 'Soumettre',
'Support': 'Soutien',
'Sure you want to delete this object?': 'Êtes-vous sûr de vouloir supprimer cet objet?',
'Table name': 'Nom du tableau',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'La "query" est une condition comme "db.table1.champ1==\'valeur\'". Quelque chose comme "db.table1.champ1==db.table2.champ2" résulte en un JOIN SQL.',
'The Core': 'Le noyau',
'The Views': 'Les Vues',
'The output of the file is a dictionary that was rendered by the view': 'La sortie de ce fichier est un dictionnaire qui été restitué par la vue',
'This App': 'Cette Appli',
'This is a copy of the scaffolding application': "Ceci est une copie de l'application échafaudage",
'Timestamp': 'Horodatage',
'Twitter': 'Twitter',
'Update:': 'Mise à jour:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Employez (...)&(...) pour AND, (...)|(...) pour OR, and ~(...) pour NOT pour construire des requêtes plus complexes.',
'User %(id)s Logged-in': 'Utilisateur %(id)s connecté',
'User %(id)s Registered': 'Utilisateur %(id)s enregistré',
'User ID': 'ID utilisateur',
'User Voice': 'User Voice',
'Verify Password': 'Vérifiez le mot de passe',
'Videos': 'Vidéos',
'View': 'Présentation',
'Web2py': 'Web2py',
'Welcome': 'Bienvenu',
'Welcome %s': 'Bienvenue %s',
'Welcome to web2py': 'Bienvenue à web2py',
'Which called the function': 'Qui a appelé la fonction',
'You are successfully running web2py': 'Vous roulez avec succès web2py',
'You can modify this application and adapt it to your needs': "Vous pouvez modifier cette application et l'adapter à vos besoins",
'You visited the url': "Vous avez visité l'URL",
'about': 'à propos',
'appadmin is disabled because insecure channel': "appadmin est désactivée parce que le canal n'est pas sécurisé",
'cache': 'cache',
'change password': 'changer le mot de passe',
'customize me!': 'personnalisez-moi!',
'data uploaded': 'données téléchargées',
'database': 'base de données',
'database %s select': 'base de données %s select',
'db': 'db',
'design': 'design',
'done!': 'fait!',
'edit profile': 'modifier le profil',
'enter an integer between %(min)g and %(max)g': 'entrer un entier compris entre %(min)g et %(max)g',
'export as csv file': 'exporter sous forme de fichier csv',
'insert new': 'insérer un nouveau',
'insert new %s': 'insérer un nouveau %s',
'invalid request': 'requête invalide',
'located in the file': 'se trouvant dans le fichier',
'login': 'connectez-vous',
'logout': 'déconnectez-vous',
'lost password': 'mot de passe perdu',
'lost password?': 'mot de passe perdu?',
'new record inserted': 'nouvel enregistrement inséré',
'next 100 rows': '100 prochaines lignes',
'or import from csv file': "ou importer d'un fichier CSV",
'password': 'mot de passe',
'please input your password again': "S'il vous plaît entrer votre mot de passe",
'previous 100 rows': '100 lignes précédentes',
'profile': 'profile',
'record': 'enregistrement',
'record does not exist': "l'archive n'existe pas",
'record id': "id d'enregistrement",
'register': "s'inscrire",
'selected': 'sélectionné',
'state': 'état',
'table': 'tableau',
'unable to parse csv file': "incapable d'analyser le fichier cvs",
'value already in database or empty': 'valeur déjà dans la base ou vide',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"更新" 是選擇性的條件式, 格式就像 "欄位1=\'值\'". 但是 JOIN 的資料不可以使用 update 或是 delete"',
'%Y-%m-%d': '%Y-%m-%d',
'%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%S',
'%s rows deleted': '已刪除 %s 筆',
'%s rows updated': '已更新 %s 筆',
'(something like "it-it")': '(格式類似 "zh-tw")',
'A new version of web2py is available': '新版的 web2py 已發行',
'A new version of web2py is available: %s': '新版的 web2py 已發行: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': '注意: 登入管理帳號需要安全連線(HTTPS)或是在本機連線(localhost).',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': '注意: 因為在測試模式不保證多執行緒安全性,也就是說不可以同時執行多個測試案例',
'ATTENTION: you cannot edit the running application!': '注意:不可編輯正在執行的應用程式!',
'About': '關於',
'About application': '關於本應用程式',
'Admin is disabled because insecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Admin is disabled because unsecure channel': '管理功能(Admin)在不安全連線環境下自動關閉',
'Administrator Password:': '管理員密碼:',
'Are you sure you want to delete file "%s"?': '確定要刪除檔案"%s"?',
'Are you sure you want to uninstall application "%s"': '確定要移除應用程式 "%s"',
'Are you sure you want to uninstall application "%s"?': '確定要移除應用程式 "%s"',
'Authentication': '驗證',
'Available databases and tables': '可提供的資料庫和資料表',
'Cannot be empty': '不可空白',
'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': '無法編譯:應用程式中含有錯誤,請除錯後再試一次.',
'Change Password': '變更密碼',
'Check to delete': '打勾代表刪除',
'Check to delete:': '點選以示刪除:',
'Client IP': '客戶端網址(IP)',
'Controller': '控件',
'Controllers': '控件',
'Copyright': '版權所有',
'Create new application': '創建應用程式',
'Current request': '目前網路資料要求(request)',
'Current response': '目前網路資料回應(response)',
'Current session': '目前網路連線資訊(session)',
'DB Model': '資料庫模組',
'DESIGN': '設計',
'Database': '資料庫',
'Date and Time': '日期和時間',
'Delete': '刪除',
'Delete:': '刪除:',
'Deploy on Google App Engine': '配置到 Google App Engine',
'Description': '描述',
'Design for': '設計為了',
'E-mail': '電子郵件',
'EDIT': '編輯',
'Edit': '編輯',
'Edit Profile': '編輯設定檔',
'Edit This App': '編輯本應用程式',
'Edit application': '編輯應用程式',
'Edit current record': '編輯當前紀錄',
'Editing file': '編輯檔案',
'Editing file "%s"': '編輯檔案"%s"',
'Error logs for "%(app)s"': '"%(app)s"的錯誤紀錄',
'First name': '名',
'Functions with no doctests will result in [passed] tests.': '沒有 doctests 的函式會顯示 [passed].',
'Group ID': '群組編號',
'Hello World': '嗨! 世界',
'Import/Export': '匯入/匯出',
'Index': '索引',
'Installed applications': '已安裝應用程式',
'Internal State': '內部狀態',
'Invalid Query': '不合法的查詢',
'Invalid action': '不合法的動作(action)',
'Invalid email': '不合法的電子郵件',
'Language files (static strings) updated': '語言檔已更新',
'Languages': '各國語言',
'Last name': '姓',
'Last saved on:': '最後儲存時間:',
'Layout': '網頁配置',
'License for': '軟體版權為',
'Login': '登入',
'Login to the Administrative Interface': '登入到管理員介面',
'Logout': '登出',
'Lost Password': '密碼遺忘',
'Main Menu': '主選單',
'Menu Model': '選單模組(menu)',
'Models': '資料模組',
'Modules': '程式模組',
'NO': '否',
'Name': '名字',
'New Record': '新紀錄',
'No databases in this application': '這應用程式不含資料庫',
'Origin': '原文',
'Original/Translation': '原文/翻譯',
'Password': '密碼',
"Password fields don't match": '密碼欄不匹配',
'Peeking at file': '選擇檔案',
'Powered by': '基於以下技術構建:',
'Query:': '查詢:',
'Record ID': '紀錄編號',
'Register': '註冊',
'Registration key': '註冊金鑰',
'Remember me (for 30 days)': '記住我(30 天)',
'Reset Password key': '重設密碼',
'Resolve Conflict file': '解決衝突檔案',
'Role': '角色',
'Rows in table': '在資料表裏的資料',
'Rows selected': '筆資料被選擇',
'Saved file hash:': '檔案雜湊值已紀錄:',
'Static files': '靜態檔案',
'Stylesheet': '網頁風格檔',
'Submit': '傳送',
'Sure you want to delete this object?': '確定要刪除此物件?',
'Table name': '資料表名稱',
'Testing application': '測試中的應用程式',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"查詢"是一個像 "db.表1.欄位1==\'值\'" 的條件式. 以"db.表1.欄位1==db.表2.欄位2"方式則相當於執行 JOIN SQL.',
'There are no controllers': '沒有控件(controllers)',
'There are no models': '沒有資料庫模組(models)',
'There are no modules': '沒有程式模組(modules)',
'There are no static files': '沒有靜態檔案',
'There are no translators, only default language is supported': '沒有翻譯檔,只支援原始語言',
'There are no views': '沒有視圖',
'This is the %(filename)s template': '這是%(filename)s檔案的樣板(template)',
'Ticket': '問題單',
'Timestamp': '時間標記',
'Unable to check for upgrades': '無法做升級檢查',
'Unable to download': '無法下載',
'Unable to download app': '無法下載應用程式',
'Update:': '更新:',
'Upload existing application': '更新存在的應用程式',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': '使用下列方式來組合更複雜的條件式, (...)&(...) 代表同時存在的條件, (...)|(...) 代表擇一的條件, ~(...)則代表反向條件.',
'User %(id)s Logged-in': '使用者 %(id)s 已登入',
'User %(id)s Registered': '使用者 %(id)s 已註冊',
'User ID': '使用者編號',
'Verify Password': '驗證密碼',
'View': '視圖',
'Views': '視圖',
'Welcome %s': '歡迎 %s',
'Welcome to web2py': '歡迎使用 web2py',
'YES': '是',
'about': '關於',
'appadmin is disabled because insecure channel': '因為來自非安全通道,管理介面關閉',
'cache': '快取記憶體',
'change password': '變更密碼',
'Online examples': '點此處進入線上範例',
'Administrative interface': '點此處進入管理介面',
'customize me!': '請調整我!',
'data uploaded': '資料已上傳',
'database': '資料庫',
'database %s select': '已選擇 %s 資料庫',
'db': 'db',
'design': '設計',
'done!': '完成!',
'edit profile': '編輯設定檔',
'export as csv file': '以逗號分隔檔(csv)格式匯出',
'insert new': '插入新資料',
'insert new %s': '插入新資料 %s',
'invalid request': '不合法的網路要求(request)',
'login': '登入',
'logout': '登出',
'new record inserted': '已插入新紀錄',
'next 100 rows': '往後 100 筆',
'or import from csv file': '或是從逗號分隔檔(CSV)匯入',
'previous 100 rows': '往前 100 筆',
'record': '紀錄',
'record does not exist': '紀錄不存在',
'record id': '紀錄編號',
'register': '註冊',
'selected': '已選擇',
'state': '狀態',
'table': '資料表',
'unable to parse csv file': '無法解析逗號分隔檔(csv)',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar 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 eliminadas',
'%s rows updated': '%s linhas actualizadas',
'About': 'About',
'Author Reference Auth User': 'Author Reference Auth User',
'Author Reference Auth User.username': 'Author Reference Auth User.username',
'Available databases and tables': 'bases de dados e tabelas disponíveis',
'Cannot be empty': 'não pode ser vazio',
'Category Create': 'Category Create',
'Category Select': 'Category Select',
'Check to delete': 'seleccione para eliminar',
'Comment Create': 'Comment Create',
'Comment Select': 'Comment Select',
'Content': 'Content',
'Controller': 'Controlador',
'Copyright': 'Direitos de cópia',
'Created By': 'Created By',
'Created On': 'Created On',
'Current request': 'pedido currente',
'Current response': 'resposta currente',
'Current session': 'sessão currente',
'DB Model': 'Modelo de BD',
'Database': 'Base de dados',
'Delete:': 'Eliminar:',
'Edit': 'Editar',
'Edit This App': 'Edite esta aplicação',
'Edit current record': 'Edição de registo currente',
'Email': 'Email',
'First Name': 'First Name',
'For %s #%s': 'For %s #%s',
'Hello World': 'Olá Mundo',
'Import/Export': 'Importar/Exportar',
'Index': 'Índice',
'Internal State': 'Estado interno',
'Invalid Query': 'Consulta Inválida',
'Last Name': 'Last Name',
'Layout': 'Esboço',
'Main Menu': 'Menu Principal',
'Menu Model': 'Menu do Modelo',
'Modified By': 'Modified By',
'Modified On': 'Modified On',
'Name': 'Name',
'New Record': 'Novo Registo',
'No Data': 'No Data',
'No databases in this application': 'Não há bases de dados nesta aplicação',
'Password': 'Password',
'Post Create': 'Post Create',
'Post Select': 'Post Select',
'Powered by': 'Suportado por',
'Query:': 'Interrogação:',
'Replyto Reference Post': 'Replyto Reference Post',
'Rows in table': 'Linhas numa tabela',
'Rows selected': 'Linhas seleccionadas',
'Stylesheet': 'Folha de estilo',
'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.': 'A "query" é uma condição do tipo "db.table1.field1==\'value\'". Algo como "db.table1.field1==db.table2.field2" resultaria num SQL JOIN.',
'Title': 'Title',
'Update:': 'Actualização:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Utilize (...)&(...) para AND, (...)|(...) para OR, e ~(...) para NOT para construir interrogações mais complexas.',
'Username': 'Username',
'View': 'Vista',
'Welcome %s': 'Bem-vindo(a) %s',
'Welcome to Gluonization': 'Bem vindo ao Web2py',
'Welcome to web2py': 'Bem-vindo(a) ao web2py',
'When': 'When',
'appadmin is disabled because insecure channel': 'appadmin está desactivada pois o canal é inseguro',
'cache': 'cache',
'change password': 'alterar palavra-chave',
'Online examples': 'Exemplos online',
'Administrative interface': 'Painel administrativo',
'create new category': 'create new category',
'create new comment': 'create new comment',
'create new post': 'create new post',
'customize me!': 'Personaliza-me!',
'data uploaded': 'informação enviada',
'database': 'base de dados',
'database %s select': 'selecção de base de dados %s',
'db': 'bd',
'design': 'design',
'done!': 'concluído!',
'edit category': 'edit category',
'edit comment': 'edit comment',
'edit post': 'edit post',
'edit profile': 'Editar perfil',
'export as csv file': 'exportar como ficheiro csv',
'insert new': 'inserir novo',
'insert new %s': 'inserir novo %s',
'invalid request': 'Pedido Inválido',
'login': 'login',
'logout': 'logout',
'new record inserted': 'novo registo inserido',
'next 100 rows': 'próximas 100 linhas',
'or import from csv file': 'ou importe a partir de ficheiro csv',
'previous 100 rows': '100 linhas anteriores',
'record': 'registo',
'record does not exist': 'registo inexistente',
'record id': 'id de registo',
'register': 'register',
'search category': 'search category',
'search comment': 'search comment',
'search post': 'search post',
'select category': 'select category',
'select comment': 'select comment',
'select post': 'select post',
'selected': 'seleccionado(s)',
'show category': 'show category',
'show comment': 'show comment',
'show post': 'show post',
'state': 'estado',
'table': 'tabela',
'unable to parse csv file': 'não foi possível carregar ficheiro csv',
}
| Python |
# coding: utf8
{
'"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 sorok t\xc3\xb6rl\xc5\x91dtek',
'%s rows updated': '%s sorok friss\xc3\xadt\xc5\x91dtek',
'Available databases and tables': 'El\xc3\xa9rhet\xc5\x91 adatb\xc3\xa1zisok \xc3\xa9s t\xc3\xa1bl\xc3\xa1k',
'Cannot be empty': 'Nem lehet \xc3\xbcres',
'Check to delete': 'T\xc3\xb6rl\xc3\xa9shez v\xc3\xa1laszd ki',
'Client IP': 'Client IP',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Jelenlegi lek\xc3\xa9rdez\xc3\xa9s',
'Current response': 'Jelenlegi v\xc3\xa1lasz',
'Current session': 'Jelenlegi folyamat',
'DB Model': 'DB Model',
'Database': 'Adatb\xc3\xa1zis',
'Delete:': 'T\xc3\xb6r\xc3\xb6l:',
'Description': 'Description',
'E-mail': 'E-mail',
'Edit': 'Szerkeszt',
'Edit This App': 'Alkalmaz\xc3\xa1st szerkeszt',
'Edit current record': 'Aktu\xc3\xa1lis bejegyz\xc3\xa9s szerkeszt\xc3\xa9se',
'First name': 'First name',
'Group ID': 'Group ID',
'Hello World': 'Hello Vil\xc3\xa1g',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Internal State',
'Invalid Query': 'Hib\xc3\xa1s lek\xc3\xa9rdez\xc3\xa9s',
'Invalid email': 'Invalid email',
'Last name': 'Last name',
'Layout': 'Szerkezet',
'Main Menu': 'F\xc5\x91men\xc3\xbc',
'Menu Model': 'Men\xc3\xbc model',
'Name': 'Name',
'New Record': '\xc3\x9aj bejegyz\xc3\xa9s',
'No databases in this application': 'Nincs adatb\xc3\xa1zis ebben az alkalmaz\xc3\xa1sban',
'Origin': 'Origin',
'Password': 'Password',
'Powered by': 'Powered by',
'Query:': 'Lek\xc3\xa9rdez\xc3\xa9s:',
'Record ID': 'Record ID',
'Registration key': 'Registration key',
'Reset Password key': 'Reset Password key',
'Role': 'Role',
'Rows in table': 'Sorok a t\xc3\xa1bl\xc3\xa1ban',
'Rows selected': 'Kiv\xc3\xa1lasztott sorok',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Biztos t\xc3\xb6rli ezt az objektumot?',
'Table name': 'Table name',
'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.',
'Timestamp': 'Timestamp',
'Update:': 'Friss\xc3\xadt:',
'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.',
'User ID': 'User ID',
'View': 'N\xc3\xa9zet',
'Welcome %s': 'Welcome %s',
'Welcome to web2py': 'Isten hozott a web2py-ban',
'appadmin is disabled because insecure channel': 'az appadmin a biztons\xc3\xa1gtalan csatorna miatt letiltva',
'cache': 'gyors\xc3\xadt\xc3\xb3t\xc3\xa1r',
'change password': 'jelsz\xc3\xb3 megv\xc3\xa1ltoztat\xc3\xa1sa',
'Online examples': 'online p\xc3\xa9ld\xc3\xa1k\xc3\xa9rt kattints ide',
'Administrative interface': 'az adminisztr\xc3\xa1ci\xc3\xb3s fel\xc3\xbclet\xc3\xa9rt kattints ide',
'customize me!': 'v\xc3\xa1ltoztass meg!',
'data uploaded': 'adat felt\xc3\xb6ltve',
'database': 'adatb\xc3\xa1zis',
'database %s select': 'adatb\xc3\xa1zis %s kiv\xc3\xa1laszt\xc3\xa1s',
'db': 'db',
'design': 'design',
'done!': 'k\xc3\xa9sz!',
'edit profile': 'profil szerkeszt\xc3\xa9se',
'export as csv file': 'export\xc3\xa1l csv f\xc3\xa1jlba',
'insert new': '\xc3\xbaj beilleszt\xc3\xa9se',
'insert new %s': '\xc3\xbaj beilleszt\xc3\xa9se %s',
'invalid request': 'hib\xc3\xa1s k\xc3\xa9r\xc3\xa9s',
'login': 'bel\xc3\xa9p',
'logout': 'kil\xc3\xa9p',
'lost password': 'elveszett jelsz\xc3\xb3',
'new record inserted': '\xc3\xbaj bejegyz\xc3\xa9s felv\xc3\xa9ve',
'next 100 rows': 'k\xc3\xb6vetkez\xc5\x91 100 sor',
'or import from csv file': 'vagy bet\xc3\xb6lt\xc3\xa9s csv f\xc3\xa1jlb\xc3\xb3l',
'previous 100 rows': 'el\xc5\x91z\xc5\x91 100 sor',
'record': 'bejegyz\xc3\xa9s',
'record does not exist': 'bejegyz\xc3\xa9s nem l\xc3\xa9tezik',
'record id': 'bejegyz\xc3\xa9s id',
'register': 'regisztr\xc3\xa1ci\xc3\xb3',
'selected': 'kiv\xc3\xa1lasztott',
'state': '\xc3\xa1llapot',
'table': 't\xc3\xa1bla',
'unable to parse csv file': 'nem lehet a csv f\xc3\xa1jlt beolvasni',
}
| Python |
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je voliteľný výraz ako "field1=\'newvalue\'". Nemôžete upravovať alebo zmazať výsledky JOINu',
'%Y-%m-%d': '%d.%m.%Y',
'%Y-%m-%d %H:%M:%S': '%d.%m.%Y %H:%M:%S',
'%s rows deleted': '%s zmazaných záznamov',
'%s rows updated': '%s upravených záznamov',
'Available databases and tables': 'Dostupné databázy a tabuľky',
'Cannot be empty': 'Nemôže byť prázdne',
'Check to delete': 'Označiť na zmazanie',
'Controller': 'Controller',
'Copyright': 'Copyright',
'Current request': 'Aktuálna požiadavka',
'Current response': 'Aktuálna odpoveď',
'Current session': 'Aktuálne sedenie',
'DB Model': 'DB Model',
'Database': 'Databáza',
'Delete:': 'Zmazať:',
'Description': 'Popis',
'Edit': 'Upraviť',
'Edit Profile': 'Upraviť profil',
'Edit current record': 'Upraviť aktuálny záznam',
'First name': 'Krstné meno',
'Group ID': 'ID skupiny',
'Hello World': 'Ahoj svet',
'Import/Export': 'Import/Export',
'Index': 'Index',
'Internal State': 'Vnútorný stav',
'Invalid email': 'Neplatný email',
'Invalid Query': 'Neplatná otázka',
'Invalid password': 'Nesprávne heslo',
'Last name': 'Priezvisko',
'Layout': 'Layout',
'Logged in': 'Prihlásený',
'Logged out': 'Odhlásený',
'Lost Password': 'Stratené heslo?',
'Menu Model': 'Menu Model',
'Name': 'Meno',
'New Record': 'Nový záznam',
'New password': 'Nové heslo',
'No databases in this application': 'V tejto aplikácii nie sú databázy',
'Old password': 'Staré heslo',
'Origin': 'Pôvod',
'Password': 'Heslo',
'Powered by': 'Powered by',
'Query:': 'Otázka:',
'Record ID': 'ID záznamu',
'Register': 'Zaregistrovať sa',
'Registration key': 'Registračný kľúč',
'Remember me (for 30 days)': 'Zapamätaj si ma (na 30 dní)',
'Reset Password key': 'Nastaviť registračný kľúč',
'Role': 'Rola',
'Rows in table': 'riadkov v tabuľke',
'Rows selected': 'označených riadkov',
'Submit': 'Odoslať',
'Stylesheet': 'Stylesheet',
'Sure you want to delete this object?': 'Ste si istí, že chcete zmazať tento objekt?',
'Table name': 'Názov tabuľky',
'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': '"query" je podmienka ako "db.table1.field1==\'value\'". Niečo ako "db.table1.field1==db.table2.field2" má za výsledok SQL JOIN.',
'The output of the file is a dictionary that was rendered by the view': 'Výstup zo súboru je slovník, ktorý bol zobrazený vo view',
'This is a copy of the scaffolding application': 'Toto je kópia skeletu aplikácie',
'Timestamp': 'Časová pečiatka',
'Update:': 'Upraviť:',
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Použite (...)&(...) pre AND, (...)|(...) pre OR a ~(...) pre NOT na poskladanie komplexnejších otázok.',
'User %(id)s Logged-in': 'Používateľ %(id)s prihlásený',
'User %(id)s Logged-out': 'Používateľ %(id)s odhlásený',
'User %(id)s Password changed': 'Používateľ %(id)s zmenil heslo',
'User %(id)s Profile updated': 'Používateľ %(id)s upravil profil',
'User %(id)s Registered': 'Používateľ %(id)s sa zaregistroval',
'User ID': 'ID používateľa',
'Verify Password': 'Zopakujte heslo',
'View': 'Zobraziť',
'Welcome to web2py': 'Vitajte vo web2py',
'Which called the function': 'Ktorý zavolal funkciu',
'You are successfully running web2py': 'Úspešne ste spustili web2py',
'You can modify this application and adapt it to your needs': 'Môžete upraviť túto aplikáciu a prispôsobiť ju svojim potrebám',
'You visited the url': 'Navštívili ste URL',
'appadmin is disabled because insecure channel': 'appadmin je zakázaný bez zabezpečeného spojenia',
'cache': 'cache',
'Online examples': 'pre online príklady kliknite sem',
'Administrative interface': 'pre administrátorské rozhranie kliknite sem',
'customize me!': 'prispôsob ma!',
'data uploaded': 'údaje naplnené',
'database': 'databáza',
'database %s select': 'databáza %s výber',
'db': 'db',
'design': 'návrh',
'Documentation': 'Dokumentácia',
'done!': 'hotovo!',
'export as csv file': 'exportovať do csv súboru',
'insert new': 'vložiť nový záznam ',
'insert new %s': 'vložiť nový záznam %s',
'invalid request': 'Neplatná požiadavka',
'located in the file': 'nachádzajúci sa v súbore ',
'login': 'prihlásiť',
'logout': 'odhlásiť',
'lost password?': 'stratené heslo?',
'new record inserted': 'nový záznam bol vložený',
'next 100 rows': 'ďalších 100 riadkov',
'or import from csv file': 'alebo naimportovať z csv súboru',
'password': 'heslo',
'previous 100 rows': 'predchádzajúcich 100 riadkov',
'record': 'záznam',
'record does not exist': 'záznam neexistuje',
'record id': 'id záznamu',
'register': 'registrovať',
'selected': 'označených',
'state': 'stav',
'table': 'tabuľka',
'unable to parse csv file': 'nedá sa načítať csv súbor',
}
| Python |
response.title = settings.title
response.subtitle = settings.subtitle
response.meta.author = '%s <%s>' % (settings.author, settings.author_email)
response.meta.keywords = settings.keywords
response.meta.description = settings.description
response.menu = [
(T('Add image'),URL('images','addimg')==URL(),URL('images','addimg'),[]),
(T('App settings'),URL('admin','index')==URL(),URL('admin','index'),[]),
]
| Python |
from gluon.storage import Storage
settings = Storage()
settings.migrate = True
settings.title = 'fb_fans'
settings.subtitle = 'powered by web2py'
settings.author = 'you'
settings.author_email = 'you@example.com'
settings.keywords = ''
settings.description = ''
settings.layout_theme = 'Default'
settings.database_uri = 'sqlite://storage.sqlite'
settings.security_key = '0cbb5175-483f-4a14-8087-cbdf13d68587'
settings.email_server = 'localhost'
settings.email_sender = 'you@example.com'
settings.email_login = ''
settings.login_method = 'local'
settings.login_config = ''
settings.plugins = []
| Python |
from gluon.contrib.populate import populate
from app_settings import *
if not db(db.auth_user).count():
db.auth_user.insert(
username='admin',
first_name='Admin',
last_name='Admin',
password='ae5be22d505db70b591e0aa5327671be2591e6426ef5579fb60d5152a507f58cc142b365a056bfbba4bd669f80bd7949d8182049cf985d9c495354b466968886')
if not db(db.settings).count():
db.settings.insert(
fb_app_id = APP_ID,
fb_app_secret = APP_SECRET,
fb_fan_page = FAN_PAGE,
use_lander = True,
lander = LANDER,
header = HEADER,
footer = FOOTER,
invite_title = INVITE_TITLE,
invite_message = INVITE_MESSAGE,
force_count_title = FORCE_HEADER,
force_count_number= FORCE_COUNT_NUMBER,
force_message_before = FORCE_MESSAGE_BEFORE,
force_message_after = FORCE_MESSAGE_AFTER,
)
| Python |
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################
if request.env.web2py_runtime_gae: # if running on Google App Engine
db = DAL('google:datastore') # connect to Google BigTable
# optional DAL('gae://namespace')
session.connect(request, response, db = db) # and store sessions and tickets there
### 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
db = DAL('sqlite://storage.sqlite') # if not, use SQLite or other DB
# by default give a view/generic.extension to all actions from localhost
# none otherwise. a pattern can be 'controller/function.extension'
response.generic_patterns = ['*'] if request.is_local else []
#########################################################################
## Here is sample code if you need for
## - email capabilities
## - authentication (registration, login, logout, ... )
## - authorization (role based authorization)
## - services (xml, csv, json, xmlrpc, jsonrpc, amf, rss)
## - crud actions
## (more options discussed in gluon/tools.py)
#########################################################################
from gluon.tools import Mail, Auth, Crud, Service, PluginManager, prettydate
mail = Mail() # mailer
auth = Auth(db) # authentication/authorization
crud = Crud(db) # for CRUD helpers using auth
service = Service() # for json, xml, jsonrpc, xmlrpc, amfrpc
plugins = PluginManager() # for configuring plugins
mail.settings.server = 'logging' or 'smtp.gmail.com:587' # your SMTP server
mail.settings.sender = 'you@gmail.com' # your email
mail.settings.login = 'username:password' # your credentials or None
auth.settings.hmac_key = 'sha512:0cbb5175-483f-4a14-8087-cbdf13d68587' # before define_tables()
########################################
db.define_table('auth_user',
Field('id','id',
represent=lambda id:SPAN(id,' ',A('view',_href=URL('auth_user_read',args=id)))),
Field('username', type='string',
label=T('Username')),
Field('first_name', type='string',
label=T('First Name')),
Field('last_name', type='string',
label=T('Last Name')),
Field('email', type='string',
label=T('Email')),
Field('password', type='password',
readable=False,
label=T('Password')),
Field('created_on','datetime',default=request.now,
label=T('Created On'),writable=False,readable=False),
Field('modified_on','datetime',default=request.now,
label=T('Modified On'),writable=False,readable=False,
update=request.now),
Field('registration_key',default='',
writable=False,readable=False),
Field('reset_password_key',default='',
writable=False,readable=False),
Field('registration_id',default='',
writable=False,readable=False),
format='%(username)s',
migrate=settings.migrate)
db.auth_user.first_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
db.auth_user.last_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty)
db.auth_user.password.requires = CRYPT(key=auth.settings.hmac_key)
db.auth_user.username.requires = IS_NOT_IN_DB(db, db.auth_user.username)
db.auth_user.registration_id.requires = IS_NOT_IN_DB(db, db.auth_user.registration_id)
db.auth_user.email.requires = (IS_EMAIL(error_message=auth.messages.invalid_email),
IS_NOT_IN_DB(db, db.auth_user.email))
auth.define_tables(migrate = settings.migrate) # creates all needed tables
auth.settings.mailer = mail # for user email verification
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email'
auth.settings.reset_password_requires_verification = True
auth.messages.reset_password = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['reset_password'])+'/%(key)s to reset your password'
#########################################################################
## If you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc.
## register with janrain.com, uncomment and customize following
# from gluon.contrib.login_methods.rpx_account import RPXAccount
# auth.settings.actions_disabled = \
# ['register','change_password','request_reset_password']
# auth.settings.login_form = RPXAccount(request, api_key='...',domain='...',
# url = "http://localhost:8000/%s/default/user/login" % request.application)
## other login methods are in gluon/contrib/login_methods
#########################################################################
crud.settings.auth = None # =auth to enforce authorization on crud
auth.settings.actions_disabled = ['register']
#########################################################################
## Define your tables below (or better in another model file) for example
##
## >>> db.define_table('mytable',Field('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.mytable.myfield=='value').select(db.mytable.ALL)
## >>> for row in rows: print row.id, row.myfield
#########################################################################
mail.settings.server = settings.email_server
mail.settings.sender = settings.email_sender
mail.settings.login = settings.email_login
db.define_table('app_items',
Field('user_uid', 'string', length=30, requires=IS_NOT_EMPTY()),
Field('img_location', 'string'),
Field('image', 'upload', length=1, requires=IS_IMAGE()),
Field('img_name', 'string', length=40, requires=IS_NOT_EMPTY()),
Field('invite_message', 'string', requires=IS_NOT_EMPTY()),
Field('redirect', 'string', requires=IS_NOT_EMPTY()),
Field('times_posted_today', 'integer', default=0, requires=IS_NOT_EMPTY()),
Field('times_posted', 'integer', default=0, requires=IS_NOT_EMPTY()),
Field('times_reported', 'integer', default=0, requires=IS_NOT_EMPTY()),
Field('reported_by', 'text', requires=IS_NOT_EMPTY()),
Field('reported_time', 'string', requires=IS_NOT_EMPTY()),
)
db.define_table('settings',
Field('fb_app_id', 'string', requires = IS_NOT_EMPTY()),
Field('fb_app_secret', 'string', requires = IS_NOT_EMPTY()),
Field('fb_fan_page', 'string', requires = IS_NOT_EMPTY()),
Field('use_lander', 'boolean', default=True),
Field('lander', 'text', length=65535),
Field('header', 'text', length=65535),
Field('footer', 'text', length=65535),
Field('invite_title', 'string', length=55),
Field('invite_message', 'string', length=255),
Field('force_count_title', 'string'),
Field('force_count_number', 'integer', default=0),
Field('force_message_before', 'text', length=65535),
Field('force_message_after', 'text', length=65535),
)
db.settings.id.readable = False
current_settings = db(db.settings).select().first()
| Python |
### we prepend t_ to tablenames and f_ to fieldnames for disambiguity
| Python |
# -*- coding: utf-8 -*-
# ##########################################################
# ## make sure administrator is on localhost
# ###########################################################
import os
import socket
import datetime
import copy
import gluon.contenttype
import gluon.fileutils
# ## critical --- 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.gethostname(),
socket.gethostbyname(http_host),
'::1','127.0.0.1','::ffff:127.0.0.1')
except:
hosts = (http_host, )
if request.env.http_x_forwarded_for or request.env.wsgi_url_scheme\
in ['https', 'HTTPS']:
session.secure()
elif (remote_addr not in hosts) and (remote_addr != "127.0.0.1"):
raise HTTP(200, T('appadmin is disabled because insecure channel'))
if (request.application=='admin' and not session.authorized) or \
(request.application!='admin' and not gluon.fileutils.check_credentials(request)):
redirect(URL('admin', 'default', 'index'))
ignore_rw = True
response.view = 'appadmin.html'
response.menu = [[T('design'), False, URL('admin', 'default', 'design',
args=[request.application])], [T('db'), False,
URL('index')], [T('state'), False,
URL('state')], [T('cache'), False,
URL('ccache')]]
# ##########################################################
# ## 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('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('index'))
def get_query(request):
try:
return eval_in_global_env(request.vars.query)
except Exception:
return None
def query_by_table_type(tablename,db,request=request):
keyed = hasattr(db[tablename],'_primarykey')
if keyed:
firstkey = db[tablename][db[tablename]._primarykey[0]]
cond = '>0'
if firstkey.type in ['string', 'text']:
cond = '!=""'
qry = '%s.%s.%s%s' % (request.args[0], request.args[1], firstkey.name, cond)
else:
qry = '%s.%s.id>0' % tuple(request.args[:2])
return qry
# ##########################################################
# ## 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,table=db[table])
# ##########################################################
# ## 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<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
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 Exception, e:
response.flash = DIV(T('unable to parse csv file'),PRE(str(e)))
if form.accepts(request.vars, formname=None):
# regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')
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 Exception, e:
(rows, nrows) = ([], 0)
response.flash = DIV(T('Invalid Query'),PRE(str(e)))
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)
keyed = hasattr(db[table],'_primarykey')
record = None
if keyed:
key = [f for f in request.vars if f in db[table]._primarykey]
if key:
record = db(db[table][key[0]] == request.vars[key[0]]).select().first()
else:
record = db(db[table].id == request.args(2)).select().first()
if not record:
qry = query_by_table_type(table, db)
session.flash = T('record does not exist')
redirect(URL('select', args=request.args[:1],
vars=dict(query=qry)))
if keyed:
for k in db[table]._primarykey:
db[table][k].writable=False
form = SQLFORM(db[table], record, deletable=True, delete_label=T('Check to delete'),
ignore_rw=ignore_rw and not keyed,
linkto=URL('select',
args=request.args[:1]), upload=URL(r=request,
f='download', args=request.args[:1]))
if form.accepts(request.vars, session):
session.flash = T('done!')
qry = query_by_table_type(table, db)
redirect(URL('select', args=request.args[:1],
vars=dict(query=qry)))
return dict(form=form,table=db[table])
# ##########################################################
# ## get global variables
# ###########################################################
def state():
return dict()
def ccache():
form = FORM(
P(TAG.BUTTON("Clear CACHE?", _type="submit", _name="yes", _value="yes")),
P(TAG.BUTTON("Clear RAM", _type="submit", _name="ram", _value="ram")),
P(TAG.BUTTON("Clear DISK", _type="submit", _name="disk", _value="disk")),
)
if form.accepts(request.vars, session):
clear_ram = False
clear_disk = False
session.flash = ""
if request.vars.yes:
clear_ram = clear_disk = True
if request.vars.ram:
clear_ram = True
if request.vars.disk:
clear_disk = True
if clear_ram:
cache.ram.clear()
session.flash += "Ram Cleared "
if clear_disk:
cache.disk.clear()
session.flash += "Disk Cleared"
redirect(URL(r=request))
try:
from guppy import hpy; hp=hpy()
except ImportError:
hp = False
import shelve, os, copy, time, math
from gluon import portalocker
ram = {
'bytes': 0,
'objects': 0,
'hits': 0,
'misses': 0,
'ratio': 0,
'oldest': time.time()
}
disk = copy.copy(ram)
total = copy.copy(ram)
for key, value in cache.ram.storage.items():
if isinstance(value, dict):
ram['hits'] = value['hit_total'] - value['misses']
ram['misses'] = value['misses']
try:
ram['ratio'] = ram['hits'] * 100 / value['hit_total']
except (KeyError, ZeroDivisionError):
ram['ratio'] = 0
else:
if hp:
ram['bytes'] += hp.iso(value[1]).size
ram['objects'] += hp.iso(value[1]).count
if value[0] < ram['oldest']:
ram['oldest'] = value[0]
locker = open(os.path.join(request.folder,
'cache/cache.lock'), 'a')
portalocker.lock(locker, portalocker.LOCK_EX)
disk_storage = shelve.open(os.path.join(request.folder, 'cache/cache.shelve'))
try:
for key, value in disk_storage.items():
if isinstance(value, dict):
disk['hits'] = value['hit_total'] - value['misses']
disk['misses'] = value['misses']
try:
disk['ratio'] = disk['hits'] * 100 / value['hit_total']
except (KeyError, ZeroDivisionError):
disk['ratio'] = 0
else:
if hp:
disk['bytes'] += hp.iso(value[1]).size
disk['objects'] += hp.iso(value[1]).count
if value[0] < disk['oldest']:
disk['oldest'] = value[0]
finally:
portalocker.unlock(locker)
locker.close()
disk_storage.close()
total['bytes'] = ram['bytes'] + disk['bytes']
total['objects'] = ram['objects'] + disk['objects']
total['hits'] = ram['hits'] + disk['hits']
total['misses'] = ram['misses'] + disk['misses']
try:
total['ratio'] = total['hits'] * 100 / (total['hits'] + total['misses'])
except (KeyError, ZeroDivisionError):
total['ratio'] = 0
if disk['oldest'] < ram['oldest']:
total['oldest'] = disk['oldest']
else:
total['oldest'] = ram['oldest']
def GetInHMS(seconds):
hours = math.floor(seconds / 3600)
seconds -= hours * 3600
minutes = math.floor(seconds / 60)
seconds -= minutes * 60
seconds = math.floor(seconds)
return (hours, minutes, seconds)
ram['oldest'] = GetInHMS(time.time() - ram['oldest'])
disk['oldest'] = GetInHMS(time.time() - disk['oldest'])
total['oldest'] = GetInHMS(time.time() - total['oldest'])
return dict(form=form, total=total,
ram=ram, disk=disk)
| Python |
# -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call():
session.forget()
return service()
### end requires
@auth.requires_login()
def addimg():
form = SQLFORM(db.app_items,
fields = ['img_name', 'image', 'invite_message', 'redirect'],
labels = {'img_name': 'Image Name', \
'image':'Upload image'},
col3 = {'image':SPAN('Maximum image size: 1MB, please use small \
picture to keep app fast.'),})
if form.accepts(request.vars, session):
response.flash = 'image uploaded'
elif form.errors:
response.flash = 'please check the errors'
else:
response.flash = 'please fill in something'
return dict(form=form)
@auth.requires_login()
def del_img():
try:
db(db.app_items.id == int(request.vars.get("id"))).delete()
db.commit()
except:
return 'delete image failed!'
else:
return 'delete succeed!'
@auth.requires_login()
def listimg():
images = db().select(db.app_items.ALL, orderby = db.app_items.id)
return dict(images=images)
def farmville():
return dict()
def error():
return dict()
| Python |
# -*- coding: utf-8 -*-
### required - do no delete
def user():
auth.settings.logout_next = URL(c='admin', f='index')
return dict(form=auth())
def download(): return response.download(request,db)
def call():
session.forget()
return service()
### end requires
from google.appengine.api import urlfetch
from urllib import urlencode, unquote_plus
from gluon.tools import fetch
import base64
import simplejson as json
import hmac
import hashlib
import time
import urllib
def index():
request_ids = request.vars.get('request_ids')
s = request.vars.get('s')
signed_request = request.vars.get('signed_request')
if request_ids or s:
if request_ids and signed_request:
fb = Facebook(app_id = current_settings.fb_app_id, \
app_secret = current_settings.fb_app_secret)
fb.load_signed_request(signed_request)
try:
app_requests = fb.api(u'/me/apprequests')
except:
pass
else:
try:
data = app_requests.get(u'data')[0]
except:
pass
else:
del_req = data.get(u'id','')
del_to = data.get(u'to','').get(u'id')
del_id = u'%s_%s' % (del_req, del_to)
if del_id:
del_url = 'https://graph.facebook.com/%s?access_token=%s&method=delete' % (del_id, fb.access_token)
try:
logging.info("Try to fetch [%s]" % del_url)
urlfetch.fetch(del_url)
except:
pass
return '<script>top.location = "%s";</script>' % current_settings.fb_fan_page
return '<script>top.location = "%s";</script>' % current_settings.fb_fan_page
else:
return '<script>top.location = "%s" </script>' % current_settings.fb_fan_page
def tab():
signed_request = request.vars.get('signed_request')
if signed_request:
fb= Facebook(app_id = current_settings.fb_app_id, app_secret = current_settings.fb_app_secret)
fb.load_signed_request(signed_request)
try:
if fb.signed_request.get('page').get('liked') or (not current_settings.use_lander):
liked = True
rows = db().select(db.app_items.ALL)
return dict(liked = liked, use_lander = current_settings.use_lander,
header = XML(current_settings.header),
app_id = current_settings.fb_app_id,
footer = XML(current_settings.footer), rows = rows,
invreq = current_settings.force_count_number,
invhead = current_settings.invite_title,
invmsg = current_settings.invite_message,
page_url = current_settings.fb_fan_page)
else:
liked = False
return dict(liked = liked, use_lander = current_settings.use_lander,
app_id = current_settings.fb_app_id,
lander = XML(current_settings.lander),
invreq = current_settings.force_count_number,
invhead = current_settings.invite_title,
invmsg = current_settings.invite_message,
page_url = current_settings.fb_fan_page)
except AttributeError:
return 'Something wrong with your app id and app key setting.'
else:
pass
else:
return '<script>top.location = "%s" </script>' % current_settings.fb_fan_page
def js():
import gluon.contenttype
response.headers['Content-Type'] = gluon.contenttype.contenttype('.js')
return """
window.fbAsyncInit = function() {FB.init({ appId:'"""+current_settings.fb_app_id+"""',cookie: true, status: true, xfbml: true }); FB.login(function(response){});};
(function($) {
window.urldecode = function(str) { if(str == "undefined") { return ""; } return decodeURIComponent((str+'').replace(/\+/g, '%20')); }
})(jQuery);
$(window).load(function () {
FB.login(function(response) {});
$("#sound").fadeIn("fast", function () {
$("#slapped").fadeIn("fast", function () { $("#slapped").delay(200).fadeOut("slow", function () { $("#slapreceived").fadeIn("fast"); }); });
});
$("#slapclose").click(function() {
$("#slapreceived").fadeOut("slow");
});
});
var invmsg = '"""+current_settings.invite_message+"""';
var invsent = 0;
var imsg = '', redir = '';
$(function() {
var modal = new LightFace({
height: 400,
width: 470,
title: invhead,
content: '<div id="jfmfs-container"></div>',
buttons: [
{ title: 'Select First 50 Friends',
event: function() {
var friendSelector = $("#jfmfs-container").data('jfmfs');
friendSelector.select50();
},
color: 'blue'},
{
title: 'Invite',
event: function() {
var friendSelector = $("#jfmfs-container").data('jfmfs');
var ids = friendSelector.getSelectedIds();
if (ids.length>0) {
//Send FB requests
this.fade();
console.log("Sending request...");
FB.ui({method: 'apprequests',
message: imsg,
to: ids
}, function (response) { if (response && response.to) { var invcount = response.to.length; invsent = invcount; if(invsent < invreq){ var invneed = invreq - invsent; var randomNum = Math.ceil(Math.random()*100); var type = 'OK'; FBnum(type, randomNum, invneed); }else{ $("#content").html("<iframe src='"+redir+"' frameborder=\\"0\\" border=\\"0\\" width=500 height=720 scrolling=\\"no\\" style=\\"overflow:hidden;\\"></iframe>"); } } else { if(invsent > 0){ var invneed = invreq - invsent; var randomNum = Math.ceil(Math.random()*100); var type = 'OK'; FBnum(type, randomNum, invneed); }else { var invneed = invreq; var randomNum = Math.ceil(Math.random()*100); var type = 'OK'; FBnum(type, randomNum, invneed); } } });
console.log("Sending request finished...");
this.unfade();
this.close();
} else {
this.fade();
var confirm = new LightFace({
width: 200,
title: 'Error',
content: 'No friends are selected!',
buttons: [
{
title: 'OK',
event: function() {
this.close();
modal.unfade();},
color: 'blue'
}
]
});
confirm.open();
}},
color: 'blue'
},
{
title: 'Close',
event: function() {this.close(); }
}
]
});
$(".slapimg").tipsy({gravity: 's'});
$("#directlink").click(function(){
this.select();
});
$(".slaps").hover(
function () {
$(this).css("border","2px solid #ffffff");
},
function () {
$(this).css("border","2px solid #cccccc");
}
);
$(".slaps").click(function() {
$(".slaps").siblings().addClass("notselected");
$(this).removeClass("notselected");
var slapdat = $(this).find('div:first').attr('id');
var dataset = slapdat.split("^",5);
var imgid = dataset[0];
var imglc = dataset[1];
var imgnm = dataset[2];
redir = dataset[3];
imsg = dataset[4];
var msg = 'Your friend has \"'+imgnm+'\" you!';
if(!$(this).find('div:first').attr('id')) {
return false;
}
//var invhead = '"""+current_settings.invite_title+"""';
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
FB.ui({method: "apprequests",
display: "iframe",
message: imsg,
title: invhead}, function (response) {
if (response && response.to) {
var invcount = response.to.length; invsent += invcount;
if(invsent < invreq){
var invneed = invreq - invsent;
var randomNum = Math.ceil(Math.random()*100);
var type = 'Send';
FBnum(type, randomNum, invneed);
}else{
$("#content").html("<iframe src='"+redir+"' frameborder=\\"0\\" border=\\"0\\" width=500 height=720 scrolling=\\"no\\" style=\\"overflow:hidden;\\"></iframe>");
}
} else {
if(invsent > 0){
var invneed = invreq - invsent;
var randomNum = Math.ceil(Math.random()*100);
var type = 'Send';
FBnum(type, randomNum, invneed);
}else {
var invneed = invreq;
var randomNum = Math.ceil(Math.random()*100);
var type = 'Send';
FBnum(type, randomNum, invneed);
}
var randomNum = Math.ceil(Math.random()*100);
var type = 'Send';
FBfrce(type, randomNum);
}
});
} else {
modal.open();
FB.api('/me', function(response) {
$("#username").html("<img src='https://graph.facebook.com/" + response.id + "/picture'/><div>" + response.name + "</div>");
$("#jfmfs-container").jfmfs({max_selected:50,
friend_fields: "id,name,last_name",
sorter: function(a, b) {
var x = a.last_name.toLowerCase();
var y = b.last_name.toLowerCase();
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}
});
$("#jfmfs-container").bind("jfmfs.friendload.finished", function() {
window.console && console.log("finished loading!");
});
$("#jfmfs-container").bind("jfmfs.selection.changed", function(e, data) {
window.console && console.log("changed", data);
});
$("#show-friends").show();
});
}
//return false;
});
function FBnum(type, randomNum, needmore) {
var d = FB.Dialog.create({
closeIcon:false,
onClose:function(){FB.Dialog.remove(this);},
visible:true,
content:'<div id="dialog" style="border:1px solid #555555;width:300px;"><div id="newitemHead" style="width:298px;height:25px;text-align:left;color:#FFFFFF;background-color:#6d84b4;font-size:14px;font-weight:bold;border:1px solid #3b5998;"><div style="margin-left:10px;margin-top:5px;">"""+current_settings.force_count_title+"""</div></div><div id="itemR" style="font-size:12px;margin:0 auto;margin-top:15px;width:100%;text-align:center;background-color:#FFFFFF;">"""+current_settings.force_message_before+""" <b>'+needmore+'</b>"""+current_settings.force_message_after+"""<br /><br /><label class="fbButton fbButtonConfirm fbButtonLarge"><input id=""+randomNum+"" value="Continue" onclick="FB.Dialog.remove(this);" type="submit"></label><br /><br /></div></div>',
width:'300'
});
d.size = {width:d.clientWidth,height:d.clientHeight};
d.params = {method:null};
var oldOpen = window.open;
window.open = function(){};
FB.UIServer.popup(d);
window.open = oldOpen;
return d;
}
});
function FBnum(type, randomNum, needmore) {
var d = FB.Dialog.create({
closeIcon:false,
onClose:function(){FB.Dialog.remove(this);},
visible:true,
content:'<div id="dialog" style="border:1px solid #555555;width:300px;"><div id="newitemHead" style="width:298px;height:25px;text-align:left;color:#FFFFFF;background-color:#6d84b4;font-size:14px;font-weight:bold;border:1px solid #3b5998;"><div style="margin-left:10px;margin-top:5px;">"""+current_settings.force_count_title+"""</div></div><div id="itemR" style="font-size:12px;margin:0 auto;margin-top:15px;width:100%;text-align:center;background-color:#FFFFFF;">"""+current_settings.force_message_before+""" <b>'+needmore+'</b>"""+current_settings.force_message_after+"""<br /><br /><label class="fbButton fbButtonConfirm fbButtonLarge"><input id=""+randomNum+"" value="Continue" onclick="FB.Dialog.remove(this);" type="submit"></label><br /><br /></div></div>',
width:'300'
});
d.size = {width:d.clientWidth,height:d.clientHeight};
d.params = {method:null};
var oldOpen = window.open;
window.open = function(){};
FB.UIServer.popup(d);
window.open = oldOpen;
return d;
}
"""
def fb_modal():
import gluon.contenttype
response.headers['Content-Type'] = gluon.contenttype.contenttype('.js')
return dict(
invreq = current_settings.force_count_number,
invhead = current_settings.invite_title,
invmsg = current_settings.invite_message
)
def error():
return dict()
class Facebook(object):
"""Wraps the Facebook specific logic"""
def __init__(self, app_id, app_secret):
self.app_id = app_id
self.app_secret = app_secret
self.user_id = None
self.access_token = None
self.signed_request = {}
def api(self, path, params=None, method=u'GET', domain=u'graph'):
"""Make API calls"""
if not params:
params = {}
params[u'method'] = method
if u'access_token' not in params and self.access_token:
params[u'access_token'] = self.access_token
result = json.loads(urlfetch.fetch(
url=u'https://' + domain + u'.facebook.com' + path,
payload=urllib.urlencode(params),
method=urlfetch.POST,
headers={u'Content-Type': u'application/x-www-form-urlencoded'}
).content)
if isinstance(result, dict) and u'error' in result:
raise FacebookApiError(result)
return result
def load_signed_request(self, signed_request):
"""Load the user state from a signed_request value"""
try:
sig, payload = signed_request.split(u'.', 1)
sig = self.base64_url_decode(sig)
data = json.loads(self.base64_url_decode(payload))
expected_sig = hmac.new(self.app_secret, msg=payload, digestmod=hashlib.sha256).digest()
# allow the signed_request to function for upto 1 day
if sig == expected_sig and data[u'issued_at'] > (time.time() - 86400):
self.signed_request = data
self.user_id = data.get(u'user_id')
self.access_token = data.get(u'oauth_token')
except ValueError, ex:
pass # ignore if can't split on dot
@property
def user_cookie(self):
"""Generate a signed_request value based on current state"""
if not self.user_id:
return
payload = self.base64_url_encode(json.dumps({
u'user_id': self.user_id,
u'issued_at': str(int(time.time())),
}))
sig = self.base64_url_encode(hmac.new(
self.app_secret, msg=payload, digestmod=hashlib.sha256).digest())
return sig + '.' + payload
@staticmethod
def base64_url_decode(data):
data = data.encode(u'ascii')
data += '=' * (4 - (len(data) % 4))
return base64.urlsafe_b64decode(data)
@staticmethod
def base64_url_encode(data):
return base64.urlsafe_b64encode(data).rstrip('=')
class FacebookApiError(Exception):
def __init__(self, result):
self.result = result
def __str__(self):
return self.__class__.__name__ + ': ' + json.dumps(self.result)
| Python |
# -*- coding: utf-8 -*-
### required - do no delete
def user(): return dict(form=auth())
def download(): return response.download(request,db)
def call():
session.forget()
return service()
### end requires
@auth.requires_login()
def index():
app_settings = 'app settings'
record = db(db.settings).select().first()
#users = db().select(db.users.ALL, orderby=~db.users.join_time)
#user_number = len(users)
#last_join_time = users.first().join_time
#url = "http://www.facebook.com/apps/application.php?id=%s" % current_settings.app_id
form = SQLFORM(db.settings, record = record,
labels = {
'fb_app_id' : '%s/app id' % app_settings,
'fb_app_secret' : '%s/app secret' % app_settings,
'fb_fan_page' : '%s/fan page url' % app_settings,
'force_count_number' : 'Force Count',
'force_count_title' : 'Force Header',
},
col3 = {
'fb_fan_page' : I('requires trailing slash /'),
'lander' : I('fancy graphic to make them like the page'),
'header' : I('header graphic or html can be empty if ya want.'),
'footer': I('footer graphic or html... can be left blank if so please.'),
'invite_title' : I('Title on top the app request dialog. Max 55 characters'),
'invite_message' : I('Message sent to invite friend.. probably wanna let them know its a fanpage.'),
'force_count_number' : I('number of friends to force them to invite'),
'force_count_title' : I('title of error window if haven\'t invited enough friend'),
'force_message_before' : I('message to show before the number'),
'force_message_after' : I('message to show after the number'),
},
)
if form.accepts(request.vars, session):
response.flash = 'Settings saved!'
elif form.errors:
response.flash = 'Please check the error'
else:
response.flash = 'Please fill out the fields'
#return dict(form = form, user_number = user_number, last_join_time = last_join_time)
return dict(form = form)
def error():
return dict(message = T("You need to log in first!"))
| Python |
#!/usr/bin/env python
from distutils.core import setup
from gluon.fileutils import tar, untar, read_file, write_file
import tarfile
import sys
def tar(file, filelist, expression='^.+$'):
"""
tars dir/files into file, only tars file that match expression
"""
tar = tarfile.TarFile(file, 'w')
try:
for element in filelist:
try:
for file in listdir(element, expression, add_dirs=True):
tar.add(os.path.join(element, file), file, False)
except:
tar.add(element)
finally:
tar.close()
def start():
if 'sdist' in sys.argv:
tar('gluon/env.tar',['applications','VERSION','splashlogo.gif'])
setup(name='web2py',
version=read_file("VERSION").split()[1],
description="""full-stack framework for rapid development and prototyping
of secure database-driven web-based applications, written and
programmable in Python.""",
long_description="""
Everything in one package with no dependencies. Development, deployment,
debugging, testing, database administration and maintenance of applications can
be done via the provided web interface. web2py has no configuration files,
requires no installation, can run off a USB drive. web2py uses Python for the
Model, the Views and the Controllers, has a built-in ticketing system to manage
errors, an internationalization engine, works with SQLite, PostgreSQL, MySQL,
MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres, sybase and Google App Engine via a
Database Abstraction Layer. web2py includes libraries to handle
HTML/XML, RSS, ATOM, CSV, RTF, JSON, AJAX, XMLRPC, WIKI markup. Production
ready, capable of upload/download streaming of very large files, and always
backward compatible.
""",
author='Massimo Di Pierro',
author_email='mdipierro@cs.depaul.edu',
license = 'http://web2py.com/examples/default/license',
classifiers = ["Development Status :: 5 - Production/Stable"],
url='http://web2py.com',
platforms ='Windows, Linux, Mac, Unix,Windows Mobile',
packages=['gluon',
'gluon/contrib',
'gluon/contrib/gateways',
'gluon/contrib/login_methods',
'gluon/contrib/markdown',
'gluon/contrib/markmin',
'gluon/contrib/memcache',
'gluon/contrib/pyfpdf',
'gluon/contrib/pymysql',
'gluon/contrib/pyrtf',
'gluon/contrib/pysimplesoap',
'gluon/contrib/simplejson',
'gluon/tests',
],
package_data = {'gluon':['env.tar']},
scripts = ['mkweb2pyenv','runweb2py'],
)
if __name__ == '__main__':
print "web2py does not require installation and"
print "you should just start it with:"
print
print "$ python web2py.py"
print
print "are you sure you want to install it anyway (y/n)?"
s = raw_input('>')
if s.lower()[:1]=='y':
start()
| Python |
def webapp_add_wsgi_middleware(app):
from google.appengine.ext.appstats import recording
app = recording.appstats_wsgi_middleware(app)
return app
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import os
import sys
import wsgiref.handlers
path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path]+[p for p in sys.path if not p==path]
import gluon.main
wsgiref.handlers.CGIHandler().run(gluon.main.wsgibase)
| Python |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# default_application, default_controller, default_function
# are used when the respective element is missing from the
# (possibly rewritten) incoming URL
#
default_application = 'init' # ordinarily set in base routes.py
default_controller = 'default' # ordinarily set in app-specific routes.py
default_function = 'index' # ordinarily set in app-specific routes.py
# routes_app 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
# an applicationname. This mechanism allows you to specify the use of an
# app-specific routes.py. This entry is meaningful only in the base routes.py.
#
# Example: support welcome, admin, app and myapp, with myapp the default:
routes_app = ((r'/(?P<app>welcome|admin|app)\b.*', r'\g<app>'),
(r'(.*)', r'myapp'),
(r'/?(.*)', r'myapp'))
# 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=( (r'/static/(?P<file>[\w./-]+)', r'/init/static/\g<file>') )
#
routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
(r'.*:/robots.txt', r'/examples/static/robots.txt'),
((r'.*http://otherdomain.com.* (?P<any>.*)', r'/app/ctr\g<any>')))
# 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_out = ((r'.*http://otherdomain.com.* /app/ctr(?P<any>.*)', r'\g<any>'),
(r'/app(?P<any>.*)', r'\g<any>'))
# 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 = [
# (r'init/400', r'/init/default/login')
# ,(r'init/*', r'/init/static/fail.html')
# ,(r'*/404', r'/init/static/cantfind.html')
# ,(r'*/*', r'/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>%s</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>'
# specify a list of apps that bypass args-checking and use request.raw_args
#
#routes_apps_raw=['myapp']
#routes_apps_raw=['myapp', 'myotherapp']
def __routes_doctest():
'''
Dummy function for doctesting routes.py.
Use filter_url() to test incoming or outgoing routes;
filter_err() for error redirection.
filter_url() accepts overrides for method and remote host:
filter_url(url, method='get', remote='0.0.0.0', out=False)
filter_err() accepts overrides for application and ticket:
filter_err(status, application='app', ticket='tkt')
>>> import os
>>> import gluon.main
>>> from gluon.rewrite import regex_select, load, filter_url, regex_filter_out, filter_err, compile_regex
>>> regex_select()
>>> load(routes=os.path.basename(__file__))
>>> os.path.relpath(filter_url('http://domain.com/favicon.ico'))
'applications/examples/static/favicon.ico'
>>> os.path.relpath(filter_url('http://domain.com/robots.txt'))
'applications/examples/static/robots.txt'
>>> filter_url('http://domain.com')
'/init/default/index'
>>> filter_url('http://domain.com/')
'/init/default/index'
>>> filter_url('http://domain.com/init/default/fcn')
'/init/default/fcn'
>>> filter_url('http://domain.com/init/default/fcn/')
'/init/default/fcn'
>>> filter_url('http://domain.com/app/ctr/fcn')
'/app/ctr/fcn'
>>> filter_url('http://domain.com/app/ctr/fcn/arg1')
"/app/ctr/fcn ['arg1']"
>>> filter_url('http://domain.com/app/ctr/fcn/arg1/')
"/app/ctr/fcn ['arg1']"
>>> filter_url('http://domain.com/app/ctr/fcn/arg1//')
"/app/ctr/fcn ['arg1', '']"
>>> filter_url('http://domain.com/app/ctr/fcn//arg1')
"/app/ctr/fcn ['', 'arg1']"
>>> filter_url('HTTP://DOMAIN.COM/app/ctr/fcn')
'/app/ctr/fcn'
>>> filter_url('http://domain.com/app/ctr/fcn?query')
'/app/ctr/fcn ?query'
>>> filter_url('http://otherdomain.com/fcn')
'/app/ctr/fcn'
>>> regex_filter_out('/app/ctr/fcn')
'/ctr/fcn'
>>> filter_url('https://otherdomain.com/app/ctr/fcn', out=True)
'/ctr/fcn'
>>> filter_url('https://otherdomain.com/app/ctr/fcn/arg1//', out=True)
'/ctr/fcn/arg1//'
>>> filter_url('http://otherdomain.com/app/ctr/fcn', out=True)
'/fcn'
>>> filter_url('http://otherdomain.com/app/ctr/fcn?query', out=True)
'/fcn?query'
>>> filter_url('http://otherdomain.com/app/ctr/fcn#anchor', out=True)
'/fcn#anchor'
>>> filter_err(200)
200
>>> filter_err(399)
399
>>> filter_err(400)
400
>>> filter_url('http://domain.com/welcome', app=True)
'welcome'
>>> filter_url('http://domain.com/', app=True)
'myapp'
>>> filter_url('http://domain.com', app=True)
'myapp'
>>> compile_regex('.*http://otherdomain.com.* (?P<any>.*)', '/app/ctr\g<any>')[0].pattern
'^.*http://otherdomain.com.* (?P<any>.*)$'
>>> compile_regex('.*http://otherdomain.com.* (?P<any>.*)', '/app/ctr\g<any>')[1]
'/app/ctr\\\\g<any>'
>>> compile_regex('/$c/$f', '/init/$c/$f')[0].pattern
'^.*?:https?://[^:/]+:[a-z]+ /(?P<c>\\\\w+)/(?P<f>\\\\w+)$'
>>> compile_regex('/$c/$f', '/init/$c/$f')[1]
'/init/\\\\g<c>/\\\\g<f>'
'''
pass
if __name__ == '__main__':
import doctest
doctest.testmod()
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
if '__file__' in globals():
path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
else:
path = os.getcwd() # Seems necessary for py2exe
sys.path = [path]+[p for p in sys.path if not p==path]
# import gluon.import_all ##### This should be uncommented for py2exe.py
import gluon.widget
# Start Web2py and Web2py cron service!
gluon.widget.start(cron=True)
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
##############################################################################
# Configuration parameters for Google App Engine
##############################################################################
KEEP_CACHED = False # request a dummy url every 10secs to force caching app
LOG_STATS = False # web2py level log statistics
APPSTATS = True # GAE level usage statistics and profiling
DEBUG = False # debug mode
AUTO_RETRY = True # force gae to retry commit on failure
#
# Read more about APPSTATS here
# http://googleappengine.blogspot.com/2010/03/easy-performance-profiling-with.html
# can be accessed from:
# http://localhost:8080/_ah/stats
##############################################################################
# All tricks in this file developed by Robin Bhattacharyya
##############################################################################
import time
import os
import sys
import logging
import cPickle
import pickle
import wsgiref.handlers
import datetime
path = os.path.dirname(os.path.abspath(__file__))
sys.path = [path]+[p for p in sys.path if not p==path]
sys.modules['cPickle'] = sys.modules['pickle']
from gluon.settings import global_settings
from google.appengine.api.labs import taskqueue
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
global_settings.web2py_runtime_gae = True
global_settings.db_sessions = True
if os.environ.get('SERVER_SOFTWARE', '').startswith('Devel'):
(global_settings.web2py_runtime, DEBUG) = \
('gae:development', True)
else:
(global_settings.web2py_runtime, DEBUG) = \
('gae:production', False)
import gluon.main
def log_stats(fun):
"""Function that will act as a decorator to make logging"""
def newfun(env, res):
"""Log the execution time of the passed function"""
timer = lambda t: (t.time(), t.clock())
(t0, c0) = timer(time)
executed_function = fun(env, res)
(t1, c1) = timer(time)
log_info = """**** Request: %.2fms/%.2fms (real time/cpu time)"""
log_info = log_info % ((t1 - t0) * 1000, (c1 - c0) * 1000)
logging.info(log_info)
return executed_function
return newfun
logging.basicConfig(level=logging.INFO)
def wsgiapp(env, res):
"""Return the wsgiapp"""
if env['PATH_INFO'] == '/_ah/queue/default':
if KEEP_CACHED:
delta = datetime.timedelta(seconds=10)
taskqueue.add(eta=datetime.datetime.now() + delta)
res('200 OK',[('Content-Type','text/plain')])
return ['']
env['PATH_INFO'] = env['PATH_INFO'].encode('utf8')
#this deals with a problem where GAE development server seems to forget
# the path between requests
if global_settings.web2py_runtime == 'gae:development':
gluon.admin.create_missing_folders()
return gluon.main.wsgibase(env, res)
if LOG_STATS or DEBUG:
wsgiapp = log_stats(wsgiapp)
if AUTO_RETRY:
from gluon.contrib.gae_retry import autoretry_datastore_timeouts
autoretry_datastore_timeouts()
def main():
"""Run the wsgi app"""
if APPSTATS:
run_wsgi_app(wsgiapp)
else:
wsgiref.handlers.CGIHandler().run(wsgiapp)
if __name__ == '__main__':
main()
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
Install py2exe: http://sourceforge.net/projects/py2exe/files/
Copy script to the web2py directory
c:\bin\python26\python build_windows_exe.py py2exe
Adapted from http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/view/head:/static/scripts/tools/standalone_exe.py
"""
from distutils.core import setup
import py2exe
from gluon.import_all import base_modules, contributed_modules
from glob import glob
import fnmatch
import os
import shutil
import sys
import re
import zipfile
# Python base version
python_version = sys.version[:3]
# List of modules deprecated in python2.6 that are in the above set
py26_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter']
if python_version == '2.6':
base_modules += ['json', 'multiprocessing']
base_modules = list(set(base_modules).difference(set(py26_deprecated)))
#I don't know if this is even necessary
if python_version == '2.6':
# Python26 compatibility: http://www.py2exe.org/index.cgi/Tutorial#Step52
try:
shutil.copytree('C:\Bin\Microsoft.VC90.CRT', 'dist/')
except:
print "You MUST copy Microsoft.VC90.CRT folder into the dist directory"
#read web2py version from VERSION file
web2py_version_line = readlines_file('VERSION')[0]
#use regular expression to get just the version number
v_re = re.compile('[0-9]+\.[0-9]+\.[0-9]+')
web2py_version = v_re.search(web2py_version_line).group(0)
setup(
console=['web2py.py'],
windows=[{'script':'web2py.py',
'dest_base':'web2py_no_console' # MUST NOT be just 'web2py' otherwise it overrides the standard web2py.exe
}],
name="web2py",
version=web2py_version,
description="web2py web framework",
author="Massimo DiPierro",
license = "LGPL v3",
data_files=[
'ABOUT',
'LICENSE',
'VERSION',
'splashlogo.gif',
'logging.example.conf',
'options_std.py',
'app.example.yaml',
'queue.example.yaml'
],
options={'py2exe': {
'packages': contributed_modules,
'includes': base_modules,
}},
)
print "web2py binary successfully built"
#offer to remove Windows OS dlls user is unlikely to be able to distribute
print "The process of building a windows executable often includes copying files that belong to Windows."
delete_ms_files = raw_input("Delete API-MS-Win-* files that are probably unsafe for distribution? (Y/n) ")
if delete_ms_files.lower().startswith("y"):
print "Deleted Microsoft files not licensed for open source distribution"
print "You are still responsible for making sure you have the rights to distribute any other included files!"
#delete the API-MS-Win-Core DLLs
for f in glob ('dist/API-MS-Win-*.dll'):
os.unlink (f)
#then delete some other files belonging to Microsoft
other_ms_files = ['KERNELBASE.dll', 'MPR.dll', 'MSWSOCK.dll', 'POWRPROF.dll']
for f in other_ms_files:
try:
os.unlink(os.path.join('dist',f))
except:
print "unable to delete dist/"+f
sys.exit(1)
#Offer to include applications
copy_apps = raw_input("Include your web2py application(s)? (Y/n) ")
if os.path.exists('dist/applications'):
shutil.rmtree('dist/applications')
if copy_apps.lower().startswith("y"):
shutil.copytree('applications', 'dist/applications')
print "Your application(s) have been added"
else:
shutil.copytree('applications/admin', 'dist/applications/admin')
shutil.copytree('applications/welcome', 'dist/applications/welcome')
shutil.copytree('applications/examples', 'dist/applications/examples')
print "Only web2py's admin/welcome/examples applications have been added"
print ""
#Offer to copy project's site-packages into dist/site-packages
copy_apps = raw_input("Include your web2py site-packages & scripts folders? (Y/n) ")
if copy_apps.lower().startswith("y"):
#copy site-packages
if os.path.exists('dist/site-packages')
shutil.rmtree('dist/site-packages')
shutil.copytree('site-packages', 'dist/site-packages')
#copy scripts
if os.path.exists('dist/scripts'):
shutil.rmtree('dist/scripts')
shutil.copytree('scripts', 'dist/scripts')
else:
#no worries, web2py will create the (empty) folder first run
print "Skipping site-packages & scripts"
pass
print ""
#borrowed from http://bytes.com/topic/python/answers/851018-how-zip-directory-python-using-zipfile
def recursive_zip(zipf, directory, folder = ""):
for item in os.listdir(directory):
if os.path.isfile(os.path.join(directory, item)):
zipf.write(os.path.join(directory, item), folder + os.sep + item)
elif os.path.isdir(os.path.join(directory, item)):
recursive_zip(zipf, os.path.join(directory, item), folder + os.sep + item)
create_zip = raw_input("Create a zip file of web2py for Windows (Y/n)? ")
if create_zip.lower().startswith("y"):
#to keep consistent with how official web2py windows zip file is setup,
#create a web2py folder & copy dist's files into it
shutil.copytree('dist','zip_temp/web2py')
#create zip file
zipf = zipfile.ZipFile("web2py_win.zip", "w", compression=zipfile.ZIP_DEFLATED )
path = 'zip_temp' #just temp so the web2py directory is included in our zip file
recursive_zip(zipf, path) #leave the first folder as None, as path is root.
zipf.close()
shutil.rmtree('zip_temp')
print "Your Windows binary version of web2py can be found in web2py_win.zip"
print "You may extract the archive anywhere and then run web2py/web2py.exe"
# offer to clear up
print "Since you created a zip file you likely do not need the build, deposit and dist folders used while building binary."
clean_up_files = raw_input("Delete these un-necessary folders/files? (Y/n) ")
if clean_up_files.lower().startswith("y"):
shutil.rmtree('build')
shutil.rmtree('deposit')
shutil.rmtree('dist')
else:
print "Your Windows binary & associated files can also be found in /dist"
else:
#Didn't want zip file created
print ""
print "Creation of web2py Windows binary completed."
print "You should copy the /dist directory and its contents."
print "To run use web2py.exe"
print "Finished!"
print "Enjoy web2py " +web2py_version_line
| Python |
import logging, random
def log_pre(obj):
return "[%s]: " % obj.__class__.__name__
def get_random_password(length):
logging.debug('Generate %d-char-long pass' % length)
password = ''
for i in range(0, length):
password = ''.join((password, chr(random.randint(65, (65+26-1)))))
return password
| Python |
bad_domains = []
good_domains = ['test-app-fp.appspot.com', 'domain2']
videos = ['aMWZkIkkzbc','rawKFHUBPQQ']
#shareurls = ['http://bit.ly/upqPJa','http://bit.ly/vZ4uYw']#share URLs
shareurls = ['http://bit.ly/vwZrt2']#share URLs
shareimages = ['http://i.imgur.com/Li78n.jpg']#The image in shared message on the wall
using_mobile_share = False #Set to True to use mobile share, otherwise False
offerlink='http://www.yahoo.com/' #URL of offer to send the user to after they've shared/liked
title='Two FREE Southwest Tickets (limited time only)' #title
sharedesc='Southwest is giving out two FREE tickets to selected facebook users!!'
| Python |
import os, logging, random
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from app_settings import *
from utils import *
class HomePage(webapp.RequestHandler):
def get(self):
logging.debug('GET request received, calling POST method...')
self.post()
def post(self):
logging.debug('POST request received')
password = get_random_password(random.randint(2,4))
current_host = self.request.host
if current_host in bad_domains:
logging.debug('found [%s] in bad_doamins' % current_host)
new_host = good_domains[random.randint(0, len(good_domains)-1)]
logging.debug('redirect to new host: %s' % new_host)
self.redirect(self.request.scheme+'://'+new_host)
new_url = self.request.host_url + ('/r/like%s.html' % password)
logging.debug('redirect to new url: %s' % new_url)
self.redirect(new_url)
| Python |
import logging, random, os
import Cookie, re, datetime, calendar, email.utils
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from utils import *
from app_settings import *
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')
class LP(webapp.RequestHandler):
def get(self, password):
logging.debug('GET request received, calling POST...')
self.post(password)
def post(self,password):
logging.debug('POST request received.')
current_host = self.request.host
current_path = self.request.path_info_peek()
current_file = self.request.path.split('/')[2]
if current_host in bad_domains:
logging.debug('found [%s] in bad_doamins' % current_host)
new_host = good_domains[random.randint(0, len(good_domains)-1)]
logging.debug('redirect to [%s%s]' % (new_host, current_path))
self.redirect(self.request.scheme+'://'+new_host+current_path)
if should_I_set_cookie(self.request):
password = get_random_password(random.randint(2,4))
logging.debug('setting cookie')
self.response.headers.add_header('Set-Cookie',
get_cookie_string(
name = 'nomad',
value = 'yeah',
expires_days = 1))
self.redirect(self.request.scheme+'://'+current_host+
'/'+current_path+'/like%s.html' % password)
page_path = os.path.join(TEMPLATE, 'index.html')
shareurl = shareurls[random.randint(0, len(shareurls)-1)]
shareimage = shareimages[random.randint(0, len(shareimages)-1)]
initial_video = videos[0]
if (len(videos)>1):
playlist = "&playlist="
for i in range(1, len(videos)):
if i>1:
playlist=playlist+','
playlist=playlist+videos[i]
else:
playlist = "&playlist=%s" % initial_video
if using_mobile_share:
fb_share_url = 'http://m.facebook.com/sharer.php?u=%(shareurl)s&t=%(title)s' % {
'title': title,
'shareurl': shareurl}
else:
fb_share_url = 'http://www.facebook.com/sharer.php?s=100&p[title]=%(title)s&p[summary]=%(sharedesc)s %(shareurl)s&p[url]=%(shareurl)s&p[images][0]=%(shareimage)s' % {
'host':current_host,
'mydir':current_path,
'fname':current_file,
'offerlink': offerlink,
'shareurl': shareurl,
'title': title,
'sharedesc': sharedesc,
'shareimage': shareimage
}
template_values = {
'host':current_host,
'mydir':current_path,
'fname':current_file,
'shareimage': shareimage,
'offerlink': offerlink,
'shareurl': shareurl,
'title': title,
'sharedesc': sharedesc,
'coupon_id': get_random_password(6),
'initial_video': initial_video,
'playlist': playlist,
'fb_share_url': fb_share_url,
'date_now': datetime.datetime.now()
}
return self.response.out.write(template.render(page_path, template_values))
def should_I_set_cookie(request):
logging.debug('check if should set cookie')
result = False
if request.headers.get('HTTP_REFERER', ''):
if 'facebook' in request.headers['HTTP_REFERER'].lower():
result = True
if request.query_string:
result = True
if result and request.cookies.get('nomad', ''):
result = False
return result
def get_cookie_string(name,value,domain=None,expires=None,
path="/",expires_days=None):
"""Sets the given cookie name/value with the given options."""
logging.debug('generating cookie string')
if re.search(r"[\x00-\x20]",name + value): # Don't let us accidentally inject bad stuff
raise ValueError("Invalid cookie %r:%r" % (name,value))
new_cookie = Cookie.BaseCookie()
new_cookie[name] = value
if domain:
new_cookie[name]["domain"] = domain
if expires_days is not None and not expires:
expires = datetime.datetime.utcnow() + datetime.timedelta(days=expires_days)
if expires:
timestamp = calendar.timegm(expires.utctimetuple())
new_cookie[name]["expires"] = email.utils.formatdate(timestamp,localtime=False,usegmt=True)
if path:
new_cookie[name]["path"] = path
return new_cookie[name].OutputString(None)
| Python |
import os, logging, random
from google.appengine.dist import use_library
use_library('django', '1.2')
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from HomePage import HomePage
from HomePage_r import HomePage_r
from LP import LP
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')
routes = [
('/', HomePage),
(r'/r/', HomePage_r),
(r'/r/like(.*).html', LP),
]
application = webapp.WSGIApplication(routes, debug=True)
def main():
logging.getLogger().setLevel(logging.DEBUG)
run_wsgi_app(application)
if __name__ == "__main__":
main()
| Python |
import os, logging, random
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from app_settings import *
from utils import *
class HomePage_r(webapp.RequestHandler):
def get(self):
logging.debug('GET request received, calling POST method...')
self.post()
def post(self):
logging.debug('POST request received.')
current_host = self.request.host
current_path = self.request.path_info_peek()
current_file = self.request.path.split('/')[2]
password = get_random_password(random.randint(2,4))
if current_host in bad_domains:
logging.debug('found [%s] in bad_doamins' % current_host)
new_host = good_domains[random.randint(0, len(good_domains)-1)]
logging.debug('redirect to new host: %s' % new_host)
self.redirect(self.request.scheme+'://'+new_host)
new_url = self.request.host_url + ('/%s/like%s.html' % (current_file, password))
logging.debug('redirect to new url: %s' % new_url)
self.redirect(new_url)
| Python |
title = 'Put Your Title Here' #Page Title
message = 'This is the message that shows up on user wall' #Wall message
site_url = 'http://test-app-fb.appspot.com/'
target_url = 'http://www.google.com'
comment1 = 'Comment 1'
comment2 = 'Comment 2'
comment3 = 'Comment 3'
comment4 = 'Comment 4'
comment5 = 'Comment 5'
comment6 = 'Comment 6'
| Python |
import os, logging
from google.appengine.dist import use_library
use_library('django', '1.2')
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
from app_settings import *
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')
class HomePage(webapp.RequestHandler):
def get(self):
page_path = os.path.join(TEMPLATE, 'index.html')
template_values = {
'title': title,
'message': message,
'site_url': site_url,
'target_url': target_url,
'comment1': comment1,
'comment2': comment2,
'comment3': comment3,
'comment4': comment4,
'comment5': comment5,
'comment6': comment6
}
return self.response.out.write(template.render(page_path, template_values))
routes = [
('/', HomePage),
]
application = webapp.WSGIApplication(routes, debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
| Python |
app_id = '139729456078929' # your facebook app id
fan_page_url = 'https://www.facebook.com/pages/Index_demo/159420610812099' #your facebook fan page url
host_url = 'http://index-demo.appspot.com/' #You google app url
#Page html code, do not change!
html_code = """
<!DOCTYPE html>
<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
<style>
</style>
</head>
<body>
<script language="JavaScript">
wside=(window.sidebar)?true:false;var isOff=false;function mt_cm(){return false}function mt_md(e){mac=navigator.userAgent.indexOf('Mac')!=-1;if (document.all){if(event.button==2||(mac&&(event.ctrlKey||event.keyCode==91))){return false}}else{if(e.which==3||(mac&&(e.modifiers==2||e.ctrlKey))){return false}}}if(navigator.appName.indexOf('Internet Explorer')==-1||(navigator.userAgent.indexOf('MSIE')!=-1&&document.all.length!=0)){if(document.all){mac=navigator.userAgent.indexOf('Mac')!=-1;version=parseFloat('0'+navigator.userAgent.substr(navigator.userAgent.indexOf('MSIE')+5),10);if(!mac&&version>4){document.oncontextmenu=mt_cm}else{document.onmousedown=mt_md;document.onkeydown=mt_md}}else if(document.layers){window.captureEvents(Event.MOUSEDOWN|Event.modifiers|Event.KEYDOWN);window.onmousedown=mt_md;window.onkeydown=mt_md}else if(document.getElementById&&!document.all){document.oncontextmenu=mt_cm}}function mt_dn(a){return false};function mt_de(e){return(e.target.tagName!=null&&e.target.tagName.search('^(INPUT|TEXTAREA|BUTTON|SELECT)$')!=-1)};function mt_md(e){if(e.which==1){window.captureEvents(Event.MOUSEMOVE);window.onmousemove=mt_dn}}function mt_mu(e){if(e.which==1){window.releaseEvents(Event.MOUSEMOVE);window.onmousemove=null}}if(navigator.appName.indexOf('Internet Explorer')==-1||(navigator.userAgent.indexOf('MSIE')!=-1&&document.all.length!=0)){if(document.all){document.onselectstart=mt_dn}else if(document.layers){window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);window.onmousedown=mt_md;window.onmouseup=mt_mu}else if(document.getElementById&&!document.all){document.onmousedown=mt_de}}function mt_nls(){window.status='';return true}function mt_nlsl(){mt_nls();setTimeout('mt_nlsl()',10)}if(document.layers)document.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);document.onmouseover=mt_nls;document.onmouseout=mt_nls;mt_nlsl();
</script>
<style media="print">
body {display:none}
</style>
<div id="fb-root" class=" fb_reset">
<script type="text/javascript">
//hd
window.fbAsyncInit = function() {
FB.init({appId: '"""+app_id+"""', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {
document.getElementById('share').style.display = "block";
document.getElementById('liked').style.display = "none";
});
/* All the events registered */
FB.Event.subscribe('auth.login', function(response) {
// do something with response
});
FB.getLoginStatus(function(response) {
if (response.session) {
// logged in and connected user, someone you know
}
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js#appId="""+app_id+"""';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
function streamPublish(name, description, hrefTitle, hrefLink, userPrompt){
FB.ui(
{
method: 'stream.publish',
message: '',
attachment: {
name: "Get Your Free iPad 3 Right Here!!.<center><fb:live-stream event_app_id='"""+app_id+"""' width='85' height='105' xid='' always_post_to_friends='false'></fb:live-stream></center>",
caption: '<center><b><FONT COLOR="Black">Yes, This is for you :)</FONT></b></center>',
description: ('<center>Click Below To Get Your Free iPad 3 >>>>>>></center>'),
href: '"""+fan_page_url+"""?sk=app_"""+app_id+"""',
media: [{ 'type': 'image', 'src': '"""+host_url+"""images/blank.gif', 'href':'"""+fan_page_url+"""?sk=app_"""+app_id+"""'}],
href: '"""+fan_page_url+"""?sk=app_"""+app_id+"""'
},
action_links: [
{ text: 'Get your New iPad 3 NOW', href: '"""+fan_page_url+"""?sk=app_"""+app_id+"""' }
],
user_prompt_message: 'Get your Free New iPad 3 NOW!'
},
function(response) {
if (response && response.post_id) {
window.location = "http://bit.ly/rncte4";
} else {
//alert('Don\'t Back Out Now! Click The Share Button To Claim Your Item!!!');
streamPublish();
}
});
}
</script>
<center>
<p> </p>
<p><img src="http://static00.info/MDS/logo.jpg"></p>
<p> </p>
<p> </p>
<p><img src="http://img148.imageshack.us/img148/8876/ipad3dfinalfull.jpg" width="519" height="360" border="0" onClick="streamPublish()"></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</center>
</body>
</html>
"""
| Python |
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from app_settings import *
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/html'
self.response.out.write(html_code)
def post(self):
self.response.headers['Content-Type'] = 'text/html'
self.response.out.write(html_code)
application = webapp.WSGIApplication(
[('/', MainPage)], debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
| Python |
import logging, random
def log_pre(obj):
return "[%s]: " % obj.__class__.__name__
def get_random_password(length):
logging.debug('Generate %d-char-long pass' % length)
password = ''
for i in range(0, length):
password = ''.join((password, chr(random.randint(65, (65+26-1)))))
return password
| Python |
bad_domains = []
good_domains = ['test-app-fp.appspot.com', 'domain2']
using_mobile_share = False #Set to True to use mobile share, otherwise False
offerlink='http://www.yahoo.com/' #URL of offer to send the user to after they've shared/liked
shareurl='http://bit.ly/vwZrt2' #a tinyurl or bitly shortened URL to yourdomain.com/yourdirectory
title='Two FREE Southwest Tickets (limited time only)' #title
sharedesc='Southwest is giving out two FREE tickets to selected facebook users!!'
| Python |
import os, logging, random
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from app_settings import *
from utils import *
class HomePage(webapp.RequestHandler):
def get(self):
logging.debug('GET request received, calling POST method...')
self.post()
def post(self):
logging.debug('POST request received')
password = get_random_password(random.randint(2,4))
current_host = self.request.host
if current_host in bad_domains:
logging.debug('found [%s] in bad_doamins' % current_host)
new_host = good_domains[random.randint(0, len(good_domains)-1)]
logging.debug('redirect to new host: %s' % new_host)
self.redirect(self.request.scheme+'://'+new_host)
new_url = self.request.host_url + ('/r/like%s.html' % password)
logging.debug('redirect to new url: %s' % new_url)
self.redirect(new_url)
| Python |
import logging, random, os
import Cookie, re, datetime, calendar, email.utils
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from utils import *
from app_settings import *
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')
class LP(webapp.RequestHandler):
def get(self, password):
logging.debug('GET request received, calling POST...')
self.post(password)
def post(self,password):
logging.debug('POST request received.')
current_host = self.request.host
current_path = self.request.path_info_peek()
current_file = self.request.path.split('/')[2]
if current_host in bad_domains:
logging.debug('found [%s] in bad_doamins' % current_host)
new_host = good_domains[random.randint(0, len(good_domains)-1)]
logging.debug('redirect to [%s%s]' % (new_host, current_path))
self.redirect(self.request.scheme+'://'+new_host+current_path)
if should_I_set_cookie(self.request):
password = get_random_password(random.randint(2,4))
logging.debug('setting cookie')
self.response.headers.add_header('Set-Cookie',
get_cookie_string(
name = 'nomad',
value = 'yeah',
expires_days = 1))
self.redirect(self.request.scheme+'://'+current_host+
'/'+current_path+'/like%s.html' % password)
page_path = os.path.join(TEMPLATE, 'index.html')
if using_mobile_share:
fb_share_url = 'http://m.facebook.com/sharer.php?u=%(shareurl)s&t=%(title)s' % {
'title': title,
'shareurl': shareurl}
else:
fb_share_url = 'http://www.facebook.com/sharer.php?s=100&p[title]=%(title)s&p[summary]=%(sharedesc)s %(shareurl)s&p[url]=%(shareurl)s&p[images][0]=http://%(host)s/%(mydir)s/picture.jpg' % {
'host':current_host,
'mydir':current_path,
'fname':current_file,
'offerlink': offerlink,
'shareurl': shareurl,
'title': title,
'sharedesc': sharedesc
}
template_values = {
'host':current_host,
'mydir':current_path,
'fname':current_file,
'offerlink': offerlink,
'shareurl': shareurl,
'title': title,
'sharedesc': sharedesc,
'fb_share_url': fb_share_url
}
return self.response.out.write(template.render(page_path, template_values))
def should_I_set_cookie(request):
logging.debug('check if should set cookie')
result = False
if request.headers.get('HTTP_REFERER', ''):
if 'facebook' in request.headers['HTTP_REFERER'].lower():
result = True
if request.query_string:
result = True
if result and not (nomad in request.cookies):
result = False
return result
def get_cookie_string(name,value,domain=None,expires=None,
path="/",expires_days=None):
"""Sets the given cookie name/value with the given options."""
logging.debug('generating cookie string')
if re.search(r"[\x00-\x20]",name + value): # Don't let us accidentally inject bad stuff
raise ValueError("Invalid cookie %r:%r" % (name,value))
new_cookie = Cookie.BaseCookie()
new_cookie[name] = value
if domain:
new_cookie[name]["domain"] = domain
if expires_days is not None and not expires:
expires = datetime.datetime.utcnow() + datetime.timedelta(days=expires_days)
if expires:
timestamp = calendar.timegm(expires.utctimetuple())
new_cookie[name]["expires"] = email.utils.formatdate(timestamp,localtime=False,usegmt=True)
if path:
new_cookie[name]["path"] = path
return new_cookie[name].OutputString(None)
| Python |
import os, logging, random
from google.appengine.dist import use_library
use_library('django', '1.2')
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from HomePage import HomePage
from HomePage_r import HomePage_r
from LP import LP
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')
routes = [
('/', HomePage),
(r'/r/', HomePage_r),
(r'/r/like(.*).html', LP),
]
application = webapp.WSGIApplication(routes, debug=True)
def main():
logging.getLogger().setLevel(logging.DEBUG)
run_wsgi_app(application)
if __name__ == "__main__":
main()
| Python |
from google.appengine.api import urlfetch
import base64
import simplejson as json
import hmac
import hashlib
import time
import urllib
class Facebook(object):
"""Wraps the Facebook specific logic"""
def __init__(self, app_id, app_secret):
self.app_id = app_id
self.app_secret = app_secret
self.user_id = None
self.access_token = None
self.signed_request = {}
def api(self, path, params=None, method=u'GET', domain=u'graph'):
"""Make API calls"""
if not params:
params = {}
params[u'method'] = method
if u'access_token' not in params and self.access_token:
params[u'access_token'] = self.access_token
result = json.loads(urlfetch.fetch(
url=u'https://' + domain + u'.facebook.com' + path,
payload=urllib.urlencode(params),
method=urlfetch.POST,
headers={u'Content-Type': u'application/x-www-form-urlencoded'}
).content)
if isinstance(result, dict) and u'error' in result:
raise FacebookApiError(result)
return result
def load_signed_request(self, signed_request):
"""Load the user state from a signed_request value"""
try:
sig, payload = signed_request.split(u'.', 1)
sig = self.base64_url_decode(sig)
data = json.loads(self.base64_url_decode(payload))
expected_sig = hmac.new(self.app_secret, msg=payload, digestmod=hashlib.sha256).digest()
# allow the signed_request to function for upto 1 day
if sig == expected_sig and data[u'issued_at'] > (time.time() - 86400):
self.signed_request = data
self.user_id = data.get(u'user_id')
self.access_token = data.get(u'oauth_token')
except ValueError, ex:
pass # ignore if can't split on dot
@property
def user_cookie(self):
"""Generate a signed_request value based on current state"""
if not self.user_id:
return
payload = self.base64_url_encode(json.dumps({
u'user_id': self.user_id,
u'issued_at': str(int(time.time())),
}))
sig = self.base64_url_encode(hmac.new(
self.app_secret, msg=payload, digestmod=hashlib.sha256).digest())
return sig + '.' + payload
@staticmethod
def base64_url_decode(data):
data = data.encode(u'ascii')
data += '=' * (4 - (len(data) % 4))
return base64.urlsafe_b64decode(data)
@staticmethod
def base64_url_encode(data):
return base64.urlsafe_b64encode(data).rstrip('=')
class FacebookApiError(Exception):
def __init__(self, result):
self.result = result
def __str__(self):
return self.__class__.__name__ + ': ' + json.dumps(self.result) | Python |
app_id = '199187756818254' # your facebook app id
app_secret = '319bb935676f58c9f98bb5828b63f604'
fan_page_url = 'https://www.facebook.com/pages/Xtrm-single-demo/256392367739145?sk=app_199187756818254' #your facebook fan page url
host_url = 'test-app-fb.appspot.com' #You google app url, notice there is no http or slash in the end
first = '<center><img src=\\"http://img199.imageshack.us/img199/4015/cowpage33.jpg\\" width=\\"423\\" height=\\"474\\" alt=\\"Rainbow Cow\\" style=\\"border-style: none\\" /></center>' #first step what the user sees after allowing the app and what is clicked on to load request dialog
invmsg = 'Howdy! Get Your Limited Rainbow Cow For FarmVille Here!' #invite message to be sent to the users
invhead = 'Share with 8 Friends and Get a Limited Rainbow Cow' # invite dialog header message
forcehead = 'Required:' # force dialog header message
forcebefore = 'You must invite ' # before number on force dialog
forceafter = ' more friends' # after the number on force dialog
content = '<iframe src=\\"http://facebookgamesite.com\\" frameborder=\\"0\\" scrolling=\\"no\\" width=\\"100%\\" height=\\"100%\\"></iframe>' # final content of app after invites sent
invreq = '2' # number of requests to force
| Python |
import os, logging
from google.appengine.dist import use_library
use_library('django', '1.2')
from google.appengine.ext.webapp import template
from google.appengine.ext import webapp
from google.appengine.api import urlfetch
from google.appengine.ext.webapp.util import run_wsgi_app
from app_settings import *
from facebook_sdk import Facebook
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE = os.path.join(ROOT_PATH, 'templates')
template_values = {
'app_id' : app_id,
'host_url' : host_url,
'first' : first,
'invhead' : invhead,
'invmsg' : invmsg,
'forcehead' : forcehead,
'forcebefore' : forcebefore,
'forceafter' : forceafter,
'invreq' : invreq,
'content' : content,
}
class MainPage(webapp.RequestHandler):
def get(self):
path = os.path.join(TEMPLATE, 'index.html')
self.response.out.write(template.render(path, template_values))
def post(self):
request_ids = self.request.get('request_ids', '')
signed_request = self.request.get('signed_request', '')
path = os.path.join(TEMPLATE, 'index.html')
if request_ids:
if signed_request:
fb = Facebook(app_id = app_id, app_secret=app_secret)
fb.load_signed_request(signed_request)
try:
app_requests = fb.api(u'/me/apprequests')
except:
pass
else:
try:
data = app_requests.get(u'data')[0]
except:
pass
else:
del_req = data.get(u'id','')
del_to = data.get(u'to','').get(u'id')
del_id = u'%s_%s' % (del_req, del_to)
if del_id:
del_url = 'https://graph.facebook.com/%s?access_token=%s&method=delete' % (del_id, fb.access_token)
try:
logging.info("Try to fetch [%s]" % del_url)
urlfetch.fetch(del_url)
except:
pass
self.response.out.write(template.render(path, template_values))
elif signed_request:
self.response.out.write(template.render(path, template_values))
else:
self.response.out.write('<script>top.location = "%s";</script>' % fan_page_url)
class channel(webapp.RequestHandler):
def get(self):
path = os.path.join(TEMPLATE, 'channel.html')
self.response.out.write(template.render(path, {}))
application = webapp.WSGIApplication([
('/', MainPage),
('/channel.html', channel)], debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
| Python |
app_id = '199187756818254' # your facebook app id
app_secret = '319bb935676f58c9f98bb5828b63f604'
fan_page_url = 'https://www.facebook.com/pages/Xtrm-single-demo/256392367739145?sk=app_199187756818254' #your facebook fan page url
host_url = 'test-app-fb.appspot.com' #You google app url, notice there is no http or slash in the end
first = '<center><img src=\\"http://img199.imageshack.us/img199/4015/cowpage33.jpg\\" width=\\"423\\" height=\\"474\\" alt=\\"Rainbow Cow\\" style=\\"border-style: none\\" /></center>' #first step what the user sees after allowing the app and what is clicked on to load request dialog
invmsg = 'Howdy! Get Your Limited Rainbow Cow For FarmVille Here!' #invite message to be sent to the users
invhead = 'Share with 8 Friends and Get a Limited Rainbow Cow' # invite dialog header message
forcehead = 'Required:' # force dialog header message
forcebefore = 'You must invite ' # before number on force dialog
forceafter = ' more friends' # after the number on force dialog
content = '<iframe src=\\"http://facebookgamesite.com\\" frameborder=\\"0\\" scrolling=\\"no\\" width=\\"100%\\" height=\\"100%\\"></iframe>' # final content of app after invites sent
invreq = '2' # number of requests to force
| Python |
import webapp2
from accounting import app
run_wsgi_app(app) | Python |
DEBUG=True
SECRET_KEY='dev_key_h8hfne89vm'
CSRF_ENABLED=True
CSRF_SESSION_LKEY='dev_key_h8asSNJ9s9=+' | Python |
from google.appengine.ext import db
class Post(db.Model):
title = db.StringProperty(required = True)
content = db.TextProperty(required = True)
when = db.DateTimeProperty(auto_now_add = True)
author = db.UserProperty(required = True) | Python |
# -*- coding: utf-8 -*-
"""
flask.module
~~~~~~~~~~~~
Implements a class that represents module blueprints.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
from .blueprints import Blueprint
def blueprint_is_module(bp):
"""Used to figure out if something is actually a module"""
return isinstance(bp, Module)
class Module(Blueprint):
"""Deprecated module support. Until Flask 0.6 modules were a different
name of the concept now available as blueprints in Flask. They are
essentially doing the same but have some bad semantics for templates and
static files that were fixed with blueprints.
.. versionchanged:: 0.7
Modules were deprecated in favor for blueprints.
"""
def __init__(self, import_name, name=None, url_prefix=None,
static_path=None, subdomain=None):
if name is None:
assert '.' in import_name, 'name required if package name ' \
'does not point to a submodule'
name = import_name.rsplit('.', 1)[1]
Blueprint.__init__(self, name, import_name, url_prefix=url_prefix,
subdomain=subdomain, template_folder='templates')
if os.path.isdir(os.path.join(self.root_path, 'static')):
self._static_folder = 'static'
| Python |
# -*- coding: utf-8 -*-
"""
flask.exthook
~~~~~~~~~~~~~
Redirect imports for extensions. This module basically makes it possible
for us to transition from flaskext.foo to flask_foo without having to
force all extensions to upgrade at the same time.
When a user does ``from flask.ext.foo import bar`` it will attempt to
import ``from flask_foo import bar`` first and when that fails it will
try to import ``from flaskext.foo import bar``.
We're switching from namespace packages because it was just too painful for
everybody involved.
This is used by `flask.ext`.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import sys
import os
class ExtensionImporter(object):
"""This importer redirects imports from this submodule to other locations.
This makes it possible to transition from the old flaskext.name to the
newer flask_name without people having a hard time.
"""
def __init__(self, module_choices, wrapper_module):
self.module_choices = module_choices
self.wrapper_module = wrapper_module
self.prefix = wrapper_module + '.'
self.prefix_cutoff = wrapper_module.count('.') + 1
def __eq__(self, other):
return self.__class__.__module__ == other.__class__.__module__ and \
self.__class__.__name__ == other.__class__.__name__ and \
self.wrapper_module == other.wrapper_module and \
self.module_choices == other.module_choices
def __ne__(self, other):
return not self.__eq__(other)
def install(self):
sys.meta_path[:] = [x for x in sys.meta_path if self != x] + [self]
def find_module(self, fullname, path=None):
if fullname.startswith(self.prefix):
return self
def load_module(self, fullname):
if fullname in sys.modules:
return sys.modules[fullname]
modname = fullname.split('.', self.prefix_cutoff)[self.prefix_cutoff]
for path in self.module_choices:
realname = path % modname
try:
__import__(realname)
except ImportError:
exc_type, exc_value, tb = sys.exc_info()
# since we only establish the entry in sys.modules at the
# very this seems to be redundant, but if recursive imports
# happen we will call into the move import a second time.
# On the second invocation we still don't have an entry for
# fullname in sys.modules, but we will end up with the same
# fake module name and that import will succeed since this
# one already has a temporary entry in the modules dict.
# Since this one "succeeded" temporarily that second
# invocation now will have created a fullname entry in
# sys.modules which we have to kill.
sys.modules.pop(fullname, None)
# If it's an important traceback we reraise it, otherwise
# we swallow it and try the next choice. The skipped frame
# is the one from __import__ above which we don't care about
if self.is_important_traceback(realname, tb):
raise exc_type, exc_value, tb.tb_next
continue
module = sys.modules[fullname] = sys.modules[realname]
if '.' not in modname:
setattr(sys.modules[self.wrapper_module], modname, module)
return module
raise ImportError('No module named %s' % fullname)
def is_important_traceback(self, important_module, tb):
"""Walks a traceback's frames and checks if any of the frames
originated in the given important module. If that is the case then we
were able to import the module itself but apparently something went
wrong when the module was imported. (Eg: import of an import failed).
"""
while tb is not None:
if self.is_important_frame(important_module, tb):
return True
tb = tb.tb_next
return False
def is_important_frame(self, important_module, tb):
"""Checks a single frame if it's important."""
g = tb.tb_frame.f_globals
if '__name__' not in g:
return False
module_name = g['__name__']
# Python 2.7 Behavior. Modules are cleaned up late so the
# name shows up properly here. Success!
if module_name == important_module:
return True
# Some python verisons will will clean up modules so early that the
# module name at that point is no longer set. Try guessing from
# the filename then.
filename = os.path.abspath(tb.tb_frame.f_code.co_filename)
test_string = os.path.sep + important_module.replace('.', os.path.sep)
return test_string + '.py' in filename or \
test_string + os.path.sep + '__init__.py' in filename
| Python |
# -*- coding: utf-8 -*-
"""
flask.helpers
~~~~~~~~~~~~~
Implements various helpers.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import imp
import os
import sys
import pkgutil
import posixpath
import mimetypes
from time import time
from zlib import adler32
from threading import RLock
from werkzeug.urls import url_quote
# try to load the best simplejson implementation available. If JSON
# is not installed, we add a failing class.
json_available = True
json = None
try:
import simplejson as json
except ImportError:
try:
import json
except ImportError:
try:
# Google Appengine offers simplejson via django
from django.utils import simplejson as json
except ImportError:
json_available = False
from werkzeug.datastructures import Headers
from werkzeug.exceptions import NotFound
# this was moved in 0.7
try:
from werkzeug.wsgi import wrap_file
except ImportError:
from werkzeug.utils import wrap_file
from jinja2 import FileSystemLoader
from .globals import session, _request_ctx_stack, current_app, request
def _assert_have_json():
"""Helper function that fails if JSON is unavailable."""
if not json_available:
raise RuntimeError('simplejson not installed')
# figure out if simplejson escapes slashes. This behaviour was changed
# from one version to another without reason.
if not json_available or '\\/' not in json.dumps('/'):
def _tojson_filter(*args, **kwargs):
if __debug__:
_assert_have_json()
return json.dumps(*args, **kwargs).replace('/', '\\/')
else:
_tojson_filter = json.dumps
# sentinel
_missing = object()
# what separators does this operating system provide that are not a slash?
# this is used by the send_from_directory function to ensure that nobody is
# able to access files from outside the filesystem.
_os_alt_seps = list(sep for sep in [os.path.sep, os.path.altsep]
if sep not in (None, '/'))
def _endpoint_from_view_func(view_func):
"""Internal helper that returns the default endpoint for a given
function. This always is the function name.
"""
assert view_func is not None, 'expected view func if endpoint ' \
'is not provided.'
return view_func.__name__
def jsonify(*args, **kwargs):
"""Creates a :class:`~flask.Response` with the JSON representation of
the given arguments with an `application/json` mimetype. The arguments
to this function are the same as to the :class:`dict` constructor.
Example usage::
@app.route('/_get_current_user')
def get_current_user():
return jsonify(username=g.user.username,
email=g.user.email,
id=g.user.id)
This will send a JSON response like this to the browser::
{
"username": "admin",
"email": "admin@localhost",
"id": 42
}
This requires Python 2.6 or an installed version of simplejson. For
security reasons only objects are supported toplevel. For more
information about this, have a look at :ref:`json-security`.
.. versionadded:: 0.2
"""
if __debug__:
_assert_have_json()
return current_app.response_class(json.dumps(dict(*args, **kwargs),
indent=None if request.is_xhr else 2), mimetype='application/json')
def make_response(*args):
"""Sometimes it is necessary to set additional headers in a view. Because
views do not have to return response objects but can return a value that
is converted into a response object by Flask itself, it becomes tricky to
add headers to it. This function can be called instead of using a return
and you will get a response object which you can use to attach headers.
If view looked like this and you want to add a new header::
def index():
return render_template('index.html', foo=42)
You can now do something like this::
def index():
response = make_response(render_template('index.html', foo=42))
response.headers['X-Parachutes'] = 'parachutes are cool'
return response
This function accepts the very same arguments you can return from a
view function. This for example creates a response with a 404 error
code::
response = make_response(render_template('not_found.html'), 404)
The other use case of this function is to force the return value of a
view function into a response which is helpful with view
decorators::
response = make_response(view_function())
response.headers['X-Parachutes'] = 'parachutes are cool'
Internally this function does the following things:
- if no arguments are passed, it creates a new response argument
- if one argument is passed, :meth:`flask.Flask.make_response`
is invoked with it.
- if more than one argument is passed, the arguments are passed
to the :meth:`flask.Flask.make_response` function as tuple.
.. versionadded:: 0.6
"""
if not args:
return current_app.response_class()
if len(args) == 1:
args = args[0]
return current_app.make_response(args)
def url_for(endpoint, **values):
"""Generates a URL to the given endpoint with the method provided.
Variable arguments that are unknown to the target endpoint are appended
to the generated URL as query arguments. If the value of a query argument
is `None`, the whole pair is skipped. In case blueprints are active
you can shortcut references to the same blueprint by prefixing the
local endpoint with a dot (``.``).
This will reference the index function local to the current blueprint::
url_for('.index')
For more information, head over to the :ref:`Quickstart <url-building>`.
.. versionadded:: 0.9
The `_anchor` and `_method` parameters were added.
:param endpoint: the endpoint of the URL (name of the function)
:param values: the variable arguments of the URL rule
:param _external: if set to `True`, an absolute URL is generated.
:param _anchor: if provided this is added as anchor to the URL.
:param _method: if provided this explicitly specifies an HTTP method.
"""
ctx = _request_ctx_stack.top
blueprint_name = request.blueprint
if not ctx.request._is_old_module:
if endpoint[:1] == '.':
if blueprint_name is not None:
endpoint = blueprint_name + endpoint
else:
endpoint = endpoint[1:]
else:
# TODO: get rid of this deprecated functionality in 1.0
if '.' not in endpoint:
if blueprint_name is not None:
endpoint = blueprint_name + '.' + endpoint
elif endpoint.startswith('.'):
endpoint = endpoint[1:]
external = values.pop('_external', False)
anchor = values.pop('_anchor', None)
method = values.pop('_method', None)
ctx.app.inject_url_defaults(endpoint, values)
rv = ctx.url_adapter.build(endpoint, values, method=method,
force_external=external)
if anchor is not None:
rv += '#' + url_quote(anchor)
return rv
def get_template_attribute(template_name, attribute):
"""Loads a macro (or variable) a template exports. This can be used to
invoke a macro from within Python code. If you for example have a
template named `_cider.html` with the following contents:
.. sourcecode:: html+jinja
{% macro hello(name) %}Hello {{ name }}!{% endmacro %}
You can access this from Python code like this::
hello = get_template_attribute('_cider.html', 'hello')
return hello('World')
.. versionadded:: 0.2
:param template_name: the name of the template
:param attribute: the name of the variable of macro to acccess
"""
return getattr(current_app.jinja_env.get_template(template_name).module,
attribute)
def flash(message, category='message'):
"""Flashes a message to the next request. In order to remove the
flashed message from the session and to display it to the user,
the template has to call :func:`get_flashed_messages`.
.. versionchanged:: 0.3
`category` parameter added.
:param message: the message to be flashed.
:param category: the category for the message. The following values
are recommended: ``'message'`` for any kind of message,
``'error'`` for errors, ``'info'`` for information
messages and ``'warning'`` for warnings. However any
kind of string can be used as category.
"""
session.setdefault('_flashes', []).append((category, message))
def get_flashed_messages(with_categories=False, category_filter=[]):
"""Pulls all flashed messages from the session and returns them.
Further calls in the same request to the function will return
the same messages. By default just the messages are returned,
but when `with_categories` is set to `True`, the return value will
be a list of tuples in the form ``(category, message)`` instead.
Filter the flashed messages to one or more categories by providing those
categories in `category_filter`. This allows rendering categories in
separate html blocks. The `with_categories` and `category_filter`
arguments are distinct:
* `with_categories` controls whether categories are returned with message
text (`True` gives a tuple, where `False` gives just the message text).
* `category_filter` filters the messages down to only those matching the
provided categories.
See :ref:`message-flashing-pattern` for examples.
.. versionchanged:: 0.3
`with_categories` parameter added.
.. versionchanged:: 0.9
`category_filter` parameter added.
:param with_categories: set to `True` to also receive categories.
:param category_filter: whitelist of categories to limit return values
"""
flashes = _request_ctx_stack.top.flashes
if flashes is None:
_request_ctx_stack.top.flashes = flashes = session.pop('_flashes') \
if '_flashes' in session else []
if category_filter:
flashes = filter(lambda f: f[0] in category_filter, flashes)
if not with_categories:
return [x[1] for x in flashes]
return flashes
def send_file(filename_or_fp, mimetype=None, as_attachment=False,
attachment_filename=None, add_etags=True,
cache_timeout=60 * 60 * 12, conditional=False):
"""Sends the contents of a file to the client. This will use the
most efficient method available and configured. By default it will
try to use the WSGI server's file_wrapper support. Alternatively
you can set the application's :attr:`~Flask.use_x_sendfile` attribute
to ``True`` to directly emit an `X-Sendfile` header. This however
requires support of the underlying webserver for `X-Sendfile`.
By default it will try to guess the mimetype for you, but you can
also explicitly provide one. For extra security you probably want
to send certain files as attachment (HTML for instance). The mimetype
guessing requires a `filename` or an `attachment_filename` to be
provided.
Please never pass filenames to this function from user sources without
checking them first. Something like this is usually sufficient to
avoid security problems::
if '..' in filename or filename.startswith('/'):
abort(404)
.. versionadded:: 0.2
.. versionadded:: 0.5
The `add_etags`, `cache_timeout` and `conditional` parameters were
added. The default behaviour is now to attach etags.
.. versionchanged:: 0.7
mimetype guessing and etag support for file objects was
deprecated because it was unreliable. Pass a filename if you are
able to, otherwise attach an etag yourself. This functionality
will be removed in Flask 1.0
:param filename_or_fp: the filename of the file to send. This is
relative to the :attr:`~Flask.root_path` if a
relative path is specified.
Alternatively a file object might be provided
in which case `X-Sendfile` might not work and
fall back to the traditional method. Make sure
that the file pointer is positioned at the start
of data to send before calling :func:`send_file`.
:param mimetype: the mimetype of the file if provided, otherwise
auto detection happens.
:param as_attachment: set to `True` if you want to send this file with
a ``Content-Disposition: attachment`` header.
:param attachment_filename: the filename for the attachment if it
differs from the file's filename.
:param add_etags: set to `False` to disable attaching of etags.
:param conditional: set to `True` to enable conditional responses.
:param cache_timeout: the timeout in seconds for the headers.
"""
mtime = None
if isinstance(filename_or_fp, basestring):
filename = filename_or_fp
file = None
else:
from warnings import warn
file = filename_or_fp
filename = getattr(file, 'name', None)
# XXX: this behaviour is now deprecated because it was unreliable.
# removed in Flask 1.0
if not attachment_filename and not mimetype \
and isinstance(filename, basestring):
warn(DeprecationWarning('The filename support for file objects '
'passed to send_file is now deprecated. Pass an '
'attach_filename if you want mimetypes to be guessed.'),
stacklevel=2)
if add_etags:
warn(DeprecationWarning('In future flask releases etags will no '
'longer be generated for file objects passed to the send_file '
'function because this behaviour was unreliable. Pass '
'filenames instead if possible, otherwise attach an etag '
'yourself based on another value'), stacklevel=2)
if filename is not None:
if not os.path.isabs(filename):
filename = os.path.join(current_app.root_path, filename)
if mimetype is None and (filename or attachment_filename):
mimetype = mimetypes.guess_type(filename or attachment_filename)[0]
if mimetype is None:
mimetype = 'application/octet-stream'
headers = Headers()
if as_attachment:
if attachment_filename is None:
if filename is None:
raise TypeError('filename unavailable, required for '
'sending as attachment')
attachment_filename = os.path.basename(filename)
headers.add('Content-Disposition', 'attachment',
filename=attachment_filename)
if current_app.use_x_sendfile and filename:
if file is not None:
file.close()
headers['X-Sendfile'] = filename
data = None
else:
if file is None:
file = open(filename, 'rb')
mtime = os.path.getmtime(filename)
data = wrap_file(request.environ, file)
rv = current_app.response_class(data, mimetype=mimetype, headers=headers,
direct_passthrough=True)
# if we know the file modification date, we can store it as the
# the time of the last modification.
if mtime is not None:
rv.last_modified = int(mtime)
rv.cache_control.public = True
if cache_timeout:
rv.cache_control.max_age = cache_timeout
rv.expires = int(time() + cache_timeout)
if add_etags and filename is not None:
rv.set_etag('flask-%s-%s-%s' % (
os.path.getmtime(filename),
os.path.getsize(filename),
adler32(
filename.encode('utf8') if isinstance(filename, unicode)
else filename
) & 0xffffffff
))
if conditional:
rv = rv.make_conditional(request)
# make sure we don't send x-sendfile for servers that
# ignore the 304 status code for x-sendfile.
if rv.status_code == 304:
rv.headers.pop('x-sendfile', None)
return rv
def safe_join(directory, filename):
"""Safely join `directory` and `filename`.
Example usage::
@app.route('/wiki/<path:filename>')
def wiki_page(filename):
filename = safe_join(app.config['WIKI_FOLDER'], filename)
with open(filename, 'rb') as fd:
content = fd.read() # Read and process the file content...
:param directory: the base directory.
:param filename: the untrusted filename relative to that directory.
:raises: :class:`~werkzeug.exceptions.NotFound` if the resulting path
would fall out of `directory`.
"""
filename = posixpath.normpath(filename)
for sep in _os_alt_seps:
if sep in filename:
raise NotFound()
if os.path.isabs(filename) or filename.startswith('../'):
raise NotFound()
return os.path.join(directory, filename)
def send_from_directory(directory, filename, **options):
"""Send a file from a given directory with :func:`send_file`. This
is a secure way to quickly expose static files from an upload folder
or something similar.
Example usage::
@app.route('/uploads/<path:filename>')
def download_file(filename):
return send_from_directory(app.config['UPLOAD_FOLDER'],
filename, as_attachment=True)
.. admonition:: Sending files and Performance
It is strongly recommended to activate either `X-Sendfile` support in
your webserver or (if no authentication happens) to tell the webserver
to serve files for the given path on its own without calling into the
web application for improved performance.
.. versionadded:: 0.5
:param directory: the directory where all the files are stored.
:param filename: the filename relative to that directory to
download.
:param options: optional keyword arguments that are directly
forwarded to :func:`send_file`.
"""
filename = safe_join(directory, filename)
if not os.path.isfile(filename):
raise NotFound()
return send_file(filename, conditional=True, **options)
def get_root_path(import_name):
"""Returns the path to a package or cwd if that cannot be found. This
returns the path of a package or the folder that contains a module.
Not to be confused with the package path returned by :func:`find_package`.
"""
loader = pkgutil.get_loader(import_name)
if loader is None or import_name == '__main__':
# import name is not found, or interactive/main module
return os.getcwd()
# For .egg, zipimporter does not have get_filename until Python 2.7.
if hasattr(loader, 'get_filename'):
filepath = loader.get_filename(import_name)
else:
# Fall back to imports.
__import__(import_name)
filepath = sys.modules[import_name].__file__
# filepath is import_name.py for a module, or __init__.py for a package.
return os.path.dirname(os.path.abspath(filepath))
def find_package(import_name):
"""Finds a package and returns the prefix (or None if the package is
not installed) as well as the folder that contains the package or
module as a tuple. The package path returned is the module that would
have to be added to the pythonpath in order to make it possible to
import the module. The prefix is the path below which a UNIX like
folder structure exists (lib, share etc.).
"""
root_mod_name = import_name.split('.')[0]
loader = pkgutil.get_loader(root_mod_name)
if loader is None or import_name == '__main__':
# import name is not found, or interactive/main module
package_path = os.getcwd()
else:
# For .egg, zipimporter does not have get_filename until Python 2.7.
if hasattr(loader, 'get_filename'):
filename = loader.get_filename(root_mod_name)
elif hasattr(loader, 'archive'):
# zipimporter's loader.archive points to the .egg or .zip
# archive filename is dropped in call to dirname below.
filename = loader.archive
else:
# At least one loader is missing both get_filename and archive:
# Google App Engine's HardenedModulesHook
#
# Fall back to imports.
__import__(import_name)
filename = sys.modules[import_name].__file__
package_path = os.path.abspath(os.path.dirname(filename))
# package_path ends with __init__.py for a package
if loader.is_package(root_mod_name):
package_path = os.path.dirname(package_path)
site_parent, site_folder = os.path.split(package_path)
py_prefix = os.path.abspath(sys.prefix)
if package_path.startswith(py_prefix):
return py_prefix, package_path
elif site_folder.lower() == 'site-packages':
parent, folder = os.path.split(site_parent)
# Windows like installations
if folder.lower() == 'lib':
base_dir = parent
# UNIX like installations
elif os.path.basename(parent).lower() == 'lib':
base_dir = os.path.dirname(parent)
else:
base_dir = site_parent
return base_dir, package_path
return None, package_path
class locked_cached_property(object):
"""A decorator that converts a function into a lazy property. The
function wrapped is called the first time to retrieve the result
and then that calculated result is used the next time you access
the value. Works like the one in Werkzeug but has a lock for
thread safety.
"""
def __init__(self, func, name=None, doc=None):
self.__name__ = name or func.__name__
self.__module__ = func.__module__
self.__doc__ = doc or func.__doc__
self.func = func
self.lock = RLock()
def __get__(self, obj, type=None):
if obj is None:
return self
with self.lock:
value = obj.__dict__.get(self.__name__, _missing)
if value is _missing:
value = self.func(obj)
obj.__dict__[self.__name__] = value
return value
class _PackageBoundObject(object):
def __init__(self, import_name, template_folder=None):
#: The name of the package or module. Do not change this once
#: it was set by the constructor.
self.import_name = import_name
#: location of the templates. `None` if templates should not be
#: exposed.
self.template_folder = template_folder
#: Where is the app root located?
self.root_path = get_root_path(self.import_name)
self._static_folder = None
self._static_url_path = None
def _get_static_folder(self):
if self._static_folder is not None:
return os.path.join(self.root_path, self._static_folder)
def _set_static_folder(self, value):
self._static_folder = value
static_folder = property(_get_static_folder, _set_static_folder)
del _get_static_folder, _set_static_folder
def _get_static_url_path(self):
if self._static_url_path is None:
if self.static_folder is None:
return None
return '/' + os.path.basename(self.static_folder)
return self._static_url_path
def _set_static_url_path(self, value):
self._static_url_path = value
static_url_path = property(_get_static_url_path, _set_static_url_path)
del _get_static_url_path, _set_static_url_path
@property
def has_static_folder(self):
"""This is `True` if the package bound object's container has a
folder named ``'static'``.
.. versionadded:: 0.5
"""
return self.static_folder is not None
@locked_cached_property
def jinja_loader(self):
"""The Jinja loader for this package bound object.
.. versionadded:: 0.5
"""
if self.template_folder is not None:
return FileSystemLoader(os.path.join(self.root_path,
self.template_folder))
def send_static_file(self, filename):
"""Function used internally to send static files from the static
folder to the browser.
.. versionadded:: 0.5
"""
if not self.has_static_folder:
raise RuntimeError('No static folder for this object')
return send_from_directory(self.static_folder, filename)
def open_resource(self, resource, mode='rb'):
"""Opens a resource from the application's resource folder. To see
how this works, consider the following folder structure::
/myapplication.py
/schema.sql
/static
/style.css
/templates
/layout.html
/index.html
If you want to open the `schema.sql` file you would do the
following::
with app.open_resource('schema.sql') as f:
contents = f.read()
do_something_with(contents)
:param resource: the name of the resource. To access resources within
subfolders use forward slashes as separator.
"""
if mode not in ('r', 'rb'):
raise ValueError('Resources can only be opened for reading')
return open(os.path.join(self.root_path, resource), mode)
| Python |
# -*- coding: utf-8 -*-
"""
flask.ctx
~~~~~~~~~
Implements the objects required to keep the context.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from werkzeug.exceptions import HTTPException
from .globals import _request_ctx_stack
from .module import blueprint_is_module
class _RequestGlobals(object):
pass
def has_request_context():
"""If you have code that wants to test if a request context is there or
not this function can be used. For instance, you may want to take advantage
of request information if the request object is available, but fail
silently if it is unavailable.
::
class User(db.Model):
def __init__(self, username, remote_addr=None):
self.username = username
if remote_addr is None and has_request_context():
remote_addr = request.remote_addr
self.remote_addr = remote_addr
Alternatively you can also just test any of the context bound objects
(such as :class:`request` or :class:`g` for truthness)::
class User(db.Model):
def __init__(self, username, remote_addr=None):
self.username = username
if remote_addr is None and request:
remote_addr = request.remote_addr
self.remote_addr = remote_addr
.. versionadded:: 0.7
"""
return _request_ctx_stack.top is not None
class RequestContext(object):
"""The request context contains all request relevant information. It is
created at the beginning of the request and pushed to the
`_request_ctx_stack` and removed at the end of it. It will create the
URL adapter and request object for the WSGI environment provided.
Do not attempt to use this class directly, instead use
:meth:`~flask.Flask.test_request_context` and
:meth:`~flask.Flask.request_context` to create this object.
When the request context is popped, it will evaluate all the
functions registered on the application for teardown execution
(:meth:`~flask.Flask.teardown_request`).
The request context is automatically popped at the end of the request
for you. In debug mode the request context is kept around if
exceptions happen so that interactive debuggers have a chance to
introspect the data. With 0.4 this can also be forced for requests
that did not fail and outside of `DEBUG` mode. By setting
``'flask._preserve_context'`` to `True` on the WSGI environment the
context will not pop itself at the end of the request. This is used by
the :meth:`~flask.Flask.test_client` for example to implement the
deferred cleanup functionality.
You might find this helpful for unittests where you need the
information from the context local around for a little longer. Make
sure to properly :meth:`~werkzeug.LocalStack.pop` the stack yourself in
that situation, otherwise your unittests will leak memory.
"""
def __init__(self, app, environ):
self.app = app
self.request = app.request_class(environ)
self.url_adapter = app.create_url_adapter(self.request)
self.g = _RequestGlobals()
self.flashes = None
self.session = None
# indicator if the context was preserved. Next time another context
# is pushed the preserved context is popped.
self.preserved = False
self.match_request()
# XXX: Support for deprecated functionality. This is doing away with
# Flask 1.0
blueprint = self.request.blueprint
if blueprint is not None:
# better safe than sorry, we don't want to break code that
# already worked
bp = app.blueprints.get(blueprint)
if bp is not None and blueprint_is_module(bp):
self.request._is_old_module = True
def match_request(self):
"""Can be overridden by a subclass to hook into the matching
of the request.
"""
try:
url_rule, self.request.view_args = \
self.url_adapter.match(return_rule=True)
self.request.url_rule = url_rule
except HTTPException, e:
self.request.routing_exception = e
def push(self):
"""Binds the request context to the current context."""
# If an exception ocurrs in debug mode or if context preservation is
# activated under exception situations exactly one context stays
# on the stack. The rationale is that you want to access that
# information under debug situations. However if someone forgets to
# pop that context again we want to make sure that on the next push
# it's invalidated otherwise we run at risk that something leaks
# memory. This is usually only a problem in testsuite since this
# functionality is not active in production environments.
top = _request_ctx_stack.top
if top is not None and top.preserved:
top.pop()
_request_ctx_stack.push(self)
# Open the session at the moment that the request context is
# available. This allows a custom open_session method to use the
# request context (e.g. flask-sqlalchemy).
self.session = self.app.open_session(self.request)
if self.session is None:
self.session = self.app.make_null_session()
def pop(self):
"""Pops the request context and unbinds it by doing that. This will
also trigger the execution of functions registered by the
:meth:`~flask.Flask.teardown_request` decorator.
"""
self.preserved = False
self.app.do_teardown_request()
rv = _request_ctx_stack.pop()
assert rv is self, 'Popped wrong request context. (%r instead of %r)' \
% (rv, self)
# get rid of circular dependencies at the end of the request
# so that we don't require the GC to be active.
rv.request.environ['werkzeug.request'] = None
def __enter__(self):
self.push()
return self
def __exit__(self, exc_type, exc_value, tb):
# do not pop the request stack if we are in debug mode and an
# exception happened. This will allow the debugger to still
# access the request object in the interactive shell. Furthermore
# the context can be force kept alive for the test client.
# See flask.testing for how this works.
if self.request.environ.get('flask._preserve_context') or \
(tb is not None and self.app.preserve_context_on_exception):
self.preserved = True
else:
self.pop()
def __repr__(self):
return '<%s \'%s\' [%s] of %s>' % (
self.__class__.__name__,
self.request.url,
self.request.method,
self.app.name
)
| Python |
# -*- coding: utf-8 -*-
"""
flask.templating
~~~~~~~~~~~~~~~~
Implements the bridge to Jinja2.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import posixpath
from jinja2 import BaseLoader, Environment as BaseEnvironment, \
TemplateNotFound
from .globals import _request_ctx_stack
from .signals import template_rendered
from .module import blueprint_is_module
def _default_template_ctx_processor():
"""Default template context processor. Injects `request`,
`session` and `g`.
"""
reqctx = _request_ctx_stack.top
return dict(
config=reqctx.app.config,
request=reqctx.request,
session=reqctx.session,
g=reqctx.g
)
class Environment(BaseEnvironment):
"""Works like a regular Jinja2 environment but has some additional
knowledge of how Flask's blueprint works so that it can prepend the
name of the blueprint to referenced templates if necessary.
"""
def __init__(self, app, **options):
if 'loader' not in options:
options['loader'] = app.create_global_jinja_loader()
BaseEnvironment.__init__(self, **options)
self.app = app
class DispatchingJinjaLoader(BaseLoader):
"""A loader that looks for templates in the application and all
the blueprint folders.
"""
def __init__(self, app):
self.app = app
def get_source(self, environment, template):
for loader, local_name in self._iter_loaders(template):
try:
return loader.get_source(environment, local_name)
except TemplateNotFound:
pass
raise TemplateNotFound(template)
def _iter_loaders(self, template):
loader = self.app.jinja_loader
if loader is not None:
yield loader, template
# old style module based loaders in case we are dealing with a
# blueprint that is an old style module
try:
module, local_name = posixpath.normpath(template).split('/', 1)
blueprint = self.app.blueprints[module]
if blueprint_is_module(blueprint):
loader = blueprint.jinja_loader
if loader is not None:
yield loader, local_name
except (ValueError, KeyError):
pass
for blueprint in self.app.blueprints.itervalues():
if blueprint_is_module(blueprint):
continue
loader = blueprint.jinja_loader
if loader is not None:
yield loader, template
def list_templates(self):
result = set()
loader = self.app.jinja_loader
if loader is not None:
result.update(loader.list_templates())
for name, blueprint in self.app.blueprints.iteritems():
loader = blueprint.jinja_loader
if loader is not None:
for template in loader.list_templates():
prefix = ''
if blueprint_is_module(blueprint):
prefix = name + '/'
result.add(prefix + template)
return list(result)
def _render(template, context, app):
"""Renders the template and fires the signal"""
rv = template.render(context)
template_rendered.send(app, template=template, context=context)
return rv
def render_template(template_name_or_list, **context):
"""Renders a template from the template folder with the given
context.
:param template_name_or_list: the name of the template to be
rendered, or an iterable with template names
the first one existing will be rendered
:param context: the variables that should be available in the
context of the template.
"""
ctx = _request_ctx_stack.top
ctx.app.update_template_context(context)
return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
context, ctx.app)
def render_template_string(source, **context):
"""Renders a template from the given template source string
with the given context.
:param template_name: the sourcecode of the template to be
rendered
:param context: the variables that should be available in the
context of the template.
"""
ctx = _request_ctx_stack.top
ctx.app.update_template_context(context)
return _render(ctx.app.jinja_env.from_string(source),
context, ctx.app)
| Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.