• 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

95.24
/apps/mapideas/models.py
1
from django.contrib.contenttypes.fields import GenericRelation
1✔
2
from django.db import models
1✔
3
from django.urls import reverse
1✔
4
from django.utils.translation import gettext_lazy as _
1✔
5

6
from adhocracy4.comments import models as comment_models
1✔
7
from adhocracy4.maps import fields as map_fields
1✔
8
from adhocracy4.ratings import models as rating_models
1✔
9
from apps.ideas import models as idea_models
1✔
10

11

12
class AbstractMapIdea(idea_models.AbstractIdea):
1✔
13
    point = map_fields.PointField(
1✔
14
        verbose_name=_("Where can your idea be located on a map?"),
15
        help_text=_(
16
            "Click inside the marked area "
17
            "to set the marker. A set "
18
            "marker can be dragged when pressed."
19
        ),
20
    )
21

22
    point_label = models.CharField(
1✔
23
        blank=True,
24
        default="",
25
        max_length=255,
26
        verbose_name=_("Label of the ideas location"),
27
        help_text=_("This could be an address or the name of a landmark."),
28
    )
29

30
    class Meta:
1✔
31
        abstract = True
1✔
32

33

34
class MapIdea(AbstractMapIdea):
1✔
35
    ratings = GenericRelation(
1✔
36
        rating_models.Rating, related_query_name="mapidea", object_id_field="object_pk"
37
    )
38
    comments = GenericRelation(
1✔
39
        comment_models.Comment,
40
        related_query_name="mapidea",
41
        object_id_field="object_pk",
42
    )
43

44
    def get_absolute_url(self):
1✔
45
        return reverse(
×
46
            "a4_candy_mapideas:mapidea-detail",
47
            kwargs=dict(
48
                organisation_slug=self.project.organisation.slug,
49
                pk="{:05d}".format(self.pk),
50
                year=self.created.year,
51
            ),
52
        )
53

54
    class Meta:
1✔
55
        ordering = ["-created"]
1✔
56
        verbose_name = "mapidea"
1✔
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