Skip to content

Commit

Permalink
Merge pull request #44 from Vincent-Cui/main
Browse files Browse the repository at this point in the history
add mailinglist
  • Loading branch information
Pengyu-gis authored Jan 8, 2024
2 parents 44a04f3 + 07f81bd commit 3915c04
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
20 changes: 20 additions & 0 deletions nextServer/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
'apps.post',
'accounts',
'knox',
'django.contrib.sites',
'sorl.thumbnail',
'mailinglist',
]
if DEBUG:
INSTALLED_APPS += ['drf_yasg']
Expand All @@ -69,6 +72,8 @@

ROOT_URLCONF = 'nextServer.urls'

SITE_ID = 1# Adjust this ID based on your site's ID in the database

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
Expand All @@ -87,6 +92,8 @@

WSGI_APPLICATION = 'nextServer.wsgi.application'

NEWSLETTER_THUMBNAIL = 'sorl-thumbnail'

# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases

Expand Down Expand Up @@ -156,6 +163,19 @@
],
}

# email SMTP setting
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp-mail.outlook.com' # or your Outlook SMTP server address
EMAIL_PORT = 587 # Outlook SMTP port
EMAIL_USE_TLS = True # Use TLS encryption
EMAIL_HOST_USER = '[email protected]' # Your Outlook email address
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD') # Your Outlook email password or app password
DEFAULT_FROM_EMAIL = '[email protected]'

MAILINGLIST_BASE_URL = "https://www.gisphere.info" # NO TRAILING SLASH PLEASE
MAILINGLIST_DEFAULT_SENDER_EMAIL = "[email protected]"


# LOGGING_DIR = BASE_DIR.joinpath("logs")
# debug_log_dir = LOGGING_DIR / "debug"
# info_log_dir = LOGGING_DIR / "info"
Expand Down
1 change: 1 addition & 0 deletions nextServer/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
path('api/', include("apps.post.urls")),
path('api/', include("apps.school.urls")),
path('', include('accounts.urls')),
path("mailinglist/", include("mailinglist.urls", namespace="mailinglist")),
]
if settings.DEBUG:
urlpatterns += [path('', include('app.apis.swagger.urls')),
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ PyMySQL==1.0.2
pytz==2022.1
sqlparse==0.4.2
django-rest-knox==4.2.0
drf_yasg==1.21.4
drf_yasg==1.21.4
django-mailinglist==0.1.5
sorl-thumbnail==12.10.0

0 comments on commit 3915c04

Please sign in to comment.