Skip to content

Commit 0e8460f

Browse files
committed
model
1 parent a1dc13b commit 0e8460f

File tree

7 files changed

+120
-18
lines changed

7 files changed

+120
-18
lines changed

server/djangoproj/settings.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
# SECURITY WARNING: don't run with debug turned on in production!
2929
DEBUG = True
3030

31-
ALLOWED_HOSTS = []
32-
CSRF_TRUSTED_ORIGINS = []
31+
ALLOWED_HOSTS = ['localhost','http://127.0.0.1:8000/',"http://127.0.0.1",'127.0.0.1']
32+
CSRF_TRUSTED_ORIGINS = ['http://127.0.0.1:8000/']
3333

3434
REST_FRAMEWORK = {
3535
'DEFAULT_AUTHENTICATION_CLASSES': [],
@@ -61,7 +61,9 @@
6161
TEMPLATES = [
6262
{
6363
'BACKEND': 'django.template.backends.django.DjangoTemplates',
64-
'DIRS': [],
64+
'DIRS': [
65+
os.path.join(BASE_DIR,'frontend/static')
66+
],
6567
'APP_DIRS': True,
6668
'OPTIONS': {
6769
'context_processors': [
@@ -74,6 +76,8 @@
7476
},
7577
]
7678

79+
80+
7781
WSGI_APPLICATION = 'djangoproj.wsgi.application'
7882

7983

@@ -134,5 +138,7 @@
134138

135139
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
136140

137-
STATICFILES_DIRS = []
141+
STATICFILES_DIRS = [
142+
os.path.join(BASE_DIR,'frontend/static')
143+
]
138144

server/djangoproj/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@
2323
path('admin/', admin.site.urls),
2424
path('djangoapp/', include('djangoapp.urls')),
2525
path('', TemplateView.as_view(template_name="Home.html")),
26+
path('about/', TemplateView.as_view(template_name="About.html")),
27+
path('contact/', TemplateView.as_view(template_name="Contact.html")),
2628
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

server/frontend/static/About.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<html>
22
<head>
33
<!-- Link the style sheet here -->
4+
<link rel="stylesheet" href="/static/style.css">
5+
<link rel="stylesheet" href="/static/bootstrap.min.css">
46
</head>
57
<div>
68
<nav class="navbar navbar-expand-lg navbar-light" style="background-color:darkturquoise; height: 1in;">
@@ -28,35 +30,37 @@ <h2 style="padding-right: 5%;">Dealerships</h2>
2830
<div class="card" style="width: 80%;margin: auto; margin-top:5%;">
2931
<div class="banner" name="about-header">
3032
<!-- Insert header information here -->
33+
<h1>About Us</h1>
34+
Welcome to Best Cars dealership, home to the best cars in North America. We deal in sale of domestic and imported cars at reasonable prices.
3135
</div>
3236
<div style="display: flex;flex-direction: row; margin:auto">
3337
<div class="card" style="width: 30%;">
34-
<img class="card-img-top" src="/static/person.png" alt="Card image">
38+
<img class="card-img-top" src="/static/happy-person-png-23617.png" alt="Card image">
3539
<div class="card-body">
36-
<p class="title">Person1</p>
37-
<p>Person1 Title</p>
38-
<p class="card-text">Some text that explains the person1 in about 2 short sentences</p>
39-
<p>person1@example.com</p>
40+
<p class="title">John</p>
41+
<p>CEO</p>
42+
<p class="card-text">John founded Best Cars dealership in 2010. His vision is to provide quality vehicles at competitive prices.</p>
43+
<p>john@bestcars.com</p>
4044
</div>
4145
</div>
4246

4347
<div class="card" style="width: 30%;">
44-
<img class="card-img-top" src="/static/person.png" alt="Card image">
48+
<img class="card-img-top" src="/static/happy-person-png-23636.png" alt="Card image">
4549
<div class="card-body">
46-
<p class="title">Person2</p>
47-
<p>Person2 Title</p>
48-
<p class="card-text">Some text that explains the person2 in about 2 short sentences</p>
49-
<p>person2@example.com</p>
50+
<p class="title">Jay</p>
51+
<p>Sales Manager</p>
52+
<p class="card-text">Jay has over 10 years of experience in automotive sales. He leads our sales team with enthusiasm and expertise.</p>
53+
<p>jay@Sales.com</p>
5054
</div>
5155
</div>
5256

5357
<div class="card" style="width: 30%;">
5458
<img class="card-img-top" src="/static/person.png" alt="Card image">
5559
<div class="card-body">
56-
<p class="title">Person3</p>
57-
<p>Person3 Title</p>
58-
<p class="card-text">Some text that explains the person3 in about 2 short sentences</p>
59-
<p>person3@example.com</p>
60+
<p class="title">Sarah</p>
61+
<p>Service Manager</p>
62+
<p class="card-text">Sarah oversees our service department with dedication and precision. She ensures every vehicle meets our quality standards.</p>
63+
<p>sarah@bestcars.com</p>
6064
</div>
6165
</div>
6266
</div>

server/frontend/static/Contact.html

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Contact Us - Taskify</title>
7+
<link rel="stylesheet" href="css/styles.css">
8+
<link rel="stylesheet" href="css/responsive.css">
9+
<link rel="stylesheet" href="/static/style.css">
10+
<link rel="stylesheet" href="/static/bootstrap.min.css">
11+
</head>
12+
<body>
13+
14+
15+
<nav class="navbar navbar-expand-lg navbar-light" style="background-color:darkturquoise; height: 1in;">
16+
<div class="container-fluid">
17+
<h2 style="padding-right: 5%;">Dealerships</h2>
18+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
19+
<span class="navbar-toggler-icon"></span>
20+
</button>
21+
<div class="collapse navbar-collapse" id="navbarText">
22+
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
23+
<li class="nav-item">
24+
<a class="nav-link" style="font-size: larger;" aria-current="page" href="/">Home</a>
25+
</li>
26+
<li class="nav-item">
27+
<a class="nav-link" style="font-size: larger;" href="/about">About Us</a>
28+
</li>
29+
<li class="nav-item">
30+
<a class="nav-link active" style="font-size: larger;" href="/contact">Contact Us</a>
31+
</li>
32+
</ul>
33+
</div>
34+
</div>
35+
</nav>
36+
37+
38+
39+
<div class="card" style="width: 80%;margin: auto; margin-top:5%;">
40+
<div class="banner" name="contact-header">
41+
<h1>Contact Us</h1>
42+
Have questions or feedback? Reach out to our team at Best Cars dealership. We're here to assist you with all your automotive needs.
43+
</div>
44+
45+
<div class="contact-form" style="width: 70%; margin: auto; padding: 20px;">
46+
<form>
47+
<div class="mb-3">
48+
<label for="name" class="form-label">Name</label>
49+
<input type="text" class="form-control" id="name" name="name" required>
50+
</div>
51+
52+
<div class="mb-3">
53+
<label for="email" class="form-label">Email</label>
54+
<input type="email" class="form-control" id="email" name="email" required>
55+
</div>
56+
57+
<div class="mb-3">
58+
<label for="phone" class="form-label">Phone Number</label>
59+
<input type="tel" class="form-control" id="phone" name="phone">
60+
</div>
61+
62+
<div class="mb-3">
63+
<label for="message" class="form-label">Message</label>
64+
<textarea class="form-control" id="message" name="message" rows="5" required></textarea>
65+
</div>
66+
67+
<button type="submit" class="btn btn-primary">Send Message</button>
68+
</form>
69+
</div>
70+
71+
<div class="contact-info" style="margin: 20px auto; width: 70%;">
72+
<h3>Visit Us</h3>
73+
<p>123 Car Avenue, Automotive City, AC 12345</p>
74+
75+
<h3>Call Us</h3>
76+
<p>Sales: (555) 123-4567</p>
77+
<p>Service: (555) 987-6543</p>
78+
79+
<h3>Email Us</h3>
80+
81+
</div>
82+
</div>
83+
84+
<footer>
85+
<div class="container">
86+
<p>&copy; 2023 Taskify. All rights reserved.</p>
87+
</div>
88+
</footer>
89+
</body>
90+
</html>
8.56 MB
Loading
423 KB
Loading

server/frontend/static/person.png

-121 KB
Loading

0 commit comments

Comments
 (0)