Le Thu, 19 Apr 2012 11:58:36 +0200, Étienne Loks <[email protected]> a écrit :
> The only way I am thinking of is to test Django version. > Something like: > > import django > > assert django.VERSION[0] == 1 and django.VERSION[1] >= 2 > if django.VERSION[1] == 2: > from django.contrib.syndication.views import Feed > else: > from django.contrib.gis.feeds import Feed Well, it's the opposite: the code running with Django 1.2 uses django.contrib.gis.feeds while the code I've done for Django 1.4 uses django.contrib.syndication.views. However, the two are not equivalent: by using the django.contrib.syndication.views variant, we lose the GeoRSS capabilities of django.contrib.gis.feeds. Thomas -- Thomas Petazzoni http://thomas.enix.org MapOSMatic http://www.maposmatic.org Logiciels Libres à Toulouse http://www.toulibre.org Embedded Linux http://www.free-electrons.com
