rif / web2admin Goto Github PK
View Code? Open in Web Editor NEWweb2py administration plugin
web2py administration plugin
Running Windows 8 x64 with Version 2.4.1-alpha.2+timestamp.2013.02.21.10.15.58 on Python x64 2.7.3.
Tried installing with the w2p package and installing through the plugins in the /admin interface.
Accessing from 'localhost/web2admin' or 'localhost//web2admin' both gave same error.
Git cloning into the '/applications' directory also gave this same error:
"invalid function (default/web2admin)"
if you turn DAL(..., check_reserved=['all'])
<type 'exceptions.SyntaxError'> invalid table/column name "action" is a "ALL" reserved SQL keyword
File /home/bcr/projects/web2py210/applications/smtc/models/plugin_web2admin/plugin_web2admin.py in at line 71
Code listing
w2a_db = cdb()
w2a_def_db = cdb(0)
w2a_def_db.define_table('plugin_web2admin_history',
Field('action'),
auth.signature
)
w2a_history = w2a_def_db.plugin_web2admin_history
def action_dispatch(table, ids, action):
I applied the plugins to a simple barebone app with just def index(); return wiki.auth() and I get:
Traceback (most recent call last):
File "/Users/massimodipierro/Dropbox/web2py/gluon/restricted.py", line 209, in restricted
exec ccode in environment
File "/Users/massimodipierro/Dropbox/web2py/applications/cocineros/controllers/plugin_web2admin.py", line 102, in
File "/Users/massimodipierro/Dropbox/web2py/gluon/globals.py", line 186, in
self._caller = lambda f: f()
File "/Users/massimodipierro/Dropbox/web2py/gluon/tools.py", line 2812, in f
return action(_a, *_b)
File "/Users/massimodipierro/Dropbox/web2py/applications/cocineros/controllers/plugin_web2admin.py", line 31, in history
logs = w2a_def_db(w2a_history).select(orderby=~w2a_history.id)[:5]
AttributeError: 'NoneType' object has no attribute 'id'
I applied the plugins to a simple barebone app with just def index(); return wiki.auth() and I get:
Traceback (most recent call last):
File "/Users/massimodipierro/Dropbox/web2py/gluon/restricted.py", line 209, in restricted
exec ccode in environment
File "/Users/massimodipierro/Dropbox/web2py/applications/cocineros/controllers/plugin_web2admin.py", line 102, in
File "/Users/massimodipierro/Dropbox/web2py/gluon/globals.py", line 186, in
self._caller = lambda f: f()
File "/Users/massimodipierro/Dropbox/web2py/gluon/tools.py", line 2812, in f
return action(_a, *_b)
File "/Users/massimodipierro/Dropbox/web2py/applications/cocineros/controllers/plugin_web2admin.py", line 31, in history
logs = w2a_def_db(w2a_history).select(orderby=~w2a_history.id)[:5]
AttributeError: 'NoneType' object has no attribute 'id'
<class 'pyodbc.ProgrammingError'> ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Introducing FOREIGN KEY constraint 'plugin_web2admin_history_modified_by__constraint' on table 'plugin_web2admin_history' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. (1785) (SQLExecDirectW); [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Could not create constraint. See previous errors. (1750)")
Probably web2py conditional models are not working
Here in models https://github.com/rif/web2admin/blob/master/models/plugin_web2admin.py#L4 it cheched if the requested controller is 'web2admin' and them models_to_run are build. Probably it is not working in newer versions of web2py.
Traceback (most recent call last):
File "/home/web2admin/web2py/gluon/restricted.py", line 217, in restricted
exec ccode in environment
File "/home/web2admin/web2py/applications/welcome/controllers/plugin_web2admin.py", line 6, in <module>
@auth.requires(check_access(a0, 'w2a_read'))
NameError: name 'check_access' is not defined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.