[Zope] organizational questions

Shaw, Howard ShawH@STHS.org
Wed, 21 Apr 1999 11:06:12 -0500


> ----------
> From: 	Scott Lewis[SMTP:csl@balticave.com]
> Sent: 	Wednesday, April 21, 1999 9:37 AM
> To: 	zope@zope.org
> Subject: 	[Zope] organizational questions
> 
> hi folks,
> 
> first off, thanks to the people who offered quick, helpful responses 
> to my question yesterday.
> 
> ok, i'm converted. i've started implementing in zope. i have a 
> relational database of about 8 tables. it is used for a registry of 
> trainings and trainers. we have ten centers that will offer trainings.
> 
> each center needs a publicly accessible home page where people 
> can search on data in the database. also, each center needs a 
> management section, where they can insert/edit/delete data and 
> more. this section is restricted to certain validated users.
> 
> my question is how to structure this in zope. i started by creating a 
> centers folder, and a subfolder for each center. i plan to place 
> common DTML docs and SQL methods in the centers folder, 
> letting each center acquire them. each center has an ID property, 
> corresponding to its unique ID in the database. i just noticed this 
> morning that this is the same way its done in the budget sample 
> application in the HOWTO section. i must be going in the right 
> direction.
> 
> i expect to have a number of DTML documents that are access 
> restricted. for organizational clarity and ease of managing the 
> permissions, i'd like to put them in a folder. but if i put them in a 
> folder in the centers folder, then they are parallel to the individual
> 
> centers and can't be acquired. does this mean i'm stuck putting 
> them all in the centers folder? any suggestions?
> 
> lets say i put a DTML document called dtViewTrainings in the 
> centers directory. it uses a SQL method and an ID property to get 
> trainings from the database. so the user views 
> http://.../centers/roswell/dtViewTrainings and the ID is acquired 
> from the roswell folder. everything's ok. but what if they browse to 
> http://..centers/dtViewTrainings. there's an error because ID is not 
> defined. that's fine, because the request makes no sense. but is 
> this problem? it just kind of bugs me that the user could browse to 
> this URL and get a meaningless error.
> 
Put in an <!--#unless ID--><!--#call
"RESPONSE.redirect('index.html')"--><!--#/unless--> near the front of
your document. Untested, YMMV.

> thanks in advance for any help,
> 
> -scott
> 
> -----
> Scott Lewis
> Baltic Avenue Productions
> csl@balticave.com
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
> 
Howard C. Shaw III
Programmer/SysAdmin
St. Thomas High School