1- In my pyramid package directory, if I create a file called
somefunction.py and I want to call this function using $.post, what
URL would I specify to call this function.
and:
2- And if I have a view function called aview created in views.py, can
I call this function by simply referring the
Hi AwaisMuzaffar,
1. To be able to call a python function via an ajax call you will have to make
the function in your python module a callable view and then call the url that
is assigned to the view in your js script.
2. As for calling a view in $.post, are you using traversal or
Thank you for the reply.
I am using url_dispatch.
I have done as follows:
In the init.py: I have added:
config.add_route('ajax', '/ajax/', view='testproject.views.ajax')
In the views.py:
def ajax(request):
string = 'hello world'
return Response(string)
and my jquery
On Thu, Jun 16, 2011 at 10:03 AM, AwaisMuzaffar awais1...@googlemail.comwrote:
config.add_route('ajax', '/ajax/', view='testproject.views.ajax')
def ajax(request):
string = 'hello world'
return Response(string)
This is fine, but there are 2 enhancements you may want to
Hello!
What problem can I have if I will use sqlalchemy version 0.7 with pylons
1.0? Pylons 1.0 uses sqlalchemy version 0.5 by default.
Thanks!
--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this group, send email to
How are file uploads done in Pyramid?
I have tried to access the file from request.POST['fileupload'] and
request.params['fileupload'] using this html form:
form action=/upload target=fileupload-frame method=POST
enctype=multipart/form-data
input type=file id=fileupload name=fileupload
/form
The documentation says 'It’s sometimes advantageous to not use
SQLAlchemy’s thread-scoped sessions'. Thread-scoped as I understand is
done using scoped_session(), which will associate an SQLAlchemy
session for currently running thread.
WIth my experience from J2EE I understand that each
I don't see anyway in documentation mentioned this, anyone can post a
url will be helpful.
And maybe add this part to narrative documentation will be useful for
the fresh man.
--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this
I don't see anyway in documentation mentioned this, anyone can post a url
will be helpful.
And maybe add this part to narrative documentation will be useful for the
fresh man.
--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this
Its really simple to create a scalable social network using Redis, to
demonstrate this I wrote a small library called resn in python that
can provide out of the box support for friends, news feed, asymmetric
connections (like Twitter) and authentication. It uses the redis-py
library by Andy
Has someone done a benchmark for paster server ? As per the
documentation to deploy pyramid using ngnix in the mix (for load
balancing etc) paster is used. I have also seen in this and other
forums that folks use this architecture in production. So it will be
good to know how paster perform how
It was a problem with my form (being submitted by jquery)
--
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pylons-discuss/-/1bEbkNjqa88J.
To post to this group, send email
On Thu, 2011-06-16 at 10:54 -0700, Jason wrote:
It was a problem with my form (being submitted by jquery)
For the record, here's a short tutorial describing file uploads and
Pyramid:
http://docs.pylonsproject.org/projects/pyramid_cookbook/dev/files.html
--
You received this message because
On Thu, 2011-06-16 at 09:06 +0800, Zhang Jiawei wrote:
I don't see anyway in documentation mentioned this, anyone can post a
url will be helpful.
And maybe add this part to narrative documentation will be useful for
the fresh man.
paster is a command, not a server. Depending on the content of
the .ini file used by paster serve, a type of server is used. The
default Pyramid .ini file uses the paste.httpserver server (which
despite being named paste has really nothing to do with paster).
See
On Wed, 2011-06-15 at 22:38 -0700, Liju wrote:
The documentation says 'It’s sometimes advantageous to not use
SQLAlchemy’s thread-scoped sessions'. Thread-scoped as I understand is
done using scoped_session(), which will associate an SQLAlchemy
session for currently running thread.
WIth my
Hi everyone,
How can we invoke multiple threads of processing from the view handler, so
that the threads run independently and provide results, which will be
returned by the view handler? The threads described above will invoke
requests to external API's.
Can anyone help me out in this.
Thanks,
On Fri, 2011-06-17 at 00:25 +0530, Raviteja wrote:
Hi everyone,
How can we invoke multiple threads of processing from the view
handler, so that the threads run independently and provide results,
which will be returned by the view handler? The threads described
above will invoke requests
Thanks for the reply. It has been very helpful.
Regards,
Awais
On Jun 16, 4:47 pm, Michael Merickel mmeri...@gmail.com wrote:
On Thu, Jun 16, 2011 at 10:03 AM, AwaisMuzaffar
awais1...@googlemail.comwrote:
config.add_route('ajax', '/ajax/', view='testproject.views.ajax')
def
On Thursday, June 16, 2011 10:13:57 AM UTC-7, monax wrote:
Hello!
What problem can I have if I will use sqlalchemy version 0.7 with pylons
1.0? Pylons 1.0 uses sqlalchemy version 0.5 by default.
Pylons doesn't depend on SQLAlchemy, so there shouldn't be any problems at
all.
When you
it's the orm code that you write that might have a problem with sqla 0.7.
Not pyramid. And only you can know if your model code will have a problem
running on sqla 0.7
I can say with certainty that the model code I am working on works just fine
on sqla 0.7, no issues whatsoever. Also, views
And actually I hope all the stuffs go to uwsgi log file now, will go to the
log file in production.ini I specified. Is this possible ?
2011/6/17 Zhang Jiawei ghos...@gmail.com
Thanks Chris.
And I have another question about logging.
I can start pyramid with uwsgi successfully now, and the
Thanks Chris.
And I have another question about logging.
I can start pyramid with uwsgi successfully now, and the logging info is
written to the log file I specified path in the production.ini, but I found
exceptions raised in view will be logged to the file which is specified by
uwsgi not the
On Thursday, June 16, 2011, Liju lij...@gmail.com wrote:
Has someone done a benchmark for paster server ? As per the
documentation to deploy pyramid using ngnix in the mix (for load
balancing etc) paster is used. I have also seen in this and other
forums that folks use this architecture in
On Fri, 2011-06-17 at 08:57 +0800, Zhang Jiawei wrote:
Thanks Chris.
And I have another question about logging.
I can start pyramid with uwsgi successfully now, and the logging info
is written to the log file I specified path in the production.ini, but
I found exceptions raised in view
On Thu, Jun 16, 2011 at 12:38 AM, Liju lij...@gmail.com wrote:
The documentation says 'It’s sometimes advantageous to not use
SQLAlchemy’s thread-scoped sessions'.
The issue isn't with scoped_session as much as it has to do with using a
global variable to store your database connections. It
26 matches
Mail list logo