mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 22:19:16 +02:00
Admin UI for libraries and uploads
This commit is contained in:
parent
9aee135c2f
commit
a605bcbe76
27 changed files with 2140 additions and 361 deletions
|
@ -1,4 +1,5 @@
|
|||
import tempfile
|
||||
import urllib.parse
|
||||
import uuid
|
||||
|
||||
from django.conf import settings
|
||||
|
@ -43,6 +44,18 @@ class FederationMixin(models.Model):
|
|||
class Meta:
|
||||
abstract = True
|
||||
|
||||
@property
|
||||
def is_local(self):
|
||||
return federation_utils.is_local(self.fid)
|
||||
|
||||
@property
|
||||
def domain_name(self):
|
||||
if not self.fid:
|
||||
return
|
||||
|
||||
parsed = urllib.parse.urlparse(self.fid)
|
||||
return parsed.hostname
|
||||
|
||||
|
||||
class ActorQuerySet(models.QuerySet):
|
||||
def local(self, include=True):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue