policies/*: remove path-based import from all policies

This commit is contained in:
Jens Langhammer
2020-07-20 15:58:48 +02:00
parent ac2dd3611f
commit 6aefd072c8
8 changed files with 51 additions and 7 deletions

View File

@ -1,7 +1,9 @@
"""Policy base models"""
from typing import Type
from uuid import uuid4
from django.db import models
from django.forms import ModelForm
from django.utils.translation import gettext_lazy as _
from model_utils.managers import InheritanceManager
@ -73,6 +75,10 @@ class Policy(CreatedUpdatedModel):
objects = InheritanceAutoManager()
def form(self) -> Type[ModelForm]:
"""Return Form class used to edit this object"""
raise NotImplementedError
def __str__(self):
return f"Policy {self.name}"