• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

liqd / adhocracy-plus / 18908688697

29 Oct 2025 12:59PM UTC coverage: 44.622% (-44.5%) from 89.135%
18908688697

Pull #2986

github

web-flow
Merge 1dfde8ee7 into 445e1d498
Pull Request #2986: Draft: Speed up Github Ci Tests

3012 of 6750 relevant lines covered (44.62%)

0.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

32.14
/apps/cms/settings/helpers.py
1
from django.conf import settings
1✔
2
from django.utils.html import mark_safe
1✔
3
from django.utils.translation import gettext_lazy as _
1✔
4
from wagtail.models import Site
1✔
5

6
from apps.cms.settings.models import ImportantPages
1✔
7

8
LINK_TEXT = _("Please look {}here{} for more information.")
1✔
9

10

11
def add_link_to_helptext(help_text, important_page_name, link_text=None):
1✔
12
    site = Site.objects.filter(is_default_site=True).first()
×
13
    important_pages = ImportantPages.for_site(site)
×
14

15
    if (
×
16
        getattr(important_pages, important_page_name)
17
        and getattr(important_pages, important_page_name).live
18
    ):
19
        url = getattr(important_pages, important_page_name).url
×
20
        if not link_text:
×
21
            link_text = LINK_TEXT
×
22
        link_text = link_text.format('<a href="' + url + '" target="_blank">', "</a>")
×
23
        return "{} {}".format(help_text, mark_safe(link_text))
×
24

25
    return help_text
×
26

27

28
def add_email_link_to_helptext(help_text, link_text=None):
1✔
29
    url = settings.CONTACT_EMAIL
×
30

31
    if not link_text:
×
32
        link_text = LINK_TEXT
×
33
    link_text = link_text.format('<a href="mailto:' + url + '">', "</a>")
×
34
    return mark_safe("{} {}".format(help_text, link_text))
×
35

36
    return help_text
37

38

39
def get_important_page_url(important_page_name):
1✔
40
    site = Site.objects.filter(is_default_site=True).first()
×
41
    important_pages = ImportantPages.for_site(site)
×
42
    if getattr(important_pages, important_page_name):
×
43
        return getattr(important_pages, important_page_name).url
×
44
    return None
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc