diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index 80d6799..a532502 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index 60d4401..1928577 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 83fb33b..26c98a7 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index d547184..9be8687 100644 --- a/core/admin.py +++ b/core/admin.py @@ -166,7 +166,7 @@ class ParcelAdmin(admin.ModelAdmin): class PlatformProfileAdmin(admin.ModelAdmin): fieldsets = ( (_('General Info'), { - 'fields': ('name', 'logo', 'slogan', 'address', 'phone_number', 'registration_number', 'vat_number') + 'fields': ('name', 'logo', 'favicon', 'admin_panel_logo', 'slogan', 'address', 'phone_number', 'registration_number', 'vat_number') }), (_('Financial Configuration'), { 'fields': ('platform_fee_percentage', 'enable_payment') diff --git a/core/migrations/0025_platformprofile_admin_panel_logo_and_more.py b/core/migrations/0025_platformprofile_admin_panel_logo_and_more.py new file mode 100644 index 0000000..b2b5c9a --- /dev/null +++ b/core/migrations/0025_platformprofile_admin_panel_logo_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.2.7 on 2026-01-31 13:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0024_platformprofile_auto_mark_paid'), + ] + + operations = [ + migrations.AddField( + model_name='platformprofile', + name='admin_panel_logo', + field=models.ImageField(blank=True, help_text='Logo for the Admin Panel (top left).', null=True, upload_to='platform_logos/', verbose_name='Admin Panel Logo'), + ), + migrations.AddField( + model_name='platformprofile', + name='favicon', + field=models.ImageField(blank=True, help_text='Upload a favicon (e.g., .ico or .png)', null=True, upload_to='platform_logos/', verbose_name='Favicon'), + ), + ] diff --git a/core/migrations/__pycache__/0024_platformprofile_auto_mark_paid.cpython-311.pyc b/core/migrations/__pycache__/0024_platformprofile_auto_mark_paid.cpython-311.pyc new file mode 100644 index 0000000..538526b Binary files /dev/null and b/core/migrations/__pycache__/0024_platformprofile_auto_mark_paid.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0025_platformprofile_admin_panel_logo_and_more.cpython-311.pyc b/core/migrations/__pycache__/0025_platformprofile_admin_panel_logo_and_more.cpython-311.pyc new file mode 100644 index 0000000..74f277c Binary files /dev/null and b/core/migrations/__pycache__/0025_platformprofile_admin_panel_logo_and_more.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 4128b14..efb9c7e 100644 --- a/core/models.py +++ b/core/models.py @@ -134,6 +134,8 @@ class PricingRule(models.Model): class PlatformProfile(models.Model): name = models.CharField(_('Platform Name'), max_length=100) logo = models.ImageField(_('Logo'), upload_to='platform_logos/', blank=True, null=True) + favicon = models.ImageField(_('Favicon'), upload_to='platform_logos/', blank=True, null=True, help_text=_("Upload a favicon (e.g., .ico or .png)")) + admin_panel_logo = models.ImageField(_('Admin Panel Logo'), upload_to='platform_logos/', blank=True, null=True, help_text=_("Logo for the Admin Panel (top left).")) slogan = models.CharField(_('Slogan'), max_length=255, blank=True) address = models.TextField(_('Address'), blank=True) phone_number = models.CharField(_('Phone Number'), max_length=50, blank=True) diff --git a/core/templates/admin/base.html b/core/templates/admin/base.html new file mode 100644 index 0000000..6b39599 --- /dev/null +++ b/core/templates/admin/base.html @@ -0,0 +1,29 @@ +{% extends "admin/base.html" %} +{% load static %} + +{% block extrahead %} + {{ block.super }} + {% if platform_profile and platform_profile.favicon %} + + {% endif %} + + {% if platform_profile and platform_profile.admin_panel_logo %} + + {% endif %} +{% endblock %} diff --git a/core/templates/base.html b/core/templates/base.html index 63881c0..5e681f2 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -8,6 +8,12 @@ {% block title %}masarX | {% trans "Small Shipments, Smart Delivery" %}{% endblock %} + {% if platform_profile and platform_profile.favicon %} + + {% else %} + + {% endif %} + {% if project_description %}