-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from hungpham3112/front_end_nightly
Front end nightly
- Loading branch information
Showing
1,268 changed files
with
840 additions
and
290 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -13,6 +13,15 @@ | |
import os | ||
from pathlib import Path | ||
from django.utils.translation import gettext_lazy as _ | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
# 2023-05-02 10:39 phamhung20022015 | ||
# [Note]: Lưu ý các đoạn code được comment ở dưới là optional | ||
# vi lý do hầu hết là khiến hiệu năng của trang giảm nên phải | ||
# tắt đi, trong tương lai nếu muốn active thì cần nghiên cứu kĩ lại | ||
# để tránh làm hỏng code cũ. | ||
|
||
env = environ.Env( | ||
# set casting, default value | ||
|
@@ -39,6 +48,8 @@ | |
|
||
ALLOWED_HOSTS = ["*"] | ||
|
||
WSGI_APPLICATION = 'vercel_app.wsgi.app' | ||
|
||
# Application definition | ||
|
||
INSTALLED_APPS = [ | ||
|
@@ -151,43 +162,52 @@ | |
|
||
# Default primary key field type | ||
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field | ||
# Prevent add uploads file to the repo | ||
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] | ||
|
||
MEDIA_URL = "/media/" | ||
MEDIA_ROOT = os.path.join(BASE_DIR, "static/uploads") | ||
|
||
# Supporting for forever-cacheable files and compression | ||
# More details: https://whitenoise.readthedocs.io/en/stable/django.html | ||
# [Note]: 2023-04-29 14:02 [email protected] | ||
# Enable storage will fail `python manage.py test` | ||
# STORAGES = { | ||
# 2023-04-29 14:02 [email protected] | ||
# [Note]: Enable storage will fail `python manage.py test` | ||
# STORAGES = { | ||
# "staticfiles": { | ||
# "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage", | ||
# }, | ||
# } | ||
|
||
# Rich text editor with ckeditor | ||
CKEDITOR_UPLOAD_PATH = "uploads/" | ||
|
||
CKEDITOR_CONFIGS = { | ||
"default": {"toolbar": "full", "height": 300, "width": "100%"}, | ||
} | ||
|
||
CKEDITOR_STORAGE_BACKEND = "django.core.files.storage.FileSystemStorage" | ||
|
||
|
||
# production | ||
if ENVIRONMENT == "production": | ||
DEBUG = False | ||
SECURE_BROWSER_XSS_FILTER = True # prevent cross-site scripting(XSS) attack | ||
X_FRAME_OPTIONS = "DENY" # prevent clickjacking attack | ||
SECURE_HSTS_SECONDS = 3600 | ||
SECURE_HSTS_INCLUDE_SUBDOMAINS = ( | ||
True # force any subdomains to also exclusively use SSL | ||
) | ||
SECURE_HSTS_PRELOAD = True | ||
# SECURE_HSTS_SECONDS = 3600 | ||
# SECURE_HSTS_INCLUDE_SUBDOMAINS = ( | ||
# True # force any subdomains to also exclusively use SSL | ||
# ) | ||
# SECURE_HSTS_PRELOAD = True | ||
SECURE_CONTENT_TYPE_NOSNIFF = True | ||
SESSION_COOKIE_SECURE = True | ||
CSRF_COOKIE_SECURE = True | ||
# CSRF_COOKIE_SECURE = True | ||
CSRF_TRUSTED_ORIGINS = ["https://*.railway.app", "https://www.*.railway.app", "https://*.onrender.com", | ||
"https://www.*.onrender.com"] | ||
|
||
# [Note]: 2023-04-29 13:43 [email protected] | ||
# Khi triển khai trang lên server thì 2 tùy chỉnh dưới đây sẽ tăng bảo mật nhưng sẽ đánh đổi | ||
# về mặt độ trễ khi chuyển trang. Trong trường hợp yêu cầu cao về bảo mật ko thì False | ||
# về mặt độ trễ khi chuyển trang. Trong trường hợp yêu cầu cao về bảo mật nếu ko thì nên False | ||
# để giúp trang load nhanh hơn. | ||
# SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") # prevent browsers from using the website on insecure HTTP connections. | ||
# SECURE_SSL_REDIRECT = True # force all non-HTTPS traffic to be redirected to HTTPS | ||
|
||
|
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
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.