diff --git a/ttadmin/users/models.py b/ttadmin/users/models.py index b3dc292..9d45224 100644 --- a/ttadmin/users/models.py +++ b/ttadmin/users/models.py @@ -3,6 +3,10 @@ from django.dispatch import receiver from django.contrib.auth.models import User from django.db.models import TextField, BooleanField, CharField +SSH_TYPE_CHOICES = ( + ('ssh-rsa', 'ssh-rsa',), + ('ssh-dss', 'ssh-dss',), +) class Townie(User): """Both an almost normal Django User as well as an abstraction over a @@ -11,6 +15,10 @@ class Townie(User): shell = CharField(max_length=50, default="/bin/bash") reviewed = BooleanField(default=False) displayname = CharField(max_length=100, blank=False, null=False) + pubkey_type = CharField(max_length=15, + blank=False, + null=False, + choices=SSH_TYPE_CHOICES) @property def home_path(self): diff --git a/ttadmin/users/templates/ttadmin/signup.html b/ttadmin/users/templates/ttadmin/signup.html index 41f2e6b..574bcb0 100644 --- a/ttadmin/users/templates/ttadmin/signup.html +++ b/ttadmin/users/templates/ttadmin/signup.html @@ -2,6 +2,18 @@