Skip to content
Snippets Groups Projects
Commit ff336ff4 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Add missing "get by slug"-method for event

This message is used by the mixin to find the corresponding event for a slug
parent 0fb46af4
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,10 @@ class Event(models.Model):
def __str__(self):
return self.name
@staticmethod
def get_by_slug(slug):
return Event.objects.get(slug=slug)
class AKOwner(models.Model):
""" An AKOwner describes the person organizing/holding an AK.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment