-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.py
47 lines (40 loc) · 1011 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright Collab 2013-2018
"""
Models used for testing.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext as _
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Location(models.Model):
"""
Location.
"""
name = models.CharField(
_('name'),
help_text=_('Name of the location.'),
max_length=255,
blank=False,
null=False
)
slug = models.SlugField(
_('slug'),
help_text=_('Location name as used in links.'),
max_length=255,
blank=False,
null=False,
unique=True
)
address = models.CharField(
_('address'),
help_text=_('Location address.'),
max_length=255,
blank=False,
null=False
)
class Meta:
verbose_name = _('location')
verbose_name_plural = _('locations')
def __str__(self):
return self.name