mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 04:59:17 +02:00
Attribute artist
This commit is contained in:
parent
8687a64873
commit
4e44e4e4b6
31 changed files with 1741 additions and 46 deletions
|
@ -2,6 +2,8 @@ import uuid
|
|||
import factory
|
||||
import persisting_theory
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from faker.providers import internet as internet_provider
|
||||
|
||||
|
||||
|
@ -50,11 +52,11 @@ class FunkwhaleProvider(internet_provider.Provider):
|
|||
not random enough
|
||||
"""
|
||||
|
||||
def federation_url(self, prefix=""):
|
||||
def federation_url(self, prefix="", local=False):
|
||||
def path_generator():
|
||||
return "{}/{}".format(prefix, uuid.uuid4())
|
||||
|
||||
domain = self.domain_name()
|
||||
domain = settings.FEDERATION_HOSTNAME if local else self.domain_name()
|
||||
protocol = "https"
|
||||
path = path_generator()
|
||||
return "{}://{}/{}".format(protocol, domain, path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue