Hi,
is it possible to define a schema with a node that will have the same value
as another node in the same Schema? Something along these lines:
class Schema(colander.Schema):
initial_amount = colander.SchemaNode(colander.Float())
current_amount = GetValueFrom(src="initial_amount")
ator=my_decorator)
>
> In this way you can easily write decorators that only accept context,
> request without having to worry about the signature / args of your callable.
>
> On Fri, Apr 1, 2016 at 6:08 AM, Petr Blahos <petrbla...@gmail.com> wrote:
>
>&g
Hi,
I am using pyramid_rpc to define an xmlrpc api methods like this:
@xmlrpc_method(endpoint='napi')
def getiteminfo(request, wp, userid, item_type, pn):
" the actual function "
and I would like to wrap the methods with another decorator,
in this case for measuring and debugging purposes.
Hi Mehdi,
traversing your resource tree does not necessarily mean running any
queries. In
your example, it wouldn't have to run any queries at all.
Basically, it is there to bring you to the view and possibly gather some
information
on the way. For example (simplified and certainly not working):
Hello,
is it possible to make all the checkboxes in a CheckboxChoiceWidget
checked by
default?
Sorry, I meant to say in colander + deform2.
Thanks.
Petr
--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To unsubscribe from this group and
pallet)),
),
default=[16, 17],
)
On Wed, Jun 17, 2015 at 8:10 AM, Petr Blahos petrbla...@gmail.com wrote:
Hello,
is it possible to make all the checkboxes in a CheckboxChoiceWidget
checked by
default?
Sorry, I meant to say in colander + deform2
Hello,
is it possible to make all the checkboxes in a CheckboxChoiceWidget checked
by
default?
Thanks,
Petr
--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hi everyone,
this is the first time I am trying to use lingua's pot-create instead of
setup.py extract_messages. First I want to mention, that if I put in the
setup.cfg with the
extract_messages/update_catalog/compile_catalog sections, the good old
setup.py extract_messages
works. With
thnx pb, made it partially working, after initialize_MyApp_db which
successfully created models table I still
get error in browser Pyramid is having a problem using your SQL database
Is there any exception show in your console where you run your pserve?
another question: how to define
Hi,
I have 32bit python 2.7, 32 bit windows, pyodbc 3.0.6, and sqlalchemy 0.8,
and my connection string
is something like:
mssql://username:password@hostname/dbname?driver=SQL Server Native Client
10.0;unicode_results=True
where driver=... is the same text I found in the ODBC data source
So far in my project.py i added the routing:
config.add_route('normalView', '/view/{id}')
config.add_route('updatedView', '/view/{id}')
Hi Michael, this is not going to work, you expect your matching
pattern /view/{id} to be mapped to 2 different route names. Pyramid
will always
Recently I was setting up configuration for a new project and was trying
to do the obvious thing in my .ini:
pyramid.reload_templates = ✔
pyramid.debug_authorization = ✖
pyramid.debug_notfound = ✖
pyramid.debug_routematch = ✖
pyramid.debug_templates = ✔
To my surprise, the checkmark did
Perhaps you could use nose Attrib plugin?
https://nose.readthedocs.org/en/latest/plugins/attrib.html
(I haven't got down to it yet, but I want to use it for
a similar purpose).
--
Petr
On Thu, Jan 24, 2013 at 2:00 AM, Jonathan Vanasco jonat...@findmeon.comwrote:
i should add...
originally
On 4 November 2012 20:29, Petr Blahos petrbla...@gmail.com wrote:
What he does there, he basically has a file watcher and whenever his
style
changes,
it is compiled with stylus, whenever his coffee script changes, it gets
translated to
js, whenever his js changes, tests are run.
You
Hi all,
I have seen a very nice thing in the js framework este (
https://github.com/Steida/este).
What he does there, he basically has a file watcher and whenever his style
changes,
it is compiled with stylus, whenever his coffee script changes, it gets
translated to
js, whenever his js changes,
I'm working on a pylons project, and we have users trying to host the
web-app under a non-root path (i.e. host it at '/myapp/' rather than at
'/'). We've been pretty good about using 'h.url_for' to generate links in
our jinja2 templates, so most things work as expected. However, our CSS file
I'm trying to install Pylons using easy_install, but the installation
egg does not seem to be available.
bash-4.2$ ./easy_install Pylons=1.0
Searching for Pylons=1.0
Reading http://pypi.python.org/simple/Pylons/
Reading http://www.pylonshq.com/
Download error: [Errno 110] Connection timed
Hi all,
I would like to set session.cookie_expires to timedelta. It seems to me that it
cannot be done in the .ini file. Is that so?
In that case, what would be the best way to do it? Setting the value in
config/environment.py: load_environment?
Thanks in advance.
--
Petr
--
You received this
So first, why does @validate change the request method? Is it to help
the error middleware?
It's so that if the other method that displays the form has a REST decorator
requiring
a GET to show the form, it can still actually be run. Not an ideal solution
at all of course.
What I did in
First of all, I would like to know, whether my idea that request.params
should be there is correct.
You called it with ?par1=xxx, so c.par1 should be xxx and that
should be the default value in the text box.;
In 'save' decorated with @validate, you'd get the processed variables
from
20 matches
Mail list logo