Hi,
When executing the following program, changes in the database (other
than those made by this program) aren't visible until it is restarted,
due to some form of SQLAlchemy caching:
from twisted.web import server, resource
import model # my database model
class MyRoot(resource.Resource):
def render(self, request):
m = model.MyModel.get(request.args['id'][0])
return m.some_column
# Connect to database.
model.metadata.connect('some_dburi')
# Create site structure.
root = resource.Resource()
root.putChild('', MyRoot())
site = server.Site(root)
# Switch user, start service.
from twisted.application import service, strports
application = service.Application("myexample")
s = strports.service('tcp:8080', site)
s.setServiceParent(application)
So if I visit http://localhost:8080/?id=1, then alter the some_column
value for the row who's id is 1 and reload, the change is not
reflected.
Problem is, I need the update to be visible. How would I go about
implementing this?
Regards,
Magnus
Hi.
I would like to include a XML template inside another template.
Using XML Inclusion this should be possibile at the XML level.
Is this feature available or easy to support?
Thanks Manlio Perillo
Hi
My first time on this list, but most people already know my antics
from #twisted.web
I was advised to join and make noise and hype about my project Enamel
http://open.thusa.co.za/enamel/ although I hope it may not be
premature to do so.
I know it's "yet another framework" to some people, but I hope there
will be enough interest at some stage to achieve it's goals - which
ultimately is to get more people using Nevow.
Comments/flames/whatever are welcome.
--
Colin Alston ~ http://www.karnaugh.za.net/
Expecting one person to deal with all your problems is like praying
each time you require an ambulance: You'll eventually be dead long
before you get a response.