Commits

Peter Heise committed f072935

Add django 1.3 staticfiles compatibility

  • Participants
  • Parent commits acbb16f

Comments (0)

Files changed (1)

File django_countries/settings.py

         url = settings.COUNTRIES_FLAG_URL
     else:
         url = 'flags/%(code)s.gif'
-    prefix = getattr(settings, 'STATIC_URL', '') or settings.MEDIA_URL
+
+    prefix = getattr(settings, 'STATIC_URL', '') or \
+        getattr(settings, 'STATICFILES_URL', '') or \
+        settings.MEDIA_URL
+
     if not prefix.endswith('/'):
         prefix = '%s/' % prefix
     return '%s%s' % (prefix, url)