Re: [pylons-discuss] Generating URL using request.resource_url

2020-04-23 Thread Antonio Beamud Montero
El 23/4/20 a las 7:31, Steve Piercy escribió: > Further reading, from the sidebar in the Traversal chapter, "The > Example View Callables Accept Only a Request; How Do I Access the > Context Resource?": > https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/traversal.html > Hi all, this

[pylons-discuss] Custom Internal Server Error View

2014-03-27 Thread Antonio Beamud Montero
Hi all: I've implemented my custom 500 error like: def error500(request): request.response.status = '500' return {} config.add_view(error500, renderer='testprj:templates/500.mako', context=Exception) And seems to be fine, but, is the most pyramidonic way of doing this? Thanks. --

[pylons-discuss] effective principals as request property

2014-02-06 Thread Antonio Beamud Montero
I need the user principals to filter a list of objets, not only the views, but also the results must be filtered by user group. It's ok to add a property like: c.add_request_method('pyramid.security.effective_principals', 'principals', reify=True) and use in the request lifespan? Thanks.

Re: [pylons-discuss] Re: effective principals as request property

2014-02-06 Thread Antonio Beamud Montero
El 06/02/14 16:31, Tres Seaver escribió: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/06/2014 09:33 AM, Antonio Beamud Montero wrote: I need the user principals to filter a list of objets, not only the views, but also the results must be filtered by user group. It's ok to add a property

[pylons-discuss] pyramid_tm and disable transactions

2013-12-11 Thread Antonio Beamud Montero
Hi all. Is it possible to disable the pyramid_tm machinery in only one view, keeping the rest using the transaction machinery. I need in a view (at least), to manage the transactions in my own way, because the view makes http requests to other services, and can be very slow, creating locking

Re: [pylons-discuss] Re: pyramid_tm and disable transactions

2013-12-11 Thread Antonio Beamud Montero
El 11/12/13 19:14, Jonathan Vanasco escribió: Not sure, and I have a similar need. Have you considered offloading the 3rd Party HTTP requests into a celery task though? Your pyramid view would just queue a task, celery could handle all the transaction stuff, and then you can use a refresh

Re: [pylons-discuss] Re: pyramid_tm and disable transactions

2013-12-11 Thread Antonio Beamud Montero
El 11/12/13 19:22, Michael Merickel escribió: The SQLAlchemy session you're using is configured to use the ZTE. You can manage this session manually via transaction.commit() and transaction.abort(), but this is not recommended. If you want to avoid pyramid_tm, it's simple. Just don't use a

Re: [pylons-discuss] Re: pyramid_tm and disable transactions

2013-12-11 Thread Antonio Beamud Montero
El 11/12/13 20:44, Jonathan Vanasco escribió: If you only use the manual session within a single view/function (or pass it around to other functions), you would not need a `scoped_session`. I'm using it in 3 views, in one of them, passing to other functions as a parameter. In this case,

Re: [pylons-discuss] Re: How to manage data processing in Pyramid

2013-11-18 Thread Antonio Beamud Montero
El 17/11/13 21:35, Tanner Semerad escribió: Also, do you have an example of using an ajax call to poll Pyramid? I've never done such a thing. My original plan was to load separate views for each step of the processing, but using ajax to update the page sounds like a great alternative. Thanks

Re: Maintenance mode

2013-07-17 Thread Antonio Beamud Montero
El 15/07/13 17:15, Jonathan Vanasco escribió: The easiest way is to enter/exit maintenance mode on the port 80 server ( nginx / apache ) with nginx, it's popular to 'touch' a file to enter maintenance mode -- so if /var/www/sites/maintenance exists, nginx will dispatch to another set of

Maintenance mode

2013-07-15 Thread Antonio Beamud Montero
Exists a tween like maintenance-mode in Django? On the other hand, what's the best approach to solve this situation? a) Directly in apache, redirecting to a static site? b) Changing the routes inside the pyramid app? I want to use pyramid app core to deliver the maintence page, and, at the same

event suscriber, request property or session

2012-07-02 Thread Antonio Beamud Montero
Hi all: I want to have the inbox messages number associated with a user always available. What's the best way to do this?. As I can read in documentation, I can accomplish this with: - adding a property to the request with 'set_request_property', like:

Re: event suscriber, request property or session

2012-07-02 Thread Antonio Beamud Montero
El 02/07/12 17:17, Chris McDonough escribió: On 07/02/2012 11:13 AM, Antonio Beamud Montero wrote: Hi all: I want to have the inbox messages number associated with a user always available. What's the best way to do this?. As I can read in documentation, I can accomplish this with: - adding

Re: pyramid_mailer exception handling

2012-06-28 Thread Antonio Beamud Montero
El 27/06/12 21:18, Jason escribió: On Wednesday, June 27, 2012 12:49:19 PM UTC-4, antonio wrote: The problem is the user data is commited to the database, but the mail is not sent. I want, if the mail cannot be sent, abort the transaction, rollback the data flushed

Re: pyramid_mailer exception handling

2012-06-27 Thread Antonio Beamud Montero
El 09/06/12 07:52, Michael Merickel escribió: mailer.send() does not send immediately. As per the docs it uses the transaction manager and sends the mail at the end of the request. You can create an exception view for this exception, or call mailer.send_immediately() instead. The transaction

duplicated requests

2012-03-22 Thread Antonio Beamud Montero
Hi all. When I call a url, for example: http://localhost:6543/home/address/edit/2 Always two requests are fired, but I can't see why or where. For example: 2012-03-22 18:20:29,518 DEBUG [t2t][Dummy-4] route matched for url http://localhost:6543/home/address/edit/2; route_name: 'address',

Re: permission per object

2012-03-08 Thread Antonio Beamud Montero
Am 16.02.2012 17:36 schrieb Antonio Beamud Montero antonio.bea...@gmail.com mailto:antonio.bea...@gmail.com: El 16/02/12 16:44, Robert Forkel escribió: i went with a custom context factory [1] per route; i.e. i have routes for patterns like /task/{id}/edit or /task

cache user groups

2012-02-22 Thread Antonio Beamud Montero
It's ok cache the user groups? like @cache.region('short_term', 'groupfinder') def groupfinder(...): Or it's better approach use the session, to check the user info is in the user session, before invoke the sqlalchemy machinery? Greetings. -- You received this message because you are

Re: permission per object

2012-02-17 Thread Antonio Beamud Montero
El 17/02/12 10:33, Robert Forkel escribió: It works as follows: I register context factories per route (as named utility in the registry) and also use the route names as permission names. The only thing the context factories need to compute permissions is the logged-in user which is attached to

Re: permission per object

2012-02-16 Thread Antonio Beamud Montero
Beamud Montero antonio.bea...@gmail.com wrote: Hi, what's the best way to implement a permission per object in pyramid using SQLAlchemy to store users info, and using url distpatch. For example, If a user has three tasks assigned, he can edit two of them, but only view the 3rd, or view tasks

mod_wsgi and reload

2012-02-10 Thread Antonio Beamud Montero
In our system, we have a test server, with several pyramid environments. These environments are very similar to the production system (apache2 + mod_wsgi...) but with debugging and template reloading enabled. The problem arises with the auto-reload code. I've configured apache2 + mod_wsgi in

Official versions in mercurial repo

2010-12-02 Thread Antonio Beamud Montero
Hi all: I'm trying to download the 1.1 pylons stable release via mercurial, but I cannot find a tag in mercurial pointing to that release... How can I get it? Greetings. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group,

Re: dealing with slow respones

2010-11-23 Thread Antonio Beamud Montero
El 23/11/10 18:19, Danny Navarro escribió: Hi all, I'm writing a pyramid app where I have to deal with a very expensive request, ~5 minutes. Instead of having the user waiting for a response I would like the user to see something like a progress bar and let the browser free while the long

[OT] Benchmark of python web servers

2010-03-16 Thread Antonio Beamud Montero
FYI, via reddit: http://www.reddit.com/r/programming/comments/be289/benchmark_of_python_web_servers_wsgi/) http://nichol.as/benchmark-of-python-web-servers -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to

Why I switched to Pylons after using Django for six months

2010-03-09 Thread Antonio Beamud Montero
From reddit: http://www.reddit.com/r/programming/comments/bat7q/why_i_switched_to_pylons_after_using_django_for/ Original blog: http://www.mutualinformation.org/2010/03/why-i-switched-to-pylons-after-using-django-for-six-months/ Greetings. -- You received this message because you are

Standard Deploy

2009-11-02 Thread Antonio Beamud Montero
I want to create a RPM package for my pylon app. Exists any document / proposal about put the pylons tree as a system-wide package, in a standard way. For example, my pylon app is a blog, the next tree can be deploy after install it: /etc/myblog/myblog.ini /etc/myblog/myblog.wsgi - link to

Naming virtualenvs

2009-05-12 Thread Antonio Beamud Montero
How do you name virtual environments? And where do you store this enviroments? Exists any recipe to manage several virtual envs and not die trying it? :) Greetings. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Pylons on Google App Engine

2008-07-21 Thread Antonio Beamud Montero
El lun, 21-07-2008 a las 11:11 +0200, Wichert Akkerman escribió: Mike Orr wrote: On Mon, Jul 21, 2008 at 12:02 AM, Wichert Akkerman [EMAIL PROTECTED] wrote: Previously Mike Orr wrote: Of course, that will diminish Mako's amazing speed. It remains to be seen how much of a difference

Re: mod_wsgi and sqlalchemy problem (solved)

2008-07-08 Thread Antonio Beamud Montero
El mar, 08-07-2008 a las 07:05 -0700, Graham Dumpleton escribió: Start by reading: http://code.google.com/p/modwsgi/wiki/ApplicationIssues Issues could be fact that your paster startup is dependent on user shell environment not available to Apache or that under Apache code is run as

Re: url_for for static resources

2008-06-20 Thread Antonio Beamud Montero
El vie, 20-06-2008 a las 11:15 +0200, Wichert Akkerman escribió: I think the deployment discussion from a few days ago comes down to this: how can you use url_for to generate a link for a static resource. One person reported doing that but nobody seems to be able to reproduce that. Does

Re: best practices for static resources

2008-06-17 Thread Antonio Beamud Montero
El mar, 17-06-2008 a las 04:33 -0700, Cliff Wells escribió: On Tue, 2008-06-17 at 10:36 +0200, Wichert Akkerman wrote: Previously Cliff Wells wrote: I usually just setup Nginx to handle whatever location my static content is at. It doesn't matter if Routes is setup to handle that

Re: Controller name

2008-05-28 Thread Antonio Beamud Montero
El mié, 28-05-2008 a las 12:50 +0200, Christoph Haas escribió: Hi, Antonia... first of all: please don't hijack threads. Start a new thread if you want to post to this list. Don't just reply to a random posting. I'm sorry. It's a new thread, not a hijacked one, I only forgot to delete the

Controller name

2008-05-28 Thread Antonio Beamud Montero
Hi all: How I can get the controller name in the actual template context. For example, a site.mako template used by several controllers, I want to show the controller name with something like this: ${c.name} It's possible or I must define a property for every controller with it's name?

Re: Deployment Question

2008-05-19 Thread Antonio Beamud Montero
El vie, 16-05-2008 a las 13:38 -0700, Jonathan Vanasco escribió: I'm a little unclear on the better ways to deploy a Pylons app. My production servers run nginx -- is it better to use some fastcgi support (if so, how?) or just do a paster serve and proxy to that port? apache + mod_wsgi is

Re: URL massaging for i18n support

2008-02-21 Thread Antonio Beamud Montero
El dom, 10-06-2007 a las 19:45 +, Jose Figueras escribió: To add i18n support for my website's images I use this folder tree: /images/ [non i18n images, perhaps fallback images] /images/en/ [english images] /images/es/ [spanish images]

Re: Trying to understand about Paste and web-server requirements

2007-07-26 Thread Antonio Beamud Montero
El mié, 25-07-2007 a las 19:08 -0700, Jose Galvez escribió: no you should be able to use mod_proxy, to server your application just as Cliff has suggested. That is my personally favorite method to use with apache. Jose I think apache/mod_wsgi is the way :) Greetings

Re: AuthKit Authorization Manager?

2007-06-13 Thread Antonio Beamud Montero
El mi�, 13-06-2007 a las 11:28 -0700, HiTekElvis escribi�: Hey, everybody- I just started using AuthKit and have it working pretty snappily. Very pleased. Have a question: Is there a way to have a sort of Authorization Manager, where you can keep all of the permissions and

Re: Pylons Logo Design

2007-06-01 Thread Antonio Beamud Montero
El vie, 01-06-2007 a las 10:21 -0400, Dan escribió: This is all highly opinionated, but here are some of my suggestions. I think you should consider changing domain names. I don't think the name Pylons is bad, just combined with the domain pylonshq.com it just doesn't stick. I'd suggest