Skip to content

Commit

Permalink
Not sure
Browse files Browse the repository at this point in the history
  • Loading branch information
yaozeliangtest committed Apr 28, 2020
1 parent 1c5487b commit 0afcba4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
18 changes: 9 additions & 9 deletions my_blog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
SECRET_KEY = 'c20s(vym*s_ne845ek_o5e$jm=x*pgq6=@-ry@6(=23mv(k2w='

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False

ALLOWED_HOSTS = ['*']

Expand Down Expand Up @@ -54,7 +54,7 @@
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
# 'whitenoise.runserver_nostatic', # new!
'whitenoise.runserver_nostatic', # new!
'django.contrib.staticfiles',
]

Expand All @@ -70,7 +70,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',
Expand Down Expand Up @@ -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
Expand All @@ -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'
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'
26 changes: 23 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
asgiref==3.2.7
Django==3.0.5
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-appconf==1.0.4
django-ckeditor==5.9.0
django-crispy-forms==1.9.0
Expand All @@ -10,14 +16,28 @@ django-notifications-hq==1.6.0
django-password-reset==2.0
django-simpleui==3.9.1
django-taggit==1.2.0
gunicorn==20.0.4
djangorestframework==3.11.0
gunicorn==19.9.0
idna==2.9
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
whitenoise==5.0.1
urllib3==1.25.9
websocket-client==0.57.0
whitenoise==3.3.1
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.8.2
python-3.8.1
2 changes: 1 addition & 1 deletion templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


<li class="nav-item ">
<a class="nav-link " href="{% url 'article:article_list' %}">文章</a>
<a class="nav-link " href="{% url 'article:article_list' %}">Articles</a>
</li>

{% if user.is_authenticated %}
Expand Down

0 comments on commit 0afcba4

Please sign in to comment.