Beracles commited on
Commit
e898e8e
·
1 Parent(s): e9542a4
Files changed (3) hide show
  1. src/db.sqlite3 +0 -0
  2. src/pgsns/settings.py +17 -1
  3. src/pgsns/urls.py +5 -2
src/db.sqlite3 CHANGED
Binary files a/src/db.sqlite3 and b/src/db.sqlite3 differ
 
src/pgsns/settings.py CHANGED
@@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-vm2hnku(!sw8^v!^isb)=(+4cqoph5z)c8r=n#oy2&&ekorp_!
25
  # SECURITY WARNING: don't run with debug turned on in production!
26
  DEBUG = True
27
 
28
- ALLOWED_HOSTS = []
29
 
30
 
31
  # Application definition
@@ -37,9 +37,22 @@ INSTALLED_APPS = [
37
  'django.contrib.sessions',
38
  'django.contrib.messages',
39
  'django.contrib.staticfiles',
 
 
 
 
40
  'helloworld',
41
  ]
42
 
 
 
 
 
 
 
 
 
 
43
  MIDDLEWARE = [
44
  'django.middleware.security.SecurityMiddleware',
45
  'django.contrib.sessions.middleware.SessionMiddleware',
@@ -48,6 +61,9 @@ MIDDLEWARE = [
48
  'django.contrib.auth.middleware.AuthenticationMiddleware',
49
  'django.contrib.messages.middleware.MessageMiddleware',
50
  'django.middleware.clickjacking.XFrameOptionsMiddleware',
 
 
 
51
  ]
52
 
53
  ROOT_URLCONF = 'pgsns.urls'
 
25
  # SECURITY WARNING: don't run with debug turned on in production!
26
  DEBUG = True
27
 
28
+ ALLOWED_HOSTS = ['pgsoft-pgsns.hf.space']
29
 
30
 
31
  # Application definition
 
37
  'django.contrib.sessions',
38
  'django.contrib.messages',
39
  'django.contrib.staticfiles',
40
+
41
+ 'allauth',
42
+ 'allauth.account',
43
+ 'allauth.socialaccount',
44
  'helloworld',
45
  ]
46
 
47
+ AUTHENTICATION_BACKENDS = [
48
+ # Needed to login by username in Django admin, regardless of `allauth`
49
+ 'django.contrib.auth.backends.ModelBackend',
50
+
51
+ # `allauth` specific authentication methods, such as login by email
52
+ 'allauth.account.auth_backends.AuthenticationBackend',
53
+ ]
54
+
55
+
56
  MIDDLEWARE = [
57
  'django.middleware.security.SecurityMiddleware',
58
  'django.contrib.sessions.middleware.SessionMiddleware',
 
61
  'django.contrib.auth.middleware.AuthenticationMiddleware',
62
  'django.contrib.messages.middleware.MessageMiddleware',
63
  'django.middleware.clickjacking.XFrameOptionsMiddleware',
64
+
65
+ # Add the account middleware:
66
+ "allauth.account.middleware.AccountMiddleware",
67
  ]
68
 
69
  ROOT_URLCONF = 'pgsns.urls'
src/pgsns/urls.py CHANGED
@@ -15,9 +15,12 @@ Including another URLconf
15
  2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
16
  """
17
  from django.contrib import admin
18
- from django.urls import path
19
  from helloworld import views
 
 
20
  urlpatterns = [
21
  path('admin/', admin.site.urls),
22
- path('helloworld/', views.helloworld, name="helloworld")
 
23
  ]
 
15
  2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
16
  """
17
  from django.contrib import admin
18
+ from django.urls import path, include
19
  from helloworld import views
20
+
21
+
22
  urlpatterns = [
23
  path('admin/', admin.site.urls),
24
+ path('helloworld/', views.helloworld, name="helloworld"),
25
+ path('accounts/', include('allauth.urls')),
26
  ]