W liście Paweł Stradomski z dnia czwartek 24 czerwca 2010:
> W liście dave z dnia czwartek 24 czerwca 2010:
> > (...)
> >
> > We can make this problem go away one of two ways: 1) flush the cache
> > (not desirable.) 2) Issue a request to the server that does not invoke
ys to
force compiling mappers (I assume there is a function to do exactly that
described somewhere in the docs).
--
Paweł Stradomski
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to pylons-disc..
his is similar to how Apache/mpm_prefork keeps a pool of processes.
So, with a pool of eg 10 threads (default for CherryPy) ten requests
that start those long-running tasks would deplete the pool completely.
Further requests would be queued until one of the workers finishes.
--
Paweł Stradomski
--
You r
st launch another thread
(or process, depending on server type) or use some messaging system to
pass the job to some background process.
--
Paweł Stradomski
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, sen
W liście Haron Media z dnia środa 10 lutego 2010:
> On 02/09/2010 11:26 PM, Paweł Stradomski wrote:
> > W liście Haron Media z dnia wtorek 09 lutego 2010:
> >> In an ideal world, yeah. But it is the very nature of stateless HTTP
> >> that is the reason attacks such C
forms with javascript (wihtout user
confirmation) etc. rather than statelessnes of HTTP itself?
--
Paweł Stradomski
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to pylons-disc...@googlegroups.com
a/4.0
(compatible; Netcraft Web Server Survey)"
This is from a site that does not translate HEAD into GET but does check if
request method is acceptable (and forgets to account for HEAD)
--
Paweł Stradomski
--
You received this message because you are subscribed to the Google Groups
&q
code can be inserted into the template as normal and
> not cached. Caching the entire site for each affiliate code is not
> really an option as we have 3k+ affiliates.
Maybe edge-side includes?
--
Paweł Stradomski
--
You received this message because you are subscribed to the Google Group
LHTTPRequest - you can use
eg. flash, or iframes, as you are doing now).
Alas, if you do perform CSRF checks anyway, you can still use hidden field
method, as you suggested.
--
Paweł Stradomski
--
You received this message because you are subscribed to the Google Groups
"pylons-discus
hod").
Security risk.
For is_xhr requests you can disable CSRF checks, as there is no known way of
sending a cross-site forged request with this header set. But it's trivial to
spoof one more field.
--
Paweł Stradomski
--
You received this message because you are subscribed t
W liście Paweł Stradomski z dnia czwartek 07 stycznia 2010:
> W liście writeson z dnia czwartek 07 stycznia 2010:
>
> var MyProjectConfiguration = {
> 'base_path' : ${h.url('/')}
> }
>
Bah, forgot quotes arount the url (and proper escaping).
--
you could put this snippet
var MyProjectConfiguration = {
'base_path' : ${h.url('/')}
}
Then in other scripts you can construct paths with code like
MyProjectConfiguration.base_path + 'some/path' (important: no leading slash)
--
Paweł Stradomski
--
You received
s?
h.field got removed in 0.6.4, wasn't it?
Anyway, you can just lay it out yourself - and use CSS instead of tables.
You could probably mimic the HTML code as being output by the field helper.
Consult the source for details
http://hg.splee.co.uk/webhelpers/src/31e6eed7a527/webhelpers/html/form_
ically does what I want to do, however is there a better way
> than this?
Why not this way:
c.creditcardtypes=[("visa","visa"), ("americanexpress","americanexpress")]
Also, why does creaditcardtype derive from BaseController?
--
Paweł Stradomski
--
Y
n they received, just with additional attributes. So no
wrapping occurs.
--
Paweł Stradomski
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this
can set up mappers in setUp function in test suites that need them, and
remove them in tearDown (sqlalchemy has remove_mappers or some similarily
named function).
Personally, I don't have mappers setup as top-level functions in any module,
but have a specific function just to define mappers
ectly. When called by repr() some ipython
magic happens, which expects __repr__ to return a string.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to t
You'd probably also want to adjust PYTHONPATH environment variable (see:
http://docs.python.org/tutorial/modules.html)
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"pylons-discuss&qu
8/12/08/what-have-you-tried
--
Paweł Stradomski
--~--~-~--~~~---~--~~
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 f
W liście Mike Orr z dnia wtorek 07 lipca 2009:
> Other country lists would also be welcome. (In latin-1 charset.
Doesn't it limit the list to only countries of Western Europe?
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because
ore the warning,
> or return a text file containing one state per line (with the first
> word in the line being the ID).
The attack is only possible if the list (array in JavaScript) is top-level
object. So it is just enough to wrap the list in some object,
eg: {
Seems you're trying to execute that command in directory where you have no
access. Try it in your home directory
Also:
> Enter template_engine (mako/genshi/jinja2/etc: Template language)
> ['mako']: y
Shouldn't you type &
ssion is now dead. User 1 is asked
> to log in again.
>
But you need to hit the database to check the last login timestamp for each
request anyway, right?
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed
#x27;s problem?
--
Paweł Stradomski
--~--~-~--~~~---~--~~
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 from t
ary. I haven't
checked if beaker provides API to terminate session by id, but this should be
pretty simple to implement.
Fourth solution would be to use tagging of sessions, but this is even more
work (I guess).
> One other thing: I would like, if possible, to not have to hit t
rver - instead it is just a simple
function call to the WSGI appliaction - and as function calls usually do, it
will run in the same thread.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&quo
icodeMultiDict instance has no __call__ method
request.GET[], not request.GET(). Brackets, as in array access, not as in
function call
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"pyl
d know if this is a problem in pylons). Anyway, I don't think there is a
need for subrequest here -- can't you just get the data you need by simply
calling some function? Move the code from controller to some common module if
needed.
--
Paweł Stradomski
--~--~-~--~~
won't work, while
https://somesite:8080/ will. One could even run http (not https) on port 443,
byt this is a bad idea.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"pylons-discus
lalchemy session upon
finishing each request? Are you using contextual sessions?
I'd guess the problem is due to more and more objects existing in the session
(though I might be wrong).
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because yo
x would pick up the file
and stream it to client.
The header has sligthly different name and meaning in one of those servers, I
don't recall which one.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
t;
> In order to run a Pylons application, is it necessary to manage the
> box ourselves?
> If so, I wish I had known that beforehand.
>
Maybe take a look at this post:
http://m.andric.us/post/43754517/django-python-mod-wsgi-with-cp
eg. mod_wsgi). Some
braindead GUIs can't do this. But let somebody who does use cPanel speak up,
I haven't (just plesk).
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"pylons
ig files generated by it?
At least plesk has such a feature.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
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@go
W liście menshikoval...@gmail.com z dnia sobota, 4 kwietnia 2009:
> Hello
> How to make dynamicly range of 01..99 in options
>
> ${h.select("val", "01", options=[("01", "01"), ("02", "02").("99",
> &
cases, though you
can check that too.
What exactly is the difference between "with db" and "without db" versions,
code-wise? Could you try to remove functionality by small chunks to see what
lines cause the slowdown?
--
Paweł Stradomski
--~--~-~--~~~-
ngs for about a minute when generating the response.
> The client hangs there waiting for a response while pylons does
> *something*.
>
Maybe try to profile your application to check where it spends that time? Try
repoze.profile.
--
Paweł Stradomski
--~--~-~--~~---
> for i in range(10)
> log.debug(i)
> ...
I'm 99.% sure it has nothing to do with the for loop.
It should also happen if you do
i=0
log.debug(i)
The trace is confusing nonetheless (and either invalid or truncated).
--
Paweł Stradomski
--~--~-~--~~~
gt; the row
Is anotherFunction called in another session, which has started its own
transaction earlier with SERIALIZABLE isolation? If so, then the row might
not be visible as it would be a phantom.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message
W liście John Brennan z dnia czwartek, 29 stycznia 2009:
> but this does NOT work (it returns None):
> meta.Session.query(self).filter(self.stuff==True).filter(id).first()
Shouldn't this be .filter_by(id=id).first()?
--
Paweł
a controller, I can put
dummy implementations of services in the registry, so controller will get
those stubs when calling dependency()). I could have achieved the same with
using some mock library.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message
n of model and controller can be seen here:
http://pastebin.com/m6fac67f0
It's sqlalchemy, but not pylons (so disregard calls to dependency() etc). Also
you probably won't need Serivice objects, you would do well with plain module
methods (I need them to be able to look up SA sess
W liście Michael Bayer z dnia środa 21 stycznia 2009:
> On Jan 21, 11:48 am, Paweł Stradomski wrote:
> > What exactly are you trying to achieve?
>
> one of the tenets of activerecord is that constructing an object with
> a primary key returns the existing object implicitly.
R
nformations).get(uid)
> else:
> return object.__new__(cls, *args, **kwargs)
>
What exactly are you trying to achieve?
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
n the network which determines the pool is 90% full and sends
an e-mail to network operators etc... Fun starts at 100 tables in the system.
Cluttering domain logic code with persistence aspects is not nice.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received th
ct at all - you
could wrap all the high-level processes (eg. user creation, posting an
article etc.) in functions (maybe classmethods) or classes in the model
layer.
Just out of curiosity... which University of Technology? The Kraków one (AGH)?
--
P
y"
> properties:
>
Just note, that in case the dict is not modified directly, but an object
inside is modified, you won't get notified of the change.
Eg. suppose the restored session has:
session['messages'] = []
Now i do:
session['messages'].append(u'Ne
an mysql. Do let me know what you think
>
MySQL is a relational DBMS (not the best one out there), while CouchDB is
document-oriented. So basically you're comparing two very different
approaches to data storage.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
Y
ol_recycle = 3600
> cache_dir = %(here)s/data
> beaker.session.key = im
> beaker.session.secret = somesecret
>
> Anyone have an idea what's going on?
>
You need to create 'mytest' database and grant 'myuser' access rights to it.
--
Paweł Stradomski
--~--~-
er.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=/com
> >.ibm.cics.ts31.doc/dfhtl/topics/dfhtl_outmaking_reqwrite.htm
> >
> >
> > --
> > Paweł Stradomski
>
> If it's not even part of the specs, perhaps we shall threat that as a
> common misunderstanding instead?
Well,
t
really make much sense to me.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
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 f
Why not just use eager loading (well documented in sqlalchemy docs)? This uses
joins and loads the related objects automatically while still returning
object graph, not tuples. Also, when an object was already loaded, then
future requests for this object
2008/8/24 <[EMAIL PROTECTED]>:
>
> class ShoppingController(BaseController):
>def __init__(self):
>BaseController.main_panel = "Shopping"
>.
>.
You're setting the property on the controller instance,
object is an engine, then you can fetch a connection out of it:
conn = model.metadata.bind.connect()
conn.execute("first query")
conn.execute("second query")
...
conn.close() # returns the connection to the pool
See here: http://www.sqlalchemy.org/docs/05/dbengine.html#dbeng
#x27;t know if starting multiple processes
would give much.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
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@g
quot;HTTP/1.0://...". Ben Bangert asked me to post this here with
> additional details.
> I think the issue is related to the line "config.protocol =
> environ['SERVER_PROTOCOL']". Am I passing the wrong environment
> va
wrapping them with Markup() in the template
itself?
--
Paweł Stradomski
--~--~-~--~~~---~--~~
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
W liście Mike Orr z dnia piątek 23 listopada 2007:
> On Nov 23, 2007 6:19 AM, Paweł Stradomski <[EMAIL PROTECTED]> wrote:
> > Well, I think the current solution (function being passed by the
> > framework to routes) is better, as it gives more flexibility. Throwin an
>
W liście Mike Orr z dnia piątek 23 listopada 2007:
> On Nov 23, 2007 5:46 AM, Paweł Stradomski <[EMAIL PROTECTED]> wrote:
> > W liście Marcin Kasperski z dnia piątek 23 listopada 2007:
> > > redirect routes need some detailed design.
> If we had a separate redirect l
could just be defined in some layer using routes - and
that function would accept parameters describing type of redirect (internal,
moved permanently, moved temporarily, see other...)
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because y
; force the refresh.
Just an idea, perhaps the server/your application does refresh, but the
browser does not reload javascript files? I think this happened to me with
Firefox. Just use ctrl+f5 instead of f5 when refreshing pages if you modified
javascript/cs
l)
>
> So setting environ actually is setting req_data, which is a thread
> local.
Thanks.
--
Paweł Stradomski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this
62 matches
Mail list logo