huh new thing

This commit is contained in:
sankalp committed 2025-01-17 09:10:45 +05:45
1 parent d40476ebc3
commit 0975a125c7
125 files changed
+2195 -21409

No files matched your search

+21 -126
View File
@@ -1,161 +1,56 @@
JAZZMIN_SETTINGS = {
# title of the window (Will default to current_admin_site.site_title if absent or None)
"site_title": "Student Management System Admin",
# Title on the login screen (19 chars max) (defaults to current_admin_site.site_header if absent or None)
"site_header": "Student Management System",
# 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": "/src/img/logo.png",
# CSS classes that are applied to the logo above
"site_logo": "/dist/img/logo.png",
"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": None,
# Welcome text on the login screen
"site_icon": "/dist/img/logo.png",
"welcome_sign": "Welcome to the Student Management System",
# Copyright on the footer
"copyright": "ADDRSSS",
# theme
# The model admin to search from the search bar, search bar omitted if excluded
# "search_model": "auth.User",
# Field name on user model that contains avatar ImageField/URLField/Charfield or a callable that receives the user
"user_avatar": None,
"version": False,
############
# 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"]},
# external url that opens in a new window (Permissions can be added)
# {"name": "Support", "url": "https://github.com/farridav/django-jazzmin/issues", "new_window": True},
# model admin to link to (Permissions checked against model)
# {"model": "auth.User"},
# App with dropdown menu to all its models pages (Permissions checked against models)
# {"app": "books"},
{"name": "Dashboard", "url": "dashboard", "permissions": ["auth.view_user"]},
],
#############
# 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": ["auth", "dashboard", "course"],
"order_with_respect_to": ["auth", "dashboard", "app"],
"custom_links": {
"courses": [
{"name": "Manage Courses", "url": "add_course", "icon": "fas fa-book"}
],
"menu": [
{
"name": "Dashboard",
"url": "admin:index",
"icon": "fas fa-tachometer-alt",
},
{
"name": "Courses",
"icon": "fas fa-book",
"children": [
{
"name": "Manage Courses",
"url": "add_course",
"icon": "fas fa-plus",
},
{"name": "Course List", "model": "app.course"},
],
},
{"name": "Students", "icon": "fas fa-users", "models": ["app.student"]},
{
"name": "Teachers",
"icon": "fas fa-chalkboard-teacher",
"models": ["app.teacher"],
},
{"name": "Staff", "icon": "fas fa-user-tie", "models": ["app.staff"]},
{
"name": "Academics",
"icon": "fas fa-graduation-cap",
"children": [
{"model": "app.subject"},
{"model": "app.academicyear"},
{"model": "app.result"},
{"model": "app.attendance"},
],
},
{
"name": "Library",
"icon": "fas fa-book-reader",
"models": ["app.library"],
},
{
"name": "Certificates",
"icon": "fas fa-certificate",
"models": ["app.certificate"],
},
{
"name": "News & Events",
"icon": "fas fa-newspaper",
"models": ["app.newsevent"],
},
],
"app": [
{
"name": "Dashboard",
"url": "dashboard",
"icon": "fas fa-tachometer-alt",
},
# {
# "name": "course",
# "url": "add_course",
# },
],
},
#################
# 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": None,
"custom_js": None,
# 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": "horizontal_tabs",
"auth.group": "vertical_tabs",
"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 = {
# "footer_fixed": True,
"theme": "lumen",
# "dark_mode_theme": "cyborg",
}
+8 -3
View File
@@ -13,21 +13,23 @@ 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-4^0p#+b(zk1vavtg#+f)i$hog(!v(v4=bsf*d#-v=kic)3%kbx"
SECRET_KEY = "django-insecure-)bp&!(x=q)##0hl&7r&h2x$u_3bvd7td)yq4y&_k)$)ce%pj&m"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ["*", "192.168.18.225"]
ALLOWED_HOSTS = ["*"]
JAZZMIN_SETTINGS = JAZZMIN_SETTINGS
JAZZMIN_UI_TWEAKS = JAZZMIN_UI_TWEAKS
# Application definition
INSTALLED_APPS = [
@@ -101,6 +103,7 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
# Internationalization
# https://docs.djangoproject.com/en/5.1/topics/i18n/
@@ -129,6 +132,8 @@ STATICFILES_FINDERS = [
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
-2
View File
@@ -17,14 +17,12 @@ Including another URLconf
from django.contrib import admin
from django.urls import path, include
from django.views.generic import RedirectView
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = (
[
path("admin/", admin.site.urls),
path("", RedirectView.as_view(url="/admin/", permanent=False)),
path("", include("app.urls")),
]
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)