Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

front end till person #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions server/djangoproj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
CSRF_TRUSTED_ORIGINS = []
ALLOWED_HOSTS = ['localhost','https://kevinrblas-8000.theianext-0-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai/']
CSRF_TRUSTED_ORIGINS = ['https://kevinrblas-8000.theianext-0-labs-prod-misc-tools-us-east-0.proxy.cognitiveclass.ai/']

REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [],
Expand Down Expand Up @@ -61,7 +61,9 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
os.path.join(BASE_DIR,'frontend/static')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -134,5 +136,7 @@

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

STATICFILES_DIRS = []
STATICFILES_DIRS = [
os.path.join(BASE_DIR,'frontend/static')
]

1 change: 1 addition & 0 deletions server/djangoproj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

urlpatterns = [
path('admin/', admin.site.urls),
path('about/', TemplateView.as_view(template_name="About.html")),
path('djangoapp/', include('djangoapp.urls')),
path('', TemplateView.as_view(template_name="Home.html")),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
34 changes: 4 additions & 30 deletions server/frontend/static/About.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<html>
<head>
<!-- Link the style sheet here -->
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/static/bootstrap.min.css">
</head>
<div>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color:darkturquoise; height: 1in;">
Expand All @@ -27,36 +28,9 @@ <h2 style="padding-right: 5%;">Dealerships</h2>

<div class="card" style="width: 80%;margin: auto; margin-top:5%;">
<div class="banner" name="about-header">
<!-- Insert header information here -->
<h1>About Us</h1>
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.
</div>
<div style="display: flex;flex-direction: row; margin:auto">
<div class="card" style="width: 30%;">
<img class="card-img-top" src="/static/person.png" alt="Card image">
<div class="card-body">
<p class="title">Person1</p>
<p>Person1 Title</p>
<p class="card-text">Some text that explains the person1 in about 2 short sentences</p>
<p>[email protected]</p>
</div>
</div>

<div class="card" style="width: 30%;">
<img class="card-img-top" src="/static/person.png" alt="Card image">
<div class="card-body">
<p class="title">Person2</p>
<p>Person2 Title</p>
<p class="card-text">Some text that explains the person2 in about 2 short sentences</p>
<p>[email protected]</p>
</div>
</div>

<div class="card" style="width: 30%;">
<img class="card-img-top" src="/static/person.png" alt="Card image">
<div class="card-body">
<p class="title">Person3</p>
<p>Person3 Title</p>
<p class="card-text">Some text that explains the person3 in about 2 short sentences</p>
<p>[email protected]</p>
</div>
</div>
</div>
Expand Down
Binary file removed server/frontend/static/person.png
Binary file not shown.
Binary file added server/frontend/static/person1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added server/frontend/static/person2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added server/frontend/static/person3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.