use numeric primary keys, but still use unique names as lookups in the API
This commit is contained in:
parent
fcd0f8072b
commit
9658de72a2
14 changed files with 46 additions and 95 deletions
|
@ -6,7 +6,7 @@ class Source(models.Model):
|
|||
"""
|
||||
A map source, images of levels that can be useful as backgrounds for the map editor
|
||||
"""
|
||||
name = models.SlugField(_('source name'), primary_key=True, max_length=50)
|
||||
name = models.SlugField(_('source name'), unique=True, max_length=50)
|
||||
package = models.ForeignKey('mapdata.Package', on_delete=models.CASCADE, related_name='sources',
|
||||
verbose_name=_('map package'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue