mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-13 12:23:44 +01:00
The update check shared the file-based default cache with cachalot, whose culling randomly deleted the key as pages loaded. Store only the latest release in a dedicated cache, compare it to APP_VERSION at render time, and drop the startup delete. Hide the banner when CHECK_FOR_UPDATES is off or APP_VERSION isn't a valid version.
24 lines
689 B
Python
24 lines
689 B
Python
from django.apps import AppConfig
|
|
|
|
|
|
class CommonConfig(AppConfig):
|
|
default_auto_field = "django.db.models.BigAutoField"
|
|
name = "apps.common"
|
|
|
|
def ready(self):
|
|
from django.contrib import admin
|
|
from django.contrib.sites.models import Site
|
|
from allauth.socialaccount.models import (
|
|
SocialAccount,
|
|
SocialApp,
|
|
SocialToken,
|
|
)
|
|
|
|
admin.site.unregister(Site)
|
|
admin.site.unregister(SocialAccount)
|
|
admin.site.unregister(SocialApp)
|
|
admin.site.unregister(SocialToken)
|
|
|
|
# Register system checks for required environment variables
|
|
from apps.common import checks # noqa: F401
|