Skip to content

Commit 268e5e8

Browse files
committed
Template Update
1 parent a10a01d commit 268e5e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1287
-0
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root=true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
indent_style = space
13+
indent_size = 4
14+
max_line_length = 120
15+
16+
[*.{html,css,js,json}]
17+
indent_size = 2

books/__init__.py

Whitespace-only changes.
143 Bytes
Binary file not shown.
330 Bytes
Binary file not shown.
199 Bytes
Binary file not shown.

books/admin.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

books/migrations/__init__.py

Whitespace-only changes.

books/models.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

books/urls.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from django.urls import path
2+
3+
from books.views.dashboard import DashboardTemplateView
4+
5+
urlpatterns = [
6+
path('', DashboardTemplateView.as_view(), name="dashboard_view"),
7+
]

books/views/__init__.py

Whitespace-only changes.
149 Bytes
Binary file not shown.
485 Bytes
Binary file not shown.

books/views/dashboard.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from django.contrib.auth.mixins import LoginRequiredMixin
2+
from django.views.generic import TemplateView
3+
4+
5+
6+
class DashboardTemplateView(LoginRequiredMixin, TemplateView):
7+
template_name = 'dashboard.html'

books/views/new.py

Whitespace-only changes.

config/__init__.py

Whitespace-only changes.
167 Bytes
Binary file not shown.
418 Bytes
Binary file not shown.
2.41 KB
Binary file not shown.
518 Bytes
Binary file not shown.
326 Bytes
Binary file not shown.

config/asgi.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import os
2+
3+
from django.core.asgi import get_asgi_application
4+
5+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
6+
7+
application = get_asgi_application()

config/local_settings.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
DEBUG = True
2+
ALLOWED_HOSTS = []
3+
SECRET_KEY = "Very-Very-Secret"
4+
5+
6+
DATABASES = {
7+
'default': {
8+
'ENGINE': 'django.db.backends.postgresql_psycopg2',
9+
'NAME': "university_project",
10+
'USER': "postgres",
11+
'PASSWORD': 'nateglass',
12+
'HOST': "127.0.0.1",
13+
'PORT': "5432",
14+
}
15+
}

config/settings.py

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
from pathlib import Path
2+
import os
3+
4+
BASE_DIR = Path(__file__).resolve().parent.parent
5+
6+
SECRET_KEY = os.getenv('SECRET_KEY')
7+
DEBUG = False
8+
9+
ALLOWED_HOSTS = []
10+
11+
DJANGO_APPS = [
12+
'django.contrib.admin',
13+
'django.contrib.auth',
14+
'django.contrib.contenttypes',
15+
'django.contrib.sessions',
16+
'django.contrib.messages',
17+
'django.contrib.staticfiles',
18+
]
19+
THIRD_PARTY_APPS = []
20+
LOCAL_APPS = []
21+
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
22+
23+
MIDDLEWARE = [
24+
'django.middleware.security.SecurityMiddleware',
25+
'django.contrib.sessions.middleware.SessionMiddleware',
26+
'django.middleware.common.CommonMiddleware',
27+
'django.middleware.csrf.CsrfViewMiddleware',
28+
'django.contrib.auth.middleware.AuthenticationMiddleware',
29+
'django.contrib.messages.middleware.MessageMiddleware',
30+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
31+
]
32+
33+
ROOT_URLCONF = 'config.urls'
34+
35+
TEMPLATES = [
36+
{
37+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
38+
'DIRS': [os.path.join(BASE_DIR, 'templates')],
39+
'APP_DIRS': True,
40+
'OPTIONS': {
41+
'context_processors': [
42+
'django.template.context_processors.debug',
43+
'django.template.context_processors.request',
44+
'django.contrib.auth.context_processors.auth',
45+
'django.contrib.messages.context_processors.messages',
46+
],
47+
},
48+
},
49+
]
50+
51+
WSGI_APPLICATION = 'config.wsgi.application'
52+
DATABASES = {
53+
'default': {
54+
'ENGINE': 'django.db.backends.postgresql_psycopg2',
55+
'NAME': os.environ.get('DATABASE_NAME'),
56+
'USER': os.environ.get('DATABASE_USER'),
57+
'PASSWORD': os.environ.get('DATABASE_PASSWORD'),
58+
'HOST': os.environ.get('DATABASE_HOST'),
59+
'PORT': os.environ.get('DATABASE_PORT'),
60+
}
61+
}
62+
63+
64+
AUTH_PASSWORD_VALIDATORS = [
65+
{'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', },
66+
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', },
67+
{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', },
68+
{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', },
69+
]
70+
71+
72+
LANGUAGE_CODE = 'en-us'
73+
TIME_ZONE = 'UTC'
74+
USE_I18N = True
75+
USE_L10N = True
76+
USE_TZ = True
77+
78+
STATIC_URL = '/static/'
79+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
80+
STATICFILES_DIRS = [
81+
BASE_DIR / "static",
82+
]
83+
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
84+
MEDIA_URL = '/media/'
85+
86+
LOGIN_REDIRECT_URL = '../'
87+
LOGIN_URL = '/login/'
88+
LOGOUT_REDIRECT_URL = '/login/'
89+
90+
# AUTH_USER_MODEL = 'core.User'
91+
92+
try:
93+
from .local_settings import *
94+
except ImportError:
95+
pass

config/urls.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from django.urls import path, include
2+
from django.contrib.auth import views as auth_views
3+
from django.contrib import admin
4+
5+
urlpatterns = [
6+
path('admin/', admin.site.urls),
7+
path('', include('books.urls')),
8+
path("login/", auth_views.LoginView.as_view(), name="login_view"),
9+
path("logout/", auth_views.LogoutView.as_view(), name="logout_view"),
10+
]

config/wsgi.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import os
2+
3+
from django.core.wsgi import get_wsgi_application
4+
5+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
6+
7+
application = get_wsgi_application()

manage.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env python
2+
"""Django's command-line utility for administrative tasks."""
3+
import os
4+
import sys
5+
6+
7+
def main():
8+
"""Run administrative tasks."""
9+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
10+
try:
11+
from django.core.management import execute_from_command_line
12+
except ImportError as exc:
13+
raise ImportError(
14+
"Couldn't import Django. Are you sure it's installed and "
15+
"available on your PYTHONPATH environment variable? Did you "
16+
"forget to activate a virtual environment?"
17+
) from exc
18+
execute_from_command_line(sys.argv)
19+
20+
21+
if __name__ == '__main__':
22+
main()

static/css/style.css

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/* ----------------- Forms ---------------------- */
2+
form .mb-3 input,
3+
form .mb-3 select,
4+
form .mb-3 textarea {
5+
display: block;
6+
width: 100%;
7+
padding: 0.375rem 0.75rem;
8+
font-size: 1rem;
9+
font-weight: 400;
10+
line-height: 1.5;
11+
color: #212529;
12+
background-color: #fff;
13+
background-clip: padding-box;
14+
border: 1px solid #ced4da;
15+
border-radius: 0.375rem;
16+
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
17+
}
18+
19+
input:focus, select:focus, textarea:focus{
20+
color: #212529;
21+
background-color: #fff;
22+
border-color: #86b7fe;
23+
outline: 0;
24+
box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
25+
}
26+
27+
.errorlist {
28+
margin-top: 5px;
29+
list-style-type: none;
30+
padding-left: 0;
31+
color: red;
32+
}
33+
34+
.login-bg{
35+
background-image: url(/static/img/svgs/bg-pattern-light.svg);
36+
background-size: cover;
37+
background-position: center;
38+
}
39+
40+
.side-nav .side-nav-item .side-nav-link,
41+
.side-nav .side-nav-title,
42+
.side-nav-second-level li a {
43+
color: #8391a2;
44+
}
45+
46+
.side-nav .side-nav-link:hover,
47+
.side-nav-second-level li a:hover {
48+
color: #bccee4;
49+
}
50+
51+
.table thead tr th,
52+
.table tbody tr td{
53+
font-size: 0.9rem;
54+
}
55+
56+
.pagination li a{
57+
border-radius: 30px!important;
58+
margin: 0 3px!important;
59+
border: none;
60+
}

static/fonts/Nunito-Bold.eot

113 KB
Binary file not shown.

static/fonts/Nunito-Bold.ttf

113 KB
Binary file not shown.

static/fonts/Nunito-Bold.woff

50.7 KB
Binary file not shown.

static/fonts/Nunito-Light.eot

124 KB
Binary file not shown.

static/fonts/Nunito-Light.ttf

131 KB
Binary file not shown.

static/fonts/Nunito-Light.woff

57.8 KB
Binary file not shown.

static/fonts/Nunito-Light.woff2

41.3 KB
Binary file not shown.

static/fonts/Nunito-Regular.eot

111 KB
Binary file not shown.

static/fonts/Nunito-Regular.ttf

111 KB
Binary file not shown.

static/fonts/Nunito-Regular.woff

49.8 KB
Binary file not shown.

static/fonts/Nunito-SemiBold.eot

113 KB
Binary file not shown.

static/fonts/Nunito-SemiBold.ttf

113 KB
Binary file not shown.

static/fonts/Nunito-SemiBold.woff

50.3 KB
Binary file not shown.
982 KB
Binary file not shown.
981 KB
Binary file not shown.
446 KB
Binary file not shown.
312 KB
Binary file not shown.

static/fonts/unicons.eot

394 KB
Binary file not shown.

static/fonts/unicons.ttf

394 KB
Binary file not shown.

static/fonts/unicons.woff

199 KB
Binary file not shown.

static/fonts/unicons.woff2

144 KB
Binary file not shown.

static/img/ph-bg-1.jpg

247 KB

static/img/svgs/bg-pattern-light.svg

+1

static/js/script.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$(document).ready(function () {
2+
$('#table_id').DataTable({
3+
language: {
4+
paginate: {
5+
next: '>',
6+
previous: '<'
7+
}
8+
},
9+
responsive: true,
10+
});
11+
});

static/vendor/app.min.css

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/vendor/bootstrap_5x/bootstrap_5.min.css

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)