Beispiel #1
0
    def get_photo_url(self, geometry='160x160', **kwargs):
        """Return photo url.

        If privacy allows and no photo set, return gravatar link.
        If privacy allows and photo set return local photo link.
        If privacy doesn't allow return default local link.
        """
        privacy_level = getattr(self, '_privacy_level', MOZILLIANS)
        if (not self.photo and self.privacy_photo >= privacy_level):
            return gravatar(self.user.email, size=geometry)
        return absolutify(self.get_photo_thumbnail(geometry, **kwargs).url)
Beispiel #2
0
    def get_photo_url(self, geometry='160x160', **kwargs):
        """Return photo url.

        If privacy allows and no photo set, return gravatar link.
        If privacy allows and photo set return local photo link.
        If privacy doesn't allow return default local link.
        """
        privacy_level = getattr(self, '_privacy_level', MOZILLIANS)
        if (not self.photo and self.privacy_photo >= privacy_level):
            return gravatar(self.user.email, size=geometry)
        return absolutify(self.get_photo_thumbnail(geometry, **kwargs).url)
Beispiel #3
0
 def get_url(self, obj):
     return absolutify(reverse('groups:show_skill', kwargs={'url':
                                                            obj.url}))
Beispiel #4
0
 def get_url(self, obj):
     return absolutify(reverse('phonebook:profile_view',
                               kwargs={'username': obj.user.username}))
Beispiel #5
0
 def get_url(self, obj):
     return absolutify(reverse('phonebook:profile_view', kwargs={'username': obj.user.username}))
Beispiel #6
0
 def get_url(self, obj):
     return absolutify(reverse('groups:show_skill', kwargs={'url': obj.url}))
Beispiel #7
0
def humans(request):
    return redirect(absolutify(settings.HUMANSTXT_URL))
Beispiel #8
0
 def get_url(self, obj):
     return absolutify(reverse("phonebook:profile_view", kwargs={"username": obj.user.username}))
Beispiel #9
0
 def get_url(self, obj):
     return absolutify(reverse("groups:show_skill", kwargs={"url": obj.url}))