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 database.  How can I get the current
storage location and create new folders in the OS to house the
corresponding database and table files.  Below is an illustration of
what I would the resulting file structure to be want:

MyAPP
    databases
        storage.sqlite
        c2628476264624626_communities.table
       <<<other global tables>>>>
       My first community
            storage.sqlite
            d32753728973493784_events.table
            <<<other tables related to "My first community"
       Fox Hills Swim Club
            storage.sqlite
            e98738957375937_events.table

Note:  Each community will have the same tables (bit obviously with
different data) and I realize this is specific to sqlite (which is ok
for what I am doing).

I think that what I do not know how to do is retrieve the current
storage location (i.e. folder) and how to specif the location where
DAL creates a new database.

Thanks in advance for your assistance.



On Jul 24, 11:56 am, Iceberg <iceb...@21cn.com> wrote:
> 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" <david.wald...@gmail.com> wrote:
>
>
>
> > 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 it easy for communities to be shared.  So for
> > example I could inviet my neoighbor by simply email a link.   They in
> > turn coud do the same and invite others.  I was thinking of a link
> > like this:
>
> >www.mydomain.com/mycommunity1 orwww.mydomain.com\tallyhoswimclub
>
> > where the suffix uniquely identifies the community.  I see that web2py
> > controls the url naming and am not sure how this scheme would impact
> > the typical url suffixes that actuall provide functionality (i.e.
> > about, leit, new posing, etc.) and ofetn related to a view and.or
> > controler.
>
> > Any ideas?
>
> > On Jul 22, 6:47 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > 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 pm, "david.waldrop" <david.wald...@gmail.com> wrote:
>
> > > > All, I just discovered this amazing framework and am immediately
> > > > switching to it (from adobe) for a current project I am working on.
> > > > It is quite different from the way I have built solutions in the
> > > > past.  Here is the basic structure of how I need to approach the
> > > > problem:
>
> > > > 1) I want a user to log in and create a community based topic.
>
> > > > 2) This community topic should have a separate URL and database.  I
> > > > desire this for scaleability and privacy.  I asume the url will be
> > > > either the community topic name (or a GUID of some type, and am OK
> > > > with this)  suffixed to my domain.
>
> > > > 3) The organizer can freely share the url with others in their
> > > > neighborhood.
>
> > > > 4) All users will be required to register and login in.
>
> > > > 5) Users can participate in multiple community topics.  I think this
> > > > means there is a central database storing community topics and
> > > > participating users, thereby allowing the user to see a list of
> > > > community topics in which they are participating when they log in.
> > > > When they select a community topic (ideally represented by a URL to
> > > > aid in easily sharing) the app must somehow switch the underlying
> > > > database.
>
> > > > I am getting the hang of implementing the functionality within a
> > > > community, but have no real idea how to fulfill the above
> > > > requirements.  Any thoughts or suggestions would be greatly
> > > > appreciated.  Again,WOW, I cannot believe I have been unaware of
> > > > web2py!!!!!- Hide quoted text -
>
> > > - Show quoted text -

Reply via email to