diff --git a/blango/__pycache__/__init__.cpython-36.pyc b/blango/__pycache__/__init__.cpython-36.pyc index 7d90761b1b..642e1f5b77 100644 Binary files a/blango/__pycache__/__init__.cpython-36.pyc and b/blango/__pycache__/__init__.cpython-36.pyc differ diff --git a/blango/__pycache__/settings.cpython-36.pyc b/blango/__pycache__/settings.cpython-36.pyc index d0b50a713d..702c89678b 100644 Binary files a/blango/__pycache__/settings.cpython-36.pyc and b/blango/__pycache__/settings.cpython-36.pyc differ diff --git a/blango/__pycache__/urls.cpython-36.pyc b/blango/__pycache__/urls.cpython-36.pyc index ffc566af9e..2a62242b4c 100644 Binary files a/blango/__pycache__/urls.cpython-36.pyc and b/blango/__pycache__/urls.cpython-36.pyc differ diff --git a/blango/__pycache__/wsgi.cpython-36.pyc b/blango/__pycache__/wsgi.cpython-36.pyc index 4116ea3aaa..7af20efeb1 100644 Binary files a/blango/__pycache__/wsgi.cpython-36.pyc and b/blango/__pycache__/wsgi.cpython-36.pyc differ diff --git a/blango/settings.py b/blango/settings.py index 8bfef5a977..0985361d68 100644 --- a/blango/settings.py +++ b/blango/settings.py @@ -27,7 +27,8 @@ class Dev(Configuration): https://docs.djangoproject.com/en/3.2/ref/settings/ """ - + AUTH_USER_MODEL = "blango_auth.User" + PASSWORD_HASHERS = [ "django.contrib.auth.hashers.Argon2PasswordHasher", "django.contrib.auth.hashers.PBKDF2PasswordHasher", @@ -106,6 +107,7 @@ class Dev(Configuration): # Application definition INSTALLED_APPS = [ + "blango_auth", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", diff --git a/blango_auth/__init__.py b/blango_auth/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/blango_auth/__pycache__/__init__.cpython-36.pyc b/blango_auth/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000..fadb238f4b Binary files /dev/null and b/blango_auth/__pycache__/__init__.cpython-36.pyc differ diff --git a/blango_auth/__pycache__/admin.cpython-36.pyc b/blango_auth/__pycache__/admin.cpython-36.pyc new file mode 100644 index 0000000000..f54397de04 Binary files /dev/null and b/blango_auth/__pycache__/admin.cpython-36.pyc differ diff --git a/blango_auth/__pycache__/apps.cpython-36.pyc b/blango_auth/__pycache__/apps.cpython-36.pyc new file mode 100644 index 0000000000..5b185dc6bd Binary files /dev/null and b/blango_auth/__pycache__/apps.cpython-36.pyc differ diff --git a/blango_auth/__pycache__/models.cpython-36.pyc b/blango_auth/__pycache__/models.cpython-36.pyc new file mode 100644 index 0000000000..5019855b13 Binary files /dev/null and b/blango_auth/__pycache__/models.cpython-36.pyc differ diff --git a/blango_auth/admin.py b/blango_auth/admin.py new file mode 100644 index 0000000000..68a45f2caf --- /dev/null +++ b/blango_auth/admin.py @@ -0,0 +1,41 @@ +from django.contrib import admin +from django.contrib.auth.admin import UserAdmin +from blango_auth.models import User +from django.utils.translation import gettext_lazy as _ +# Register your models here. + + +class BlangoUserAdmin(UserAdmin): + fieldsets = ( + (None, {"fields": ("email", "password")}), + (_("Personal info"), {"fields": ("first_name", "last_name")}), + ( + _("Permissions"), + { + "fields": ( + "is_active", + "is_staff", + "is_superuser", + "groups", + "user_permissions", + ) + }, + ), + (_("Important dates"), {"fields": ("last_login", "date_joined")}), + ) + add_fieldsets = ( + ( + None, + { + "classes": ("wide",), + "fields": ("email", "password1", "password2"), + }, + ), + ) + list_display = ("email", "first_name", "last_name", "is_staff") + search_fields = ("email", "first_name", "last_name") + ordering = ("email",) + + + +admin.site.register(User, BlangoUserAdmin) \ No newline at end of file diff --git a/blango_auth/apps.py b/blango_auth/apps.py new file mode 100644 index 0000000000..3619a45e56 --- /dev/null +++ b/blango_auth/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class BlangoAuthConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'blango_auth' diff --git a/blango_auth/migrations/0001_initial.py b/blango_auth/migrations/0001_initial.py new file mode 100644 index 0000000000..c21fe57733 --- /dev/null +++ b/blango_auth/migrations/0001_initial.py @@ -0,0 +1,44 @@ +# Generated by Django 3.2.6 on 2024-09-30 03:03 + +import django.contrib.auth.models +import django.contrib.auth.validators +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='User', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), + ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), + ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), + ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), + ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')), + ], + options={ + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + 'abstract': False, + }, + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + ] diff --git a/blango_auth/migrations/0002_auto_20241004_0114.py b/blango_auth/migrations/0002_auto_20241004_0114.py new file mode 100644 index 0000000000..3519d16c85 --- /dev/null +++ b/blango_auth/migrations/0002_auto_20241004_0114.py @@ -0,0 +1,29 @@ +# Generated by Django 3.2.6 on 2024-10-04 01:14 + +import blango_auth.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('blango_auth', '0001_initial'), + ] + + operations = [ + migrations.AlterModelManagers( + name='user', + managers=[ + ('objects', blango_auth.models.BlangoUserManager()), + ], + ), + migrations.RemoveField( + model_name='user', + name='username', + ), + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(max_length=254, unique=True, verbose_name='email address'), + ), + ] diff --git a/blango_auth/migrations/__init__.py b/blango_auth/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/blango_auth/migrations/__pycache__/0001_initial.cpython-36.pyc b/blango_auth/migrations/__pycache__/0001_initial.cpython-36.pyc new file mode 100644 index 0000000000..e82d900992 Binary files /dev/null and b/blango_auth/migrations/__pycache__/0001_initial.cpython-36.pyc differ diff --git a/blango_auth/migrations/__pycache__/0002_auto_20241004_0114.cpython-36.pyc b/blango_auth/migrations/__pycache__/0002_auto_20241004_0114.cpython-36.pyc new file mode 100644 index 0000000000..1a2733e7c5 Binary files /dev/null and b/blango_auth/migrations/__pycache__/0002_auto_20241004_0114.cpython-36.pyc differ diff --git a/blango_auth/migrations/__pycache__/__init__.cpython-36.pyc b/blango_auth/migrations/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000..18b23fbda3 Binary files /dev/null and b/blango_auth/migrations/__pycache__/__init__.cpython-36.pyc differ diff --git a/blango_auth/models.py b/blango_auth/models.py new file mode 100644 index 0000000000..0cc86e5f52 --- /dev/null +++ b/blango_auth/models.py @@ -0,0 +1,48 @@ +from django.db import models +from django.contrib.auth.models import AbstractUser, UserManager +from django.utils.translation import gettext_lazy as _ + + +# Create your models here. +class BlangoUserManager(UserManager): + def _create_user(self, email, password, **extra_fields): + if not email: + raise ValueError("Email must be set") + email = self.normalize_email(email) + user = self.model(email=email, **extra_fields) + user.set_password(password) + user.save(using=self._db) + return user + + def create_user(self, email, password=None, **extra_fields): + extra_fields.setdefault("is_staff", False) + extra_fields.setdefault("is_superuser", False) + return self._create_user(email, password, **extra_fields) + + def create_superuser(self, email, password, **extra_fields): + extra_fields.setdefault("is_staff", True) + extra_fields.setdefault("is_superuser", True) + + if extra_fields.get("is_staff") is not True: + raise ValueError("Superuser must have is_staff=True.") + if extra_fields.get("is_superuser") is not True: + raise ValueError("Superuser must have is_superuser=True.") + + return self._create_user(email, password, **extra_fields) + + + +class User(AbstractUser): + username = None + email = models.EmailField( + _("email address"), + unique=True, + ) + + objects = BlangoUserManager() + + USERNAME_FIELD = "email" + REQUIRED_FIELDS = [] + + def __str__(self): + return self.email \ No newline at end of file diff --git a/blango_auth/tests.py b/blango_auth/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/blango_auth/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/blango_auth/views.py b/blango_auth/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/blango_auth/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/blog/__pycache__/__init__.cpython-36.pyc b/blog/__pycache__/__init__.cpython-36.pyc index 28d144440d..625bbaf99a 100644 Binary files a/blog/__pycache__/__init__.cpython-36.pyc and b/blog/__pycache__/__init__.cpython-36.pyc differ diff --git a/blog/__pycache__/admin.cpython-36.pyc b/blog/__pycache__/admin.cpython-36.pyc index 52894ccc47..0abc4240a8 100644 Binary files a/blog/__pycache__/admin.cpython-36.pyc and b/blog/__pycache__/admin.cpython-36.pyc differ diff --git a/blog/__pycache__/apps.cpython-36.pyc b/blog/__pycache__/apps.cpython-36.pyc index 700b1ea956..ee324884bf 100644 Binary files a/blog/__pycache__/apps.cpython-36.pyc and b/blog/__pycache__/apps.cpython-36.pyc differ diff --git a/blog/__pycache__/forms.cpython-36.pyc b/blog/__pycache__/forms.cpython-36.pyc index 110a2ff5ab..7c6290ad3a 100644 Binary files a/blog/__pycache__/forms.cpython-36.pyc and b/blog/__pycache__/forms.cpython-36.pyc differ diff --git a/blog/__pycache__/models.cpython-36.pyc b/blog/__pycache__/models.cpython-36.pyc index 9aa6aac25c..b7a3e1da4f 100644 Binary files a/blog/__pycache__/models.cpython-36.pyc and b/blog/__pycache__/models.cpython-36.pyc differ diff --git a/blog/__pycache__/views.cpython-36.pyc b/blog/__pycache__/views.cpython-36.pyc index 793ef53114..0d0e04316d 100644 Binary files a/blog/__pycache__/views.cpython-36.pyc and b/blog/__pycache__/views.cpython-36.pyc differ diff --git a/blog/admin.py b/blog/admin.py index 7449699dda..ffcebcb787 100644 --- a/blog/admin.py +++ b/blog/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from blog.models import Tag, Post, Comment +from blog.models import Tag, Post, Comment, AuthorProfile class PostAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ["title"]} @@ -7,4 +7,5 @@ class PostAdmin(admin.ModelAdmin): # Register your models here. admin.site.register(Tag) admin.site.register(Post, PostAdmin) -admin.site.register(Comment) \ No newline at end of file +admin.site.register(Comment) +admin.site.register(AuthorProfile) \ No newline at end of file diff --git a/blog/migrations/0006_authorprofile.py b/blog/migrations/0006_authorprofile.py new file mode 100644 index 0000000000..97c6cd0f4c --- /dev/null +++ b/blog/migrations/0006_authorprofile.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.6 on 2024-09-30 03:15 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('blog', '0005_auto_20240924_1811'), + ] + + operations = [ + migrations.CreateModel( + name='AuthorProfile', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('bio', models.TextField()), + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/blog/migrations/__pycache__/0001_initial.cpython-36.pyc b/blog/migrations/__pycache__/0001_initial.cpython-36.pyc index 1b00ded4ab..41a1160b08 100644 Binary files a/blog/migrations/__pycache__/0001_initial.cpython-36.pyc and b/blog/migrations/__pycache__/0001_initial.cpython-36.pyc differ diff --git a/blog/migrations/__pycache__/0002_comment.cpython-36.pyc b/blog/migrations/__pycache__/0002_comment.cpython-36.pyc index 965748ea7d..8bd93d9d4d 100644 Binary files a/blog/migrations/__pycache__/0002_comment.cpython-36.pyc and b/blog/migrations/__pycache__/0002_comment.cpython-36.pyc differ diff --git a/blog/migrations/__pycache__/0003_auto_20240907_1018.cpython-36.pyc b/blog/migrations/__pycache__/0003_auto_20240907_1018.cpython-36.pyc index a53f61b1ed..5edab09f0b 100644 Binary files a/blog/migrations/__pycache__/0003_auto_20240907_1018.cpython-36.pyc and b/blog/migrations/__pycache__/0003_auto_20240907_1018.cpython-36.pyc differ diff --git a/blog/migrations/__pycache__/0004_alter_post_published_at.cpython-36.pyc b/blog/migrations/__pycache__/0004_alter_post_published_at.cpython-36.pyc index 88652849a6..71f1a40697 100644 Binary files a/blog/migrations/__pycache__/0004_alter_post_published_at.cpython-36.pyc and b/blog/migrations/__pycache__/0004_alter_post_published_at.cpython-36.pyc differ diff --git a/blog/migrations/__pycache__/0005_auto_20240924_1811.cpython-36.pyc b/blog/migrations/__pycache__/0005_auto_20240924_1811.cpython-36.pyc index 2b19a8213c..8ee75feb27 100644 Binary files a/blog/migrations/__pycache__/0005_auto_20240924_1811.cpython-36.pyc and b/blog/migrations/__pycache__/0005_auto_20240924_1811.cpython-36.pyc differ diff --git a/blog/migrations/__pycache__/0006_authorprofile.cpython-36.pyc b/blog/migrations/__pycache__/0006_authorprofile.cpython-36.pyc new file mode 100644 index 0000000000..52badc5066 Binary files /dev/null and b/blog/migrations/__pycache__/0006_authorprofile.cpython-36.pyc differ diff --git a/blog/migrations/__pycache__/__init__.cpython-36.pyc b/blog/migrations/__pycache__/__init__.cpython-36.pyc index 0b937468d8..d6ff0eb352 100644 Binary files a/blog/migrations/__pycache__/__init__.cpython-36.pyc and b/blog/migrations/__pycache__/__init__.cpython-36.pyc differ diff --git a/blog/models.py b/blog/models.py index 285e0953a3..bdfb5acadc 100644 --- a/blog/models.py +++ b/blog/models.py @@ -36,3 +36,11 @@ def __str__(self): return self.title +class AuthorProfile(models.Model): + user = models.OneToOneField( + settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name="profile" + ) + bio = models.TextField() + + def __str__(self): + return f"{self.__class__.__name__} object for {self.user}" \ No newline at end of file diff --git a/blog/templatetags/__pycache__/__init__.cpython-36.pyc b/blog/templatetags/__pycache__/__init__.cpython-36.pyc index 98b3515689..09cb2032ff 100644 Binary files a/blog/templatetags/__pycache__/__init__.cpython-36.pyc and b/blog/templatetags/__pycache__/__init__.cpython-36.pyc differ diff --git a/blog/templatetags/__pycache__/blog_extras.cpython-36.pyc b/blog/templatetags/__pycache__/blog_extras.cpython-36.pyc index dbbcea6622..211956e180 100644 Binary files a/blog/templatetags/__pycache__/blog_extras.cpython-36.pyc and b/blog/templatetags/__pycache__/blog_extras.cpython-36.pyc differ diff --git a/data.json b/data.json new file mode 100644 index 0000000000..6814a1be2c --- /dev/null +++ b/data.json @@ -0,0 +1 @@ +[{"model": "blog.comment", "pk": 2, "fields": {"creator": 1, "content": "I like myself!", "content_type": 4, "object_id": 1, "created_at": "2024-09-07T13:35:22.696Z", "modified_at": "2024-09-07T13:35:22.713Z"}}, {"model": "blog.comment", "pk": 3, "fields": {"creator": 3, "content": "wonderfull!", "content_type": 8, "object_id": 1, "created_at": "2024-09-08T19:09:55.378Z", "modified_at": "2024-09-08T19:09:55.378Z"}}, {"model": "blog.comment", "pk": 4, "fields": {"creator": 3, "content": "great", "content_type": 8, "object_id": 2, "created_at": "2024-09-08T19:10:09.602Z", "modified_at": "2024-09-08T19:10:09.602Z"}}, {"model": "blog.comment", "pk": 5, "fields": {"creator": 3, "content": "Continue", "content_type": 8, "object_id": 1, "created_at": "2024-09-09T10:31:59.631Z", "modified_at": "2024-09-09T10:31:59.631Z"}}, {"model": "blog.tag", "pk": 1, "fields": {"value": "django"}}, {"model": "blog.post", "pk": 1, "fields": {"author": 2, "created_at": "2024-09-05T08:09:59.307Z", "modified_at": "2024-09-07T13:15:47.999Z", "published_at": "2024-09-05T08:08:42Z", "title": "An Example Post", "slug": "an-example-post", "summary": "A short example post", "content": "example", "tags": [1]}}, {"model": "blog.post", "pk": 2, "fields": {"author": 1, "created_at": "2024-09-07T11:41:00.421Z", "modified_at": "2024-09-07T11:41:00.421Z", "published_at": "2024-09-07T11:31:34Z", "title": "No Pain No Gain", "slug": "no-pain-no-gain", "summary": "just make your best and all will be fine", "content": "Tell me why\r\nShould I let you go, go, go, go\r\nYou know I love you so, so, so, so\r\nThat's why I am here tonight\r\nSo put your hands up\r\nWhy shouldn't I flow, flow, flow, flow?\r\nAnd pump it up on stereo, oh, oh, oh, oh\r\nIt's time to stomp on five\r\n\r\nLadies and gentlemen, the 89ers are back, come on, let's go!\r\n\r\n(Whoo-oo)\r\n(Whoo-oo)\r\n(Whoo-oo)\r\n(Whoo-oo)\r\n\r\nThis song's for you and that's no lie\r\nYou can't imagine, how hard I really try\r\nTo satisfy you everyday\r\nAnd all that you do is coming at me\r\nYou doing it like a killer-bee\r\nHey, hey, it's alright\r\nWe have to stop our feeling-fight\r\nOh, oh, you take my hand\r\n89ers is a punk tend band\r\n\r\nPlease tell me why should I let you go, go, go, go\r\nBecause I love you so, so, so, so\r\nThat's why I'm here tonight\r\nSo put your hands up\r\nWhy shouldn't I let it flow flow flow?\r\nAnd pump it up the stereo, oh, oh, oh, oh\r\nIt's time to stop the fight!\r\n\r\nCome with me, let's go for a ride\r\nFollow me to the brighter side\r\nPretty girl, just look around\r\nThat everybody is jumping around to the 89ers sound\r\nHey, hey, what's that noise?\r\nRushing into ears of the girls and the boys\r\nOh, oh, enjoy the show\r\nThat the 89ers never punchline flow\r\n\r\nPlease tell me why should I let you go, go, go, go\r\nBecause I love you so, so, so, so\r\nThat's why I'm here tonight\r\nSo put your hands up\r\nWhy shouldn't I let it flow flow flow?\r\nAnd pump it up the stereo, oh, oh, oh\r\nIt's time to stop the fight!\r\n\r\n(Whoo-oo)\r\n(Whoo-oo)\r\n(Whoo-oo)\r\n(Whoo-oo)\r\n\r\nPlease tell me why should I let you go, go, go, go\r\nBecause I love you so, so, so, so\r\nThat's why I'm here tonight\r\nSo put your hands up\r\nWhy shouldn't I let it flow flow flow?\r\nAnd pump it up the stereo, oh, oh, oh\r\nIt's time to stop the fight!\r\n\r\n\r\nAdd to favorites\r\n\r\nAdd to playlist\r\n\r\nFont size\r\nTab\r\nPrint\r\nCorrect\r\n\r\nAuto-scroll", "tags": [1]}}, {"model": "blango_auth.user", "pk": 1, "fields": {"password": "pbkdf2_sha256$260000$o7DTh9eqqv0EimHkzb9BOM$0MliSxvL/HwG67CapZpOYf76V+tcWO5Us5YhznhOFnU=", "last_login": "2024-09-07T11:31:15Z", "is_superuser": true, "username": "Zoldycks", "first_name": "Hunter", "last_name": "Silva", "email": "ahmediizekry@gmail.com", "is_staff": true, "is_active": true, "date_joined": "2024-09-05T08:06:01Z", "groups": [], "user_permissions": []}}, {"model": "blango_auth.user", "pk": 2, "fields": {"password": "pbkdf2_sha256$260000$SXwqKRlvz3IboAkJygYyld$aIRu0FUj6qNJ59iAUNiP6nmWrU9L8nrOJGZGoqA3jyM=", "last_login": null, "is_superuser": false, "username": "codio", "first_name": "Ahmed", "last_name": "ibrahim", "email": "ahmedzekry@gmail.com", "is_staff": false, "is_active": true, "date_joined": "2024-09-07T13:14:21Z", "groups": [], "user_permissions": []}}, {"model": "blango_auth.user", "pk": 3, "fields": {"password": "pbkdf2_sha256$260000$ETPMU7VEJhLYaYU5AbjP9Y$2BMh0e9+fssUx1uWvF+Y74b5bZn/jkehc7zBLJJQk5w=", "last_login": "2024-09-08T19:09:22.333Z", "is_superuser": true, "username": "ahmed", "first_name": "", "last_name": "", "email": "example@gmail.com", "is_staff": true, "is_active": true, "date_joined": "2024-09-08T19:08:33.694Z", "groups": [], "user_permissions": []}}, {"model": "blango_auth.user", "pk": 4, "fields": {"password": "argon2$argon2id$v=19$m=102400,t=2,p=8$cTFXSzlYY014STRZQ01iY0RqSWxpNg$TtwXCIdBCNiwXF1UQ22yvA", "last_login": "2024-09-24T16:33:07.475Z", "is_superuser": true, "username": "Zoldyck", "first_name": "", "last_name": "", "email": "example@gmail.com", "is_staff": true, "is_active": true, "date_joined": "2024-09-17T15:42:15.364Z", "groups": [], "user_permissions": []}}] \ No newline at end of file diff --git a/db.sqlite3 b/db.sqlite3 index c3780be986..09d95131aa 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/templates/blog/post-detail.html b/templates/blog/post-detail.html index a87e0deb0b..50bd49b676 100644 --- a/templates/blog/post-detail.html +++ b/templates/blog/post-detail.html @@ -9,11 +9,21 @@

{{ post.title }}

{% include "blog/post-byline.html" %} {% endrow %} + +{% if post.author.profile %} + {% row %} + {% col %} +

About the author

+

{{ post.author.profile.bio }}

+ {% endcol %} + {% endrow %} +{% endif %} {% row %}
{{ post.content|safe }}
{% endrow %} + {% include "blog/post-comments.html" %} {% row %} {% col %}