-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'main' into 'achievements_page'
Signed-off-by: Nishant Nayak <[email protected]>
- Loading branch information
1 parent
1705e05
commit 8f803ca
Showing
68 changed files
with
3,558 additions
and
9 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
corpus/accounts/migrations/0005_alter_executivemember_date_joined_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Generated by Django 4.2.7 on 2024-03-21 05:30 | ||
import datetime | ||
|
||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("accounts", "0004_alter_executivemember_date_joined"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="executivemember", | ||
name="date_joined", | ||
field=models.DateTimeField( | ||
default=datetime.datetime( | ||
2024, 3, 21, 5, 30, 54, 960770, tzinfo=datetime.timezone.utc | ||
), | ||
verbose_name="Date Joined", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="executivemember", | ||
name="github", | ||
field=models.CharField( | ||
blank=True, max_length=39, null=True, verbose_name="GitHub Username" | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ | |
import os | ||
from pathlib import Path | ||
|
||
import sentry_sdk | ||
from django.core.exceptions import ImproperlyConfigured | ||
|
||
if os.getenv("LIVECYCLE"): | ||
from dotenv import load_dotenv | ||
|
||
|
@@ -51,6 +54,8 @@ | |
"django.contrib.sessions", | ||
"django.contrib.messages", | ||
"django.contrib.staticfiles", | ||
"ckeditor", | ||
"ckeditor_uploader", | ||
"pages.apps.PagesConfig", | ||
"config.apps.ConfigConfig", | ||
"accounts.apps.AccountsConfig", | ||
|
@@ -59,6 +64,8 @@ | |
"electrika.apps.ElectrikaConfig", | ||
"skyward_expedition.apps.SkywardExpeditionConfig", | ||
"robotrix.apps.RobotrixConfig", | ||
"farewell.apps.FarewellConfig", | ||
"virtual_expo.apps.VirtualExpoConfig", | ||
] | ||
|
||
MIDDLEWARE = [ | ||
|
@@ -164,6 +171,10 @@ | |
AUTHENTICATION_BACKENDS = [ | ||
"accounts.backend.CorpusAuthBackend", | ||
] | ||
|
||
# Reset Timeout in seconds. 1 day | ||
PASSWORD_RESET_TIMEOUT = 86400 | ||
|
||
LOGIN_URL = "/accounts/login" | ||
LOGIN_REDIRECT_URL = "/" | ||
LOGOUT_URL = "" | ||
|
@@ -172,11 +183,125 @@ | |
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") | ||
|
||
# Email Settings | ||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" | ||
EMAIL_HOST = os.getenv("EMAIL_HOST", "smtp.gmail.com") | ||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER", "[email protected]") | ||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD", "gmailapppassword") | ||
EMAIL_PROTOCOL = os.getenv("EMAIL_PROTOCOL", "console") | ||
|
||
EMAIL_BACKEND = f"django.core.mail.backends.{EMAIL_PROTOCOL}.EmailBackend" | ||
EMAIL_HOST = os.environ.get("EMAIL_HOST", "smtp.gmail.com") | ||
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER", "[email protected]") | ||
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", "gmailapppassword") | ||
EMAIL_PORT = 465 | ||
EMAIL_USE_SSL = True | ||
|
||
USE_TAILWIND_CDN_LINK = os.getenv("LIVECYCLE") is not None | ||
|
||
SENTRY_DSN = os.environ.get("SENTRY_DSN") | ||
if os.getenv("ENVIRONMENT", "PRODUCTION") == "PRODUCTION": | ||
try: | ||
sentry_sdk.init( | ||
dsn=SENTRY_DSN, | ||
# Set traces_sample_rate to 1.0 to capture 100% | ||
# of transactions for performance monitoring. | ||
traces_sample_rate=1.0, | ||
# Set profiles_sample_rate to 1.0 to profile 100% | ||
# of sampled transactions. | ||
# We recommend adjusting this value in production. | ||
profiles_sample_rate=1.0, | ||
enable_tracing=True, | ||
) | ||
except Exception: | ||
raise ImproperlyConfigured("Django Sentry DSN Not found!") | ||
|
||
CKEDITOR_UPLOAD_PATH = "ckeditor_uploads/" | ||
CKEDITOR_RESTRICT_BY_USER = True | ||
CKEDITOR_CONFIGS = { | ||
"default": { | ||
"toolbar_DefaultToolbarConfig": [ | ||
{ | ||
"name": "format", | ||
"items": [ | ||
"Format", | ||
], | ||
}, | ||
{ | ||
"name": "extra", | ||
"items": [ | ||
"Link", | ||
"Unlink", | ||
"Blockquote", | ||
"Image", | ||
"Table", | ||
"CodeSnippet", | ||
"Mathjax", | ||
"Embed", | ||
], | ||
}, | ||
{ | ||
"name": "source", | ||
"items": [ | ||
"Maximize", | ||
"Source", | ||
], | ||
}, | ||
{ | ||
"name": "basicstyles", | ||
"items": [ | ||
"Bold", | ||
"Italic", | ||
"Underline", | ||
"Strike", | ||
"Subscript", | ||
"Superscript", | ||
], | ||
}, | ||
{ | ||
"name": "clipboard", | ||
"items": [ | ||
"Undo", | ||
"Redo", | ||
], | ||
}, | ||
{ | ||
"name": "paragraph", | ||
"items": [ | ||
"NumberedList", | ||
"BulletedList", | ||
"Outdent", | ||
"Indent", | ||
"HorizontalRule", | ||
"JustifyLeft", | ||
"JustifyCenter", | ||
"JustifyRight", | ||
"JustifyBlock", | ||
], | ||
}, | ||
], | ||
"toolbar": "DefaultToolbarConfig", | ||
"removeDialogTabs": ";".join( | ||
[ | ||
"image:advanced", | ||
"image:Link", | ||
"link:upload", | ||
"table:advanced", | ||
"tableProperties:advanced", | ||
] | ||
), | ||
"linkShowTargetTab": False, | ||
"linkShowAdvancedTab": False, | ||
"height": "250px", | ||
"width": "auto", | ||
"forcePasteAsPlainText ": True, | ||
"mathJaxClass": "mathjax-latex", | ||
"mathJaxLib": """ | ||
https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_SVG | ||
""", | ||
"extraPlugins": ",".join( | ||
[ | ||
"mathjax", | ||
"codesnippet", | ||
"image2", | ||
"embed", | ||
"tableresize", | ||
] | ||
), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.