[web2py] Re: WOW!!

2010-08-14 Thread david.waldrop
Is there a way to test this in a dev environment using localhost??? The db portion works fine, the url is what I cannot test locally. I have read the forums and see comeone else did this with a wiki by using routes, but i do not fully understand. Scenario: user is email link of "http://mycommuni

[web2py] Re: WOW!!

2010-08-09 Thread david.waldrop
Thanks. I am now over the main hump and cleaning up a bit. But still have a problem. I let the user create a community as described above. The app create a new subdirectory and creats some tables within that subdirectry at community creation time. All is well up to this point. I display a lis

[web2py] Re: WOW!!

2010-08-09 Thread mdipierro
You are right. crud forms should not be acceped. do this: def f(form): app=meeting.name # somehow determine which name db_path = os.path.join(request.folder,'databases',app) os.path.rmdir(db_path) # you may need to clear recursively form=crud.delete(db.meeting,meeti

[web2py] Re: WOW!!

2010-08-09 Thread david.waldrop
That may also be a problem, but the code is never getting executed. I think the crud.delete functionality does not emit forms.accept(...). IIf this is the case and I need to use the crud.ondelete mechanism I am unsure how I signal the id (or path) I want the function to ooperate on. On Aug 9, 10:

[web2py] Re: WOW!!

2010-08-09 Thread mdipierro
It may be becase the folder is not empty and rmdir does not work if the folder is not empty On Aug 9, 8:23 am, "david.waldrop" wrote: > Sorry to keep adding to this thread, but I think this is still > related. > > Now that I have the separate database in separate folders I have an > issue when I

[web2py] Re: WOW!!

2010-08-09 Thread david.waldrop
Sorry to keep adding to this thread, but I think this is still related. Now that I have the separate database in separate folders I have an issue when I delete a community. Not with how to delete the folder, but rather where to place the code. The code below never seems to execute the os.rmdir(.

[web2py] Re: WOW!!

2010-08-07 Thread david.waldrop
this one worked: mtgdb=DAL('sqlite://storage.sqlite', folder=db_path) very cool. thanks a million On Aug 7, 11:20 am, mdipierro wrote: > please try both > > mtgdb=DAL('sqlite://%s/storage.sqlite' % app, folder=db_path) > > and > > mtgdb=DAL('sqlite://storage.sqlite', folder=db_path) > >

[web2py] Re: WOW!!

2010-08-07 Thread mdipierro
please try both mtgdb=DAL('sqlite://%s/storage.sqlite' % app, folder=db_path) and mtgdb=DAL('sqlite://storage.sqlite', folder=db_path) I am sure one works but I do not recall which one. Let us know. On Aug 7, 8:55 am, "david.waldrop" wrote: > well almost perfectly.  below is my code: > >    

[web2py] Re: WOW!!

2010-08-07 Thread david.waldrop
well almost perfectly. below is my code: app=community.name db_path = os.path.join(request.folder,'databases',app) if not os.path.exists(db_path): os.mkdir(db_path) mtgdb=DAL('sqlite://%s/storage.sqlite' % app) mtgdb.define_table( 'thoughts', Field('description','text

[web2py] Re: WOW!!

2010-08-07 Thread david.waldrop
worked perfectly. I am a happy camper. One thing I am uneasy with is knowing if it's "ok" to define databases and tables in a controller, where to put inport statements, and in general how to partition code. Is there a particilarly good app you would recccomend as a reference or a place to read a

[web2py] Re: WOW!!

2010-08-07 Thread mdipierro
instead of db=DAL('sqlite://storage.sqlite') do app='...' # somehow determine which name db_path = os.path.join(request.folder,'databases',app) if not os.path.exists(db_path): os.mkdir(db_path) db=DAL('sqlite://%s/storage.sqlite' % app) On Aug 7, 6:33 am, "david.waldrop" wrote: > I have now go

[web2py] Re: WOW!!

2010-08-07 Thread david.waldrop
I have now got the url working via DNS as suggested. But encountered another problem. I would like for each community to have a separate database. Whenever I creaet a new community database and corresponding tables they are physically intermixed with teh SQLLite storage folder of the main/global

[web2py] Re: WOW!!

2010-07-24 Thread Iceberg
Some domain register supports "wild chars" in your domain name, so all requests to "*.yourdomain.com" can reach your site. If you prefer the other style, try web2py/route.py On Jul 24, 10:59pm, "david.waldrop" wrote: > Thnaks for the reply, but I think I was not clear.  I se form you > example h

[web2py] Re: WOW!!

2010-07-24 Thread david.waldrop
Thnaks for the reply, but I think I was not clear. I se form you example how to dynamically point to a seperate DB. But regarding the url, users can create communities on the fly and henei I would like to avoid having to register each one with DNS. The main use behined a seperate URL is to make

[web2py] Re: WOW!!

2010-07-22 Thread mdipierro
Thanks you can do this. register a domain like mydomain.com and access it as http://mycommunty.mydomain.com in the model file you can do: community = request.env.host_name.split('.')[0] db=DAL('sqlite://storage.%s.sqlite' % community) and that should be all you need. On Jul 22, 1:58