article update
This commit is contained in:
@@ -30,7 +30,13 @@ class Section(Base):
|
||||
def __init__(self, url=None,fname=None):
|
||||
self.url=url
|
||||
self.foreign_name=fname
|
||||
|
||||
|
||||
def title(self):
|
||||
t=self.name
|
||||
if t == None or t.strip()=="":
|
||||
t=self.foreign_name
|
||||
return t
|
||||
|
||||
@classmethod
|
||||
def find_or_create(cls, fname):
|
||||
s=Section.query.filter(Section.foreign_name==fname).first()
|
||||
|
||||
Reference in New Issue
Block a user