From 8114763849ad3ea645dc73190a1574add0b13ff0 Mon Sep 17 00:00:00 2001 From: Zeliang Yao Date: Sat, 2 May 2020 12:56:52 +0200 Subject: [PATCH] Add Covid-19 --- db.sqlite3 | Bin 618496 -> 618496 bytes my_blog/settings.py | 16 ++++++++-------- requirements.txt | 23 +++-------------------- templates/base.html | 12 +++++++++++- templates/covid19/general.html | 3 --- templates/header.html | 12 ++++++------ templates/resume/resume.html | 15 +-------------- 7 files changed, 29 insertions(+), 52 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index aa1d5c7ba0659e21be58c4b97e7955d0769aa4e0..5b99db9472073922bb808c303be6fbc2e96ae7ec 100644 GIT binary patch delta 128 zcmZp8pxW?2b%HeGm5DOWj8`@$EQx1keP&bMXq+Fa$$)#;ra%xwJ1 zo7oG#^RX~6FsM#mpR3TURKH!Rp7GHHpp^S|b^#_uevq7eyN)~)5HkZY3lOscF&hxG XZ`YCMSnt5d(tanNWBZ+WP89(F4SpoE delta 128 zcmZp8pxW?2b%HeGrHL}mjF&bhEQx1kXAj!Up5V>S)@04a>f17TZLad>>hw+yW_G@R zo7oG#^RcKf`!Y^mpR3TURKH!Rp7GHHW_Es!?d$?fiu^2c%#MuhI`T|F%nZaVK+Fon aY(UJuT}Pf{y#ph2`<-}>?RVliRRjQJ8YSrf diff --git a/my_blog/settings.py b/my_blog/settings.py index dcdeb92..2176bcf 100644 --- a/my_blog/settings.py +++ b/my_blog/settings.py @@ -55,7 +55,7 @@ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', - # 'whitenoise.runserver_nostatic', # new! + 'whitenoise.runserver_nostatic', # new! 'django.contrib.staticfiles', ] @@ -71,7 +71,7 @@ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', - # 'whitenoise.middleware.WhiteNoiseMiddleware', # new! + 'whitenoise.middleware.WhiteNoiseMiddleware', # new! 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', @@ -230,8 +230,8 @@ -STATIC_URL = '/static/' -STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] +# STATIC_URL = '/static/' +# STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] # """Deploy setting @@ -242,7 +242,7 @@ # """ -# STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') # new -# STATIC_URL = '/static/' -# STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] -# STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' \ No newline at end of file +STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') # new +STATIC_URL = '/static/' +STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] +STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 2972659..045bc88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,5 @@ asgiref==3.2.7 -beautifulsoup4==4.9.0 -bs4==0.0.1 -certifi==2020.4.5.1 -chardet==3.0.4 -defusedxml==0.6.0 -Django==2.2 -django-allauth==0.41.0 +Django==3.0.5 django-appconf==1.0.4 django-ckeditor==5.9.0 django-crispy-forms==1.9.0 @@ -16,28 +10,17 @@ django-notifications-hq==1.6.0 django-password-reset==2.0 django-simpleui==3.9.1 django-taggit==1.2.0 -djangorestframework==3.11.0 -gunicorn==19.9.0 -idna==2.9 +gunicorn==20.0.4 jsonfield==3.1.0 -lxml==4.5.0 Markdown==3.2.1 numpy==1.18.3 -oauthlib==3.1.0 pandas==1.0.3 pilkit==2.0 Pillow==7.1.1 Pygments==2.6.1 python-dateutil==2.8.1 -python3-openid==3.1.0 pytz==2019.3 -requests==2.23.0 -requests-oauthlib==1.3.0 -simplejson==3.17.0 six==1.14.0 -soupsieve==2.0 sqlparse==0.3.1 swapper==1.1.2.post1 -urllib3==1.25.9 -websocket-client==0.57.0 -whitenoise==3.3.1 +whitenoise==5.0.1 diff --git a/templates/base.html b/templates/base.html index 57348e6..7f43d8c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,6 +15,9 @@ + + + {%block extra_css%} {%endblock extra_css%} @@ -46,7 +49,14 @@ - + + + {% block script %} {% endblock script %} diff --git a/templates/covid19/general.html b/templates/covid19/general.html index 7e3d9ef..8449f5f 100644 --- a/templates/covid19/general.html +++ b/templates/covid19/general.html @@ -27,7 +27,6 @@
  • Global View
  • -
  • Europe
  • France
@@ -106,9 +105,7 @@
-
内容2
内容3
diff --git a/templates/header.html b/templates/header.html index c298a64..c941358 100644 --- a/templates/header.html +++ b/templates/header.html @@ -2,20 +2,22 @@ {% load notifications_tags %} {% notifications_unread as unread_count %} {% load static %} + +