Ich möchte ein Modell in der Datei setting.py für PUSH_NOTIFICATIONS_SETTINGS in django-push-notifications importieren. Dies ist mein Code:Django-Einstellung - Apps sind noch nicht geladen
INSTALLED_APPS = (
....
'my_app',
'push_notifications'
....
)
from my_app.models import User
PUSH_NOTIFICATIONS_SETTINGS = {
'GCM_API_KEY': 'xxxxx',
'APNS_CERTIFICATE': 'xxxxx.pem',
'USER_MODEL': User, # i want to change the default from auth_user to my_app User
}
Aber es einen Fehler in dieser Zeile erhöhen:
from my_app.models import User
Der Fehler ist:
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Wie kann ich my_app Modell in setting.py laden?