updates
This commit is contained in:
1 parent
9e119917b6
commit
7c402bfb88
54 files changed
+1639
-5032
No files matched your search
@@ -1,56 +0,0 @@
|
||||
JAZZMIN_SETTINGS = {
|
||||
"site_title": "Student Management System Admin",
|
||||
"site_header": "Student Management System",
|
||||
"site_brand": "SMS",
|
||||
"site_logo": "/dist/img/logo.png",
|
||||
"site_logo_classes": "img-circle",
|
||||
"site_icon": "/dist/img/logo.png",
|
||||
"welcome_sign": "Welcome to the Student Management System",
|
||||
"copyright": "ADDRSSS",
|
||||
############
|
||||
# Top Menu #
|
||||
############
|
||||
"topmenu_links": [
|
||||
{"name": "Home", "url": "admin:index", "permissions": ["auth.view_user"]},
|
||||
{"name": "Dashboard", "url": "dashboard", "permissions": ["auth.view_user"]},
|
||||
],
|
||||
#############
|
||||
# Side Menu #
|
||||
#############
|
||||
"show_sidebar": True,
|
||||
"navigation_expanded": True,
|
||||
# List of apps (and/or models) to base side menu ordering off of (does not need to contain all apps/models)
|
||||
"order_with_respect_to": ["auth", "dashboard", "app"],
|
||||
"custom_links": {
|
||||
"app": [
|
||||
{
|
||||
"name": "Dashboard",
|
||||
"url": "dashboard",
|
||||
"icon": "fas fa-tachometer-alt",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
"icons": {
|
||||
"auth": "fas fa-users-cog",
|
||||
"auth.user": "fas fa-user",
|
||||
"auth.group": "fas fa-users",
|
||||
"app.student": "fas fa-user-graduate",
|
||||
"app.teacher": "fas fa-chalkboard-teacher",
|
||||
"app.course": "fas fa-book",
|
||||
"app.subject": "fas fa-book-open",
|
||||
"app.academicyear": "fas fa-calendar",
|
||||
"app.attendance": "fas fa-calendar-check",
|
||||
"app.attendancereport": "fas fa-clipboard-list",
|
||||
"app.leavereportstudent": "fas fa-user-clock",
|
||||
"app.leavereportteacher": "fas fa-clock",
|
||||
"app.feedbackstudent": "fas fa-comment-alt",
|
||||
"app.feedbackteacher": "fas fa-comments",
|
||||
},
|
||||
}
|
||||
|
||||
JAZZMIN_UI_TWEAKS = {
|
||||
"theme": "lumen",
|
||||
# "dark_mode_theme": "cyborg",
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Django settings for student_management_system project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 5.1.4.
|
||||
Generated by 'django-admin startproject' using Django 5.1.6.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.1/topics/settings/
|
||||
@@ -11,25 +11,21 @@ https://docs.djangoproject.com/en/5.1/ref/settings/
|
||||
"""
|
||||
|
||||
import os
|
||||
from student_management_system.jazzmin import JAZZMIN_SETTINGS, JAZZMIN_UI_TWEAKS
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = "django-insecure-)bp&!(x=q)##0hl&7r&h2x$u_3bvd7td)yq4y&_k)$)ce%pj&m"
|
||||
SECRET_KEY = "django-insecure-r))8$j-a-kc641we86oiyxr&x$1e43c!7y4#w-r1s@$$q8dik8"
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
JAZZMIN_SETTINGS = JAZZMIN_SETTINGS
|
||||
JAZZMIN_UI_TWEAKS = JAZZMIN_UI_TWEAKS
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -41,6 +37,7 @@ INSTALLED_APPS = [
|
||||
"django.contrib.sessions",
|
||||
"django.contrib.messages",
|
||||
"django.contrib.staticfiles",
|
||||
"rest_framework",
|
||||
"app",
|
||||
]
|
||||
|
||||
@@ -54,6 +51,11 @@ MIDDLEWARE = [
|
||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
]
|
||||
|
||||
AUTHENTICATION_BACKENDS = [
|
||||
"app.backends.MultiModelBackend",
|
||||
"django.contrib.auth.backends.ModelBackend",
|
||||
]
|
||||
REST_FRAMEWORK = {"DEFAULT_PERMISSION_CLASSES": ["rest_framework.permissions.AllowAny"]}
|
||||
ROOT_URLCONF = "student_management_system.urls"
|
||||
|
||||
TEMPLATES = [
|
||||
@@ -110,7 +112,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
|
||||
LANGUAGE_CODE = "en-us"
|
||||
|
||||
TIME_ZONE = "Asia/Kathmandu"
|
||||
TIME_ZONE = "UTC"
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
@@ -121,21 +123,175 @@ USE_TZ = True
|
||||
# https://docs.djangoproject.com/en/5.1/howto/static-files/
|
||||
|
||||
STATIC_URL = "static/"
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, "static"),
|
||||
]
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
|
||||
|
||||
STATICFILES_FINDERS = [
|
||||
"django.contrib.staticfiles.finders.FileSystemFinder",
|
||||
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
|
||||
]
|
||||
|
||||
MEDIA_URL = "/media/"
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
|
||||
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||
|
||||
JAZZMIN_SETTINGS = {
|
||||
# title of the window (Will default to current_admin_site.site_title if absent or None)
|
||||
"site_title": "SMS",
|
||||
# Title on the login screen (19 chars max) (defaults to current_admin_site.site_header if absent or None)
|
||||
"site_header": "SMS",
|
||||
# Title on the brand (19 chars max) (defaults to current_admin_site.site_header if absent or None)
|
||||
"site_brand": "SMS",
|
||||
# Logo to use for your site, must be present in static files, used for brand on top left
|
||||
# "site_logo": BASE_DIR / "static/img/logo.jpg",
|
||||
# Logo to use for your site, must be present in static files, used for login form logo (defaults to site_logo)
|
||||
"login_logo": None,
|
||||
# Logo to use for login form in dark themes (defaults to login_logo)
|
||||
"login_logo_dark": None,
|
||||
# CSS classes that are applied to the logo above
|
||||
"site_logo_classes": "img-circle",
|
||||
# Relative path to a favicon for your site, will default to site_logo if absent (ideally 32x32 px)
|
||||
# "site_icon": BASE_DIR / "static/img/logo.jpg",
|
||||
# Welcome text on the login screen
|
||||
"welcome_sign": "WELCOME TO SMS",
|
||||
# Copyright on the footer
|
||||
"copyright": "S4NKALP: SMS",
|
||||
# List of model admins to search from the search bar, search bar omitted if excluded
|
||||
# If you want to use a single search field you dont need to use a list, you can use a simple string
|
||||
"search_model": ["app.Student", "app.Course"],
|
||||
# Field name on user model that contains avatar ImageField/URLField/Charfield or a callable that receives the user
|
||||
# "user_avatar": get_user_avatar,
|
||||
############
|
||||
# Top Menu #
|
||||
############
|
||||
# Links to put along the top menu
|
||||
"topmenu_links": [
|
||||
# Url that gets reversed (Permissions can be added)
|
||||
{"name": "Home", "url": "admin:index", "permissions": ["auth.view_user"]},
|
||||
{"name": "Dashboard", "url": "/app/dashboard", "permissions": []},
|
||||
# model admin to link to (Permissions checked against model)
|
||||
{"model": "app.Student"},
|
||||
# App with dropdown menu to all its models pages (Permissions checked against models)
|
||||
{"app": "app"},
|
||||
],
|
||||
#############
|
||||
# User Menu #
|
||||
#############
|
||||
# Additional links to include in the user menu on the top right ("app" url type is not allowed)
|
||||
"usermenu_links": [
|
||||
# {"name": "Support", "url": "https://github.com/farridav/django-jazzmin/issues", "new_window": True},
|
||||
{"model": "auth.user"}
|
||||
],
|
||||
#############
|
||||
# Side Menu #
|
||||
#############
|
||||
# Whether to display the side menu
|
||||
"show_sidebar": True,
|
||||
# Whether to aut expand the menu
|
||||
"navigation_expanded": True,
|
||||
# Hide these apps when generating side menu e.g (auth)
|
||||
"hide_apps": [],
|
||||
# Hide these models when generating side menu (e.g auth.user)
|
||||
"hide_models": [],
|
||||
# List of apps (and/or models) to base side menu ordering off of (does not need to contain all apps/models)
|
||||
"order_with_respect_to": [
|
||||
"dashboard",
|
||||
"authentication",
|
||||
"organization",
|
||||
"human_management",
|
||||
"transaction",
|
||||
"report",
|
||||
"organization.institute",
|
||||
"organization.batch",
|
||||
"organization.course",
|
||||
"human_management.student",
|
||||
"human_management.staff",
|
||||
"human_management.vendor",
|
||||
"human_management.routine",
|
||||
"human_management.attendance",
|
||||
"human_management.course_tracking",
|
||||
"transaction.fee",
|
||||
"transaction.salary",
|
||||
"transaction.expenses",
|
||||
],
|
||||
# Custom links to append to app groups, keyed on app name
|
||||
"custom_links": {
|
||||
"app": [
|
||||
{
|
||||
"name": "Dashboard",
|
||||
"url": "/app/dashboard",
|
||||
"icon": "fas fa-circle",
|
||||
"permissions": [],
|
||||
}
|
||||
]
|
||||
},
|
||||
# Custom icons for side menu apps/models See https://fontawesome.com/icons?d=gallery&m=free&v=5.0.0,5.0.1,5.0.10,5.0.11,5.0.12,5.0.13,5.0.2,5.0.3,5.0.4,5.0.5,5.0.6,5.0.7,5.0.8,5.0.9,5.1.0,5.1.1,5.2.0,5.3.0,5.3.1,5.4.0,5.4.1,5.4.2,5.13.0,5.12.0,5.11.2,5.11.1,5.10.0,5.9.0,5.8.2,5.8.1,5.7.2,5.7.1,5.7.0,5.6.3,5.5.0,5.4.2
|
||||
# for the full list of 5.13.0 free icon classes
|
||||
"icons": {
|
||||
"auth": "fas fa-users-cog",
|
||||
"auth.user": "fas fa-user",
|
||||
"auth.Group": "fas fa-users",
|
||||
},
|
||||
# Icons that are used when one is not manually specified
|
||||
"default_icon_parents": "fas fa-chevron-circle-right",
|
||||
"default_icon_children": "fas fa-circle",
|
||||
#################
|
||||
# Related Modal #
|
||||
#################
|
||||
# Use modals instead of popups
|
||||
"related_modal_active": False,
|
||||
#############
|
||||
# UI Tweaks #
|
||||
#############
|
||||
# Relative paths to custom CSS/JS scripts (must be present in static files)
|
||||
"custom_css": "css/main.css",
|
||||
"custom_js": None,
|
||||
# Whether to link font from fonts.googleapis.com (use custom_css to supply font otherwise)
|
||||
"use_google_fonts_cdn": True,
|
||||
# Whether to show the UI customizer on the sidebar
|
||||
"show_ui_builder": False,
|
||||
###############
|
||||
# Change view #
|
||||
###############
|
||||
# Render out the change view as a single form, or in tabs, current options are
|
||||
# - single
|
||||
# - horizontal_tabs (default)
|
||||
# - vertical_tabs
|
||||
# - collapsible
|
||||
# - carousel
|
||||
"changeform_format": "horizontal_tabs",
|
||||
# override change forms on a per modeladmin basis
|
||||
"changeform_format_overrides": {
|
||||
"auth.user": "collapsible",
|
||||
"auth.group": "vertical_tabs",
|
||||
},
|
||||
# Add a language dropdown into the admin
|
||||
# "language_chooser": True,
|
||||
}
|
||||
|
||||
|
||||
JAZZMIN_UI_TWEAKS = {
|
||||
"navbar_small_text": False,
|
||||
"footer_small_text": False,
|
||||
"body_small_text": False,
|
||||
"brand_small_text": False,
|
||||
"brand_colour": False,
|
||||
"accent": "accent-primary",
|
||||
"navbar": "navbar-dark",
|
||||
"no_navbar_border": False,
|
||||
"navbar_fixed": True,
|
||||
"layout_boxed": False,
|
||||
"footer_fixed": False,
|
||||
"sidebar_fixed": True,
|
||||
"sidebar": "sidebar-dark-primary",
|
||||
"sidebar_nav_small_text": False,
|
||||
"sidebar_disable_expand": False,
|
||||
"sidebar_nav_child_indent": False,
|
||||
"sidebar_nav_compact_style": False,
|
||||
"sidebar_nav_legacy_style": False,
|
||||
"sidebar_nav_flat_style": False,
|
||||
"theme": "lumen",
|
||||
"dark_mode_theme": None,
|
||||
"button_classes": {
|
||||
"primary": "btn-outline-primary",
|
||||
"secondary": "btn-outline-secondary",
|
||||
"info": "btn-outline-info",
|
||||
"warning": "btn-outline-warning",
|
||||
"danger": "btn-outline-danger",
|
||||
"success": "btn-outline-success",
|
||||
},
|
||||
}
|
||||
@@ -17,14 +17,9 @@ Including another URLconf
|
||||
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from app.admin import custom_admin_site
|
||||
|
||||
urlpatterns = (
|
||||
[
|
||||
path("admin/", admin.site.urls),
|
||||
path("", include("app.urls")),
|
||||
]
|
||||
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
)
|
||||
urlpatterns = [
|
||||
# path("admin/", admin.site.urls),
|
||||
path("", custom_admin_site.urls, name="admin")
|
||||
]
|
||||
Reference in new issue
Block a user