Change the str repr
This commit is contained in:
parent
c6f05889ff
commit
e51af13a31
3 changed files with 14 additions and 4 deletions
|
@ -79,6 +79,7 @@ SECRET_KEY = env('DJANGO_SECRET_KEY')
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
# 1st migrate
|
# 1st migrate
|
||||||
|
'hosting',
|
||||||
'membership',
|
'membership',
|
||||||
'djangocms_admin_style',
|
'djangocms_admin_style',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
|
@ -143,7 +144,6 @@ INSTALLED_APPS = (
|
||||||
# ungleich
|
# ungleich
|
||||||
'ungleich',
|
'ungleich',
|
||||||
'ungleich_page',
|
'ungleich_page',
|
||||||
'hosting',
|
|
||||||
'digitalglarus',
|
'digitalglarus',
|
||||||
'nosystemd',
|
'nosystemd',
|
||||||
'datacenterlight',
|
'datacenterlight',
|
||||||
|
@ -196,6 +196,7 @@ TEMPLATES = [
|
||||||
os.path.join(PROJECT_DIR, 'cms_templates/'),
|
os.path.join(PROJECT_DIR, 'cms_templates/'),
|
||||||
os.path.join(PROJECT_DIR, 'cms_templates/djangocms_blog/'),
|
os.path.join(PROJECT_DIR, 'cms_templates/djangocms_blog/'),
|
||||||
os.path.join(PROJECT_DIR, 'templates/gdpr'),
|
os.path.join(PROJECT_DIR, 'templates/gdpr'),
|
||||||
|
os.path.join(PROJECT_DIR, 'templates'),
|
||||||
],
|
],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
|
|
|
@ -209,9 +209,18 @@ class UserHostingKey(models.Model):
|
||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
display_str = '%s - %s - %s - %s - %s' % (
|
username = "None"
|
||||||
self.user.username,
|
email = "None"
|
||||||
self.user.email,
|
if self.user:
|
||||||
|
username = self.user.username
|
||||||
|
email = self.user.email
|
||||||
|
display_str = '''Username: %s,
|
||||||
|
Email: %s,
|
||||||
|
Key name: %s,
|
||||||
|
Created at: %s,
|
||||||
|
Public Key: %s''' % (
|
||||||
|
username,
|
||||||
|
email,
|
||||||
self.name,
|
self.name,
|
||||||
self.created_at,
|
self.created_at,
|
||||||
self.public_key
|
self.public_key
|
||||||
|
|
Loading…
Reference in a new issue