Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Lawrence Oluyede
> Is there a reason I couldn't just create a simple model that uses a db > connection string from the developer.ini conf file and then just make > direct queries? We have a pretty big application using PostgreSQL + psycopg2 with no SqlAlchemy whatsoever, so it's definitely possible :-) -- Law

Re: Problems making Routes Subdomains work on Pylons

2008-01-22 Thread Dmitry Lipovoi
yep. i mean foo.localhost :) On Jan 22, 3:44 am, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > You should probably add foo.localhost andwww.localhostto your hosts > file as well. > > Le lundi 21 janvier 2008 à 13:34 -0800, Pavel Skvazh a écrit : > > > That's exactly what I've got there. > > Running

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Dmitry Lipovoi
orm is abstraction over database query language. you can make queries in oo-terms. so your business logic stays clear and you dont care about object persistence. also with orm you can change backend (from MySQL to Postgre for ex.) just by edit config. if you work with native sql its not always po

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Antoine
> I am a little unsure of the Model concepts though, and how tightly > they are bound to SQLAlchemy. They aren't. Actually, it seems you are not even obliged to use a Model at all. You can just write controllers and handle all the logic inside them if you want (although many people would probabl

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Kevin Baker
Sent from my iPhone Please excuse any typos ;) On Jan 22, 2008, at 3:09 AM, "Antoine" <[EMAIL PROTECTED]> wrote: > > >> I am a little unsure of the Model concepts though, and how tightly >> they are bound to SQLAlchemy. > > They aren't. Actually, it seems you are not even obliged to use a >

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Kevin Baker
Sent from my iPhone Please excuse any typos ;) On Jan 22, 2008, at 12:08 AM, "Lawrence Oluyede" <[EMAIL PROTECTED]> wrote: > >> Is there a reason I couldn't just create a simple model that uses a >> db >> connection string from the developer.ini conf file and then just make >> direct queri

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Antoine
> So if I didnt need the portable scheme creation, can I just skip the > table def in the model? If you only plan to use raw (text) queries, yes. But then you would need to write your CREATE TABLE statements by hand, so I'm not sure it would buy you anything unless you have specific needs. > Al

Having some trouble getting started with Pylons

2008-01-22 Thread walterbyrd
I have been trying to follow the install instructions here. http://wiki.pylonshq.com/display/pylonsdocs/Home Everything was going okay until I tried this: wb:/var/www/helloworld# paster serve --reload development.ini Starting subprocess with file monitor Starting server in PID 3751. 09:45:52,84

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Kevin Baker
Sent from my iPhone Please excuse any typos ;) On Jan 22, 2008, at 7:38 AM, "Antoine" <[EMAIL PROTECTED]> wrote: > > >> So if I didnt need the portable scheme creation, can I just skip the >> table def in the model? > > If you only plan to use raw (text) queries, yes. But then you would > ne

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Luis Bruno
Antoine escreveu: > Some of that configuration (the table declarations) replaces hand-written > CREATE TABLE queries, though, and in a more portable way. > It's one of those "you have to see it before you believe it" situations. I've smacked my forehead recently, for not having tried out the O

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread walterbyrd
On Jan 22, 2:33 am, Dmitry Lipovoi <[EMAIL PROTECTED]> wrote: > orm is abstraction over database query language. you can make queries > in oo-terms. so your business logic stays clear and you dont care > about object persistence. > > also with orm you can change backend (from MySQL to Postgre for

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Kevin Baker
Sent from my iPhone Please excuse any typos ;) On Jan 22, 2008, at 9:11 AM, walterbyrd <[EMAIL PROTECTED]> wrote: > > On Jan 22, 2:33 am, Dmitry Lipovoi <[EMAIL PROTECTED]> wrote: >> orm is abstraction over database query language. you can make queries >> in oo-terms. so your business logic st

Template knowing the path to static files

2008-01-22 Thread Matt Haggard
I've got an app with the following ini: ... [app:main] use = egg:myapp filter-with = app-prefix ... [filter:app-prefix] use = egg:PasteDeploy#prefix prefix=/myapp I've been developing without the filter option, and now that I have it, my hard-coded image paths no longer work. (e.g. they're looki

Re: Having some trouble getting started with Pylons

2008-01-22 Thread Mike Orr
On Jan 22, 2008 8:53 AM, walterbyrd <[EMAIL PROTECTED]> wrote: > > I have been trying to follow the install instructions here. > > http://wiki.pylonshq.com/display/pylonsdocs/Home > > Everything was going okay until I tried this: > > wb:/var/www/helloworld# paster serve --reload development.ini >

Re: Having some trouble getting started with Pylons

2008-01-22 Thread Mike Orr
I meant to ask, which operating system and virtual server product is your ISP using? How do they provide Python? (I.e.,anything you know about who compiled Python, where it's located, and what kinds of Python add-ons the ISP provide? -- Mike Orr <[EMAIL PROTECTED]> --~--~-~--~~---

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Mike Orr
On Jan 22, 2008 5:17 AM, Kevin Baker <[EMAIL PROTECTED]> wrote: > On Jan 22, 2008, at 3:09 AM, "Antoine" <[EMAIL PROTECTED]> wrote: > > I would always use a model unless maybe if there was no db. I would use a model even if there weren't a db. It keeps your "business objects" from being too clos

Re: Template knowing the path to static files

2008-01-22 Thread Mike Orr
On Jan 22, 2008 11:11 AM, Matt Haggard <[EMAIL PROTECTED]> wrote: > > I've got an app with the following ini: > ... > [app:main] > use = egg:myapp > filter-with = app-prefix > ... > [filter:app-prefix] > use = egg:PasteDeploy#prefix > prefix=/myapp > > I've been developing without the filter optio

Re: Template knowing the path to static files

2008-01-22 Thread Matt Haggard
So what about images in CSS files? I can't use helper functions there... I'll try the h.url_for() in the templates and let you know On Jan 22, 1:34 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote: > On Jan 22, 2008 11:11 AM, Matt Haggard <[EMAIL PROTECTED]> wrote: > > > > > > > I've got an app with th

Re: Template knowing the path to static files

2008-01-22 Thread Alberto Valverde
Matt Haggard wrote: > So what about images in CSS files? I can't use helper functions > there... Make them relative to the url the CSS file lives in, eg: .foos { background-image: url(../img/foo-bg.jpeg) } (assuming this css file is at public/css/style.css and the image at public/img/foo-bg.jp

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread [EMAIL PROTECTED]
On 22 jan, 10:33, Dmitry Lipovoi <[EMAIL PROTECTED]> wrote: > orm is abstraction over database query language. you can make queries > in oo-terms. so your business logic stays clear and you dont care > about object persistence. Bullshit. When using a RDBMS, the database schema is actually 90% (

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread [EMAIL PROTECTED]
On 22 jan, 14:17, Kevin Baker <[EMAIL PROTECTED]> wrote: > Sent from my iPhone > Please excuse any typos ;) > > On Jan 22, 2008, at 3:09 AM, "Antoine" <[EMAIL PROTECTED]> wrote: > > >> I am a little unsure of the Model concepts though, and how tightly > >> they are bound to SQLAlchemy. > > > They

Re: Having some trouble getting started with Pylons

2008-01-22 Thread walterbyrd
On Jan 22, 12:40 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote: > I meant to ask, which operating system and virtual server product is > your ISP using? How do they provide Python? I'm sorry, I should have mentioned that. The OS is Debian Etch. I installed Python with a standard apt-get. I am using l

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Mike Orr
On Jan 22, 2008 1:34 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On 22 jan, 10:33, Dmitry Lipovoi <[EMAIL PROTECTED]> wrote: > > orm is abstraction over database query language. you can make queries > > in oo-terms. so your business logic stays clear and you dont care > > about object per

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Kevin Baker
On Jan 22, 2008, at 12:11 PM, Mike Orr wrote: > > On Jan 22, 2008 5:17 AM, Kevin Baker <[EMAIL PROTECTED]> wrote: >> On Jan 22, 2008, at 3:09 AM, "Antoine" <[EMAIL PROTECTED]> wrote: >> >> I would always use a model unless maybe if there was no db. > > I would use a model even if there weren't a

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Kevin Baker
On Jan 22, 2008, at 1:46 PM, [EMAIL PROTECTED] wrote: > > On 22 jan, 14:17, Kevin Baker <[EMAIL PROTECTED]> wrote: >> Sent from my iPhone >> Please excuse any typos ;) >> >> On Jan 22, 2008, at 3:09 AM, "Antoine" <[EMAIL PROTECTED]> wrote: >> I am a little unsure of the Model concepts thoug

Re: Pylons Model approach vs simple sql?

2008-01-22 Thread Mike Orr
On Jan 22, 2008 4:00 PM, Kevin Baker <[EMAIL PROTECTED]> wrote: > hmmm this sounds interesting "autoload", I'm guessing this uses the > table metadata to build the definition? would I find a link to that > in the SQLAlchemy site? See "reflecting tables" in the first chapter of the SQLAlchemy man

Re: Template knowing the path to static files

2008-01-22 Thread Cliff Wells
On Tue, 2008-01-22 at 11:11 -0800, Matt Haggard wrote: > I've been developing without the filter option, and now that I have > it, my hard-coded image paths no longer work. (e.g. they're looking > at http://127.0.0.1:5000/images/something.gif when they should be > looking at http://127.0.0.1:50

Re: Having some trouble getting started with Pylons

2008-01-22 Thread Cliff Wells
On Tue, 2008-01-22 at 11:38 -0800, Mike Orr wrote: > On Jan 22, 2008 8:53 AM, walterbyrd <[EMAIL PROTECTED]> wrote: > > > > I have been trying to follow the install instructions here. > > > > http://wiki.pylonshq.com/display/pylonsdocs/Home > > > > Everything was going okay until I tried this: > >

Re: Template knowing the path to static files

2008-01-22 Thread Mike Orr
On Jan 22, 2008 7:04 PM, Cliff Wells <[EMAIL PROTECTED]> wrote: > > > On Tue, 2008-01-22 at 11:11 -0800, Matt Haggard wrote: > > > I've been developing without the filter option, and now that I have > > it, my hard-coded image paths no longer work. (e.g. they're looking > > at http://127.0.0.1:50

pylons 10,000 foot overview

2008-01-22 Thread kettle
Hi, I'm looking for a clear, simple 10,000 foot overview of how pylons and its various components work together, preferably with some snazzy diagrams to point out things like client<-->server request flows and relationships between the various pylons components. As a brief introduction, I've

Re: pylons 10,000 foot overview

2008-01-22 Thread kettle
Ok, so immediately following this lengthy post, I got to thinking, maybe I just haven't been searching for the right keywords. I found this, which is pretty much exactly what I was droning on about in the preceding paragraphs: http://spacepants.org/blog/pylons-paste-stack This is pretty much Exa

Re: pylons 10,000 foot overview

2008-01-22 Thread kettle
Thought I'd also add that it would be awesome if something like the diagram below were posted prominently somewhere near the beginning of the pylons docs! On Jan 23, 3:17 pm, kettle <[EMAIL PROTECTED]> wrote: > Ok, so immediately following this lengthy post, I got to thinking, > maybe I just have

Re: Template knowing the path to static files

2008-01-22 Thread Cliff Wells
On Tue, 2008-01-22 at 19:37 -0800, Mike Orr wrote: > You'll have to set up a handler for each file/directory in public if you want > to > do this, or put everything in a subdirectory of public which will appear in > the > URL (public/static/images -> /static/images). Unless there's a way to ma

Re: pylons 10,000 foot overview

2008-01-22 Thread kettle
I'm just going to continue using this post as my personal notepad, and add a couple more useful resources I've managed to dig up in the last hour: http://pythonpaste.org/archives/mindex/[EMAIL PROTECTED]/message/20070307.035711.786edbb1.en.html http://pythonpaste.org/archives/mindex/[EMAIL PROTE