views:

20

answers:

1

I'm trying to access my pylons application via cron job to send notifications to my users. The way I'm doing this is by running the application using something like:

paster request myconfig.ini /maintenance/do

In the actual controller I check for the "paste.command_request" to block public access. Everything works but the only problem is that within the notifications that I send to my users there is a link to their profile and the host is "localhost" which should instead be the domain name of the application. When the notifications are sent from within the served application (say, a user modifies their settings on the site) the notifications have the correct url.

I am using mako to render my email tamplates and within the template I am using the "pylons.url" method with "qualified" set to "True".

Am I missing something here?

Thanks in advance.

A: 

What I pretty much ended up doing was the following paster command:

paster request myconfig.ini /maintenance/do --header=HOST:<USE_THIS_HOST>

Where is the domain name I wanted my users to see in their email. You can even add in the IP address if you are testing the application locally.

I'm not sure if this is the best way of doing this. If anyone else has any suggestions, they are greatly appreciated.

mmartinez