How to process a request with Content-Type: multipart/rfc-822 ?

2009-03-03 Thread Ville Säävuori
I'm playing with an web hook webapp called smtp2web ( http://smtp2web.com ), which, as it name suggests, forwards email messages to a URL as a http POST request. A quote from docs: "the entire message (including headers) is sent in a POST request to the URL you specified, with Content-Type: multi

Re: How to process a request with Content-Type: multipart/rfc-822 ?

2009-03-03 Thread Ville Säävuori
> > A helpful Djangonaut pointed out to me in IRC that I could subclass > > the request handler (in my case django.core.handlers.modpython) and do > > some magic to prevent the default handling from happening. Is this the > > only way to get to this data? I'd like a cleaner (and easier!) > > solut

Djangonauts at EuroPython?

2007-07-08 Thread Ville Säävuori
leaving on Friday evening. If the weather stays like this, I'm sure some company at the local bars (after the conference hours) wouldn't hurt =) Yours, Ville Säävuori http://www.unessa.net/en/hoyci/ --~--~-~--~~~---~--~~ You received this message becau

Re: Djangonauts at EuroPython?

2007-07-08 Thread Ville Säävuori
> Simon Willison is keynoting, and he is an original contributor. I was going to mention that besides Simon (but thought it was too obvious :) We had a fun evening with some Danish friends from #django channel today. Hopefully we see more django-people -- including Simon -- tomorrow! :) Yours,

Flatpages and APPEND_SLASH=True

2008-01-03 Thread Ville Säävuori
I'm not sure if this is a bug in my setup, a bug in Django or not a bug at all. I have the great APPEND_SLASH=True in my settings for canonical urls, and I'm using contrib.flatpages. Problem is, after the changes in r6582, all flatpages with url ending slash (ie, all of my flatpages) do not redire

Re: Flatpages and APPEND_SLASH=True

2008-01-03 Thread Ville Säävuori
This broke my site so I had to fix it. I ended up fixing the Flatpages app to behave with APPEND_SLASH=True. I added a ticket with a patch (also to docs): http://code.djangoproject.com/ticket/6309 - VS --~--~-~--~~~---~--~~ You received this message because you are

AutoField that is not a pk?

2006-06-13 Thread Ville Säävuori
Is there some reason why I cannot have an AutoField(primary_key=False) in my model? (In fact, documentation hints that I could, but manage.py gives an assertion error from it.) My pk is a charfield but I would also need an automatically incrementing integer in the same class. Any ideas? --~--~-

How to select distinct rows?

2006-06-26 Thread Ville Säävuori
Say I have a model like class Example (models.Model): ip = models.IPAddressField() desc = models.CharField(maxlength=255) created = models.DateTimeField(auto_now_add=True) How do I make a query that counts distinct objects by ip (or any other field that is not pk)? It's q