mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 00:42:17 +00:00
Update view logic for is_ajax being changed to a template context processor
This commit is contained in:
@@ -126,7 +126,7 @@ class AddQualification(generic.CreateView, ModalURLMixin):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["depths"] = models.TrainingItemQualification.CHOICES
|
||||
if is_ajax(self.request):
|
||||
if is_ajax(self.request).get('is_ajax'):
|
||||
context['override'] = "base_ajax.html"
|
||||
else:
|
||||
context['override'] = 'base_training.html'
|
||||
|
||||
Reference in New Issue
Block a user