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")
Than
gt;
> 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 wrote:
>
>> Hi,
>>
>> I am using pyramid_rpc to define an xmlr
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):
t pallet"), (17, "Second pallet")),
),
default=["16", "17"],
)
On Wed, Jun 17, 2015 at 8:10 AM, Petr Blahos wrote:
> Hello,
>>
>> is it possible to make all the checkboxes in a CheckboxChoiceWidget
>> ch
>
> 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 g
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 p
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 lingua
> 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 defin
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
adminis
>
>
> 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
> 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 che
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 wrote:
> i should add...
>
> originally my structure was:
>
> On 4 November 2012 20:29, Petr Blahos 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 ch
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, t
>> 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
> 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] Connec
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
>> 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
> > CODE:
> > When I call validate/index?par1=xxx
> > fill a non-number into the second text-field and press submit, I get
> > an exception
> > on the second line of index.
>
> So what is the problem? �...@validate is eating parameters so that they
> no longer appear in ``requests.params`` or
> ``r
21 matches
Mail list logo