diff --git a/touragency/agency/templates/static_page/index.html b/touragency/agency/templates/static_page/index.html new file mode 100644 index 0000000..382472c --- /dev/null +++ b/touragency/agency/templates/static_page/index.html @@ -0,0 +1,16 @@ +{% load static %} + + +
+ + +This website provides Tour Listings for Asian destinations!
+ +
+
+
diff --git a/touragency/agency/views.py b/touragency/agency/views.py
index 7eb722f..0228f15 100644
--- a/touragency/agency/views.py
+++ b/touragency/agency/views.py
@@ -6,10 +6,13 @@ from .models import Tour
# Create your views here.
-def index(request):
- tours = Tour.objects.all()
- context = {"tours": tours}
- return render(request, "tours/index.html", context)
-
+# def index(request):
+# tours = Tour.objects.all()
+# context = {"tours": tours}
+# return render(request, "tours/index.html", context)
# return HttpResponse("Asian Tours Agency")
+
+
+def index(request):
+ return render(request, "static_page/index.html")
diff --git a/touragency/static/images/dog.jpg b/touragency/static/images/dog.jpg
new file mode 100644
index 0000000..dbfb069
Binary files /dev/null and b/touragency/static/images/dog.jpg differ
diff --git a/touragency/static/js/script.js b/touragency/static/js/script.js
new file mode 100644
index 0000000..26f8304
--- /dev/null
+++ b/touragency/static/js/script.js
@@ -0,0 +1,3 @@
+document.addEventListener("DOMContentLoaded", function () {
+ alert("Here boy!");
+});
diff --git a/touragency/static/styles/styles.css b/touragency/static/styles/styles.css
new file mode 100644
index 0000000..808c2e3
--- /dev/null
+++ b/touragency/static/styles/styles.css
@@ -0,0 +1,11 @@
+body {
+ font-family: Arial, Arial, Helvetica, sans-serif;
+ background-color: #f4f4f4;
+ color: #333;
+ text-align: center;
+ padding: 20px;
+}
+
+img {
+ width: 300px;
+}
diff --git a/touragency/touragency/settings.py b/touragency/touragency/settings.py
index a989713..e568573 100644
--- a/touragency/touragency/settings.py
+++ b/touragency/touragency/settings.py
@@ -10,6 +10,7 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/6.0/ref/settings/
"""
+import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
@@ -116,3 +117,6 @@ USE_TZ = True
# https://docs.djangoproject.com/en/6.0/howto/static-files/
STATIC_URL = "static/"
+MEDIA_URL = "images/"
+
+STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"),)