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

DemocracyClub / WhoCanIVoteFor / bdb34524-03ac-44a5-bbe5-9a049cd6b7b4

17 Feb 2025 05:02PM UTC coverage: 58.297% (-0.009%) from 58.306%
bdb34524-03ac-44a5-bbe5-9a049cd6b7b4

Pull #2169

circleci

symroe
Fixup from comments (to be cleaned up)
Pull Request #2169: Move to uv

2793 of 4791 relevant lines covered (58.3%)

0.58 hits per line

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

0.0
/wcivf/apps/core/db_routers.py
1
class FeedbackRouter(object):
×
2
    apps_that_use_feedback_router = ["feedback"]
×
3

4
    def db_for_read(self, model, **hints):
×
5
        if model._meta.app_label in self.apps_that_use_feedback_router:
×
6
            return "feedback"
×
7
        return None
×
8

9
    def db_for_write(self, model, **hints):
×
10
        if model._meta.app_label in self.apps_that_use_feedback_router:
×
11
            return "feedback"
×
12
        return None
×
13

14
    def allow_migrate(self, db, app_label, model_name=None, **hints):
×
15
        return True
×
16

17

18
class PrincipalRDSRouter:
×
19
    apps_that_use_principal_router = ["hustings", "admin"]
×
20

21
    def db_for_read(self, model, **hints):
×
22
        return "default"
×
23

24
    def db_for_write(self, model, **hints):
×
25
        print(model._meta.app_label)
×
26
        if model._meta.app_label in self.apps_that_use_principal_router:
×
27
            return "principal"
×
28
        return "default"
×
29

30
    def allow_relation(self, obj1, obj2, **hints):
×
31
        """
32
        Allow any relation between objects in different databases.
33
        """
34
        return True
×
35

36
    def allow_migrate(self, db, app_label, model_name=None, **hints):
×
37
        return True
×
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