Re: Serving Media through mod_proxy.

2007-03-01 Thread David Abrahams
"Jorge Gajon" <[EMAIL PROTECTED]> writes: > Take a look at this page under the section titled "Serving media files" > > http://www.djangoproject.com/documentation/modpython/ > > That way you can also serve your media files from your same Apache instance. Yes, I know. However, that suffers many

Serving Media through mod_proxy.

2007-02-27 Thread David Abrahams
I'm running django with Apache/mod_python and serving media through lighttpd. I have only one IP address, so lighttpd is running on port 8081, but some of my clients are behind firewalls that block ports other than 80. I'm planning to ditch Apache and run everything with lighttpd under FastCGI,

Model instance identity

2007-02-13 Thread David Abrahams
I just wrote some code that used Model instances as keys in a dict, and was surprised to find two instances in the dict that represented the same object in the database. Shouldn't that be impossible? If you can't guarantee that a given object in the database is always represented by the same Py

Re: ForeignKey, null, and schema evolution

2007-02-11 Thread David Abrahams
"Ramiro Morales" <[EMAIL PROTECTED]> writes: > On 2/10/07, David Abrahams <[EMAIL PROTECTED]> wrote: >> >> Whatever django bugs may be lurking asid, I need to move forward with >> my project ASAP so I'd really appreciate it if someone could give m

Re: ForeignKey, null, and schema evolution

2007-02-10 Thread David Abrahams
"yary" <[EMAIL PROTECTED]> writes: > IIRC, Django's admin can't handle a field with null=True and > blank=False (which is a bit of a shame...) Try adding blank=True to > your model's field? Read my latest post and you'll see that I have tried that. It works, but only if I explicitly specify the

Re: ForeignKey, null, and schema evolution

2007-02-10 Thread David Abrahams
David Abrahams <[EMAIL PROTECTED]> writes: > My models.py is enclosed. It doesn't have any special dependencies. > Would you mind trying to reproduce the problem? > >> Try creating a smaller project with a trimmed >> down model -- doing the standard "remov

Re: ForeignKey, null, and schema evolution

2007-02-10 Thread David Abrahams
Malcolm Tredinnick <[EMAIL PROTECTED]> writes: > On Sat, 2007-02-10 at 03:34 -0500, David Abrahams wrote: >> >> In my attempt to use >> >>ForeignKey(Track, null=True) >> >> When I actually tried to use a null Track value, I got: > [...trac

ForeignKey, null, and schema evolution

2007-02-10 Thread David Abrahams
In my attempt to use ForeignKey(Track, null=True) When I actually tried to use a null Track value, I got: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response 77. response = callback(request, *callback_args, **cal

Admin convenience

2007-02-07 Thread David Abrahams
Hi, I'm building an app for scheduling conferences and am having a hard time finding a way to make it convenient for the scheduling administrator. Sessions need to be scheduled into time slots and it seems difficult to take advantage of the usual constraints to make scheduling work well. Here

Re: Project organization and decoupling

2007-01-17 Thread David Abrahams
"Doug Van Horn" <[EMAIL PROTECTED]> writes: You would put parent_folder and parent_folder/spam_website into your python path. So when you need a model from the foo application, you do: from foo.models import Eggs and if you need something from the settings module in the project, you do:

Re: Project organization and decoupling

2007-01-17 Thread David Abrahams
Stefan Foulis <[EMAIL PROTECTED]> writes: On Jan 16, 2007, at 17:52, David Abrahams wrote: For me, Django doesn't seem to be delivering on its promise to allow me to build a collection of apps and organize them in different combinations into multiple Django projects, and the do

Project organization and decoupling

2007-01-16 Thread David Abrahams
For me, Django doesn't seem to be delivering on its promise to allow me to build a collection of apps and organize them in different combinations into multiple Django projects, and the documentation I can find doesn't really give any clues about best practices for project organization. One prob

Re: Why so slow?

2007-01-15 Thread David Abrahams
"Jeremy Dunck" <[EMAIL PROTECTED]> writes: > Most likely, KeepAlive is holding processes unavailable while > sitting idle. How would I tell if that was happening? Turn it off and see if performance suddenly becomes rediculously good. :) Unfortunately even with KeepAlive off, I'm seeing it

Re: Why so slow?

2007-01-12 Thread David Abrahams
"Ramiro Morales" <[EMAIL PROTECTED]> writes: > On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote: >> [...] >> >> Most of my content is static in nature, generated on-demand from ReST >> sources. For those pages, the model checks the mod time of

error: (32, 'Broken pipe')

2007-01-10 Thread David Abrahams
I see this often when running the development server. All the pages seem to render correctly. Can anyone explain what's going on, and tell me whether I should be concerned? I note that others have asked this question in the past, but the explanation given at http://groups.google.com/group/djan

Re: Why so slow?

2007-01-05 Thread David Abrahams
Kenneth Gonsalves <[EMAIL PROTECTED]> writes: On 05-Jan-07, at 9:11 PM, David Abrahams wrote: Next most likely is # of child processes. Try fiddling with Min and MaxSpareServers. http://httpd.apache.org/docs/2.0/mod/prefork.html According to the docs that should only be necessar

Re: Why so slow?

2007-01-05 Thread David Abrahams
"Joseph Heck" <[EMAIL PROTECTED]> writes: Everyone's looking at the web serving mechanisms, so let me ask a relatively obvious question - are you doing anything complex database-wise on the page that's being so slow? Most pages shouldn't require any DB lookups. I don't see PostgreSQL soaking

Re: Why so slow?

2007-01-05 Thread David Abrahams
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: On Jan 5, 2:54 am, David Abrahams <[EMAIL PROTECTED]> wrote: I am developing a Django-based site, and it *really* seems to be slow... sometimes. It's running in an Apache virtual server on the Any insight you might

Re: Why so slow?

2007-01-05 Thread David Abrahams
"Jeremy Dunck" <[EMAIL PROTECTED]> writes: On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote: .. > Except that KeepAlive ties up processes waiting for further requests > from a client, which may never come (and certainly won't if you run > media separate

Re: Why so slow?

2007-01-05 Thread David Abrahams
"Jeremy Dunck" <[EMAIL PROTECTED]> writes: On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote: ... > Most likely, KeepAlive is holding processes unavailable while > sitting idle. How would I tell if that was happening? Turn it off and see if performance sudden

Re: Why so slow?

2007-01-05 Thread David Abrahams
"DavidA" <[EMAIL PROTECTED]> writes: Is it possible your Apache server is doing reverse DNS lookups on the GET requests and the lookup is failing for the client machine? I seem to remember older versions of Apache having this on by default. It's Apache22, but I don't have any explicit settin

Re: Why so slow?

2007-01-05 Thread David Abrahams
"Jeremy Dunck" <[EMAIL PROTECTED]> writes: On 1/4/07, David Abrahams <[EMAIL PROTECTED]> wrote: ... If I log into the server and run "top" while trying to access pages, I don't see any alarming jumps in CPU load; the hungriest processes typically stay in s

Re: Why so slow?

2007-01-05 Thread David Abrahams
"Jeremy Dunck" <[EMAIL PROTECTED]> writes: On 1/4/07, David Abrahams <[EMAIL PROTECTED]> wrote: ... If I log into the server and run "top" while trying to access pages, I don't see any alarming jumps in CPU load; the hungriest processes typically stay in s

Why so slow?

2007-01-04 Thread David Abrahams
I am developing a Django-based site, and it *really* seems to be slow... sometimes. It's running in an Apache virtual server on the same machine as my static site. When things are good, the Django-based site approaches the static site in speed, but when things are bad, there's just no comparis

Apache auto-reload?

2006-11-29 Thread David Abrahams
Hi, I'm developing a site locally, and managing its code and static data in a subversion repository. I also have it running on a real apache server on the web with mod_python, but I don't want to login to the server, restart, etc. every time I check something in. I've got a post-commit hook al

Moving from development server to apache

2006-11-27 Thread David Abrahams
I've been very happily developing my Django site with the development server, and decided it was time to start it under Apache. I ran into several problems that really slowed my development down. I'm posting here because: a. I'd love some help with these if anyone can offer it; many of my

Re: UnicodeEncodeError with templatetags

2006-11-07 Thread David Abrahams
Ivan Sagalaev <[EMAIL PROTECTED]> writes: > David Abrahams wrote: >> I've been running into a problem that seems very similar to >> http://code.djangoproject.com/ticket/170, although I see that that >> issue was fixed so I am betting the bug is on my end somewhere

UnicodeEncodeError with templatetags

2006-11-07 Thread David Abrahams
I've been running into a problem that seems very similar to http://code.djangoproject.com/ticket/170, although I see that that issue was fixed so I am betting the bug is on my end somewhere. Unfortunately, I'm a little green w.r.t. unicode issues so I'm hoping someone else can correct my misconcep

Re: Support for static content?

2006-10-07 Thread David Abrahams
"Adrian Holovaty" <[EMAIL PROTECTED]> writes: > On 10/5/06, David Abrahams <[EMAIL PROTECTED]> wrote: >> So the idea is to map certain URLs into that view, have the view parse >> the URL to find the files in the SVN working copy that it should use >&g

Re: Support for static content?

2006-10-05 Thread David Abrahams
"Adrian Holovaty" <[EMAIL PROTECTED]> writes: > If you just want to use the HTTP request/response part of Django, > there's no requirement that you need to use a database. > > All Django cares about is that your view functions return an > HttpResponse. What they do internally -- whether it's conn

Re: Support for static content?

2006-10-05 Thread David Abrahams
Tim Chase <[EMAIL PROTECTED]> writes: >> Django's database-centric approach seems to make certain kinds >> of mostly-static sites harder to build. > [cut] >> Yes, Django is a framework, so I could build components that >> make this possible, but it seems to me that it should be a >> fundamental,