mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	happy new year (contain annually WEI change and update to follow Django Style Guide)
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
# Copyright (C) 2018-2021 by BDE ENS Paris-Saclay
 | 
			
		||||
# Copyright (C) 2018-2024 by BDE ENS Paris-Saclay
 | 
			
		||||
# SPDX-License-Identifier: GPL-3.0-or-later
 | 
			
		||||
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
@@ -76,9 +76,6 @@ class Changelog(models.Model):
 | 
			
		||||
        verbose_name=_('timestamp'),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    def delete(self, using=None, keep_parents=False):
 | 
			
		||||
        raise ValidationError(_("Logs cannot be destroyed."))
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        verbose_name = _("changelog")
 | 
			
		||||
        verbose_name_plural = _("changelogs")
 | 
			
		||||
@@ -86,3 +83,6 @@ class Changelog(models.Model):
 | 
			
		||||
    def __str__(self):
 | 
			
		||||
        return _("Changelog of type \"{action}\" for model {model} at {timestamp}").format(
 | 
			
		||||
            action=self.get_action_display(), model=str(self.model), timestamp=str(self.timestamp))
 | 
			
		||||
 | 
			
		||||
    def delete(self, using=None, keep_parents=False):
 | 
			
		||||
        raise ValidationError(_("Logs cannot be destroyed."))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user