-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
841 changed files
with
172,330 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,3 +56,7 @@ docs/_build/ | |
|
||
# PyBuilder | ||
target/ | ||
|
||
\.idea/ | ||
|
||
\.DS_Store |
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,21 @@ | ||
language: python | ||
sudo: enabled | ||
python: | ||
- "3.5" | ||
- "3.6" | ||
- "3.6-dev" # 3.6 development branch | ||
- "3.7-dev" # 3.7 development branch | ||
env: | ||
global: | ||
- TRAVIS=true | ||
# command to install dependencies | ||
before_script: | ||
- cd ran-django-template | ||
- python manage.py makemigrations | ||
- python manage.py migrate | ||
- python manage.py collectstatic --noinput | ||
install: | ||
- pip install -r requirements.txt | ||
|
||
script: | ||
python manage.py test |
Empty file.
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,173 @@ | ||
""" | ||
Django settings for Blog project. | ||
Generated by 'django-admin startproject' using Django 2.0.7. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/2.0/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/2.0/ref/settings/ | ||
""" | ||
|
||
import os | ||
from django.core.mail import send_mail | ||
|
||
# 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/2.0/howto/deployment/checklist/ | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = '^+k&w#tjwa+0dhg5i+krp6b8+$6(0sk_6e4@upk#2jk730x28a' | ||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = True | ||
|
||
ALLOWED_HOSTS = ['*'] | ||
|
||
|
||
#Application definition | ||
# 基本设定 | ||
ACCOUNT_AUTHENTICATION_METHOD = 'username_email' | ||
ACCOUNT_EMAIL_REQUIRED = True | ||
LOGIN_REDIRECT_URL = '/accounts/profile/' | ||
|
||
AUTHENTICATION_BACKENDS = ( | ||
'django.contrib.auth.backends.ModelBackend', | ||
'allauth.account.auth_backends.AuthenticationBackend', | ||
) | ||
|
||
# # 邮箱设定 | ||
EMAIL_HOST = 'smtp.qq.com' | ||
EMAIL_PORT = 25 | ||
EMAIL_HOST_USER = '[email protected]' # 你的 QQ 账号和授权码 | ||
EMAIL_HOST_PASSWORD = 'fsuebzoaafnhbejh' | ||
EMAIL_USE_TLS = True # 这里必须是 True,否则发送不成功 | ||
EMAIL_FROM = '[email protected]'# 你的 QQ 账号 | ||
DEFAULT_FROM_EMAIL = 'Ziran.Gong<[email protected]>[email protected]' | ||
|
||
|
||
INSTALLED_APPS = [ | ||
'django.contrib.admin', | ||
'django.contrib.auth', | ||
'django.contrib.sites', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
'apps.gallery.apps.GalleryConfig', | ||
'allauth', | ||
'allauth.account', | ||
'allauth.socialaccount', | ||
'allauth.socialaccount.providers.github', | ||
'apps.blogs', | ||
'apps.qrcreate', | ||
'myauth', | ||
'widget_tweaks', | ||
'apps.myapp', | ||
'rest_framework', | ||
# 'account', | ||
] | ||
|
||
SITE_ID = 1 | ||
LOGIN_REDIRECT_URL = '/' | ||
EMAIL_BACKEND ='django.core.mail.backends.console.EmailBackend' | ||
|
||
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', | ||
] | ||
|
||
ROOT_URLCONF = 'Blog.urls' | ||
|
||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
# 'DIRS': ['Blog/templates'], | ||
'DIRS': [os.path.join(BASE_DIR, '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', | ||
|
||
|
||
], | ||
}, | ||
}, | ||
] | ||
|
||
WSGI_APPLICATION = 'Blog.wsgi.application' | ||
|
||
|
||
# Database | ||
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), | ||
} | ||
} | ||
|
||
|
||
# Password validation | ||
# https://docs.djangoproject.com/en/2.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/2.0/topics/i18n/ | ||
|
||
LANGUAGE_CODE = 'en-us' | ||
|
||
TIME_ZONE = 'UTC' | ||
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
|
||
USE_TZ = True | ||
|
||
|
||
# Static files (CSS, JavaScript, Images) | ||
# https://docs.djangoproject.com/en/2.0/howto/static-files/ | ||
STATICFILES_DIRS = [ | ||
os.path.join(BASE_DIR, 'Blog/static/'), | ||
] | ||
|
||
STATIC_URL = '/static/' | ||
|
||
STATIC_ROOT = os.path.join(BASE_DIR, 'static') | ||
|
||
MEDIA_URL = '/media/' | ||
|
||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') | ||
|
||
# Face++ config | ||
API_KEY = 'GseLmFPc_PRfnjUfPkZ1lmOy_z2dwiv8' | ||
API_SECRET = 's3S80XFyQJrDDvc6NVF4sPPT7btnq-WD' |
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,99 @@ | ||
body{ | ||
font-family:Arial; | ||
} | ||
#header{ | ||
margin:0 auto; | ||
width:100%; | ||
text-align:center; | ||
} | ||
|
||
#header h1{ | ||
font-size:40px; | ||
font-weight:bold; | ||
|
||
left: 0px; | ||
top: 0px; | ||
} | ||
|
||
#newGameBtn{ | ||
margin:20px auto; | ||
|
||
width:100px; | ||
padding:10px 10px; | ||
|
||
background-color:#8f7a66; | ||
color:#fff; | ||
border-radius:10px; | ||
text-decoration:none; | ||
} | ||
|
||
#newGameBtn:hover{ | ||
background-color:#9f8b77; | ||
} | ||
|
||
#header p{ | ||
font-size:20px; | ||
margin:20px; | ||
} | ||
|
||
#game-pane{ | ||
width: 460px; | ||
height: 460px; | ||
padding: 20px; | ||
|
||
margin:0px auto; | ||
background-color:#bbada0; | ||
|
||
border-radius:10px; | ||
position: relative; | ||
} | ||
|
||
#game-pane .cell{ | ||
width:100px; | ||
height:100px; | ||
|
||
border-radius:6px; | ||
background-color:#ccc0b3; | ||
|
||
position:absolute; | ||
} | ||
|
||
#game-pane .number-cell{ | ||
|
||
border-radius:6px; | ||
|
||
font-size:60px; | ||
text-align:center; | ||
line-height:100px; | ||
font-weight:bold; | ||
|
||
position:absolute; | ||
} | ||
|
||
.over{ | ||
display: none; | ||
margin: 0 auto; | ||
background-color:#ccc0b3; | ||
text-align: center; | ||
border:1px solid #666666; | ||
border-radius:10px; | ||
left: 0px; | ||
top: 0px; | ||
position: absolute; | ||
} | ||
|
||
.over a{ | ||
padding: 10px; | ||
background-color:#8f7a66; | ||
color:#fff; | ||
font-weight: bold; | ||
font-size: 17px; | ||
border-radius:10px; | ||
text-decoration: none; | ||
} | ||
|
||
.over a:hover{ | ||
background-color:#9f8b77; | ||
} | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.