Compare commits

..

3 commits

5 changed files with 1051 additions and 1057 deletions

View file

@ -3,7 +3,7 @@
<article class="h-entry media"> <article class="h-entry media">
{{i}}<aside class="info"> {{i}}<aside class="info">
{{i}}<a class="p-author h-card" href="{{ entry.author.url }}"> {{i}}<a class="p-author h-card" href="{{ entry.author.url }}">
{{i}}<img class="u-photo img-fluid" src="{{ entry.author.avatar.url }}" alt="{{ entry.author.name }}" /> {{i}}{% if entry.author.avatar %}<img class="u-photo img-fluid" src="{{ entry.author.avatar.url }}" alt="{{ entry.author.name }}" />{% endif %}
{{i}}<span class="p-name sr-only">{{ entry.author.name }}</span> {{i}}<span class="p-name sr-only">{{ entry.author.name }}</span>
{{i}}</a> {{i}}</a>
{{i}}<a class="u-uid u-url" href="{{ entry.url }}"> {{i}}<a class="u-uid u-url" href="{{ entry.url }}">

View file

@ -154,7 +154,6 @@ CACHES = {
"LOCATION": "redis://127.0.0.1:6380/0", "LOCATION": "redis://127.0.0.1:6380/0",
"KEY_PREFIX": "lemoncurry", "KEY_PREFIX": "lemoncurry",
"OPTIONS": { "OPTIONS": {
"PARSER_CLASS": "redis.connection.HiredisParser",
"SERIALIZER": "lemoncurry.msgpack.MSGPackModernSerializer", "SERIALIZER": "lemoncurry.msgpack.MSGPackModernSerializer",
}, },
"VERSION": 2, "VERSION": 2,

2099
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -48,7 +48,7 @@ pyyaml = "*"
qrcode = "*" qrcode = "*"
ronkyuu = "*" ronkyuu = "*"
xrd = "*" xrd = "*"
greenlet = "^2.0.2" greenlet = "*"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
mypy = "*" mypy = "*"

View file

@ -128,7 +128,7 @@ class User(ModelMeta, AbstractUser):
@property @property
def avatar_url(self): def avatar_url(self):
return self.avatar.url return self.avatar.url if self.avatar else None
@cached_property @cached_property
def facebook_id(self): def facebook_id(self):
@ -154,7 +154,7 @@ class User(ModelMeta, AbstractUser):
"url": self.full_url, "url": self.full_url,
"name": self.name, "name": self.name,
"email": self.email, "email": self.email,
"image": urljoin(base, self.avatar.url), "image": urljoin(base, self.avatar.url) if self.avatar else None,
"givenName": self.first_name, "givenName": self.first_name,
"familyName": self.last_name, "familyName": self.last_name,
"sameAs": [profile.url for profile in self.profiles.all()], "sameAs": [profile.url for profile in self.profiles.all()],