I wanted to post an update:
I took Boris's adaptation of sqldesigner for web2py, and modified it
(very slightly) to work as a named app in web2py.
The good news:
- it seems to work just fine (no routes at all used);
- to accommodate"name it to whatever you want" I changed ONE line of
code;
- I dropped in the latest sqldesigner (to check if this would work as
needed, w/o any other changes - and yes, it does);
- I tested saving and restoring work in the "app" database (Boris is
saving the xml from sessions, so the save/restore is fine);
- it (continues to) work with latest web2py;
The "bad" news (well, this isn't really bad - but does suggest
something we may need to do w/ web2py):
- from the static directory, sqldesigner (itself) has a link to it's
subdirectory for "docs" code; it fails (you have to manually add
"index.html" to the generated URL); for STATIC references, web2py
should probably handle doing "what normally happens" (or is this a
server backend function? anyway, cherrypy doesn't...)
- the generated DAL is pretty much one-way (at this point): copy /
paste, and use it once you're done. (This is not really bad news I
don't think; it's probably not worth the effort to go further);
I can post, or you can do what I did:
- take Boris's zip, rename applications/init to (for example)
applications/sqldesigner; zip this up, or copy to your current web2py
(routes.py not needed);
- get the latest sqldesigner from
http://code.google.com/p/wwwsqldesigner/
and drop it in your new app as static/designer
Unfortunately, sqldesigner still has not included the changes needed,
so you need to also update static/designer/js/config.js with Boris's
change (
http://designer.bojanka.net/js/config.js);
Alternatively, simply add "web2py-db" to AVAILABLE_BACKENDS and make
it the DEFAULT_BACKEND string.
- in controllers/default.py make the following change:
<<< old
def index():
redirect('designer.html')
>>> new
def index():
redirect(URL(r=request,c='static',f='designer/index.html'))
That's it!
Let me know if you find a way to let sqldesigner's "documentation"
link work.
Yarko
On Dec 1, 3:25 pm, "Boris Manojlovic" <
boris.manojlo...@gmail.com>
wrote:
> Hi,
> as i said it was just a prof of concept :) and i tried to make it forward
> compatible as much as possible.
> What that means is I did not changed "www sql developer" code (except
> configuration) on purpose so that files from *applications/init/static/**
> designer*
> can be replaced with new version without problems - until Ondřej Žára change
> API code which I hope will not be done hehe :)
> (Just tried to put newest version of sql developer into my code and it
> worked on first look)
>
> Boris
>
> P.S. on
designer.bojanka.net is still old version of sql developer watch out
> :)
>
> (look here for confighttp://
designer.bojanka.net/js/config.js)