Exemplo n.º 1
0
 def setUpClass(cls):
     add_or_update_django_sites(sites=[
         SingleSite(
             settings.SITE_ID,
             "test_site",
             country_code="ug",
             country="uganda",
             domain="bugamba.ug.clinicedc.org",
         )
     ])
     return super().setUpClass()
Exemplo n.º 2
0
"""Default sites module.

Define ``sites.py`` in your own module and set EDC_SITES_MODULE_NAME
to the name of that module.

"""
from django.conf import settings

from edc_sites.single_site import SingleSite

default_country = getattr(settings, "EDC_SITES_DEFAULT_COUNTRY", "botswana")
default_country_code = getattr(settings, "EDC_SITES_DEFAULT_COUNTRY_CODE",
                               "bw")
default_domain = getattr(settings, "EDC_SITES_DEFAULT_DOMAIN", "localhost")

all_sites = {
    default_country or "site": [
        SingleSite(
            1,
            settings.APP_NAME,
            country=default_country,
            country_code=default_country_code,
            domain=default_domain,
        ),
    ],
}
Exemplo n.º 3
0
from edc_sites.single_site import SingleSite

fqdn = "meta.clinicedc.org"

all_sites = {
    "tanzania": (
        SingleSite(
            10,
            "hindu_mandal",
            title="Hindu Mandal Hospital",
            country="tanzania",
            country_code="tz",
            domain=f"hindu-mandal.tz.{fqdn}",
        ),
        SingleSite(
            20,
            "amana",
            title="Amana Hospital",
            country="tanzania",
            country_code="tz",
            domain=f"amana.tz.{fqdn}",
        ),
        SingleSite(
            30,
            "temeke",
            title="Temeke Hospital",
            country="tanzania",
            country_code="tz",
            domain=f"temeke.tz.{fqdn}",
        ),
        SingleSite(
Exemplo n.º 4
0
from edc_sites.single_site import SingleSite

fqdn = "mapitio.clinicedc.org"

all_sites = {
    "tanzania": [
        SingleSite(
            10,
            "hindu_mandal",
            country="tanzania",
            country_code="tz",
            domain=f"hindu-mandal.tz.{fqdn}",
        ),
    ],
}
    AlreadyRandomized,
    InvalidAssignment,
    RandomizationError,
    Randomizer,
)
from edc_randomization.site_randomizers import site_randomizers

from ..make_test_list import make_test_list
from ..models import SubjectConsent
from ..randomizers import MyRandomizer

fqdn = "example.clinicedc.org"
all_sites = (
    SingleSite(10,
               "site_one",
               title="One",
               country="uganda",
               country_code="ug",
               fqdn=fqdn),
    SingleSite(20,
               "site_two",
               title="Two",
               country="uganda",
               country_code="ug",
               fqdn=fqdn),
    SingleSite(30,
               "site_three",
               title="Three",
               country="uganda",
               country_code="ug",
               fqdn=fqdn),
    SingleSite(40,
Exemplo n.º 6
0
from edc_sites.single_site import SingleSite

fqdn = "clinicedc.org"

sites = [
    SingleSite(
        10,
        "mochudi",
        "Mochudi",
        country="botswana",
        country_code="bw",
        domain=f"mochudi.bw.{fqdn}",
    ),
    SingleSite(
        20,
        "molepolole",
        "molepolole",
        country="botswana",
        country_code="bw",
        fqdn=fqdn,
    ),
    SingleSite(
        30,
        "lobatse",
        "lobatse",
        country="botswana",
        country_code="bw",
        fqdn=fqdn,
    ),
    SingleSite(
        40,
Exemplo n.º 7
0
from django.core.management import color_style
from edc_sites.single_site import SingleSite

style = color_style()

fqdn = "inte.clinicedc.org"

# site_id, name, **kwargs
all_sites = {
    "uganda": (
        SingleSite(
            101,
            "bugamba",
            country_code="ug",
            country="uganda",
            domain=f"bugamba.ug.{fqdn}",
        ),
        SingleSite(
            102,
            "bwizibwera",
            country_code="ug",
            country="uganda",
            domain=f"bwizibwera.ug.{fqdn}",
        ),
        SingleSite(
            103,
            "kinoni",
            country_code="ug",
            country="uganda",
            domain=f"kinoni.ug.{fqdn}",
        ),