454554
This commit is contained in:
@@ -18,9 +18,6 @@ from import_export import resources
|
||||
from rangefilter.filters import DateRangeFilter
|
||||
|
||||
|
||||
from rangefilter.filters import DateRangeFilter
|
||||
|
||||
|
||||
class CreditTransactionResource(resources.ModelResource):
|
||||
"""Resource class for exporting Credit Transactions"""
|
||||
class Meta:
|
||||
|
||||
@@ -36,10 +36,7 @@ ALLOWED_HOSTS = [
|
||||
]
|
||||
|
||||
INSTALLED_APPS = [
|
||||
# Django Admin Enhancements (must be before django.contrib.admin)
|
||||
'admin_interface',
|
||||
'colorfield',
|
||||
# Core Django apps
|
||||
# Core Django apps - Custom admin with IGNY8 branding
|
||||
'igny8_core.admin.apps.Igny8AdminConfig', # Custom admin config
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
@@ -207,6 +204,9 @@ USE_TZ = True
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, 'igny8_core', 'static'),
|
||||
]
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
@@ -600,9 +600,6 @@ LOGGING = {
|
||||
},
|
||||
}
|
||||
|
||||
# Admin Interface Configuration
|
||||
X_FRAME_OPTIONS = 'SAMEORIGIN' # Required for django-admin-interface
|
||||
|
||||
# Celery Results Backend
|
||||
CELERY_RESULT_BACKEND = 'django-db'
|
||||
CELERY_CACHE_BACKEND = 'django-cache'
|
||||
|
||||
@@ -1,40 +1,177 @@
|
||||
/* IGNY8 Custom Admin Styles */
|
||||
/* ===================================================================
|
||||
IGNY8 CUSTOM ADMIN STYLES
|
||||
===================================================================
|
||||
Using IGNY8 brand colors from frontend design system
|
||||
=================================================================== */
|
||||
|
||||
/* IGNY8 Brand Color Variables */
|
||||
:root {
|
||||
--igny8-primary: #0693e3; /* Primary brand blue */
|
||||
--igny8-primary-dark: #0472b8; /* Primary dark */
|
||||
--igny8-success: #0bbf87; /* Success teal-green */
|
||||
--igny8-success-dark: #08966b; /* Success dark */
|
||||
--igny8-warning: #ff7a00; /* Warning orange */
|
||||
--igny8-warning-dark: #cc5f00; /* Warning dark */
|
||||
--igny8-danger: #ef4444; /* Danger red */
|
||||
--igny8-danger-dark: #d13333; /* Danger dark */
|
||||
--igny8-purple: #5d4ae3; /* Purple accent */
|
||||
--igny8-purple-dark: #3a2f94; /* Purple dark */
|
||||
--igny8-navy: #0d1b2a; /* Dark navy background */
|
||||
--igny8-navy-light: #142b3f; /* Navy light */
|
||||
--igny8-surface: #f8fafc; /* Page background */
|
||||
--igny8-panel: #ffffff; /* Panel background */
|
||||
--igny8-text: #555a68; /* Main text */
|
||||
--igny8-text-dim: #64748b; /* Dimmed text */
|
||||
--igny8-stroke: #e2e8f0; /* Borders */
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
HEADER & BRANDING - IGNY8 Primary Blue with Gradient
|
||||
=================================================================== */
|
||||
#header {
|
||||
background: linear-gradient(135deg, var(--igny8-primary) 0%, var(--igny8-primary-dark) 100%) !important;
|
||||
color: white !important;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
|
||||
}
|
||||
|
||||
#header a:link, #header a:visited {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
#branding h1, #branding h1 a:link, #branding h1 a:visited {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.header-user-tools a {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
SIDEBAR NAVIGATION - IGNY8 Navy Background for Readability
|
||||
=================================================================== */
|
||||
#changelist-filter {
|
||||
background: var(--igny8-surface) !important;
|
||||
}
|
||||
|
||||
#changelist-filter h2 {
|
||||
background: var(--igny8-navy) !important;
|
||||
color: white !important;
|
||||
padding: 10px !important;
|
||||
margin: 0 0 10px 0 !important;
|
||||
border-radius: 4px !important;
|
||||
}
|
||||
|
||||
#changelist-filter h3 {
|
||||
color: var(--igny8-text) !important;
|
||||
font-weight: bold !important;
|
||||
margin-top: 15px !important;
|
||||
padding: 8px 10px !important;
|
||||
background: var(--igny8-surface) !important;
|
||||
border-left: 3px solid var(--igny8-primary) !important;
|
||||
}
|
||||
|
||||
#changelist-filter li {
|
||||
padding: 5px 10px !important;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected {
|
||||
background: rgba(6, 147, 227, 0.1) !important;
|
||||
border-left: 3px solid var(--igny8-primary) !important;
|
||||
}
|
||||
|
||||
/* Module headers - Navy instead of bright blue */
|
||||
.module h2, .inline-group h2 {
|
||||
background: var(--igny8-navy) !important;
|
||||
color: white !important;
|
||||
padding: 10px !important;
|
||||
border-radius: 4px 4px 0 0 !important;
|
||||
}
|
||||
|
||||
/* Table headers - White with blue text for readability */
|
||||
.module caption, .module th, thead th {
|
||||
background: var(--igny8-surface) !important;
|
||||
color: var(--igny8-primary) !important;
|
||||
font-weight: 600 !important;
|
||||
border-bottom: 2px solid var(--igny8-primary) !important;
|
||||
}
|
||||
|
||||
#result_list thead th {
|
||||
background: var(--igny8-surface) !important;
|
||||
color: var(--igny8-primary) !important;
|
||||
padding: 12px 10px !important;
|
||||
border-bottom: 2px solid var(--igny8-primary) !important;
|
||||
}
|
||||
|
||||
/* Table header links */
|
||||
#result_list thead th a:link,
|
||||
#result_list thead th a:visited {
|
||||
color: var(--igny8-primary) !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
BUTTONS - IGNY8 Primary Blue
|
||||
=================================================================== */
|
||||
.button, input[type=submit], input[type=button], .submit-row input, button, .btn {
|
||||
background: var(--igny8-primary) !important;
|
||||
color: white !important;
|
||||
border: none !important;
|
||||
padding: 10px 15px !important;
|
||||
border-radius: 4px !important;
|
||||
cursor: pointer !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
.button:hover, input[type=submit]:hover, input[type=button]:hover, button:hover, .btn:hover {
|
||||
background: var(--igny8-primary-dark) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.button:active, .button:focus {
|
||||
background: var(--igny8-primary-dark) !important;
|
||||
}
|
||||
|
||||
/* Default action button */
|
||||
.default, input[type=submit].default {
|
||||
background: var(--igny8-primary) !important;
|
||||
border: 2px solid var(--igny8-primary-dark) !important;
|
||||
}
|
||||
|
||||
/* Status badges */
|
||||
.status-active {
|
||||
color: #28a745 !important;
|
||||
color: var(--igny8-success) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.status-inactive {
|
||||
color: #dc3545 !important;
|
||||
color: var(--igny8-danger) !important;
|
||||
}
|
||||
|
||||
.status-pending {
|
||||
color: #ffc107 !important;
|
||||
color: var(--igny8-warning) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.status-succeeded, .status-completed {
|
||||
color: #28a745 !important;
|
||||
color: var(--igny8-success) !important;
|
||||
}
|
||||
|
||||
.status-failed, .status-error {
|
||||
color: #dc3545 !important;
|
||||
color: var(--igny8-danger) !important;
|
||||
}
|
||||
|
||||
/* Credit indicators */
|
||||
.credits-low {
|
||||
color: #dc3545 !important;
|
||||
color: var(--igny8-danger) !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.credits-medium {
|
||||
color: #ffc107 !important;
|
||||
color: var(--igny8-warning) !important;
|
||||
}
|
||||
|
||||
.credits-high {
|
||||
color: #28a745 !important;
|
||||
color: var(--igny8-success) !important;
|
||||
}
|
||||
|
||||
/* Quick action buttons */
|
||||
@@ -45,25 +182,25 @@
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 2px;
|
||||
background-color: #417690;
|
||||
background-color: var(--igny8-primary);
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.admin-action-button:hover {
|
||||
background-color: #305d75;
|
||||
background-color: var(--igny8-primary-dark);
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* List view enhancements */
|
||||
#content-main table tr:hover {
|
||||
background-color: #f8f9fa !important;
|
||||
background-color: var(--igny8-surface) !important;
|
||||
}
|
||||
|
||||
/* Improve sidebar menu appearance */
|
||||
#content-related h3 {
|
||||
background: #417690;
|
||||
background: var(--igny8-primary);
|
||||
color: white;
|
||||
padding: 10px;
|
||||
border-radius: 4px 4px 0 0;
|
||||
@@ -77,42 +214,42 @@
|
||||
/* Highlight required fields */
|
||||
.required label:after {
|
||||
content: " *";
|
||||
color: #dc3545;
|
||||
color: var(--igny8-danger);
|
||||
}
|
||||
|
||||
/* Success messages */
|
||||
.success, .messagelist .success {
|
||||
background-color: #d4edda !important;
|
||||
border-color: #c3e6cb !important;
|
||||
color: #155724 !important;
|
||||
background-color: rgba(11, 191, 135, 0.1) !important;
|
||||
border-color: var(--igny8-success) !important;
|
||||
color: var(--igny8-success-dark) !important;
|
||||
}
|
||||
|
||||
/* Warning messages */
|
||||
.warning, .messagelist .warning {
|
||||
background-color: #fff3cd !important;
|
||||
border-color: #ffeaa7 !important;
|
||||
color: #856404 !important;
|
||||
background-color: rgba(255, 122, 0, 0.1) !important;
|
||||
border-color: var(--igny8-warning) !important;
|
||||
color: var(--igny8-warning-dark) !important;
|
||||
}
|
||||
|
||||
/* Error messages */
|
||||
.error, .messagelist .error {
|
||||
background-color: #f8d7da !important;
|
||||
border-color: #f5c6cb !important;
|
||||
color: #721c24 !important;
|
||||
background-color: rgba(239, 68, 68, 0.1) !important;
|
||||
border-color: var(--igny8-danger) !important;
|
||||
color: var(--igny8-danger-dark) !important;
|
||||
}
|
||||
|
||||
/* Improve table readability */
|
||||
#result_list tbody tr:nth-child(odd) {
|
||||
background-color: #f9f9f9;
|
||||
background-color: var(--igny8-surface);
|
||||
}
|
||||
|
||||
#result_list tbody tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
background-color: var(--igny8-panel);
|
||||
}
|
||||
|
||||
/* Better button styling */
|
||||
.button, input[type=submit], input[type=button], .submit-row input {
|
||||
background: #417690 !important;
|
||||
background: var(--igny8-primary) !important;
|
||||
color: white !important;
|
||||
border: none !important;
|
||||
padding: 10px 15px !important;
|
||||
@@ -121,21 +258,112 @@
|
||||
}
|
||||
|
||||
.button:hover, input[type=submit]:hover, input[type=button]:hover {
|
||||
background: #305d75 !important;
|
||||
background: var(--igny8-primary-dark) !important;
|
||||
}
|
||||
|
||||
/* Delete button styling */
|
||||
.deletelink, .deletelink-box a {
|
||||
background: #dc3545 !important;
|
||||
.deletelink, .deletelink-box a, a.deletelink:link, a.deletelink:visited {
|
||||
background: var(--igny8-danger) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.deletelink:hover, .deletelink-box a:hover {
|
||||
background: #c82333 !important;
|
||||
background: var(--igny8-danger-dark) !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
LINKS - IGNY8 Primary Blue
|
||||
=================================================================== */
|
||||
a, a:link, a:visited {
|
||||
color: var(--igny8-primary) !important;
|
||||
}
|
||||
|
||||
a:hover, a:focus {
|
||||
color: var(--igny8-primary-dark) !important;
|
||||
}
|
||||
|
||||
.breadcrumbs a {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
ACTION BAR - IGNY8 Surface Color
|
||||
=================================================================== */
|
||||
.actions {
|
||||
background: var(--igny8-surface) !important;
|
||||
border-radius: 4px !important;
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
.actions select {
|
||||
border: 1px solid var(--igny8-stroke) !important;
|
||||
padding: 5px !important;
|
||||
border-radius: 3px !important;
|
||||
}
|
||||
|
||||
.actions .button, .actions button {
|
||||
background: var(--igny8-primary) !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
CHECKBOXES & ICONS - IGNY8 Colors
|
||||
=================================================================== */
|
||||
input[type="checkbox"]:checked {
|
||||
accent-color: var(--igny8-primary) !important;
|
||||
}
|
||||
|
||||
.vCheckboxLabel {
|
||||
display: inline !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
SIDEBAR SECTIONS - Better Contrast
|
||||
=================================================================== */
|
||||
#content-related .module {
|
||||
background: var(--igny8-panel) !important;
|
||||
border: 1px solid var(--igny8-stroke) !important;
|
||||
}
|
||||
|
||||
#content-related h3 {
|
||||
background: var(--igny8-navy) !important;
|
||||
color: white !important;
|
||||
padding: 10px !important;
|
||||
border-radius: 4px 4px 0 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
FIELDSET LEGENDS - Navy Background
|
||||
=================================================================== */
|
||||
fieldset.module h2, .collapse h2 {
|
||||
background: var(--igny8-navy) !important;
|
||||
color: white !important;
|
||||
padding: 10px !important;
|
||||
border-radius: 4px 4px 0 0 !important;
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
BREADCRUMBS - Better Visibility
|
||||
=================================================================== */
|
||||
.breadcrumbs {
|
||||
background: var(--igny8-navy) !important;
|
||||
color: white !important;
|
||||
padding: 10px 15px !important;
|
||||
}
|
||||
|
||||
.breadcrumbs a {
|
||||
color: white !important;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.breadcrumbs a:hover {
|
||||
opacity: 1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Improve filter sidebar */
|
||||
#changelist-filter h2 {
|
||||
background: #417690;
|
||||
background: var(--igny8-primary);
|
||||
color: white;
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 0;
|
||||
@@ -145,27 +373,27 @@
|
||||
font-weight: bold;
|
||||
margin-top: 15px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-bottom: 1px solid var(--igny8-stroke);
|
||||
}
|
||||
|
||||
/* Better pagination */
|
||||
.paginator {
|
||||
font-size: 14px;
|
||||
padding: 10px;
|
||||
background: #f8f9fa;
|
||||
background: var(--igny8-surface);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.paginator a {
|
||||
padding: 5px 10px;
|
||||
margin: 0 2px;
|
||||
background: white;
|
||||
border: 1px solid #ddd;
|
||||
background: var(--igny8-panel);
|
||||
border: 1px solid var(--igny8-stroke);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.paginator a:hover {
|
||||
background: #417690;
|
||||
background: var(--igny8-primary);
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -183,8 +411,9 @@
|
||||
|
||||
/* Admin header improvements */
|
||||
#header {
|
||||
background: #417690;
|
||||
background: linear-gradient(135deg, var(--igny8-primary) 0%, var(--igny8-primary-dark) 100%);
|
||||
color: white;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
#header a:link, #header a:visited {
|
||||
@@ -197,7 +426,7 @@
|
||||
|
||||
/* Fieldset legend styling */
|
||||
fieldset.module h2 {
|
||||
background: #417690;
|
||||
background: var(--igny8-primary);
|
||||
color: white;
|
||||
padding: 8px 10px;
|
||||
border-radius: 4px 4px 0 0;
|
||||
@@ -205,7 +434,7 @@ fieldset.module h2 {
|
||||
|
||||
/* Inline forms */
|
||||
.inline-group {
|
||||
border: 1px solid #ddd;
|
||||
border: 1px solid var(--igny8-stroke);
|
||||
border-radius: 4px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -217,15 +446,15 @@ fieldset.module h2 {
|
||||
/* Help text styling */
|
||||
.help {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
color: var(--igny8-text-dim);
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* Dashboard widget styling */
|
||||
.dashboard-card {
|
||||
background: white;
|
||||
border: 1px solid #ddd;
|
||||
background: var(--igny8-panel);
|
||||
border: 1px solid var(--igny8-stroke);
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
@@ -234,7 +463,7 @@ fieldset.module h2 {
|
||||
|
||||
.dashboard-card h2 {
|
||||
margin-top: 0;
|
||||
border-bottom: 2px solid #417690;
|
||||
border-bottom: 2px solid var(--igny8-primary);
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
@@ -246,13 +475,13 @@ fieldset.module h2 {
|
||||
.metric-value {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #417690;
|
||||
color: var(--igny8-primary);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.metric-label {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
color: var(--igny8-text-dim);
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
@@ -266,25 +495,25 @@ fieldset.module h2 {
|
||||
}
|
||||
|
||||
.alert-error {
|
||||
background-color: #f8d7da;
|
||||
border-left-color: #dc3545;
|
||||
color: #721c24;
|
||||
background-color: rgba(239, 68, 68, 0.1);
|
||||
border-left-color: var(--igny8-danger);
|
||||
color: var(--igny8-danger-dark);
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
background-color: #fff3cd;
|
||||
border-left-color: #ffc107;
|
||||
color: #856404;
|
||||
background-color: rgba(255, 122, 0, 0.1);
|
||||
border-left-color: var(--igny8-warning);
|
||||
color: var(--igny8-warning-dark);
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
background-color: #d1ecf1;
|
||||
border-left-color: #17a2b8;
|
||||
color: #0c5460;
|
||||
background-color: rgba(6, 147, 227, 0.1);
|
||||
border-left-color: var(--igny8-primary);
|
||||
color: var(--igny8-primary-dark);
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background-color: #d4edda;
|
||||
border-left-color: #28a745;
|
||||
color: #155724;
|
||||
background-color: rgba(11, 191, 135, 0.1);
|
||||
border-left-color: var(--igny8-success);
|
||||
color: var(--igny8-success-dark);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user