Hi all,
I'm not sure if this is the right place to ask, but I'll try anyway :)
Having a model that has a constructor, how can I write a fixture for it?
For example:
class Language(Base):
__tablename__ = 'languages'
id = Column(Integer, primary_key=True)
code=
Hello,
I am passing a context object which is a list of objects to a html
page. Within the page I then
cycle through the objects and display them. Pretty trivial. However I
want to pass the list of objects back to the controller so I can
continue to manipulate the objects.
I though I could
INPUT TYPE=hidden NAME=listitems VALUE=${c.chosenList} /
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe
Well, something has changed.
Not so long ago, I used to write my routes as
map.connect(':controller/:action')
now such a route fails to match due to the lack of leading slash. OK.
I was already told to visit
http://pylonshq.com/docs/en/0.9.7/configuration/#url-configuration
But ... I
What version of Routes do you have installed?
This wasn't the case when that documentation was written.
It definitely does not requires the leading slash in Routes-1.10
the release log for routes is:
Version 1.11 (2009-09-28)
Version 1.10 (2008-11-24)
Jonathan Vanasco jonat...@findmeon.com
writes:
What version of Routes do you have installed?
1.11
It definitely does not requires the leading slash in Routes-1.10
OK, I was not sure, someone on IRC suggested that the change was
introduced in 0.9.7. Still, it deserves some warning, I just
Unfortunately I'm not seeing what I expect to see. I want to retrieve
the list of objects
from the c.chosenList:
say the list is2,4
INPUT TYPE=hidden NAME=listitems VALUE=${c.chosenList} /
Within testController:
def test(self,id):
locallist = request.params.get(listitems)
for
On Mon, Nov 9, 2009 at 4:47 PM, gazza burslem2...@yahoo.com wrote:
from the c.chosenList:
say the list is2,4
INPUT TYPE=hidden NAME=listitems VALUE=${c.chosenList} /
Within testController:
def test(self,id):
locallist = request.params.get(listitems)
for index,item in
There are plenty of examples of how to upload files in Pylons, but
none of them check if the user actually put a file in the form or
not. If they don't, the application breaks. Wonderful.
So, how do you check? Well, I'd expect this to work:
if not request.params['file']:
return No file
Hello.
I have a problem with caching of templates. Sometimes users get the
pages, that opened before. I don't khow the reason.
Is it possible to turn off all the caching in whole pylons-project?
--~--~-~--~~~---~--~~
You received this message because you are
Hello.
I have a problem with caching of templates. Sometimes users get the
pages, that opened before. I don't khow the reason. Is it possible to
turn off all the caching in whole pylons project?
--~--~-~--~~~---~--~~
You received this message because you are
I just ran into this issue while trying to create a new Pylons project
to work through the SimpleSite tutorial from the Pylons book. The
traceback showed that the error was coming from a version of paste in /
usr/local/lib/python2.5/site-packages/paste/script/templates.py event
though I had just
sorry for the confusion above.
Anything put into the c variable in a controller is accessible
throughout the request by Controllers and Views(templates)
${} is shorthand for print the result of the brackets
Assuming that c.listitems is an array of list item ids, in your
template you can do:
Much appreciated the responses.
% for i in c.listitems:
INPUT TYPE=hidden NAME=listitems VALUE=${i} /
% endfor
The above was the approach I thought about but this looks a wee' bit
verbose creating multiple instances
. Instead I think I will limit the passing of context objects to be no
As far as I know, Pylons does not enable caching by default (including
template caching).
You can turn off caching by not configuring beaker.cache.* inside .ini file.
There are a couple of places you can also check:
* your render() method might contain cache_expire
* some of your mako files may
15 matches
Mail list logo