Skip to content

Commit

Permalink
Static Processing
Browse files Browse the repository at this point in the history
  • Loading branch information
ankiwoong committed Apr 26, 2020
1 parent aaf1417 commit a18339d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions anjia/settings.py
Expand Up @@ -119,3 +119,8 @@
# https://docs.djangoproject.com/en/3.0/howto/static-files/

STATIC_URL = '/static/'

# STATIC File
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
3 changes: 3 additions & 0 deletions blog/templates/index.html
Expand Up @@ -7,5 +7,8 @@
</head>
<body>
<h1>Hello My TEST BLOG</h1>
<!-- django에서 script load시 반드시 {% load static %} 을 해줘야된다. -->
{% load static %}
<script src="{% static 'js/test.js' %}"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions static/js/test.js
@@ -0,0 +1,2 @@
// 알람창 TEST
alert("TEST Popup");

0 comments on commit a18339d

Please sign in to comment.