Skip to content

Commit

Permalink
chore(core): remove mixin for patching sponsor data
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwang44 committed Apr 15, 2024
1 parent e03b3bb commit dfd7502
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
11 changes: 0 additions & 11 deletions src/core/data.py

This file was deleted.

12 changes: 2 additions & 10 deletions src/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,21 @@
from django.views.defaults import page_not_found, server_error
from django.views.generic import TemplateView

from .data import EXTRA_DATA
from .utils import (
TemplateExistanceStatusResponse,
collect_language_codes,
)


class ExtraDataMixin:
def get_context_data(self, **kwargs):
data = super().get_context_data(**kwargs)
data.update(EXTRA_DATA.get(self.path, {}))
return data


class IndexView(ExtraDataMixin, TemplateView):
class IndexView(TemplateView):
template_name = 'index.html'
path = ''

def dispatch(self, request, *args, **kwargs):
return redirect(reverse('user_dashboard'))


class FlatPageView(ExtraDataMixin, TemplateView):
class FlatPageView(TemplateView):

response_class = TemplateExistanceStatusResponse

Expand Down

0 comments on commit dfd7502

Please sign in to comment.