mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Port to Django 5.2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% extends request.is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
{% extends is_ajax|yesno:"base_ajax.html,base_rigs.html" %}
|
||||
|
||||
{% load static %}
|
||||
{% load linkornone from filters %}
|
||||
@@ -41,7 +41,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if not request.is_ajax and object.pk == user.pk %}
|
||||
{% if not is_ajax and object.pk == user.pk %}
|
||||
<div class="row py-3">
|
||||
<div class="col text-right">
|
||||
<div class="btn-group">
|
||||
@@ -85,7 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if not request.is_ajax and object.pk == user.pk %}
|
||||
{% if not is_ajax and object.pk == user.pk %}
|
||||
<div class="col-lg-8 col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">Personal iCal Details</div>
|
||||
|
||||
@@ -3,8 +3,7 @@ from django.contrib.auth.views import LoginView
|
||||
from django.urls import reverse_lazy
|
||||
from django.views import generic
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from RIGS import models
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
# This view should be exempt from requiring CSRF token.
|
||||
@@ -28,7 +27,7 @@ class LoginEmbed(LoginView):
|
||||
|
||||
class ProfileDetail(generic.DetailView):
|
||||
template_name = "profile_detail.html"
|
||||
model = models.Profile
|
||||
model = settings.AUTH_USER_MODEL
|
||||
|
||||
def get_queryset(self):
|
||||
try:
|
||||
@@ -48,7 +47,7 @@ class ProfileDetail(generic.DetailView):
|
||||
|
||||
class ProfileUpdateSelf(generic.UpdateView):
|
||||
template_name = "profile_form.html"
|
||||
model = models.Profile
|
||||
model = settings.AUTH_USER_MODEL
|
||||
fields = ['first_name', 'last_name', 'email', 'initials', 'phone', 'dark_theme']
|
||||
|
||||
def get_queryset(self):
|
||||
|
||||
Reference in New Issue
Block a user