forked from GithubBackups/healthchecks
Upgrade Django version to 3.2
This commit is contained in:
parent
67d11e8d40
commit
78652b5659
@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
|
||||
## v1.20.0 - Unreleased
|
||||
|
||||
## Improvements
|
||||
- Django 3.2
|
||||
- Rename VictorOps -> Splunk On-Call
|
||||
- Implement email body decoding in the "Ping Details" dialog
|
||||
- Add a "Subject" field in the "Ping Details" dialog
|
||||
|
@ -55,6 +55,7 @@ class ChecksAdmin(admin.ModelAdmin):
|
||||
|
||||
return s
|
||||
|
||||
@admin.display(description="Schedule")
|
||||
def timeout_schedule(self, obj):
|
||||
if obj.kind == "simple":
|
||||
return format_duration(obj.timeout)
|
||||
@ -63,8 +64,7 @@ class ChecksAdmin(admin.ModelAdmin):
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
timeout_schedule.short_description = "Schedule"
|
||||
|
||||
@admin.action(description="Send Alert")
|
||||
def send_alert(self, request, qs):
|
||||
for check in qs:
|
||||
for channel in check.channel_set.all():
|
||||
@ -72,8 +72,6 @@ class ChecksAdmin(admin.ModelAdmin):
|
||||
|
||||
self.message_user(request, "%d alert(s) sent" % qs.count())
|
||||
|
||||
send_alert.short_description = "Send Alert"
|
||||
|
||||
|
||||
class SchemeListFilter(admin.SimpleListFilter):
|
||||
title = "Scheme"
|
||||
@ -201,11 +199,10 @@ class ChannelsAdmin(admin.ModelAdmin):
|
||||
|
||||
return f'<span class="ic-{ obj.kind }"></span> {obj.kind}{note}'
|
||||
|
||||
@admin.display(boolean=True)
|
||||
def ok(self, obj):
|
||||
return False if obj.last_error else True
|
||||
|
||||
ok.boolean = True
|
||||
|
||||
|
||||
@admin.register(Notification)
|
||||
class NotificationsAdmin(admin.ModelAdmin):
|
||||
|
@ -42,8 +42,6 @@ class SubsAdmin(admin.ModelAdmin):
|
||||
|
||||
return ""
|
||||
|
||||
profile.allow_tags = True
|
||||
|
||||
def cancel(self, request, qs):
|
||||
for sub in qs.all():
|
||||
sub.cancel()
|
||||
|
@ -106,6 +106,7 @@ TEST_RUNNER = "hc.api.tests.CustomRunner"
|
||||
|
||||
# Default database engine is SQLite. So one can just check out code,
|
||||
# install requirements.txt and do manage.py runserver and it works
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
|
@ -1,6 +1,6 @@
|
||||
cron-descriptor==1.2.24
|
||||
croniter==1.0.8
|
||||
Django==3.1.7
|
||||
Django==3.2
|
||||
django-compressor==2.4
|
||||
fido2==0.9.1
|
||||
psycopg2==2.8.6
|
||||
|
Loading…
x
Reference in New Issue
Block a user