Re: How to handle invalid deleted forms in formsets

2010-08-10 Thread Tomi Pieviläinen
> What version of Django? This sounds a lot like: Latest (installed by making pip require django>=1.2). > http://code.djangoproject.com/ticket/11801 It isn't. The problem is not that I'm not getting formset.deleted_forms, I am. The problem is that these deleted forms also go to the cleaned_data

Re: Django 1.1.1's Feed only display the latest item

2010-08-10 Thread Tomi Pieviläinen
As mentioned in the IRC channel, the feed did indeed display two items, but because it was invalid markup (based on W3) Safari didn't show them properly. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

How to handle invalid deleted forms in formsets

2010-08-09 Thread Tomi Pieviläinen
(Using formset_factory, if that makes a difference) If the user fills a form in formset incompletely and then marks it for deletion, my form handling dies horribly. The deleted forms prevent formset.cleaned_data from working as they don't validate and thus the form doesn't have a cleaned_data attr

Re: Calculate distance between 2 latitude/longitude Point

2010-07-29 Thread Tomi Pieviläinen
> * > In [45]: Point(40.96312364002175, > -5.661885738372803).distance(Point(40.96116097790996, -5.66283792257309)) > Out[45]: 0.0021814438604553388 The results are what you get from the db. The thing is, you can't assume that the distance in degrees is the same everywhere, so you can't use a simp

Re: sqlite3 backend error

2010-05-17 Thread Tomi Pieviläinen
This is due to having a virtualenv created in a previous version of Ubuntu. Recreate the virtualenv under Lucid, and you should be fine. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegrou

Re: Custom methods for ManyToManyManager

2007-11-20 Thread Tomi Pieviläinen
> I've been hacking some filtering for related managers, have a look at > the BoxManager > here:http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py Thanks for food for thoughts. Looking at your code got me thinking and in the end my problem was really simple. I was using the example

Custom methods for ManyToManyManager

2007-11-16 Thread Tomi Pieviläinen
Hi group, Is it possible to have custom filtering methods for MTMManagers? More precisely I'd like to be able to use user.received_messages.new in my templates. I can define a custom manager for my Message model with a custom new method, but unfortunately this returns all new messages in the syst

How to get normal iteritems from a MultiValueDict?

2007-02-24 Thread Tomi Pieviläinen
While the __get__ function gives same results as a dict would, iteritems() doesn't. I'd like to use my GET/POST values in a function that uses iteritems, but it outputs even single values as lists. Is there a nice way to transform MultiValueDict into a normal dict, or the iteritems? --~--~-