If we want to use it from more than one place, it makes sense to have a
single central instance of it since each one of them otherwise has to
load and parse the magic database file.
from regtypes import validate_special_reg_type
from postgresqleu.util.validators import TwitterValidator
+from postgresqleu.util.magic import magicdb
from postgresqleu.countries.models import Country
from datetime import datetime, date
import requests
-import magic
-
-
-# Globally load and cache the magicdb
-magicdb = magic.open(magic.MIME)
-magicdb.load()
class ConferenceRegistrationForm(forms.ModelForm):
--- /dev/null
+from __future__ import absolute_import
+import magic
+
+# Globally load and cache the magicdb
+magicdb = magic.open(magic.MIME)
+magicdb.load()