feat: initial commit - Band Management application

This commit is contained in:
2026-01-06 03:11:46 +01:00
commit 34e12e00b3
24543 changed files with 3991790 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
"""
ASGI config for web_project project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
application = get_asgi_application()

View File

@@ -0,0 +1,14 @@
from django.conf import settings
def my_setting(request):
return {'MY_SETTING': settings}
def language_code(request):
return {"LANGUAGE_CODE": request.LANGUAGE_CODE}
def get_cookie(request):
return {"COOKIES": request.COOKIES}
# Add the 'ENVIRONMENT' setting to the template context
def environment(request):
return {'ENVIRONMENT': settings.ENVIRONMENT}

View File

@@ -0,0 +1,184 @@
"""
Django settings for web_project project.
Generated by 'django-admin startproject' using Django 5.0.
For more information on this file, see
https://docs.djangoproject.com/en/5.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.0/ref/settings/
"""
import os
from pathlib import Path
from django.utils.translation import gettext_lazy as _
from dotenv import load_dotenv
from .template import TEMPLATE_CONFIG, THEME_LAYOUT_DIR, THEME_VARIABLES
load_dotenv() # take environment variables from .env.
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get("SECRET_KEY", default='')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get("DEBUG", 'True').lower() in ['true', 'yes', '1']
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"]
# Current DJANGO_ENVIRONMENT
ENVIRONMENT = os.environ.get("DJANGO_ENVIRONMENT", default="local")
# Application definition
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"apps.sample",
"apps.pages",
]
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "config.urls"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"config.context_processors.language_code",
"config.context_processors.my_setting",
"config.context_processors.get_cookie",
"config.context_processors.environment",
],
"libraries": {
"theme": "web_project.template_tags.theme",
},
"builtins": [
"django.templatetags.static",
"web_project.template_tags.theme",
],
},
},
]
WSGI_APPLICATION = "config.wsgi.application"
# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
# Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
# Internationalization
# https://docs.djangoproject.com/en/5.0/topics/i18n/
# Enable i18n and set the list of supported languages
LANGUAGES = [
("en", _("English")),
("fr", _("French")),
("ar", _("Arabic")),
("de", _("German")),
# Add more languages as needed
]
# Set default language
# ! Make sure you have cleared the browser cache after changing the default language
LANGUAGE_CODE = "en"
TIME_ZONE = "UTC"
USE_I18N = True
USE_TZ = True
LOCALE_PATHS = [
BASE_DIR / "locale",
]
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/
STATIC_URL = "/static/"
STATIC_ROOT = BASE_DIR / "staticfiles"
STATICFILES_DIRS = [
BASE_DIR / "src" / "assets",
]
# Default URL on which Django application runs for specific environment
BASE_URL = os.environ.get("BASE_URL", default="http://127.0.0.1:8000")
# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
# Template Settings
# ------------------------------------------------------------------------------
THEME_LAYOUT_DIR = THEME_LAYOUT_DIR
TEMPLATE_CONFIG = TEMPLATE_CONFIG
THEME_VARIABLES = THEME_VARIABLES
# Your stuff...
# ------------------------------------------------------------------------------

View File

@@ -0,0 +1,71 @@
# Template Settings
# ------------------------------------------------------------------------------
# Theme layout templates directory
# Template config
# ? Easily change the template configuration from here
# ? Replace this object with template-config/demo-*.py file's TEMPLATE_CONFIG to change the template configuration as per our demos
TEMPLATE_CONFIG = {
"layout": "vertical", # Options[String]: vertical(default), horizontal
# "primary_color": "#891b03", # Set the primary color
"theme": 'light', # Theme options: 'light' (default), 'dark', 'system'
"my_skins" : "default", # Skin options: "default", "bordered"
"has_semi_dark" : False, # Semi-dark mode: True/False (False by default)
"rtl_mode": False, # options[Boolean]: False(default), True # To set layout to RTL layout (myRTLSupport must be True for rtl mode)
"has_customizer": True, # options[Boolean]: True(default), False # Display customizer or not THIS WILL REMOVE INCLUDED JS FILE. SO LOCAL STORAGE WON'T WORK
"display_customizer": True, # options[Boolean]: True(default), False # Display customizer UI or not, THIS WON'T REMOVE INCLUDED JS FILE. SO LOCAL STORAGE WILL WORK
"content_layout": "compact", # options[String]: 'compact', 'wide' (compact=container-xxl, wide=container-fluid)
"navbar_type": "fixed", # options[String]: 'fixed', 'static', 'hidden' (Only for vertical Layout)
"header_type": "fixed", # options[String]: 'static', 'fixed' (for horizontal layout only)
"menu_fixed": True, # options[Boolean]: True(default), False # Layout(menu) Fixed (Only for vertical Layout)
"menu_collapsed": False, # options[Boolean]: False(default), True # Show menu collapsed, Only for vertical Layout
"footer_fixed": False, # options[Boolean]: False(default), True # Footer Fixed
"show_dropdown_onhover": True, # True, False (for horizontal layout only)
"customizer_controls": [
'color', # Enable/Disable color picker in customizer
'theme', # Enable/Disable theme selection in customizer
'skins', # Enable/Disable skin options in customizer
'semiDark', # Enable/Disable semi-dark mode in customizer
'layoutCollapsed', # Enable/Disable collapsed layout in customizer
'layoutNavbarOptions', # Enable/Disable navbar options in customizer
'headerType', # Enable/Disable header type selection in customizer
'contentLayout', # Enable/Disable content layout options in customizer
'rtl'
], # To show/hide customizer options
}
# Theme Variables
# ? Personalize template by changing theme variables (For ex: Name, URL Version etc...)
THEME_VARIABLES = {
"creator_name": "PixInvent",
"creator_url": "https://pixinvent.com/",
"template_name": "Vuexy",
"template_suffix": "Django Admin Template",
"template_version": "3.0.0",
"template_free": False,
"template_description": "Vuexy is a modern, clean and fully responsive admin template built with Bootstrap 5, Django, HTML, CSS, jQuery, and JavaScript. It has a huge collection of reusable UI components and integrated with the latest jQuery plugins. It can be used for all types of web applications like custom admin panel, project management system, admin dashboard, Backend application or CRM.",
"template_keyword": "django, django admin, dashboard, bootstrap 5 dashboard, bootstrap 5 design, bootstrap 5",
"facebook_url": "https://www.facebook.com/pixinvents/",
"twitter_url": "https://twitter.com/pixinvents",
"github_url": "https://github.com/pixinvent",
"dribbble_url": "https://dribbble.com/pixinvent",
"instagram_url": "https://www.instagram.com/pixinvents/",
"license_url": "https://themeforest.net/licenses/standard",
"live_preview": "https://demos.pixinvent.com/vuexy-html-django-admin-template/demo-1/",
"product_page": "https://1.envato.market/vuexy_admin",
"support": "https://pixinvent.ticksy.com/",
"more_themes": "https://1.envato.market/pixinvent_portfolio",
"documentation": "https://demos.pixinvent.com/vuexy-html-admin-template/documentation",
"changelog": "https://demos.pixinvent.com/vuexy/changelog.html",
"git_repository": "https://github.com/pixinvent/vuexy-html-django-admin-template",
"git_repo_access": "https://tools.pixinvent.com/github/github-access",
"og_title": "Vuexy Bootstrap 5 HTML + Django Admin Template by Pixinvent",
"og_image": "https://ts-assets.b-cdn.net/pi-assets/vuexy/admin-template/banner/banner.png",
"og_type": "product",
}
# ! Don't change THEME_LAYOUT_DIR unless it's required
THEME_LAYOUT_DIR = "layout"

View File

@@ -0,0 +1,33 @@
"""
URL configuration for web_project project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/5.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include, path
from web_project.views import SystemView
urlpatterns = [
path("admin/", admin.site.urls),
# starter urls
path("", include("apps.sample.urls")),
# pages urls
path("", include("apps.pages.urls")),
]
handler404 = SystemView.as_view(template_name="pages_misc_error.html", status=404)
handler403 = SystemView.as_view(template_name="pages_misc_not_authorized.html", status=403)
handler400 = SystemView.as_view(template_name="pages_misc_error.html", status=400)
handler500 = SystemView.as_view(template_name="pages_misc_error.html", status=500)

View File

@@ -0,0 +1,16 @@
"""
WSGI config for web_project project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
application = get_wsgi_application()