From d75002ae280821488f759e464cc2c880cbc39b4f Mon Sep 17 00:00:00 2001 From: selfhoster1312 Date: Fri, 7 Mar 2025 17:44:47 +0100 Subject: [PATCH] feat: Support themes via CHARIOTTE_THEME settings / env variable --- .coveragerc | 4 +++ la_chariotte/order/models.py | 6 ---- la_chariotte/order/views/grouped_order.py | 17 +++++++++ la_chariotte/order/views/item.py | 20 ++++++++++- la_chariotte/settings.py | 17 +++++++-- .../tests/test_order_views_grouped_order.py | 33 +++++++++++++----- la_chariotte/tests/test_order_views_item.py | 14 ++++---- la_chariotte/themes/__init__.py | 0 la_chariotte/themes/default/__init__.py | 0 la_chariotte/themes/default/settings.py | 4 +++ .../static/fork-awesome/css/fork-awesome.css | 0 .../fork-awesome/css/fork-awesome.min.css | 0 .../fork-awesome/css/fork-awesome.min.css.map | 0 .../static/fork-awesome/css/v5-compat.css | 0 .../static/fork-awesome/css/v5-compat.min.css | 0 .../fork-awesome/css/v5-compat.min.css.map | 0 .../fonts/forkawesome-webfont.eot | Bin .../fonts/forkawesome-webfont.svg | 0 .../fonts/forkawesome-webfont.ttf | Bin .../fonts/forkawesome-webfont.woff | Bin .../fonts/forkawesome-webfont.woff2 | Bin .../default}/static/img/contributeureuses.png | Bin .../default}/static/img/icons/chariotte.ico | Bin .../static/img/logos/logo_hashbang.png | Bin .../static/img/logos/logo_la_chariotte.png | Bin .../default}/static/img/notice/add_item.png | Bin .../default}/static/img/notice/add_item_2.png | Bin .../default}/static/img/notice/copy_link.png | Bin .../static/img/notice/create_account.jpg | Bin .../static/img/notice/create_account_form.jpg | Bin .../img/notice/create_grouped_order.jpg | Bin .../img/notice/create_grouped_order_form.jpg | Bin .../static/img/notice/edit_grouped_order.png | Bin .../static/img/notice/get_spreadsheet.png | Bin .../static/img/notice/go_to_overview.png | Bin .../img/notice/grouped_order_sum_up.png | Bin .../static/img/notice/items_overview.png | Bin .../static/img/notice/join_grouped_order.png | Bin .../default}/static/img/notice/log_in.jpg | Bin .../static/img/notice/my_grouped_orders.jpg | Bin .../default}/static/img/notice/order_form.png | Bin .../static/img/notice/print_orders_list.png | Bin .../static/img/notice/share_grouped_order.png | Bin .../default}/static/img/notice_1.jpg | Bin .../default}/static/img/notice_2.jpg | Bin .../default}/static/img/notice_3.jpg | Bin .../default}/static/sass/base/_accordion.sass | 0 .../default}/static/sass/base/_content.sass | 0 .../default}/static/sass/base/_footer.sass | 0 .../default}/static/sass/base/_form.sass | 0 .../default}/static/sass/base/_global.sass | 0 .../default}/static/sass/base/_navbar.sass | 0 .../default}/static/sass/base/_table.sass | 0 .../default}/static/sass/base/_tabs.sass | 0 .../default}/static/sass/base/_titles.sass | 0 .../default}/static/sass/base/_variables.sass | 0 .../default}/static/sass/style.sass | 4 +-- .../{ => themes/default}/templates/base.html | 0 .../default}/templates/dashboard.html | 0 .../templates/help/about_chariotte.html | 0 .../default}/templates/help/faq.html | 0 .../default}/templates/help/legal_notice.html | 0 .../default}/templates/help/notice.html | 0 .../default}/templates/mail/base_mail.html | 0 .../templates/mail/order_confirm_mail.html | 0 .../order/grouped_order_add_items.html | 0 .../order/grouped_order_confirm_delete.html | 0 .../templates/order/grouped_order_create.html | 0 .../templates/order/grouped_order_detail.html | 0 .../order/grouped_order_overview.html | 0 .../templates/order/grouped_order_sheet.html | 0 .../templates/order/grouped_order_update.html | 0 .../default}/templates/order/index.html | 0 .../templates/order/order_detail.html | 0 .../templates/registration/login.html | 0 .../registration/password_reset_complete.html | 0 .../registration/password_reset_confirm.html | 0 .../registration/password_reset_done.html | 0 .../registration/password_reset_form.html | 0 .../templates/registration/signup.html | 0 .../warning_grouped_order_creation.html | 0 81 files changed, 93 insertions(+), 26 deletions(-) create mode 100644 la_chariotte/themes/__init__.py create mode 100644 la_chariotte/themes/default/__init__.py create mode 100644 la_chariotte/themes/default/settings.py rename la_chariotte/{ => themes/default}/static/fork-awesome/css/fork-awesome.css (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/css/fork-awesome.min.css (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/css/fork-awesome.min.css.map (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/css/v5-compat.css (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/css/v5-compat.min.css (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/css/v5-compat.min.css.map (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/fonts/forkawesome-webfont.eot (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/fonts/forkawesome-webfont.svg (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/fonts/forkawesome-webfont.ttf (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/fonts/forkawesome-webfont.woff (100%) rename la_chariotte/{ => themes/default}/static/fork-awesome/fonts/forkawesome-webfont.woff2 (100%) rename la_chariotte/{ => themes/default}/static/img/contributeureuses.png (100%) rename la_chariotte/{ => themes/default}/static/img/icons/chariotte.ico (100%) rename la_chariotte/{ => themes/default}/static/img/logos/logo_hashbang.png (100%) rename la_chariotte/{ => themes/default}/static/img/logos/logo_la_chariotte.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/add_item.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/add_item_2.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/copy_link.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/create_account.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice/create_account_form.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice/create_grouped_order.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice/create_grouped_order_form.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice/edit_grouped_order.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/get_spreadsheet.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/go_to_overview.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/grouped_order_sum_up.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/items_overview.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/join_grouped_order.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/log_in.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice/my_grouped_orders.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice/order_form.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/print_orders_list.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice/share_grouped_order.png (100%) rename la_chariotte/{ => themes/default}/static/img/notice_1.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice_2.jpg (100%) rename la_chariotte/{ => themes/default}/static/img/notice_3.jpg (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_accordion.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_content.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_footer.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_form.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_global.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_navbar.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_table.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_tabs.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_titles.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/base/_variables.sass (100%) rename la_chariotte/{ => themes/default}/static/sass/style.sass (76%) rename la_chariotte/{ => themes/default}/templates/base.html (100%) rename la_chariotte/{ => themes/default}/templates/dashboard.html (100%) rename la_chariotte/{ => themes/default}/templates/help/about_chariotte.html (100%) rename la_chariotte/{ => themes/default}/templates/help/faq.html (100%) rename la_chariotte/{ => themes/default}/templates/help/legal_notice.html (100%) rename la_chariotte/{ => themes/default}/templates/help/notice.html (100%) rename la_chariotte/{mail => themes/default}/templates/mail/base_mail.html (100%) rename la_chariotte/{mail => themes/default}/templates/mail/order_confirm_mail.html (100%) rename la_chariotte/{order => themes/default}/templates/order/grouped_order_add_items.html (100%) rename la_chariotte/{order => themes/default}/templates/order/grouped_order_confirm_delete.html (100%) rename la_chariotte/{order => themes/default}/templates/order/grouped_order_create.html (100%) rename la_chariotte/{order => themes/default}/templates/order/grouped_order_detail.html (100%) rename la_chariotte/{order => themes/default}/templates/order/grouped_order_overview.html (100%) rename la_chariotte/{order => themes/default}/templates/order/grouped_order_sheet.html (100%) rename la_chariotte/{order => themes/default}/templates/order/grouped_order_update.html (100%) rename la_chariotte/{order => themes/default}/templates/order/index.html (100%) rename la_chariotte/{order => themes/default}/templates/order/order_detail.html (100%) rename la_chariotte/{accounts => themes/default}/templates/registration/login.html (100%) rename la_chariotte/{accounts => themes/default}/templates/registration/password_reset_complete.html (100%) rename la_chariotte/{accounts => themes/default}/templates/registration/password_reset_confirm.html (100%) rename la_chariotte/{accounts => themes/default}/templates/registration/password_reset_done.html (100%) rename la_chariotte/{accounts => themes/default}/templates/registration/password_reset_form.html (100%) rename la_chariotte/{accounts => themes/default}/templates/registration/signup.html (100%) rename la_chariotte/{order => themes/default}/templates/warning_grouped_order_creation.html (100%) diff --git a/.coveragerc b/.coveragerc index 73d8e64..9077287 100644 --- a/.coveragerc +++ b/.coveragerc @@ -8,3 +8,7 @@ omit = la_chariotte/settings.py la_chariotte/asgi.py la_chariotte/wsgi.py + # We only test the default theme + # Also, code depending on theme_settings in the codebase is marked + # `# pragma: no cover` to avoid false positives. + la_chariotte/themes/*/settings.py diff --git a/la_chariotte/order/models.py b/la_chariotte/order/models.py index 5450f72..a32747a 100644 --- a/la_chariotte/order/models.py +++ b/la_chariotte/order/models.py @@ -73,9 +73,6 @@ class GroupedOrder(models.Model): def is_to_be_delivered(self): return self.delivery_date >= timezone.now().date() - def get_absolute_url(self): - return reverse("order:manage_items", kwargs={"code": self.code}) - def clean_fields(self, exclude=None): super().clean_fields(exclude=exclude) # Ensure that new grouped orders use a delivery_date in the future. @@ -172,9 +169,6 @@ class Item(models.Model): else: return None - def get_absolute_url(self): - return reverse("order:manage_items", kwargs={"code": self.grouped_order.code}) - def __str__(self): # pragma: no cover return f"{self.name} ({self.price} €)" diff --git a/la_chariotte/order/views/grouped_order.py b/la_chariotte/order/views/grouped_order.py index 55d9cca..7b96626 100644 --- a/la_chariotte/order/views/grouped_order.py +++ b/la_chariotte/order/views/grouped_order.py @@ -11,6 +11,7 @@ from django.views import generic from django_weasyprint import WeasyTemplateResponseMixin from icalendar import Calendar, Event, vCalAddress, vText +from ...settings import theme_settings from ..forms import GroupedOrderForm, Item, JoinGroupedOrderForm from ..models import GroupedOrder, OrderAuthor from .mixins import UserIsOrgaMixin @@ -183,6 +184,14 @@ class GroupedOrderCreateView(LoginRequiredMixin, generic.CreateView): self.object.create_code_from_pk() return super().form_valid(form) + def get_success_url(self): + # If the theme has specified a custom redirect, use it as success URL + theme_redirect = theme_settings.success_url(self) + if theme_redirect: # pragma: no cover + return theme_redirect + else: + return reverse("order:manage_items", kwargs={"code": self.object.code}) + class GroupedOrderUpdateView(UserIsOrgaMixin, generic.UpdateView): model = GroupedOrder @@ -198,6 +207,14 @@ class GroupedOrderUpdateView(UserIsOrgaMixin, generic.UpdateView): kwargs["user"] = self.request.user return kwargs + def get_success_url(self): + # If the theme has specified a custom redirect, use it as success URL + theme_redirect = theme_settings.success_url(self) + if theme_redirect: # pragma: no cover + return theme_redirect + else: + return reverse("order:manage_items", kwargs={"code": self.object.code}) + class GroupedOrderDuplicateView(UserIsOrgaMixin, generic.RedirectView): def get_object(self, queryset=None): diff --git a/la_chariotte/order/views/item.py b/la_chariotte/order/views/item.py index 16b3733..942add0 100644 --- a/la_chariotte/order/views/item.py +++ b/la_chariotte/order/views/item.py @@ -3,6 +3,7 @@ from django.shortcuts import get_object_or_404 from django.urls import reverse_lazy from django.views import generic +from ...settings import theme_settings from ..forms import ItemCreateForm from ..models import GroupedOrder, Item @@ -21,12 +22,29 @@ class ItemCreateView(UserPassesTestMixin, generic.CreateView): grouped_order = get_object_or_404(GroupedOrder, code=self.kwargs.get("code")) return grouped_order.orga == self.request.user + def get_success_url(self): + # If the theme has specified a custom redirect, use it as success URL + theme_redirect = theme_settings.success_url(self) + if theme_redirect: # pragma: no cover + return theme_redirect + else: + return reverse_lazy( + "order:manage_items", kwargs={"code": self.object.grouped_order.code} + ) + class ItemDeleteView(UserPassesTestMixin, generic.DeleteView): model = Item def get_success_url(self): - return reverse_lazy("order:manage_items", args=[self.object.grouped_order.code]) + # If the theme has specified a custom redirect, use it as success URL + theme_redirect = theme_settings.success_url(self) + if theme_redirect: # pragma: no cover + return theme_redirect + else: + return reverse_lazy( + "order:manage_items", kwargs={"code": self.object.grouped_order.code} + ) def test_func(self): # Restrict access to the manager or a superuser diff --git a/la_chariotte/settings.py b/la_chariotte/settings.py index ab6dadc..1ee950f 100644 --- a/la_chariotte/settings.py +++ b/la_chariotte/settings.py @@ -57,10 +57,14 @@ LOGIN_URL = "accounts:login" LOGIN_REDIRECT_URL = "order:index" LOGOUT_REDIRECT_URL = "dashboard" +CHARIOTTE_THEME = os.getenv("CHARIOTTE_THEME", "default") + TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [BASE_DIR / "la_chariotte" / "templates"], + "DIRS": ( + [BASE_DIR / "la_chariotte" / "themes" / CHARIOTTE_THEME / "templates"] + ), "APP_DIRS": True, "OPTIONS": { "context_processors": [ @@ -134,7 +138,7 @@ USE_TZ = True # https://docs.djangoproject.com/en/4.1/howto/static-files/ STATIC_URL = "static/" -STATICFILES_DIRS = ["la_chariotte/static"] +STATICFILES_DIRS = [BASE_DIR / "la_chariotte" / "themes" / CHARIOTTE_THEME / "static"] STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", @@ -191,3 +195,12 @@ if DEBUG: EMAIL_HOST_PASSWORD = "" EMAIL_PORT = 1025 EMAIL_USE_TLS = False + +# Load theme settings as la_chariotte.settings.theme_settings +from importlib import import_module + +theme_settings = import_module( + "la_chariotte.themes.%s.settings" % CHARIOTTE_THEME + if CHARIOTTE_THEME + else "default" +) diff --git a/la_chariotte/tests/test_order_views_grouped_order.py b/la_chariotte/tests/test_order_views_grouped_order.py index ce6fa36..dc4ca8d 100644 --- a/la_chariotte/tests/test_order_views_grouped_order.py +++ b/la_chariotte/tests/test_order_views_grouped_order.py @@ -10,6 +10,7 @@ from django.urls import reverse from django.utils import timezone from icalendar import Calendar, vText +from la_chariotte import settings from la_chariotte.order import models from la_chariotte.tests.utils import create_grouped_order, order_items_in_grouped_order @@ -889,7 +890,8 @@ class TestGroupedOrderCreateView: }, ) assert response.status_code == 302 - assert response.url.endswith("gerer-produits") + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url.endswith("gerer-produits") assert models.GroupedOrder.objects.count() == 1 assert models.GroupedOrder.objects.first().code != "" @@ -965,7 +967,8 @@ class TestGroupedOrderUpdateView: }, ) assert response.status_code == 302 - assert response.url.endswith("gerer-produits") + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url.endswith("gerer-produits") assert models.GroupedOrder.objects.count() == 1 assert models.GroupedOrder.objects.first().name == "titre test modifié" assert models.GroupedOrder.objects.first().place == "quelque part" @@ -1006,7 +1009,8 @@ class TestGroupedOrderUpdateView: }, ) assert response.status_code == 302 - assert response.url.endswith("gerer-produits") + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url.endswith("gerer-produits") assert models.GroupedOrder.objects.count() == 1 assert models.GroupedOrder.objects.first().name == "titre test modifié" assert models.GroupedOrder.objects.first().place == "quelque part" @@ -1118,7 +1122,8 @@ class TestGroupedOrderAddItemsView: }, ) assert response.status_code == 302 - assert response.url.endswith("gerer-produits") + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url.endswith("gerer-produits") assert models.GroupedOrder.objects.count() == 1 # Create an item @@ -1126,7 +1131,11 @@ class TestGroupedOrderAddItemsView: create_item_url = reverse("order:item_create", args=[grouped_order.code]) response = client_log.post(create_item_url, {"name": "Pain test", "price": "2"}) response.status_code == 302 - response.url == reverse("order:manage_items", args=[grouped_order.code]) + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url == reverse( + "order:manage_items", + args=[grouped_order.code], + ) assert grouped_order.item_set.count() == 1 # Delete the item @@ -1134,7 +1143,11 @@ class TestGroupedOrderAddItemsView: delete_item_url = reverse("order:item_delete", args=[grouped_order.id, item.id]) response = client_log.post(delete_item_url) assert response.status_code == 302 - assert response.url == reverse("order:manage_items", args=[grouped_order.code]) + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url == reverse( + "order:manage_items", + args=[grouped_order.code], + ) assert grouped_order.item_set.count() == 0 def test_create_or_delete_item__not_orga(self, client_log, other_user): @@ -1324,9 +1337,11 @@ class TestGroupedOrderDuplicateView: # redirection assert response.status_code == 302 - assert response.url == reverse( - "order:update_grouped_order", kwargs={"code": new_grouped_order.code} - ) + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url == reverse( + "order:update_grouped_order", + kwargs={"code": new_grouped_order.code}, + ) # The initial grouped order did not change assert grouped_order.item_set.first().ordered_nb == 4 diff --git a/la_chariotte/tests/test_order_views_item.py b/la_chariotte/tests/test_order_views_item.py index 55f888b..031e9e4 100644 --- a/la_chariotte/tests/test_order_views_item.py +++ b/la_chariotte/tests/test_order_views_item.py @@ -2,6 +2,7 @@ import pytest from django.contrib import auth from django.urls import reverse +from la_chariotte import settings from la_chariotte.order import models from .utils import create_grouped_order @@ -28,12 +29,13 @@ class TestItemCreateView: create_item_view_url, {"name": "titre item", "price": 2} ) assert response.status_code == 302 - assert response.url == reverse( - "order:manage_items", - kwargs={ - "code": grouped_order.code, - }, - ) + if getattr(settings, "CHARIOTTE_THEME", "default") == "default": + assert response.url == reverse( + "order:manage_items", + kwargs={ + "code": grouped_order.code, + }, + ) assert models.Item.objects.first().name == "titre item" response = client_log.get(response.url) assert "titre item" in response.content.decode() diff --git a/la_chariotte/themes/__init__.py b/la_chariotte/themes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/la_chariotte/themes/default/__init__.py b/la_chariotte/themes/default/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/la_chariotte/themes/default/settings.py b/la_chariotte/themes/default/settings.py new file mode 100644 index 0000000..241b334 --- /dev/null +++ b/la_chariotte/themes/default/settings.py @@ -0,0 +1,4 @@ +# The theme may want to specify which URL a successful form should redirect to +def success_url(view): + # No more form success URLs to overwrite + return None diff --git a/la_chariotte/static/fork-awesome/css/fork-awesome.css b/la_chariotte/themes/default/static/fork-awesome/css/fork-awesome.css similarity index 100% rename from la_chariotte/static/fork-awesome/css/fork-awesome.css rename to la_chariotte/themes/default/static/fork-awesome/css/fork-awesome.css diff --git a/la_chariotte/static/fork-awesome/css/fork-awesome.min.css b/la_chariotte/themes/default/static/fork-awesome/css/fork-awesome.min.css similarity index 100% rename from la_chariotte/static/fork-awesome/css/fork-awesome.min.css rename to la_chariotte/themes/default/static/fork-awesome/css/fork-awesome.min.css diff --git a/la_chariotte/static/fork-awesome/css/fork-awesome.min.css.map b/la_chariotte/themes/default/static/fork-awesome/css/fork-awesome.min.css.map similarity index 100% rename from la_chariotte/static/fork-awesome/css/fork-awesome.min.css.map rename to la_chariotte/themes/default/static/fork-awesome/css/fork-awesome.min.css.map diff --git a/la_chariotte/static/fork-awesome/css/v5-compat.css b/la_chariotte/themes/default/static/fork-awesome/css/v5-compat.css similarity index 100% rename from la_chariotte/static/fork-awesome/css/v5-compat.css rename to la_chariotte/themes/default/static/fork-awesome/css/v5-compat.css diff --git a/la_chariotte/static/fork-awesome/css/v5-compat.min.css b/la_chariotte/themes/default/static/fork-awesome/css/v5-compat.min.css similarity index 100% rename from la_chariotte/static/fork-awesome/css/v5-compat.min.css rename to la_chariotte/themes/default/static/fork-awesome/css/v5-compat.min.css diff --git a/la_chariotte/static/fork-awesome/css/v5-compat.min.css.map b/la_chariotte/themes/default/static/fork-awesome/css/v5-compat.min.css.map similarity index 100% rename from la_chariotte/static/fork-awesome/css/v5-compat.min.css.map rename to la_chariotte/themes/default/static/fork-awesome/css/v5-compat.min.css.map diff --git a/la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.eot b/la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.eot similarity index 100% rename from la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.eot rename to la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.eot diff --git a/la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.svg b/la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.svg similarity index 100% rename from la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.svg rename to la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.svg diff --git a/la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.ttf b/la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.ttf similarity index 100% rename from la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.ttf rename to la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.ttf diff --git a/la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.woff b/la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.woff similarity index 100% rename from la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.woff rename to la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.woff diff --git a/la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.woff2 b/la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.woff2 similarity index 100% rename from la_chariotte/static/fork-awesome/fonts/forkawesome-webfont.woff2 rename to la_chariotte/themes/default/static/fork-awesome/fonts/forkawesome-webfont.woff2 diff --git a/la_chariotte/static/img/contributeureuses.png b/la_chariotte/themes/default/static/img/contributeureuses.png similarity index 100% rename from la_chariotte/static/img/contributeureuses.png rename to la_chariotte/themes/default/static/img/contributeureuses.png diff --git a/la_chariotte/static/img/icons/chariotte.ico b/la_chariotte/themes/default/static/img/icons/chariotte.ico similarity index 100% rename from la_chariotte/static/img/icons/chariotte.ico rename to la_chariotte/themes/default/static/img/icons/chariotte.ico diff --git a/la_chariotte/static/img/logos/logo_hashbang.png b/la_chariotte/themes/default/static/img/logos/logo_hashbang.png similarity index 100% rename from la_chariotte/static/img/logos/logo_hashbang.png rename to la_chariotte/themes/default/static/img/logos/logo_hashbang.png diff --git a/la_chariotte/static/img/logos/logo_la_chariotte.png b/la_chariotte/themes/default/static/img/logos/logo_la_chariotte.png similarity index 100% rename from la_chariotte/static/img/logos/logo_la_chariotte.png rename to la_chariotte/themes/default/static/img/logos/logo_la_chariotte.png diff --git a/la_chariotte/static/img/notice/add_item.png b/la_chariotte/themes/default/static/img/notice/add_item.png similarity index 100% rename from la_chariotte/static/img/notice/add_item.png rename to la_chariotte/themes/default/static/img/notice/add_item.png diff --git a/la_chariotte/static/img/notice/add_item_2.png b/la_chariotte/themes/default/static/img/notice/add_item_2.png similarity index 100% rename from la_chariotte/static/img/notice/add_item_2.png rename to la_chariotte/themes/default/static/img/notice/add_item_2.png diff --git a/la_chariotte/static/img/notice/copy_link.png b/la_chariotte/themes/default/static/img/notice/copy_link.png similarity index 100% rename from la_chariotte/static/img/notice/copy_link.png rename to la_chariotte/themes/default/static/img/notice/copy_link.png diff --git a/la_chariotte/static/img/notice/create_account.jpg b/la_chariotte/themes/default/static/img/notice/create_account.jpg similarity index 100% rename from la_chariotte/static/img/notice/create_account.jpg rename to la_chariotte/themes/default/static/img/notice/create_account.jpg diff --git a/la_chariotte/static/img/notice/create_account_form.jpg b/la_chariotte/themes/default/static/img/notice/create_account_form.jpg similarity index 100% rename from la_chariotte/static/img/notice/create_account_form.jpg rename to la_chariotte/themes/default/static/img/notice/create_account_form.jpg diff --git a/la_chariotte/static/img/notice/create_grouped_order.jpg b/la_chariotte/themes/default/static/img/notice/create_grouped_order.jpg similarity index 100% rename from la_chariotte/static/img/notice/create_grouped_order.jpg rename to la_chariotte/themes/default/static/img/notice/create_grouped_order.jpg diff --git a/la_chariotte/static/img/notice/create_grouped_order_form.jpg b/la_chariotte/themes/default/static/img/notice/create_grouped_order_form.jpg similarity index 100% rename from la_chariotte/static/img/notice/create_grouped_order_form.jpg rename to la_chariotte/themes/default/static/img/notice/create_grouped_order_form.jpg diff --git a/la_chariotte/static/img/notice/edit_grouped_order.png b/la_chariotte/themes/default/static/img/notice/edit_grouped_order.png similarity index 100% rename from la_chariotte/static/img/notice/edit_grouped_order.png rename to la_chariotte/themes/default/static/img/notice/edit_grouped_order.png diff --git a/la_chariotte/static/img/notice/get_spreadsheet.png b/la_chariotte/themes/default/static/img/notice/get_spreadsheet.png similarity index 100% rename from la_chariotte/static/img/notice/get_spreadsheet.png rename to la_chariotte/themes/default/static/img/notice/get_spreadsheet.png diff --git a/la_chariotte/static/img/notice/go_to_overview.png b/la_chariotte/themes/default/static/img/notice/go_to_overview.png similarity index 100% rename from la_chariotte/static/img/notice/go_to_overview.png rename to la_chariotte/themes/default/static/img/notice/go_to_overview.png diff --git a/la_chariotte/static/img/notice/grouped_order_sum_up.png b/la_chariotte/themes/default/static/img/notice/grouped_order_sum_up.png similarity index 100% rename from la_chariotte/static/img/notice/grouped_order_sum_up.png rename to la_chariotte/themes/default/static/img/notice/grouped_order_sum_up.png diff --git a/la_chariotte/static/img/notice/items_overview.png b/la_chariotte/themes/default/static/img/notice/items_overview.png similarity index 100% rename from la_chariotte/static/img/notice/items_overview.png rename to la_chariotte/themes/default/static/img/notice/items_overview.png diff --git a/la_chariotte/static/img/notice/join_grouped_order.png b/la_chariotte/themes/default/static/img/notice/join_grouped_order.png similarity index 100% rename from la_chariotte/static/img/notice/join_grouped_order.png rename to la_chariotte/themes/default/static/img/notice/join_grouped_order.png diff --git a/la_chariotte/static/img/notice/log_in.jpg b/la_chariotte/themes/default/static/img/notice/log_in.jpg similarity index 100% rename from la_chariotte/static/img/notice/log_in.jpg rename to la_chariotte/themes/default/static/img/notice/log_in.jpg diff --git a/la_chariotte/static/img/notice/my_grouped_orders.jpg b/la_chariotte/themes/default/static/img/notice/my_grouped_orders.jpg similarity index 100% rename from la_chariotte/static/img/notice/my_grouped_orders.jpg rename to la_chariotte/themes/default/static/img/notice/my_grouped_orders.jpg diff --git a/la_chariotte/static/img/notice/order_form.png b/la_chariotte/themes/default/static/img/notice/order_form.png similarity index 100% rename from la_chariotte/static/img/notice/order_form.png rename to la_chariotte/themes/default/static/img/notice/order_form.png diff --git a/la_chariotte/static/img/notice/print_orders_list.png b/la_chariotte/themes/default/static/img/notice/print_orders_list.png similarity index 100% rename from la_chariotte/static/img/notice/print_orders_list.png rename to la_chariotte/themes/default/static/img/notice/print_orders_list.png diff --git a/la_chariotte/static/img/notice/share_grouped_order.png b/la_chariotte/themes/default/static/img/notice/share_grouped_order.png similarity index 100% rename from la_chariotte/static/img/notice/share_grouped_order.png rename to la_chariotte/themes/default/static/img/notice/share_grouped_order.png diff --git a/la_chariotte/static/img/notice_1.jpg b/la_chariotte/themes/default/static/img/notice_1.jpg similarity index 100% rename from la_chariotte/static/img/notice_1.jpg rename to la_chariotte/themes/default/static/img/notice_1.jpg diff --git a/la_chariotte/static/img/notice_2.jpg b/la_chariotte/themes/default/static/img/notice_2.jpg similarity index 100% rename from la_chariotte/static/img/notice_2.jpg rename to la_chariotte/themes/default/static/img/notice_2.jpg diff --git a/la_chariotte/static/img/notice_3.jpg b/la_chariotte/themes/default/static/img/notice_3.jpg similarity index 100% rename from la_chariotte/static/img/notice_3.jpg rename to la_chariotte/themes/default/static/img/notice_3.jpg diff --git a/la_chariotte/static/sass/base/_accordion.sass b/la_chariotte/themes/default/static/sass/base/_accordion.sass similarity index 100% rename from la_chariotte/static/sass/base/_accordion.sass rename to la_chariotte/themes/default/static/sass/base/_accordion.sass diff --git a/la_chariotte/static/sass/base/_content.sass b/la_chariotte/themes/default/static/sass/base/_content.sass similarity index 100% rename from la_chariotte/static/sass/base/_content.sass rename to la_chariotte/themes/default/static/sass/base/_content.sass diff --git a/la_chariotte/static/sass/base/_footer.sass b/la_chariotte/themes/default/static/sass/base/_footer.sass similarity index 100% rename from la_chariotte/static/sass/base/_footer.sass rename to la_chariotte/themes/default/static/sass/base/_footer.sass diff --git a/la_chariotte/static/sass/base/_form.sass b/la_chariotte/themes/default/static/sass/base/_form.sass similarity index 100% rename from la_chariotte/static/sass/base/_form.sass rename to la_chariotte/themes/default/static/sass/base/_form.sass diff --git a/la_chariotte/static/sass/base/_global.sass b/la_chariotte/themes/default/static/sass/base/_global.sass similarity index 100% rename from la_chariotte/static/sass/base/_global.sass rename to la_chariotte/themes/default/static/sass/base/_global.sass diff --git a/la_chariotte/static/sass/base/_navbar.sass b/la_chariotte/themes/default/static/sass/base/_navbar.sass similarity index 100% rename from la_chariotte/static/sass/base/_navbar.sass rename to la_chariotte/themes/default/static/sass/base/_navbar.sass diff --git a/la_chariotte/static/sass/base/_table.sass b/la_chariotte/themes/default/static/sass/base/_table.sass similarity index 100% rename from la_chariotte/static/sass/base/_table.sass rename to la_chariotte/themes/default/static/sass/base/_table.sass diff --git a/la_chariotte/static/sass/base/_tabs.sass b/la_chariotte/themes/default/static/sass/base/_tabs.sass similarity index 100% rename from la_chariotte/static/sass/base/_tabs.sass rename to la_chariotte/themes/default/static/sass/base/_tabs.sass diff --git a/la_chariotte/static/sass/base/_titles.sass b/la_chariotte/themes/default/static/sass/base/_titles.sass similarity index 100% rename from la_chariotte/static/sass/base/_titles.sass rename to la_chariotte/themes/default/static/sass/base/_titles.sass diff --git a/la_chariotte/static/sass/base/_variables.sass b/la_chariotte/themes/default/static/sass/base/_variables.sass similarity index 100% rename from la_chariotte/static/sass/base/_variables.sass rename to la_chariotte/themes/default/static/sass/base/_variables.sass diff --git a/la_chariotte/static/sass/style.sass b/la_chariotte/themes/default/static/sass/style.sass similarity index 76% rename from la_chariotte/static/sass/style.sass rename to la_chariotte/themes/default/static/sass/style.sass index 381af75..285c014 100644 --- a/la_chariotte/static/sass/style.sass +++ b/la_chariotte/themes/default/static/sass/style.sass @@ -1,12 +1,12 @@ // 1. Import the initial variables -@import "../../../node_modules/bulma/sass/utilities/initial-variables" +@import "../../../../../node_modules/bulma/sass/utilities/initial-variables" // 2. Set your own initial variables @import "./base/variables" // @import "./base/fonts" // 3. Import the rest of Bulma -@import "../../../node_modules/bulma/bulma" +@import "../../../../../node_modules/bulma/bulma" // 4. Import your stuff here @import "./base/global" diff --git a/la_chariotte/templates/base.html b/la_chariotte/themes/default/templates/base.html similarity index 100% rename from la_chariotte/templates/base.html rename to la_chariotte/themes/default/templates/base.html diff --git a/la_chariotte/templates/dashboard.html b/la_chariotte/themes/default/templates/dashboard.html similarity index 100% rename from la_chariotte/templates/dashboard.html rename to la_chariotte/themes/default/templates/dashboard.html diff --git a/la_chariotte/templates/help/about_chariotte.html b/la_chariotte/themes/default/templates/help/about_chariotte.html similarity index 100% rename from la_chariotte/templates/help/about_chariotte.html rename to la_chariotte/themes/default/templates/help/about_chariotte.html diff --git a/la_chariotte/templates/help/faq.html b/la_chariotte/themes/default/templates/help/faq.html similarity index 100% rename from la_chariotte/templates/help/faq.html rename to la_chariotte/themes/default/templates/help/faq.html diff --git a/la_chariotte/templates/help/legal_notice.html b/la_chariotte/themes/default/templates/help/legal_notice.html similarity index 100% rename from la_chariotte/templates/help/legal_notice.html rename to la_chariotte/themes/default/templates/help/legal_notice.html diff --git a/la_chariotte/templates/help/notice.html b/la_chariotte/themes/default/templates/help/notice.html similarity index 100% rename from la_chariotte/templates/help/notice.html rename to la_chariotte/themes/default/templates/help/notice.html diff --git a/la_chariotte/mail/templates/mail/base_mail.html b/la_chariotte/themes/default/templates/mail/base_mail.html similarity index 100% rename from la_chariotte/mail/templates/mail/base_mail.html rename to la_chariotte/themes/default/templates/mail/base_mail.html diff --git a/la_chariotte/mail/templates/mail/order_confirm_mail.html b/la_chariotte/themes/default/templates/mail/order_confirm_mail.html similarity index 100% rename from la_chariotte/mail/templates/mail/order_confirm_mail.html rename to la_chariotte/themes/default/templates/mail/order_confirm_mail.html diff --git a/la_chariotte/order/templates/order/grouped_order_add_items.html b/la_chariotte/themes/default/templates/order/grouped_order_add_items.html similarity index 100% rename from la_chariotte/order/templates/order/grouped_order_add_items.html rename to la_chariotte/themes/default/templates/order/grouped_order_add_items.html diff --git a/la_chariotte/order/templates/order/grouped_order_confirm_delete.html b/la_chariotte/themes/default/templates/order/grouped_order_confirm_delete.html similarity index 100% rename from la_chariotte/order/templates/order/grouped_order_confirm_delete.html rename to la_chariotte/themes/default/templates/order/grouped_order_confirm_delete.html diff --git a/la_chariotte/order/templates/order/grouped_order_create.html b/la_chariotte/themes/default/templates/order/grouped_order_create.html similarity index 100% rename from la_chariotte/order/templates/order/grouped_order_create.html rename to la_chariotte/themes/default/templates/order/grouped_order_create.html diff --git a/la_chariotte/order/templates/order/grouped_order_detail.html b/la_chariotte/themes/default/templates/order/grouped_order_detail.html similarity index 100% rename from la_chariotte/order/templates/order/grouped_order_detail.html rename to la_chariotte/themes/default/templates/order/grouped_order_detail.html diff --git a/la_chariotte/order/templates/order/grouped_order_overview.html b/la_chariotte/themes/default/templates/order/grouped_order_overview.html similarity index 100% rename from la_chariotte/order/templates/order/grouped_order_overview.html rename to la_chariotte/themes/default/templates/order/grouped_order_overview.html diff --git a/la_chariotte/order/templates/order/grouped_order_sheet.html b/la_chariotte/themes/default/templates/order/grouped_order_sheet.html similarity index 100% rename from la_chariotte/order/templates/order/grouped_order_sheet.html rename to la_chariotte/themes/default/templates/order/grouped_order_sheet.html diff --git a/la_chariotte/order/templates/order/grouped_order_update.html b/la_chariotte/themes/default/templates/order/grouped_order_update.html similarity index 100% rename from la_chariotte/order/templates/order/grouped_order_update.html rename to la_chariotte/themes/default/templates/order/grouped_order_update.html diff --git a/la_chariotte/order/templates/order/index.html b/la_chariotte/themes/default/templates/order/index.html similarity index 100% rename from la_chariotte/order/templates/order/index.html rename to la_chariotte/themes/default/templates/order/index.html diff --git a/la_chariotte/order/templates/order/order_detail.html b/la_chariotte/themes/default/templates/order/order_detail.html similarity index 100% rename from la_chariotte/order/templates/order/order_detail.html rename to la_chariotte/themes/default/templates/order/order_detail.html diff --git a/la_chariotte/accounts/templates/registration/login.html b/la_chariotte/themes/default/templates/registration/login.html similarity index 100% rename from la_chariotte/accounts/templates/registration/login.html rename to la_chariotte/themes/default/templates/registration/login.html diff --git a/la_chariotte/accounts/templates/registration/password_reset_complete.html b/la_chariotte/themes/default/templates/registration/password_reset_complete.html similarity index 100% rename from la_chariotte/accounts/templates/registration/password_reset_complete.html rename to la_chariotte/themes/default/templates/registration/password_reset_complete.html diff --git a/la_chariotte/accounts/templates/registration/password_reset_confirm.html b/la_chariotte/themes/default/templates/registration/password_reset_confirm.html similarity index 100% rename from la_chariotte/accounts/templates/registration/password_reset_confirm.html rename to la_chariotte/themes/default/templates/registration/password_reset_confirm.html diff --git a/la_chariotte/accounts/templates/registration/password_reset_done.html b/la_chariotte/themes/default/templates/registration/password_reset_done.html similarity index 100% rename from la_chariotte/accounts/templates/registration/password_reset_done.html rename to la_chariotte/themes/default/templates/registration/password_reset_done.html diff --git a/la_chariotte/accounts/templates/registration/password_reset_form.html b/la_chariotte/themes/default/templates/registration/password_reset_form.html similarity index 100% rename from la_chariotte/accounts/templates/registration/password_reset_form.html rename to la_chariotte/themes/default/templates/registration/password_reset_form.html diff --git a/la_chariotte/accounts/templates/registration/signup.html b/la_chariotte/themes/default/templates/registration/signup.html similarity index 100% rename from la_chariotte/accounts/templates/registration/signup.html rename to la_chariotte/themes/default/templates/registration/signup.html diff --git a/la_chariotte/order/templates/warning_grouped_order_creation.html b/la_chariotte/themes/default/templates/warning_grouped_order_creation.html similarity index 100% rename from la_chariotte/order/templates/warning_grouped_order_creation.html rename to la_chariotte/themes/default/templates/warning_grouped_order_creation.html