Bruno Grampa wrote:
i'm building a site to sell images (this is the concept, the reality is
All the images are in a directory mapped through LocalFS product.
For every image i have a record in a SQL table with all the basic
informations: author, name of the file, cost.
What i haven't understood is how to block users from getting images if
they have not enough credit to buy them.
I need to control the view method, but i don't know if this idea is the
right one or there are better solutions.
Maybe you can better explain your question. Im not at all sure the
following will help:
Seems like you can check a users credit at login, store the credit score
in SESSION and use that for branching logic. You could also update the
creditScore as it changes.
Then you can develope your pages with stuff like this: (syntax not checked)
<a hRef="somewhere" tal:condition="python:
request.SESSION['hasCredit'];">This link only shows up if session's
'hasCredit' is true.</a>
<a hRef="somewhere ...
In Python: (and TAL macros)
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -