File: apps.py

package info (click to toggle)
python-django-rules 3.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: python: 1,613; makefile: 5; sh: 3
file content (15 lines) | stat: -rw-r--r-- 300 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from django.apps import AppConfig


class RulesConfig(AppConfig):
    name = "rules"
    default = True


class AutodiscoverRulesConfig(RulesConfig):
    default = False

    def ready(self):
        from django.utils.module_loading import autodiscover_modules

        autodiscover_modules("rules")