/usr/share/pyshared/django_countries/settings.py is in python-django-countries 1.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import os
from django.conf import settings
def _build_flag_url():
if hasattr(settings, 'COUNTRIES_FLAG_URL'):
url = settings.COUNTRIES_FLAG_URL
else:
url = 'flags/%(code)s.gif'
prefix = getattr(settings, 'STATIC_URL', '') or settings.MEDIA_URL
if not prefix.endswith('/'):
prefix = '%s/' % prefix
return '%s%s' % (prefix, url)
def _build_iso_xml():
if hasattr(settings, 'COUNTRIES_ISO_XML'):
return settings.COUNTRIES_ISO_XML
else:
return '/usr/share/xml/iso-codes/iso_3166.xml'
FLAG_URL = _build_flag_url()
ISO_XML = _build_iso_xml()
|