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  or www.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