diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/templates/users/user_detail.html | 6 | ||||
-rw-r--r-- | ctrack/users/migrations/0002_auto_20200120_1012.py | 18 | ||||
-rw-r--r-- | ctrack/users/migrations/0003_auto_20200120_1026.py | 18 | ||||
-rw-r--r-- | ctrack/users/migrations/0004_auto_20200120_1026.py | 18 | ||||
-rw-r--r-- | ctrack/users/migrations/0005_auto_20200120_1051.py | 18 | ||||
-rw-r--r-- | ctrack/users/views.py | 2 |
6 files changed, 77 insertions, 3 deletions
diff --git a/ctrack/templates/users/user_detail.html b/ctrack/templates/users/user_detail.html index e86eda1..f1913c3 100644 --- a/ctrack/templates/users/user_detail.html +++ b/ctrack/templates/users/user_detail.html @@ -9,9 +9,11 @@ <div class="row"> <div class="col-sm-12"> - <h2>{{ object.username }}</h2> + <h2>User: {{ object.username }}</h2> {% if object.name %} - <p>{{ object.name }}</p> + <p>{{ object.name }}</p> + {% else %} + <p>Email: {{ object.email }}</p> {% endif %} </div> </div> diff --git a/ctrack/users/migrations/0002_auto_20200120_1012.py b/ctrack/users/migrations/0002_auto_20200120_1012.py new file mode 100644 index 0000000..838720f --- /dev/null +++ b/ctrack/users/migrations/0002_auto_20200120_1012.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.9 on 2020-01-20 10:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(max_length=254, unique=True), + ), + ] diff --git a/ctrack/users/migrations/0003_auto_20200120_1026.py b/ctrack/users/migrations/0003_auto_20200120_1026.py new file mode 100644 index 0000000..3374e9b --- /dev/null +++ b/ctrack/users/migrations/0003_auto_20200120_1026.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.9 on 2020-01-20 10:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0002_auto_20200120_1012'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(blank=True, max_length=254, verbose_name='email address'), + ), + ] diff --git a/ctrack/users/migrations/0004_auto_20200120_1026.py b/ctrack/users/migrations/0004_auto_20200120_1026.py new file mode 100644 index 0000000..00f6f2d --- /dev/null +++ b/ctrack/users/migrations/0004_auto_20200120_1026.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.9 on 2020-01-20 10:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0003_auto_20200120_1026'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(max_length=254, unique=True, verbose_name='Email address'), + ), + ] diff --git a/ctrack/users/migrations/0005_auto_20200120_1051.py b/ctrack/users/migrations/0005_auto_20200120_1051.py new file mode 100644 index 0000000..d00df8f --- /dev/null +++ b/ctrack/users/migrations/0005_auto_20200120_1051.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.9 on 2020-01-20 10:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0004_auto_20200120_1026'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(blank=True, max_length=254, verbose_name='email address'), + ), + ] diff --git a/ctrack/users/views.py b/ctrack/users/views.py index 5c0d5b5..9cf69e9 100644 --- a/ctrack/users/views.py +++ b/ctrack/users/views.py @@ -21,7 +21,7 @@ user_detail_view = UserDetailView.as_view() class UserUpdateView(LoginRequiredMixin, UpdateView): model = User - fields = ["name"] + fields = ["name", "first_name", "last_name"] def get_success_url(self): return reverse("users:detail", kwargs={"username": self.request.user.username}) |