Re: Passing more than one arguments to a custom filter

2006-01-09 Thread Aggelos Orfanakos
Hello Eric. Thanks for your reply. As I wrote in my initial post, I have already done this. I was wondering if there is a more elegant way. Aggelos.

Passing more than one arguments to a custom filter

2006-01-09 Thread Aggelos Orfanakos
Hello. Is there an elegant way of passing more than one arguments to a custom filter? What I do now is pass a tuple from the view to the template that contains these arguments, and in the template, pass this tuple to the custom filter (which in the filter is seen as the "arg" parameter). Thanks i

Re: Importing stuff in your app's models module?

2005-12-21 Thread Aggelos Orfanakos
Thanks for your response. I'm looking forward to this branch. :-)

Importing stuff in your app's models module?

2005-12-21 Thread Aggelos Orfanakos
I recently wanted to tweak how a model was being saved, so I used the _pre_save method of it. In the _pre_save method I needed to use the gethostbyaddr and herror of the socket module. To my surprise, I got problems [1] when having "from socket import gethostbyaddr, herror" in module-level. It wor

Re: Upgrading models...

2005-12-20 Thread Aggelos Orfanakos
I am not sure about what you are asking, but this may help: http://www.djangoproject.com/documentation/faq/#if-i-make-changes-to-a-model-how-do-i-update-the-database

Issues with admin app and ON DELETE CASCADE?

2005-12-20 Thread Aggelos Orfanakos
Hello! Are there any known issues with the Django admin app and ON DELETE CASCADE? For example, let's say I have two models (A and B), with the B having a ForeignKey pointing to A. Now (while playing with the Django free DB API in the Python interactive interpreter) if I insert a new record for A