mirror of https://gitlab.com/brutaldon/brutaldon
Merge branch 'bugfix/cant-switch-accounts-after-old-login' into 'main'
Fix bug: can’t switch accounts after using old login mode See merge request brutaldon/brutaldon!13
This commit is contained in:
commit
e690896ed3
|
@ -165,7 +165,7 @@
|
|||
<div class="container">
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
Title
|
||||
Brutaldon
|
||||
</h1>
|
||||
<p class="subtitle">
|
||||
Brutaldon is totally a thing.
|
||||
|
|
|
@ -14,14 +14,15 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Brutaldon ({{ own_acct.username }}) - {{ timeline_name }} timelime</h1>
|
||||
{% if form %}
|
||||
<h1 class="title">Post</h1>
|
||||
<h2 class="title">Post</h2>
|
||||
<div class="box">
|
||||
{% include "main/post_minimal_partial.html" %}
|
||||
</div>
|
||||
<hr class="is-hidden">
|
||||
{% endif %}
|
||||
<h1 class="title">Your {{ timeline_name }} timeline</h1>
|
||||
<h2 class="title">Your {{ timeline_name }} timeline</h2>
|
||||
<div id="timeline">
|
||||
{% for toot in toots %}
|
||||
{% cache 600 toot_partial toot.id %}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<div class="media-content">
|
||||
<div class="content">
|
||||
<p>
|
||||
<strong>{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}</strong>
|
||||
<h3><strong>{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}</strong></h3>
|
||||
<small><a href="{% url "user" toot.account.acct %}">
|
||||
@{{ toot.account.acct }}</a></small>
|
||||
<a href="{{ toot.url }}">
|
||||
|
|
|
@ -583,6 +583,7 @@ def old_login(request):
|
|||
account.username = request.session["active_username"]
|
||||
request.session["timezone"] = account.preferences.timezone
|
||||
|
||||
account.save()
|
||||
accounts_dict = request.session.get("accounts_dict")
|
||||
if not accounts_dict:
|
||||
accounts_dict = {}
|
||||
|
@ -591,7 +592,6 @@ def old_login(request):
|
|||
"user": user,
|
||||
}
|
||||
request.session["accounts_dict"] = accounts_dict
|
||||
account.save()
|
||||
|
||||
return redirect(home)
|
||||
except IntegrityError:
|
||||
|
|
Loading…
Reference in New Issue