vkk.system.models
A collection of object relational models for this module.
1""" 2A collection of object relational models for this module. 3""" 4 5from django.db import models 6from django.utils.translation import gettext_lazy as _ 7 8# Create your models here. 9 10 11class Announcement(models.Model): 12 """ 13 A simple model to manage announcements on the website. 14 """ 15 message = models.TextField( 16 verbose_name=_('message'), 17 help_text=_( 18 'Long messages may negativly impact overall website usabillity.') 19 ) 20 is_active = models.BooleanField( 21 verbose_name=_('active'), 22 default=False 23 ) 24 25 class Meta: 26 """ 27 A meta class for additional configuration. 28 """ 29 verbose_name = _('announcement') 30 verbose_name_plural = _('announcements') 31 default_permissions = ()
class
Announcement(django.db.models.base.Model):
12class Announcement(models.Model): 13 """ 14 A simple model to manage announcements on the website. 15 """ 16 message = models.TextField( 17 verbose_name=_('message'), 18 help_text=_( 19 'Long messages may negativly impact overall website usabillity.') 20 ) 21 is_active = models.BooleanField( 22 verbose_name=_('active'), 23 default=False 24 ) 25 26 class Meta: 27 """ 28 A meta class for additional configuration. 29 """ 30 verbose_name = _('announcement') 31 verbose_name_plural = _('announcements') 32 default_permissions = ()
A simple model to manage announcements on the website.
def
message(unknown):
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
def
is_active(unknown):
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
def
id(unknown):
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Inherited Members
- django.db.models.base.Model
- Model
- from_db
- pk
- get_deferred_fields
- refresh_from_db
- arefresh_from_db
- serializable_value
- save
- asave
- save_base
- delete
- adelete
- prepare_database_save
- clean
- validate_unique
- date_error_message
- unique_error_message
- get_constraints
- validate_constraints
- full_clean
- clean_fields
- check
class
Announcement.DoesNotExist(django.core.exceptions.ObjectDoesNotExist):
The requested object does not exist
Inherited Members
- builtins.Exception
- Exception
- django.core.exceptions.ObjectDoesNotExist
- silent_variable_failure
- builtins.BaseException
- with_traceback
- add_note
- args
class
Announcement.MultipleObjectsReturned(django.core.exceptions.MultipleObjectsReturned):
The query returned multiple objects when only one was expected.
Inherited Members
- builtins.Exception
- Exception
- builtins.BaseException
- with_traceback
- add_note
- args