Re: auth: get_profile(): create if it does not exist.

2008-12-17 Thread 7timesTom
actually don't user super(self.__class__, self) http://loveandtheft.org/2008/09/03/how-super-should-be-used-when-calling-a-parents-method/ use super(MyManager, self) On 17 Dec, 18:15, 7timesTom <tavspamno...@googlemail.com> wrote: > On 17 Dec, 16:08, Darthmahon <cpma...@gmai

Re: auth: get_profile(): create if it does not exist.

2008-12-17 Thread 7timesTom
On 17 Dec, 16:08, Darthmahon wrote: > Why not create your own function then and just put the try or except > code in that? That way it'll only be one line. Yup. Using model.Manager i.e.: class MyManager(models.Manager): def get_or_blank(self, pk_val): try:

Subtle Memory Leak Finally Found! (DEBUG is off)

2008-11-18 Thread 7timesTom
Some time ago Webfaction notified me "Memory usage over your limit" (80MB) It's taken me ages to find this darn memory leak! It was one short line that didn't even add functionality to my users. I have 2000 items (cars) in a database table, which my users can search through. After the webfaction

Re: geodjango on cough-vista-cough?

2008-10-30 Thread 7timesTom
Thanks for the help mate, unfortunately I still get exactly the same errors. What I don't understand, is that it's complaining about the lack of geo and postgis files, while installing postgis! Anyone have any more advise? On 30 Oct, 13:36, Jeff Johnson <[EMAIL PROTECTED]> wrote: >

geodjango on cough-vista-cough?

2008-10-30 Thread 7timesTom
I'm trying to install geodjango on windows vista business (I know! sorry!). Firstly is this a futile attempt to begin with? If not, here's the problem I'm getting: I've installed PostgreSQL using the windows xp instructions at http://geodjango.org/docs/install.html#windows. And then done a full

How do I make a Form -> Email safe and without escaped chars.

2008-09-26 Thread 7timesTom
this. ** How do I prevent escaped chars like this while not endangering recipients to any form of javascript or other attack? Thanks, 7timesTom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Finding out the name of the named url used

2008-08-21 Thread 7timesTom
I have general processing to do in my context processor based on which url was used. How can find out the name of the url used eg in my middleware. I feel like I want to do: def process_view(self, request, view_func, view_args, view_kwargs): request.url_name = view_kwargs.get('name',