Commit ad8961f2 authored by Jean-Baptiste's avatar Jean-Baptiste

update: fix container_path method and improve webfinger feature

parent e52373fd
Pipeline #4967 passed with stage
in 1 minute and 21 seconds
......@@ -5,6 +5,11 @@ from django.conf import settings
class WebFinger(object):
def uri(self, name, *args):
domain = settings.BASE_URL
return "{domain}{name}".format(domain=domain, name=name)
def response(self, response_dict, rel, acct):
return response_dict
......@@ -51,7 +56,7 @@ class WebFingerEndpoint(object):
else self.request.GET)
self.params['resource'] = query_dict.get('resource', None)
self.params['rel'] = query_dict.get('rel', '')
self.params['rel'] = query_dict.get('rel', None)
def validate_params(self):
"""
......@@ -74,6 +79,7 @@ class WebFingerEndpoint(object):
dict = {
'subject': self.params['resource'],
'aliases': [],
'links': []
}
......
......@@ -26,7 +26,7 @@ class Model(models.Model):
if path is None:
path = "{}s".format(cls._meta.object_name.lower())
return path
return cls.__clean_path(path)
def get_absolute_url(self):
return Model.resource_id(self)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment