33from markdownx .models import MarkdownxField
44from meta .models import ModelMeta
55
6+ from pyconbalkan .conference .managers import ConferenceManager
67from pyconbalkan .core .models import SingleActiveModel
78
89
910class Conference (SingleActiveModel , ModelMeta ):
1011 INTERNATIONAL = 0
1112 NATIONAL = 1
12- CONF_TYPE = (
13- (INTERNATIONAL , 'International' ),
14- (NATIONAL , 'National' ),
15- )
13+ CONF_TYPE = ((INTERNATIONAL , "International" ), (NATIONAL , "National" ))
1614
1715 event = models .CharField (null = True , blank = True , max_length = 100 )
1816 name = models .CharField (null = True , blank = True , max_length = 100 )
@@ -37,20 +35,16 @@ class Conference(SingleActiveModel, ModelMeta):
3735 # timetable
3836 timetable_pdf = models .FileField (blank = True , null = True )
3937
40-
41- _metadata = {
42- 'title' : 'get_meta_title' ,
43- 'description' : 'get_meta_description' ,
44- }
38+ _metadata = {"title" : "get_meta_title" , "description" : "get_meta_description" }
4539
4640 def get_meta_title (self ):
47- return ' #{} {} {} {}' .format (self .number , self .event , self .name , self .year )
41+ return " #{} {} {} {}" .format (self .number , self .event , self .name , self .year )
4842
4943 def get_meta_description (self ):
50- return ' Welcome to {} {} {}! ' .format (self .event , self .name , self .year )
44+ return " Welcome to {} {} {}! " .format (self .event , self .name , self .year )
5145
5246 def __str__ (self ):
53- return ' {} {} {}' .format (self .event , self .name , self .year )
47+ return " {} {} {}" .format (self .event , self .name , self .year )
5448
5549
5650def _get_default_conference ():
@@ -62,6 +56,7 @@ class AbstractConference(models.Model):
6256 conference = models .ForeignKey (
6357 Conference , on_delete = models .CASCADE , default = _get_default_conference
6458 )
59+ objects = ConferenceManager ()
6560
6661 class Meta :
6762 abstract = True
@@ -80,5 +75,3 @@ class MissionStatement(AbstractConference, SingleActiveModel):
8075
8176 def __str__ (self ):
8277 return self .content
83-
84-
0 commit comments