mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
Fixed tests.
This commit is contained in:
parent
fbba5135aa
commit
6393d25166
2 changed files with 3 additions and 6 deletions
|
|
@ -98,6 +98,7 @@ def render_avatar(avatar, size=AVATAR_DEFAULT_SIZE):
|
|||
avatar.avatar_url(size), str(avatar), size, size)
|
||||
|
||||
|
||||
@register.tag
|
||||
def primary_avatar_object(parser, token):
|
||||
split = token.split_contents()
|
||||
if len(split) == 4:
|
||||
|
|
@ -120,5 +121,3 @@ class UsersAvatarObjectNode(template.Node):
|
|||
else:
|
||||
context[key] = None
|
||||
return six.text_type()
|
||||
|
||||
register.tag('primary_avatar_object', primary_avatar_object)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
from django.core.files.base import ContentFile
|
||||
from django.http import HttpResponse, Http404
|
||||
from django.shortcuts import get_object_or_404, render, redirect
|
||||
from django.http import Http404
|
||||
from django.shortcuts import render, redirect
|
||||
from django.utils import six
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
|
|
|||
Loading…
Reference in a new issue