fixed a problem with order of table definitions in auth.wiki, thanks David
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.0.9 (2012-09-17 11:47:03) stable
|
||||
Version 2.0.9 (2012-09-17 14:23:09) stable
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
'A new version of web2py is available: %s': 'È disponibile una nuova versione di web2py: %s',
|
||||
'About': 'informazioni',
|
||||
'About application': "Informazioni sull'applicazione",
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'additional code for your application': 'righe di codice aggiuntive per la tua applicazione',
|
||||
'Additional code for your application': 'Additional code for your application',
|
||||
'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',
|
||||
@@ -46,6 +46,7 @@
|
||||
'back': 'indietro',
|
||||
'cache': 'cache',
|
||||
'cache, errors and sessions cleaned': 'pulitura cache, errori and sessioni ',
|
||||
'can be a git repo': 'can be a git repo',
|
||||
'Cannot be empty': 'Non può essere vuoto',
|
||||
'Cannot compile: there are errors in your app:': "Compilazione fallita: ci sono errori nell'applicazione.",
|
||||
'cannot create file': 'impossibile creare il file',
|
||||
@@ -98,9 +99,11 @@
|
||||
'Delete:': 'Cancella:',
|
||||
'Deploy': 'deploy',
|
||||
'Deploy on Google App Engine': 'Installa su Google App Engine',
|
||||
'Deploy to OpenShift': 'Deploy to OpenShift',
|
||||
'design': 'progetta',
|
||||
'Detailed traceback description': 'Detailed traceback description',
|
||||
'direction: ltr': 'direction: ltr',
|
||||
'Disable': 'Disable',
|
||||
'docs': 'docs',
|
||||
'done!': 'fatto!',
|
||||
'download layouts': 'download layouts',
|
||||
@@ -138,6 +141,9 @@
|
||||
'filter': 'filter',
|
||||
'Frames': 'Frames',
|
||||
'Functions with no doctests will result in [passed] tests.': 'I test delle funzioni senza "doctests" risulteranno sempre [passed].',
|
||||
'Get from URL:': 'Get from URL:',
|
||||
'Git Pull': 'Git Pull',
|
||||
'Git Push': 'Git Push',
|
||||
'Hello World': 'Salve Mondo',
|
||||
'Help': 'aiuto',
|
||||
'htmledit': 'modifica come html',
|
||||
@@ -223,6 +229,7 @@
|
||||
'Rows selected': 'Righe selezionate',
|
||||
'rules are not defined': 'rules are not defined',
|
||||
"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')",
|
||||
'Running on %s': 'Running on %s',
|
||||
'Save': 'Save',
|
||||
'Save via Ajax': 'Save via Ajax',
|
||||
'Saved file hash:': 'Hash del file salvato:',
|
||||
@@ -238,6 +245,7 @@
|
||||
'Static files': 'Files statici',
|
||||
'Stylesheet': 'Foglio di stile (stylesheet)',
|
||||
'submit': 'invia',
|
||||
'Submit': 'Submit',
|
||||
'Sure you want to delete this object?': 'Vuoi veramente cancellare questo oggetto?',
|
||||
'table': 'tabella',
|
||||
'test': 'test',
|
||||
@@ -292,6 +300,7 @@
|
||||
'upload': 'upload',
|
||||
'Upload & install packed application': 'Carica ed installa pacchetto con applicazione',
|
||||
'Upload a package:': 'Upload a package:',
|
||||
'Upload and install packed application': 'Upload and install packed application',
|
||||
'upload application:': 'carica applicazione:',
|
||||
'upload file:': 'carica file:',
|
||||
'upload plugin file:': 'carica file di plugin:',
|
||||
@@ -299,6 +308,7 @@
|
||||
'Use an url:': 'Use an url:',
|
||||
'variables': 'variables',
|
||||
'Version': 'Versione',
|
||||
'Version %s.%s.%s (%s) %s': 'Version %s.%s.%s (%s) %s',
|
||||
'versioning': 'sistema di versioni',
|
||||
'Versioning': 'Versioning',
|
||||
'view': 'vista',
|
||||
|
||||
+36
-36
@@ -4571,45 +4571,45 @@ class Wiki(object):
|
||||
perms = self.manage_permissions = manage_permissions
|
||||
self.restrict_search = restrict_search
|
||||
db = auth.db
|
||||
table_definitions = {
|
||||
'wiki_page':{
|
||||
'args':[
|
||||
Field('slug',
|
||||
requires=[IS_SLUG(),
|
||||
IS_NOT_IN_DB(db,'wiki_page.slug')],
|
||||
readable=False,writable=False),
|
||||
Field('title',unique=True),
|
||||
Field('body','text',notnull=True),
|
||||
Field('tags','list:string'),
|
||||
Field('can_read','list:string',
|
||||
writable=perms,
|
||||
readable=perms,
|
||||
default=[Wiki.everybody]),
|
||||
Field('can_edit', 'list:string',
|
||||
writable=perms,readable=perms,
|
||||
default=[Wiki.everybody]),
|
||||
table_definitions = [
|
||||
('wiki_page',{
|
||||
'args':[
|
||||
Field('slug',
|
||||
requires=[IS_SLUG(),
|
||||
IS_NOT_IN_DB(db,'wiki_page.slug')],
|
||||
readable=False,writable=False),
|
||||
Field('title',unique=True),
|
||||
Field('body','text',notnull=True),
|
||||
Field('tags','list:string'),
|
||||
Field('can_read','list:string',
|
||||
writable=perms,
|
||||
readable=perms,
|
||||
default=[Wiki.everybody]),
|
||||
Field('can_edit', 'list:string',
|
||||
writable=perms,readable=perms,
|
||||
default=[Wiki.everybody]),
|
||||
Field('changelog'),
|
||||
Field('html','text',compute=render,
|
||||
readable=False, writable=False),
|
||||
auth.signature],
|
||||
'vars':{'format':'%(title)s'}},
|
||||
'wiki_tag':{
|
||||
'args':[
|
||||
Field('name'),
|
||||
Field('wiki_page','reference wiki_page'),
|
||||
auth.signature],
|
||||
'vars':{'format':'%(name)s'}},
|
||||
'wiki_media':{
|
||||
'args':[
|
||||
Field('wiki_page','reference wiki_page'),
|
||||
Field('title',required=True),
|
||||
Field('filename','upload',required=True),
|
||||
auth.signature],
|
||||
'vars':{'format':'%(title)s'}}
|
||||
}
|
||||
Field('html','text',compute=render,
|
||||
readable=False, writable=False),
|
||||
auth.signature],
|
||||
'vars':{'format':'%(title)s'}}),
|
||||
('wiki_tag',{
|
||||
'args':[
|
||||
Field('name'),
|
||||
Field('wiki_page','reference wiki_page'),
|
||||
auth.signature],
|
||||
'vars':{'format':'%(name)s'}}),
|
||||
('wiki_media',{
|
||||
'args':[
|
||||
Field('wiki_page','reference wiki_page'),
|
||||
Field('title',required=True),
|
||||
Field('filename','upload',required=True),
|
||||
auth.signature],
|
||||
'vars':{'format':'%(title)s'}})
|
||||
]
|
||||
|
||||
# define only non-existent tables
|
||||
for key, value in table_definitions.iteritems():
|
||||
for key, value in table_definitions:
|
||||
if not key in db.tables():
|
||||
db.define_table(key, *value['args'], **value['vars'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user