[Zope] Product catalog/how to handle graphics?
Ben Edwards
ben@videonetwork.org
Wed, 7 Feb 2001 14:27:52 GMT
I am currently implementing a product catalog, which is both viewed and updated
online. I have been using MySQL to store the data. Firstly I should say that
I am very impressed with zope. I have probably spent around 4-5 days (i.e.
4-5*8 hours) and have set up zope and MySQL, done the site templates and created
modules to add/modify product, display the catalog and display items for an
individual item.
The only thing that is missing is how to handle the graphics. Each product
has a thumbnail (100*100) and a main graphic (400*300). Importing the graphics
into zope and telling the database where they are is obviously the simplest
solution but as all the rest of the data is in the database I really want to
put the graphics there two.
I guess there are two sides to this:
1) Put a couple of File Browse fields on the form used to add new products/edit
existing ones. Then find some way of tacking this file from the local file system
and getting it in the database (probably as a blob datatype).
2) Retrieving the image from the database and getting it to appear in a webpage
(I guess a temporary stage or extracting the image from the database into zope
may be required).
The problem is I don't know how to do either of these things and also am not
sure if I am going about the whole thing the right way.
The reason I like using a database to hold things is because it has enables
me (up to now) to not have to use any Python. As you can imagine this is very
good for me as I am very new to zope and do not know python (also I knoqw a
lot about rdbms).
Any advice would be appreciated.
Thanks in advance,
Ben
PS I am thinking of doing some HOWTOs (like the inserting data into a database)
such as inserting/modifying data from forms and displaying data from a database
(single records and multiple records). This would form a kind of using zope
as a front end for rdbms primer. Do people think this is worth doing.