Event-added

This commit is contained in:
2020-06-07 08:53:48 +00:00
parent 1ba4b519bd
commit b441e01f7b
2 changed files with 25 additions and 1 deletions

View File

@@ -22,6 +22,14 @@ class NewsPostManager(models.Manager):
def get_queryset(self):
return super().get_queryset().filter(~Q(is_fetsitzung=True))
class EventManager(models.Manager):
def get_queryset(self):
return super().get_queryset().filter(Q(is_event=True))
# Create your models here.
class Post(models.Model):
# id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
@@ -99,3 +107,7 @@ class PostSerializer(serializers.HyperlinkedModelSerializer):
class Event(Post):
class Meta:
proxy=True
objects=EventManager()