feat: add views for Organisation model

Location picker on update view
This commit is contained in:
James Graham
2021-01-15 14:58:05 +00:00
parent 2d85ab4370
commit 9db870bcb0
10 changed files with 259 additions and 3 deletions

View File

@@ -64,9 +64,7 @@ class User(AbstractUser):
class Organisation(models.Model):
"""
Organisation to which a :class:`Person` belongs.
"""
"""Organisation to which a :class:`Person` belongs."""
name = models.CharField(max_length=255, blank=False, null=False)
#: Latitude for displaying location on a map
@@ -78,6 +76,9 @@ class Organisation(models.Model):
def __str__(self) -> str:
return self.name
def get_absolute_url(self):
return reverse('people:organisation.detail', kwargs={'pk': self.pk})
class Theme(models.Model):
"""