SQL Designer Import

22 views
Skip to first unread message

Mario Lim

unread,
Dec 1, 2008, 2:25:59 PM12/1/08
to web...@googlegroups.com
Hi all,
     This is my first post...  I was playing with the SQL Designer page and couldn't click on the "Setting" button to check how to import.  Wanted  to know if the import functionality is working in cases I need to change the schema?

mdipierro

unread,
Dec 1, 2008, 2:34:08 PM12/1/08
to web2py Web Framework
No, sorry.

Yarko Tymciurak

unread,
Dec 1, 2008, 3:19:47 PM12/1/08
to web...@googlegroups.com
Have a look at this:


This will generate some web2py code for you.   I don't remember if the backend part works / was tested,

but once you see the code you may find it easy to work with the tables.

jwm

unread,
Dec 1, 2008, 3:30:17 PM12/1/08
to web2py Web Framework
On a related note I Am in the process of porting SQL Designer to a
web2py app on google appengine.

http://gaesql.appspot.com

Right now I have streamlined the export process and am using it as a
tool to learn web2py better, I have a basic save backend in process on
my laptop.
I'll look into writing a Import function from web2py model to the XML
the app uses it uses internally.

Let me know if you guys have any other suggestions, Google has
featured it on http://appgallery.appspot.com and I'm having fun
learning web2py and welcome some new ideas.

Jason W. Miller

Boris Manojlovic

unread,
Dec 1, 2008, 3:39:51 PM12/1/08
to web...@googlegroups.com
http://designer.bojanka.net/
and yes it is already on GAE...
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."-Albert Einstein

mdipierro

unread,
Dec 1, 2008, 3:40:29 PM12/1/08
to web2py Web Framework
Excellent!

On Dec 1, 2:30 pm, jwm <team1...@gmail.com> wrote:
> On a related note I Am in the process of porting SQL Designer to a
> web2py app on google appengine.
>
> http://gaesql.appspot.com
>
> Right now I have streamlined the export process and am using it as a
> tool to learn web2py better, I have a basic save backend in process on
> my laptop.
> I'll look into writing a Import function from web2py model to the XML
> the app uses it uses internally.
>
> Let me know if you guys have any other suggestions, Google has
> featured it onhttp://appgallery.appspot.comand I'm having fun

jwm

unread,
Dec 1, 2008, 3:43:57 PM12/1/08
to web2py Web Framework
Boris,
Looks like you had the thought before I did, Good Job!

J

On Dec 1, 2:39 pm, "Boris Manojlovic" <boris.manojlo...@gmail.com>
wrote:
> http://designer.bojanka.net/
> and yes it is already on GAE...
>
>
>
> On Mon, Dec 1, 2008 at 9:30 PM, jwm <team1...@gmail.com> wrote:
>
> > On a related note I Am in the process of porting SQL Designer to a
> > web2py app on google appengine.
>
> >http://gaesql.appspot.com
>
> > Right now I have streamlined the export process and am using it as a
> > tool to learn web2py better, I have a basic save backend in process on
> > my laptop.
> > I'll look into writing a Import function from web2py model to the XML
> > the app uses it uses internally.
>
> > Let me know if you guys have any other suggestions, Google has
> > featured it onhttp://appgallery.appspot.comand I'm having fun

mdipierro

unread,
Dec 1, 2008, 3:53:38 PM12/1/08
to web2py Web Framework
Boris,

is it functional? Can I uninstall the old one and link yours? If it is
open source, is the source posted somewhere?

perhaps the two of you should join forces.

Massimo


On Dec 1, 2:43 pm, jwm <team1...@gmail.com> wrote:
> Boris,
> Looks like you had the thought before I did, Good Job!
>
> J
>
> On Dec 1, 2:39 pm, "Boris Manojlovic" <boris.manojlo...@gmail.com>
> wrote:
>
> >http://designer.bojanka.net/
> > and yes it is already on GAE...
>
> > On Mon, Dec 1, 2008 at 9:30 PM, jwm <team1...@gmail.com> wrote:
>
> > > On a related note I Am in the process of porting SQL Designer to a
> > > web2py app on google appengine.
>
> > >http://gaesql.appspot.com
>
> > > Right now I have streamlined the export process and am using it as a
> > > tool to learn web2py better, I have a basic save backend in process on
> > > my laptop.
> > > I'll look into writing a Import function from web2py model to the XML
> > > the app uses it uses internally.
>
> > > Let me know if you guys have any other suggestions, Google has
> > > featured it onhttp://appgallery.appspot.comandI'm having fun

Boris Manojlovic

unread,
Dec 1, 2008, 3:57:50 PM12/1/08
to web...@googlegroups.com
it was created as proof of concept, i planed to add more functionality (as you can see from database schema)

http://www.bojanka.net/w2p-massimo.tar.gz

it is opensource as all package is opensource, why to close back end :)

mdipierro

unread,
Dec 1, 2008, 4:04:23 PM12/1/08
to web2py Web Framework
perhaps you and jwm can join forces. You have the same interests.

I am not planning to host this myself since you are doing it, but it
could be used and distributed with T3.

Massimo

On Dec 1, 2:57 pm, "Boris Manojlovic" <boris.manojlo...@gmail.com>
wrote:
> > > > > featured it onhttp://appgallery.appspot.comandI'mhaving fun

jwm

unread,
Dec 1, 2008, 4:18:08 PM12/1/08
to web2py Web Framework
I'm all for it, I'm just cutting my teeth on web2py and enjoying it so
far.
I was planning on releasing my source once I added more features, but
it looks like Boris is ahead of me.

Let me know how I can help and I'll pitch in.

J

Boris Manojlovic

unread,
Dec 1, 2008, 4:25:25 PM12/1/08
to web...@googlegroups.com
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 config http://designer.bojanka.net/js/config.js)

yarko

unread,
Dec 16, 2008, 11:34:33 AM12/16/08
to web2py Web Framework
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)

Yarko Tymciurak

unread,
Dec 16, 2008, 11:42:01 AM12/16/08
to web2py Web Framework
Sorry...

I may have spoken too soon....  I thought this was working, but still some things to work out.... (not saving xml to database at the moment)

2008/12/16 yarko <yar...@gmail.com>

dhmorgan

unread,
Feb 2, 2009, 4:37:56 PM2/2/09
to web2py Web Framework
I'm currently trying to implement this. Have followed above
instructions and it functions nearly completely. I cannot yet get save/
load to server's database.

Anyone have a handle on this?

Danny

On Dec 16 2008, 10:42 am, "Yarko Tymciurak" <yark...@gmail.com> wrote:
> Sorry...
> I may have spoken too soon....  I thought this was working, but still some
> things to work out.... (not saving xml to database at the moment)
>
> 2008/12/16 yarko <yark...@gmail.com>
> > - get the latest sqldesigner fromhttp://code.google.com/p/wwwsqldesigner/

dhmorgan

unread,
Feb 9, 2009, 10:05:25 AM2/9/09
to web2py Web Framework
just emailed update but it started a new topic, sorry.

see http://groups.google.com/group/web2py/browse_thread/thread/0687f038e53a0e5c#
for update

Danny
Reply all
Reply to author
Forward
0 new messages