global settings

2005-08-12 Thread [EMAIL PROTECTED]
Is there a place to set global values in a django project? Specifically I want to set a base url, so I could do something like I'd like to be able to set this somewhere so it can be easily changed across installations. Thanks --B

Admin for OneToOneField?

2005-08-12 Thread [EMAIL PROTECTED]
Are OneToOneField's supported by the default admin tooling? I am attempting to follow the ForeignKey tutorial (edit_line=meta.STACKED), but I get a get_xxx_count error, which I wouldn't expect. I would expect it to default that value to 1. I get around that by creating the missing get_xxx_count

Re: Limiting database connections?

2005-08-12 Thread Jeremy Dunck
On 8/12/05, Maniac <[EMAIL PROTECTED]> wrote: > To be honest, may be those problems were related to PHP or Oracle's part > of SQLRelay, and won't affect other environments, and it was like a year > ago, so may be it was fixed since... But now for me it doesn't look very > promising. It's clearly b

Re: Limiting database connections?

2005-08-12 Thread Maniac
Jacob Kaplan-Moss wrote: I just today ran across sqlrelay (http://sqlrelay.sourceforge.net/) which looks *extremely* promising for this type of use. Does anyone have any experience with it, and is there any interest in me writing a sqlrelay backend? We did :-). We tried to squeze it bet

Re: Limiting database connections?

2005-08-12 Thread Jacob Kaplan-Moss
On Aug 12, 2005, at 4:36 PM, Matthew Marshall wrote: From this quote on the sqlrelay site... """ An application coded using another database's native client API may be able to use SQL Relay without modification. SQL Relay provides drop-in replacement libraries for: * MySQL * PostgreSQL

Re: Limiting database connections?

2005-08-12 Thread Matthew Marshall
On Friday 12 August 2005 08:14 pm, Jacob Kaplan-Moss wrote: > I just today ran across sqlrelay (http://sqlrelay.sourceforge.net/) > which looks *extremely* promising for this type of use. Does anyone > have any experience with it, and is there any interest in me writing > a sqlrelay backend? > >

Re: Limiting database connections?

2005-08-12 Thread Jacob Kaplan-Moss
On Aug 12, 2005, at 3:10 PM, Ksenia Marasanova wrote: 2005/8/12, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: I ran out of database connections today. I'd like to prevent this in a way other than increasing my database connections. How does this work in Django? I'd like more reuse and all. Comi

Re: Limiting database connections?

2005-08-12 Thread Ksenia Marasanova
2005/8/12, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > I ran out of database connections today. I'd like to prevent this in a > way other than increasing my database connections. > > How does this work in Django? I'd like more reuse and all. Coming > from a java background, it's typical for me

Re: Do django app URLs always have a trailing slash?

2005-08-12 Thread Michael Josephson
> By default it does 'cause that's the way we use it. You can turn > that behavior off by adding:: > > APPEND_SLASH = False Thanks, Jacob. -Michael

Re: Do django app URLs always have a trailing slash?

2005-08-12 Thread Jacob Kaplan-Moss
On Aug 12, 2005, at 1:48 PM, Michael Josephson wrote: Do URLs within a django app always have a trailing '/'? e.g. If I enter a url such as http://localhost:8080/myapp/list it automatically redirects to http://localhost:8080/myapp/list/ and if I define a urlpattern such as (r'^list$', 'list_item

Do django app URLs always have a trailing slash?

2005-08-12 Thread Michael Josephson
Hi, Do URLs within a django app always have a trailing '/'? e.g. If I enter a url such as http://localhost:8080/myapp/list it automatically redirects to http://localhost:8080/myapp/list/ and if I define a urlpattern such as (r'^list$', 'list_items') it doesn't match without the trailing slash (r'

Re: Limiting database connections?

2005-08-12 Thread Jason McBrayer
[EMAIL PROTECTED] wrote: I ran out of database connections today. I'd like to prevent this in a way other than increasing my database connections. Jonpy (jonpy.sf.net) has a nice and simple dbpool module. I'm not sure how much work it would take to get django to use it, however.

Re: One file per class in models?

2005-08-12 Thread Ludovico Magnocavallo
Maniac wrote: Sorry, I was wrong with 'just import'. It should be 'import and subclass'. I have it working like this: Maniac, thanks a lot for the tip. Pretty clever, and a nice way to solve my specific problem. :) L.

Re: One file per class in models?

2005-08-12 Thread Maniac
Ludovico Magnocavallo wrote: I tried that, but could not get it to work as intended. Must be too much PHP coding lately that is affecting my (modest) Python skills, or trying to approach a new framework after a full day of work. :) Any practical example is much appreciated ofc. Sorry, I wa

Django documentation, plucker format

2005-08-12 Thread Ludovico Magnocavallo
After yesterday's uhm false start with model files and classes, I thought of trying to contribute something to the project. I don't know Django enough (yet) to code or write docs, but in the meantime some of you may be interested in the Django documentation (as of yesterday) in Plucker .pdb

Re: One file per class in models?

2005-08-12 Thread Ludovico Magnocavallo
And as far as I understand you still can divide your many-many classes into separate files to your liking and just import them in the main app module. I tried that, but could not get it to work as intended. Must be too much PHP coding lately that is affecting my (modest) Python skills, or tr

Re: One file per class in models?

2005-08-12 Thread Maniac
Ludovico Magnocavallo wrote: Yes, now I get it. My noob approach was to see the module as a container for one or more classes inside an application, where in fact it's *the* application. And as far as I understand you still can divide your many-many classes into separate files to your likin

Limiting database connections?

2005-08-12 Thread [EMAIL PROTECTED]
I ran out of database connections today. I'd like to prevent this in a way other than increasing my database connections. How does this work in Django? I'd like more reuse and all. Coming from a java background, it's typical for me to configure my application to use very few connections (often