Re: Invoking WSGIController.__call__(..) again in case of an error (db deadlock)

2010-11-05 Thread Tomasz Nazar
19, 2010 at 3:25 PM, Tomasz Nazar tomasz.na...@gmail.com wrote: Hello there! I got this neat idea, and I'm not sure if it is supposed to work... Quick (if you're not interested in the full scenario) Is it possible to invoke: WSGIController.__call__(self, environ, start_response) many times

Invoking WSGIController.__call__(..) again in case of an error (db deadlock)

2010-10-19 Thread Tomasz Nazar
Hello there! I got this neat idea, and I'm not sure if it is supposed to work... Quick (if you're not interested in the full scenario) Is it possible to invoke: WSGIController.__call__(self, environ, start_response) many times during 1 http request to Pylons? A bit longer description: My user

Re: pylons and hoteditor

2009-02-17 Thread Tomasz Nazar
As far as I understand I have similar problem. Here's solution. (The topic it's not related to Pylons at all ;) Instead of direct output of i18n key's value: var x = '${_('my.key')} I do: * use Jquery to simplify (not required) * use mix of HTML/JS helpers A) Create html list of all keys

Re: 'c' variable between redirects

2008-11-12 Thread Tomasz Nazar
Just a quick summary of what I found to be useful (though I don't yet use new Pylons) Flash Messages. It solves issues of 'c' being too transient, and session scope being too wide. T. -- _i__'simplicity_is_the_key'__tomasz_nazar _ii'i_am_concern_oriented'JKM-UPR

Re: Pylons: pros and cons

2008-10-20 Thread Tomasz Nazar
Let me thank all of you who took part in this discussion. I'm glad that I put my remarks about Pylons and related components here. I gained some new knowledge and updated existing one. Thanks :) and see you around.. T. -- _i__'simplicity_is_the_key'__tomasz_nazar

Re: Pylons: pros and cons

2008-10-16 Thread Tomasz Nazar
-- _i__'simplicity_is_the_key'__tomasz_nazar _ii'i_am_concern_oriented'JKM-UPR _iii__'patsystem.sf.net'___linux_user _'aspectized.com'___prevayler --~--~-~--~~~---~--~~ You received this

Re: Pylons: pros and cons

2008-10-16 Thread Tomasz Nazar
On Thu, Oct 16, 2008 at 2:08 AM, Mike Orr [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 4:35 PM, Tomasz Nazar [EMAIL PROTECTED] wrote: On Tue, Oct 14, 2008 at 5:20 AM, Michael Bayer [EMAIL PROTECTED] wrote: On Oct 13, 12:14 pm, Tomasz Nazar [EMAIL PROTECTED] wrote: 1) all model classes

Re: Pylons: pros and cons

2008-10-16 Thread Tomasz Nazar
On Thu, Oct 16, 2008 at 2:41 PM, cropr [EMAIL PROTECTED] wrote: wrt to organizing the model into different files, I've changed the scheme that's is autogenerated in 0.9.7rc2. My __init__.py looks like ## from sqlalchemy import MetaData from sqlalchemy.orm import

Re: Pylons: pros and cons

2008-10-16 Thread Tomasz Nazar
On Thu, Oct 16, 2008 at 8:55 PM, Mike Orr [EMAIL PROTECTED] wrote: On Thu, Oct 16, 2008 at 4:12 AM, Tomasz Nazar [EMAIL PROTECTED] wrote: Cyclic dependencies do not work just that simple. Cyclic imports unfortunately have to placed inside a method - not at the top of module. Importing

Re: Pylons: pros and cons

2008-10-15 Thread Tomasz Nazar
Thanks for such detailed answer Michael. On Tue, Oct 14, 2008 at 5:20 AM, Michael Bayer [EMAIL PROTECTED] wrote: On Oct 13, 12:14 pm, Tomasz Nazar [EMAIL PROTECTED] wrote: 2) SQLAlchemy 2nd level cache That is most frustrating for me coming from Hibernate, where it's built in. You may

Re: Pylons: pros and cons

2008-10-15 Thread Tomasz Nazar
On Tue, Oct 14, 2008 at 5:20 AM, Michael Bayer [EMAIL PROTECTED] wrote: On Oct 13, 12:14 pm, Tomasz Nazar [EMAIL PROTECTED] wrote: 1) all model classes are defined in 1 file together with database mapping like everyone is saying, you can roll this however you want and however

Pylons: pros and cons

2008-10-13 Thread Tomasz Nazar
Hi there! I've been a Pylons user for more than a year already. Few other people in the neighbourhood ask me for Pylons advantages often, so I also talk about Pylons disadvantages also. Here I'd like to point out some of them and ask you for your opinion/answer.. (basically I'm a happy Pylons

Re: Pylons: pros and cons

2008-10-13 Thread Tomasz Nazar
Thanks both of you for answers... On Mon, Oct 13, 2008 at 7:39 PM, Wayne Witzel [EMAIL PROTECTED] wrote: On Oct 13, 12:14 pm, Tomasz Nazar [EMAIL PROTECTED] wrote: Hi there! 1) all model classes are defined in 1 file together with database mapping That is 2nd most frustrating on my daily

Re: Pylons, sqlalchemy db awareness

2008-02-18 Thread Tomasz Nazar
Just noticed this not responded topic... maybe I can still help.. The Pylons session (nor even Java/Hibernate) DOES NOT have any knowledge of any parallel changes to underlying database that you use. So you a) shouldn't do concurrent modifications on database b) if you have to, then like you

Bug about substitution of _ (gettext) in 'Error Traceback' console

2007-11-22 Thread Tomasz Nazar
I think I have found some strange behaviour in Pylons and it is repeatable. It is related to _ (gettext) function and having debug sessions with nice Pylons 'Error Traceback' console How to repeat: 1) request /testing/debug which raises exception on purpose code: class

Reloading on changes to i18N *.po/*.mo files..

2007-11-08 Thread Tomasz Nazar
Hi there! I'd really like, that when changing translations (localized i18n/**/*.po/mo files) pylons/paster are reloaded with newly, updated texts. (similar like changes to templates, public files are instantly visible). Is it possible? And btw, is it possible to get rid of PO-to-MO-compilation

Re: Pylons 0.9.6.1 + nosetests: No Translator object registered for this thread

2007-10-10 Thread Tomasz Nazar
Hmmm. Sounds odd. I had similar issues http://groups.google.com/group/pylons-discuss/browse_thread/thread/a292b60bf24ce4b6/8b73ea6501c641eb?lnk=gstq=nosernum=6#8b73ea6501c641eb But they are all gone after upgrade to 0.9.6.1/0.4 without any setup.cfg configuration.. Some code snippets:

Re: Pylons 0.9.5 + SAContext and nosetests gives additional warnings

2007-10-04 Thread Tomasz Nazar
I confirm that in 0.9.6, SQLAlchemy o.4b7 and nose 0.9.3 my tests (app upgraded from 0.9.5) work like a charm :-) [well, except these still not green ;) ] Thanks. T. On 9/26/07, Ben Bangert [EMAIL PROTECTED] wrote: On Sep 26, 2007, at 2:09 AM, Jim Musil wrote: This is probably too late,

Re: mako in pylons: docs don't tell how to make caller.body() work

2007-09-20 Thread tomasz . nazar
I think there is sth wrong with your installation or sth else. It works for my Pylons app w/o problems. I also can have nested defs/calls. I do use namespaces... My working examples: with Mako: %def name=field(name) tr td style=white-space:nowrap;width:1%; ${name}

accessing _action awith -action

2007-09-20 Thread Tomasz Nazar
Hi there! In the controller I do have 'def _a(self):' action (private method really) It's I think odd what is happening when I access it these ways: http://localhost:5000/controller/_a , Result is good: Error 404 Not Found http://localhost:5000/controller/.a , Result is good:

Re: 'c' variable between redirects

2007-08-25 Thread Tomasz Nazar
On 8/25/07, Jose Galvez [EMAIL PROTECTED] wrote: Tomasz Nazar wrote: On 8/24/07, Christoph Haas [EMAIL PROTECTED] wrote: As I understand 'c' is always reset before any controller's action - what is not fun for me, as in my app one user request/click is often 2 (or more

'c' variable between redirects

2007-08-24 Thread Tomasz Nazar
Hi there! Whatever variable attached to 'c', it is available in the template when rendered via 'render_response('x.tmpl')'. I often however use redirects 'h.redirect_to(another_action)' to reuse controller's code. And the 'c'-attached variables are not present in the redirected template. As I

Re: sqlalchemy is returning the wrong data

2007-08-08 Thread Tomasz Nazar
On 8/7/07, Mike Orr [EMAIL PROTECTED] wrote: On 8/6/07, jose [EMAIL PROTECTED] wrote: On a different note with my current setup (using extension=sac.ext) I thing that the explicit save (rec.save() from the example above) is not really necessary is it? No, sac.ext implicitly does the

Pylons 0.9.5 + SAContext and nosetests gives additional warnings

2007-08-03 Thread Tomasz Nazar
, autoload=True) #Etc... mapper(User, user_t) #Etc... The are no modifications to Pylons base classes, configurations or whatever. Just the necessary ones for using Mako. config/* are almost original except routing.py, lib/* the same.. Any ideas? Tomasz Nazar -- _i__'simplicity_is_the_key