diff --git a/db.sqlite3 b/db.sqlite3 index 3203e04..9c08e69 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/tkupek_elearning/elearning/models.py b/tkupek_elearning/elearning/models.py index 155c696..43c2eab 100644 --- a/tkupek_elearning/elearning/models.py +++ b/tkupek_elearning/elearning/models.py @@ -48,7 +48,7 @@ class Option(models.Model): class User(models.Model): - token = models.CharField(max_length=40, null=True, default=gen_token) + token = models.CharField(max_length=40, null=True, default=gen_token, unique=True) name = models.CharField(max_length=100, null=False) last_seen = models.DateTimeField(null=True, blank=True) diff --git a/tkupek_elearning/elearning/templates/setting_null.html b/tkupek_elearning/elearning/templates/setting_null.html index 6afe8ec..f6305f1 100644 --- a/tkupek_elearning/elearning/templates/setting_null.html +++ b/tkupek_elearning/elearning/templates/setting_null.html @@ -25,8 +25,8 @@

Settings are not set. Please configure the service first!

diff --git a/tkupek_elearning/elearning/templates/statistic.html b/tkupek_elearning/elearning/templates/statistic.html index 0f884ae..d96ef05 100644 --- a/tkupek_elearning/elearning/templates/statistic.html +++ b/tkupek_elearning/elearning/templates/statistic.html @@ -16,6 +16,17 @@ + + + + + @@ -33,12 +44,15 @@ name questions answered last seen + url (click to copy) {% for user in users %} {{ user.name }} {{ user.questions_answered }} {{ user.last_seen }} + + {% endfor %} @@ -69,7 +83,13 @@ {{ settings.footer }} - +