Skip to content

Commit ae53671

Browse files
authored
docs: add usersessions_list to sample_deployment (#106)
1 parent 486d6a3 commit ae53671

File tree

5 files changed

+25
-18
lines changed

5 files changed

+25
-18
lines changed

sample_deployment/poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sample_deployment/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ readme = "README.md"
77

88
[tool.poetry.dependencies]
99
python = "^3.11"
10-
django-allauth-ui = "^1.2.0"
10+
django-allauth-ui = "^1.3.0"
1111
gunicorn = "^22.0.0"
1212
django-allauth = "^0.63.3"
1313
django-widget-tweaks = "^1.5.0"

sample_deployment/sample_deployment/example/templates/example/home.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<li>
2626
<a href="{% url "account_reauthenticate" %}">Reauthenticate</a>
2727
</li>
28+
<li>
29+
<a href="{% url "usersessions_list" %}">User Sessions</a>
30+
</li>
2831
<li>
2932
<a href="{% url "account_logout" %}">Logout</a>
3033
</li>

sample_deployment/sample_deployment/example/templates/example/social_metadata.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
<div>
1212
You need to <a class="link" href="{% url "account_login" %}">log in</a> to display social account metadata
1313
</div>
14-
</div>
15-
{% endif %}
14+
{% endif %}
1615
{% endblock content %}

sample_deployment/sample_deployment/settings.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,28 @@
3636
# Application definition
3737

3838
INSTALLED_APPS = [
39+
"allauth_ui",
40+
"allauth",
41+
"allauth.account",
42+
"allauth.socialaccount",
43+
"allauth.socialaccount.providers.github",
44+
"allauth.socialaccount.providers.gitlab",
45+
"allauth.usersessions",
3946
"django.contrib.admin",
4047
"django.contrib.auth",
4148
"django.contrib.contenttypes",
42-
"django.contrib.sessions",
49+
"django.contrib.humanize",
4350
"django.contrib.messages",
44-
"whitenoise.runserver_nostatic",
51+
"django.contrib.sessions",
4552
"django.contrib.staticfiles",
53+
"django_browser_reload",
4654
"django_extensions",
4755
"sample_deployment.example",
48-
"allauth_ui",
49-
"allauth",
50-
"allauth.account",
51-
"allauth.socialaccount",
52-
"allauth.socialaccount.providers.github",
53-
"allauth.socialaccount.providers.gitlab",
54-
"widget_tweaks",
55-
"tailwind",
5656
"sample_deployment.theme",
57-
"django_browser_reload",
5857
"slippers",
58+
"tailwind",
59+
"whitenoise.runserver_nostatic",
60+
"widget_tweaks",
5961
]
6062

6163
MIDDLEWARE = [
@@ -65,6 +67,7 @@
6567
"django.middleware.common.CommonMiddleware",
6668
"django.middleware.csrf.CsrfViewMiddleware",
6769
"django.contrib.auth.middleware.AuthenticationMiddleware",
70+
"allauth.usersessions.middleware.UserSessionsMiddleware",
6871
"django.contrib.messages.middleware.MessageMiddleware",
6972
"django.middleware.clickjacking.XFrameOptionsMiddleware",
7073
"django_browser_reload.middleware.BrowserReloadMiddleware",
@@ -213,3 +216,5 @@
213216
"level": "INFO",
214217
},
215218
}
219+
220+
USERSESSIONS_TRACK_ACTIVITY = True

0 commit comments

Comments
 (0)