mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
Don't rely on the Django app cache's get_app() since it's not guaranteed to find the app whe django-avatar is loaded.
This commit is contained in:
parent
ef2e6e69aa
commit
6377797e3f
1 changed files with 3 additions and 6 deletions
|
|
@ -2,8 +2,6 @@ from django.http import HttpResponseRedirect
|
|||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.db.models import get_app
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.conf import settings
|
||||
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
|
@ -13,10 +11,9 @@ from avatar.models import Avatar
|
|||
from avatar.util import get_primary_avatar, get_default_avatar_url
|
||||
from avatar.forms import PrimaryAvatarForm, DeleteAvatarForm, UploadAvatarForm
|
||||
|
||||
try:
|
||||
notification = get_app('notification')
|
||||
except ImproperlyConfigured:
|
||||
notification = None
|
||||
notification = False
|
||||
if 'notification' in settings.INSTALLED_APPS:
|
||||
from notification import models as notification
|
||||
|
||||
friends = False
|
||||
if 'friends' in settings.INSTALLED_APPS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue