GeneralNotability / bullseye

Extended IP info for Wikipedia
MIT License
12 stars 6 forks source link

GeoIP - Exception has occurred: VariableDoesNotExist #1

Closed theresnotime closed 3 years ago

theresnotime commented 3 years ago

On looking up an IP address, an exception is raised.

In bullseyeapp/templates/bullseye/data_components/maxmind.html (L12);

<p>Country: {{ maxmind.country }}</p>

This appears to be because the maxmind.country variable doesn't exist:

Failed lookup for key [country] in {
  'city': 'snip',
  'continent_code': 'EU',
  'continent_name': 'Europe',
  'country_code': 'GB',
  'country_name': 'United Kingdom',
  'dma_code': None,
  'is_in_european_union': False,
  'latitude': snip,
  'longitude': snip,
  'postal_code': 'snip',
  'region': 'ENG',
  'time_zone': 'Europe/London'
}

Is this "just" a case of changing {{ maxmind.country }} to {{ maxmind.country_name }} ?