Re: initial install problems

2007-05-17 Thread Mike Orr
On 5/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Sorry for blasting in here without listening for a bit first, but I'm > trying to get started with pylons and am having trouble out of the gate. > I have workingenv installed, and I set up a workingenv for my new pylons > project, then d

Mako: where are my cached templates?

2007-05-17 Thread Bill
I'm running Pylons-0.9.5 / Mako-0.1.5 and would like to view the Python code generated from my Mako templates as a debugging tool. The Mako docs describe options to cache templates to disk using something like this: <%page cached="True" cache_type="file" cache_dir="/home/bill/FormTest/ data"/> I

Re: where to put application init code?

2007-05-17 Thread Max Ischenko
Hello Philip, On 5/17/07, Philip Jenvey <[EMAIL PROTECTED]> wrote: > > > If you're running from the latest Pylons 0.9.5 project template, the > CONFIG object is already setup by the time the Globals constructor is > called. This is done by these lines at the top of middleware.make_app: Yep. I go

initial install problems

2007-05-17 Thread rdmurray
Sorry for blasting in here without listening for a bit first, but I'm trying to get started with pylons and am having trouble out of the gate. I have workingenv installed, and I set up a workingenv for my new pylons project, then did: easy_install Pylons followed by: paster create --t

Re: Issues with @validate decorator

2007-05-17 Thread Philip Jenvey
On May 16, 2007, at 3:00 PM, Ian Bicking wrote: > > Philip Jenvey wrote: >> >> On May 16, 2007, at 7:51 AM, Graham Stratton wrote: >> >>> >>> Hi all, >>> >>> I see there's discussion about the issues with the @validate >>> decorator >>> in the tracker. I've come across a few problems myself in

Re: setting download name with paste.fileapp

2007-05-17 Thread Philip Jenvey
On May 17, 2007, at 4:09 PM, m h wrote: > > On 5/17/07, m h <[EMAIL PROTECTED]> wrote: >> Hey all- >> >> I've got a controller method for downloading files. It appears to >> work ok, but I'd like to make it so the browser names the file as the >> file name rather than the method name. >> >> Her

Re: setting download name with paste.fileapp

2007-05-17 Thread m h
On 5/17/07, m h <[EMAIL PROTECTED]> wrote: > Hey all- > > I've got a controller method for downloading files. It appears to > work ok, but I'd like to make it so the browser names the file as the > file name rather than the method name. > > Here's the method: > > def get(self): > file

setting download name with paste.fileapp

2007-05-17 Thread m h
Hey all- I've got a controller method for downloading files. It appears to work ok, but I'd like to make it so the browser names the file as the file name rather than the method name. Here's the method: def get(self): filename = os.path.join(self.csv_dir, request.params.get("filena

Re: How to reference module parameter in sqlalchemy.dburi

2007-05-17 Thread Michael Bayer
On May 17, 2007, at 4:48 PM, [EMAIL PROTECTED] wrote: > > Hello friends, > > Newcomer here to pylons and python! So far I really like what I see > and would like to start developing some applications using pylons. > > I was going through the QuickWiki tutorial at > http://pylonshq.com/docs/0.9.5

How to reference module parameter in sqlalchemy.dburi

2007-05-17 Thread [EMAIL PROTECTED]
Hello friends, Newcomer here to pylons and python! So far I really like what I see and would like to start developing some applications using pylons. I was going through the QuickWiki tutorial at http://pylonshq.com/docs/0.9.5/quick_wiki.html#introduction and I seem to be stuck with a minor issu

Re: where to put application init code?

2007-05-17 Thread Mike Orr
On 5/17/07, Dan <[EMAIL PROTECTED]> wrote: > I don't consider myself a Pylons guru :-) , but I put my db init inside of > websetup.py and call it with paster. Hope it helps. Example below: > > command-prompt# paster setup-app development.ini Yeah, that's now QuickWiki does it. It's a good pl

Routing question

2007-05-17 Thread voltron
Given these main site links: ["home", "Link1", "Link2"] Each of these main links have sub links for example: home/sublink1 home/sublink2 Link1/sublink1 Link2/sublink3 the routing could be as follows map.connect('Home', '', controller='home', action='index' ) map.connect('Home', '/Home', contr

Re: where to put application init code?

2007-05-17 Thread Philip Jenvey
On May 17, 2007, at 10:14 AM, Max Ischenko wrote: > Hi, > > What's the most appropriate place to put the code to run once the > application is started? > > I've used app_globals.py:Globals.__init__ but when it is called the > configuration is not yet fully loaded and that results in TypeErro

Re: where to put application init code?

2007-05-17 Thread voltron
Thats great! Just what I intended :-) On May 17, 9:16 pm, Dan <[EMAIL PROTECTED]> wrote: > I don't consider myself a Pylons guru:-), but I put my db init inside of > websetup.py and call it with paster. Hope it helps. Example below: > command-prompt# paster setup-app development.ini > #websetu

Re: authkit + user_data

2007-05-17 Thread ram
Ignore this: it was a problem with the format of the user data. Base-64 encoding the user_data takes care of the issue. On May 17, 11:32 am, ram <[EMAIL PROTECTED]> wrote: > Does anyone have an example of using the "auth_data" parm with > Authkit? > > I'm using the 'forward' method, and I'm tryi

Re: where to put application init code?

2007-05-17 Thread Dan
I don't consider myself a Pylons guru :-) , but I put my db init inside of websetup.py and call it with paster.  Hope it helps.  Example below: command-prompt# paster setup-app development.ini #websetup.py def setup_config(command, filename, section, vars):     """     Place any commands to

Re: where to put application init code?

2007-05-17 Thread voltron
I was actually thinking about this yesterday. I was thinking of where to put my code that imports that uses sqlalchmey to check, drop or create databases for my application. I read somewhere that one should use the setup.py for this. But that would mean that one would have to create an egg for the

Re: where to put application init code?

2007-05-17 Thread Mike Orr
On 5/17/07, Max Ischenko <[EMAIL PROTECTED]> wrote: > What's the most appropriate place to put the code to run once the > application is started? > > I've used app_globals.py:Globals.__init__ but when it is called the > configuration is not yet fully loaded and that results in TypeError > access

where to put application init code?

2007-05-17 Thread Max Ischenko
Hi, What's the most appropriate place to put the code to run once the application is started? I've used app_globals.py:Globals.__init__ but when it is called the configuration is not yet fully loaded and that results in TypeError accessing some globals. Max. --~--~-~--~~

Re: paster shell not available

2007-05-17 Thread Alberto Valverde
On May 17, 2007, at 1:29 PM, Max Ischenko wrote: > > > On 5/16/07, Alberto Valverde <[EMAIL PROTECTED]> wrote: > > $ paster shell development.ini > > Command shell not known > > Make sure there's a file called "paster_plugins.txt" inside your > egg_info directory with, at least, the following lin

authkit + user_data

2007-05-17 Thread ram
Does anyone have an example of using the "auth_data" parm with Authkit? I'm using the 'forward' method, and I'm trying to set the value as follows: request.environ['paste.auth_tkt.set_user'](uid, user_data = 'myuserdata') Setting the cookie works, but Authkit then immediately logs the user o

Re: Issues with @validate decorator

2007-05-17 Thread Max Ischenko
On 5/17/07, Shannon -jj Behrens <[EMAIL PROTECTED]> wrote: > > > When there are errors and form is redisplayed to the user how the > template > > can tell it (to display something like "there were errors, please > correct > > and resubmit")? From what I gather, htmlfill only fills individual > fie

Re: paster shell not available

2007-05-17 Thread Max Ischenko
On 5/16/07, Alberto Valverde <[EMAIL PROTECTED]> wrote: > > > $ paster shell development.ini > > Command shell not known > > Make sure there's a file called "paster_plugins.txt" inside your > egg_info directory with, at least, the following lines: > > Pylons > PasteScript That was it, thanks! On

Re: widgets

2007-05-17 Thread Shannon -jj Behrens
> Please, advise some widget framework to use with Pylons, I know there is > in turbogears. I'd like to here some recommendations before I start > learning Toscawidgets because it's only alpha stage now. Maybe there are > more mature/promising widget frameworks suitable for Pylons. In the Python

Re: myghty: Error(UnicodeDecodeError): 'ascii' codec can't decode byte 0xc3

2007-05-17 Thread Shannon -jj Behrens
By the way, do you know about this trick: reload(sys) sys.setdefaultencoding(encoding) It gets around the site.py problem. Best Regards, -jj On 5/16/07, Jens Hoffrichter <[EMAIL PROTECTED]> wrote: > > Hey Voltron, > > > On 5/16/07, voltron <[EMAIL PROTECTED]> wrote: > > > > Oh I did no

Re: Issues with @validate decorator

2007-05-17 Thread Shannon -jj Behrens
On 5/16/07, Max Ischenko <[EMAIL PROTECTED]> wrote: > Hello, > > On 5/16/07, Graham Stratton <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > I see there's discussion about the issues with the @validate decorator > > in the tracker. I've come across a few problems myself in the last > > few wee