diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index aaa84ed..1e00947 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/__pycache__/urls.cpython-311.pyc b/config/__pycache__/urls.cpython-311.pyc index b44c4bc..96daead 100644 Binary files a/config/__pycache__/urls.cpython-311.pyc and b/config/__pycache__/urls.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index c276bb9..f7ca7b6 100644 --- a/config/settings.py +++ b/config/settings.py @@ -164,6 +164,10 @@ STATICFILES_DIRS = [ BASE_DIR / 'node_modules', ] +# Media files +MEDIA_URL = '/media/' +MEDIA_ROOT = BASE_DIR / 'media' + # Email EMAIL_BACKEND = os.getenv( "EMAIL_BACKEND", @@ -207,4 +211,4 @@ WHATSAPP_ENABLED = os.getenv("WHATSAPP_ENABLED", "false").lower() == "true" DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' LOGIN_REDIRECT_URL = 'dashboard' -LOGOUT_REDIRECT_URL = 'index' +LOGOUT_REDIRECT_URL = 'index' \ No newline at end of file diff --git a/config/urls.py b/config/urls.py index 4d288c5..89a3eba 100644 --- a/config/urls.py +++ b/config/urls.py @@ -16,4 +16,5 @@ urlpatterns += i18n_patterns( if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) - urlpatterns += static("/assets/", document_root=settings.BASE_DIR / "assets") \ No newline at end of file + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + urlpatterns += static("/assets/", document_root=settings.BASE_DIR / "assets") diff --git a/core/__pycache__/context_processors.cpython-311.pyc b/core/__pycache__/context_processors.cpython-311.pyc index 00427d2..caf654d 100644 Binary files a/core/__pycache__/context_processors.cpython-311.pyc and b/core/__pycache__/context_processors.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index bc4e4a0..f3c7b55 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 9d3522b..e99b8fd 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 0124c63..91c1022 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/context_processors.py b/core/context_processors.py index bfbe8d9..85ff7f8 100644 --- a/core/context_processors.py +++ b/core/context_processors.py @@ -1,6 +1,6 @@ import os import time -from .models import Profile +from .models import Profile, PlatformProfile def project_context(request): """ @@ -12,6 +12,8 @@ def project_context(request): profile = request.user.profile except: profile, created = Profile.objects.get_or_create(user=request.user) + + platform_profile = PlatformProfile.objects.first() return { "project_description": os.getenv("PROJECT_DESCRIPTION", ""), @@ -19,4 +21,5 @@ def project_context(request): # Used for cache-busting static assets "deployment_timestamp": int(time.time()), "user_profile": profile, + "platform_profile": platform_profile, } \ No newline at end of file diff --git a/core/migrations/0008_platformprofile_privacy_policy_and_more.py b/core/migrations/0008_platformprofile_privacy_policy_and_more.py new file mode 100644 index 0000000..e775cbb --- /dev/null +++ b/core/migrations/0008_platformprofile_privacy_policy_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.2.7 on 2026-01-25 11:00 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0007_platformprofile'), + ] + + operations = [ + migrations.AddField( + model_name='platformprofile', + name='privacy_policy', + field=models.TextField(blank=True, verbose_name='Privacy Policy'), + ), + migrations.AddField( + model_name='platformprofile', + name='terms_conditions', + field=models.TextField(blank=True, verbose_name='Terms and Conditions'), + ), + ] diff --git a/core/migrations/__pycache__/0008_platformprofile_privacy_policy_and_more.cpython-311.pyc b/core/migrations/__pycache__/0008_platformprofile_privacy_policy_and_more.cpython-311.pyc new file mode 100644 index 0000000..8840b08 Binary files /dev/null and b/core/migrations/__pycache__/0008_platformprofile_privacy_policy_and_more.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 46898f0..8804f9f 100644 --- a/core/models.py +++ b/core/models.py @@ -154,10 +154,12 @@ class PlatformProfile(models.Model): phone_number = models.CharField(_('Phone Number'), max_length=50, blank=True) registration_number = models.CharField(_('Registration Number'), max_length=100, blank=True) vat_number = models.CharField(_('VAT Number'), max_length=100, blank=True) + privacy_policy = models.TextField(_('Privacy Policy'), blank=True) + terms_conditions = models.TextField(_('Terms and Conditions'), blank=True) def __str__(self): return self.name class Meta: verbose_name = _('Platform Profile') - verbose_name_plural = _('Platform Profile') + verbose_name_plural = _('Platform Profile') \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 0ed9cdf..36cb331 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -41,7 +41,7 @@ {% block head %}{% endblock %} - +