diff --git a/src/asiimov/settings.py b/src/asiimov/settings.py index 89e282e..772dab6 100644 --- a/src/asiimov/settings.py +++ b/src/asiimov/settings.py @@ -27,7 +27,6 @@ ALLOWED_HOSTS = [] # Application definition - INSTALLED_APPS = [ 'core', 'django.contrib.admin', @@ -71,7 +70,6 @@ WSGI_APPLICATION = 'asiimov.wsgi.application' # Database # https://docs.djangoproject.com/en/3.0/ref/settings/#databases - DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', @@ -82,7 +80,6 @@ DATABASES = { # Password validation # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators - AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', @@ -101,7 +98,6 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/3.0/topics/i18n/ - LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True @@ -119,3 +115,10 @@ STATICFILES_DIRS = [ # Steam API variables STEAM_API_KEY = os.environ['STEAM_API_KEY'] + +# Redirect for users to login +LOGIN_URL = 'signup' +# Redirect after login +LOGIN_REDIRECT_URL = 'me' +# Redirect after logout +LOGOUT_REDIRECT_URL = 'home' diff --git a/src/asiimov/urls.py b/src/asiimov/urls.py index 82b67d9..734ea78 100644 --- a/src/asiimov/urls.py +++ b/src/asiimov/urls.py @@ -15,8 +15,10 @@ Including another URLconf """ from django.contrib import admin from django.urls import path, include +from django.contrib.auth.views import LogoutView urlpatterns = [ path('', include('core.urls')), - path('admin/', admin.site.urls) + path('admin/', admin.site.urls), + path('logout/', LogoutView.as_view(template_name='logout.html'), name='logout') ] diff --git a/src/common/static_files/css/profile.css b/src/common/static_files/css/profile.css new file mode 100644 index 0000000..01d40ba --- /dev/null +++ b/src/common/static_files/css/profile.css @@ -0,0 +1,3 @@ +.content_block{ + text-align: center; +} diff --git a/src/common/templates/master.html b/src/common/templates/master.html index 0125f90..66ca612 100644 --- a/src/common/templates/master.html +++ b/src/common/templates/master.html @@ -13,6 +13,7 @@ + {% block header %}{% endblock %} @@ -22,7 +23,7 @@