Prepare for public deployment

This commit is contained in:
R. Miles McCain
2020-04-14 15:18:45 -04:00
parent e04fbb3505
commit 73b8fc96d4
6 changed files with 52 additions and 9 deletions

View File

@@ -1,5 +1,11 @@
from django.apps import AppConfig
from django.conf import settings
class DashboardConfig(AppConfig):
name = 'dashboard'
def ready(self):
if not settings.ACCOUNT_SIGNUPS_ENABLED:
# Normally you'd do this in settings.py, but this must be done _after_ apps are enabled
from allauth.account.adapter import DefaultAccountAdapter
DefaultAccountAdapter.is_open_for_signup = lambda k, v: False

View File

@@ -8,6 +8,9 @@
{% block card %}
<form class="login" method="POST" action="{% url 'account_login' %}">
<aside class="aside ~info mb-4">
<p>Welcome to Shynet, a self-hosted analytics tool that's open source and privacy conscious. View the <a href="https://github.com/milesmcc/shynet">source code</a>.</p>
</aside>
{% csrf_token %}
{{ form|a17t }}
{% if redirect_field_value %}