Notes
Notes - notes.io |
Django settings for booctop project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
from django.utils.translation import ugettext_lazy as _
from django.core.paginator import Paginator
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'nrt8ic@)p68r!c*%4v0$r=cg2a!@mf#jrye54)s%6&djxl*42k'
# SECURITY WARNING: don't run with debug turned on in production!
# DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
# EMAIL_HOST_USER = '[email protected]'
# EMAIL_HOST_USER = '[email protected]'
# EMAIL_HOST_PASSWORD = 'booctepgmailcom1011'
# EMAIL_HOST_PASSWORD = 'parshotam@g'
EMAIL_HOST_PASSWORD = 'daoatkhaiteaiso123'
EMAIL_PORT = 587
# Application definition
INSTALLED_APPS = [
'home',
'django.contrib.admin',
# 'django.contrib.admin.apps.SimpleAdminConfig',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'teacher',
'student',
'video',
'social_django',
'discount',
'paypal.standard.ipn',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
# multi language
'django.middleware.locale.LocaleMiddleware',
# social middleware
'social_django.middleware.SocialAuthExceptionMiddleware',
]
ROOT_URLCONF = 'booctop.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'booctop/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'social_django.context_processors.backends', # social signup
'social_django.context_processors.login_redirect', # and this
],
},
},
]
WSGI_APPLICATION = 'booctop.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
# }
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'booctop',
'USER': 'root',
'PASSWORD': '',
'HOST': '127.0.0.1', # Or an IP Address that your DB is hosted on
'PORT': '3306',
'OPTIONS': {
'sql_mode': 'traditional',
}
}
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'booctop',
# 'USER':'root',
# 'PASSWORD':'root',
# 'HOST':'127.0.0.1',
# 'PORT':'8889',
# 'OPTIONS': {
# 'charset': 'utf8mb4',
# 'use_unicode': True,
# }
# }
}
# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'ar'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# STATICFILES_DIRS = (
# os.path.normpath(os.path.join(BASE_DIR, '/booctop/static/')),
# )
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),
os.path.join(BASE_DIR, 'home/locale'),
os.path.join(BASE_DIR, 'teacher/locale'),
)
LANGUAGES = (
('en', _('English')),
('ar', _('Arabic')),
)
MULTILINGUAL_LANGUAGES = (
"en-us",
"ar",
)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
# STATIC_URL = '/static/'
# STATIC_ROOT = os.path.join(BASE_DIR, "booctop/static")
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "booctop/static"),
)
SESSION_COOKIE_AGE = 60 * 60 * 24 * 365 * 5 # set session expire time as 5 years
AUTH_USER_MODEL = 'home.User'
AUTHENTICATION_BACKENDS = [
'home.backends.EmailAuthBackend',
'social_core.backends.google.GoogleOAuth2',
# 'social_core.backends.linkedin.LinkedinOAuth2',
'social_core.backends.instagram.InstagramOAuth2',
# 'social_core.backends.facebook.FacebookOAuth2',
# 'django.contrib.auth.backends.ModelBackend',
'social_core.backends.twitter.TwitterOAuth',
'social_core.backends.facebook.FacebookOAuth2',
'django.contrib.auth.backends.ModelBackend',
]
# LOGIN_URL = 'login'
# LOGIN_REDIRECT_URL = 'home'
# LOGOUT_URL = 'logout'
# LOGOUT_REDIRECT_URL = 'login'
LOGIN_URL = 'login'
LOGOUT_URL = 'logout'
LOGIN_REDIRECT_URL = 'home'
SOCIAL_AUTH_FACEBOOK_KEY = '466816721163746' # App ID
SOCIAL_AUTH_FACEBOOK_SECRET = '2cf20f71ac45a3bb45d4b14214874e7e' # App Secret
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email', 'user_link'] # add this
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = { # add this
'fields': 'id, name, email, picture.type(large)'
}
SOCIAL_AUTH_FACEBOOK_EXTRA_DATA = [
('email', 'email'),
('picture', 'image'),
('1', 'group_id'),
]
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '920893339825-sgodnqb1t47rnqjnjs53lj2q58i4jks0.apps.googleusercontent.com'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '2Ni_BsKvrIxxbNOf4i4sf-50'
SOCIAL_AUTH_INSTAGRAM_KEY = '267910061521683' #Client ID
SOCIAL_AUTH_INSTAGRAM_SECRET = '95c0b482253e9eb434b35acfcdb106b5' #Client SECRET
# SOCIAL_AUTH_INSTAGRAM_EXTRA_DATA = [ ('user', 'user'),
# ]
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team