mirror of
https://github.com/gamaio/gama_api.git
synced 2024-11-10 13:07:27 +00:00
apps: Truncate the api key to 15 characters + ...
This commit is contained in:
parent
7fcd9d6d2d
commit
06ddc6a305
@ -31,7 +31,9 @@ class api_apps(models.Model):
|
||||
settings = JSONField(blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return '%s (%s) - %s' % (self.name, self.owner.name, self.apikey)
|
||||
# Truncate the api key to the first 15 characters for identification
|
||||
thekey = self.apikey[:15] + (self.apikey[:15] and '...')
|
||||
return '%s (%s) - %s' % (self.name, self.owner.user.username, thekey)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
|
Loading…
Reference in New Issue
Block a user