コード例 #1
0
ファイル: pages.py プロジェクト: mhermans/serialservice
    def issue(self, shortTitle, volume, number):
        s = shortTitle
        v = volume
        n = number


        #via globals: g.graph = rdfSubject.db
        #zie serialservice/lib/app_globals.py.

        p = Periodical.get_by(shortTitle=s)
        i = Issue.filter_by(periodical=p.resUri)
        
        #XXX controleer fatsoenlijk op 1 resultaat
        i = list(i)
        if len(i) == 1:
            i = list(i)[0]

        c.articles = Article.filter_by(issue=i.resUri)

        c.contributors = []

        for a in Article.filter_by(issue=i.resUri):
            for cr in a.makers:
                c.contributors.append(cr)
            for ivr in a.ivrs:
                 c.contributors.append(ivr)        
            for ive in a.ives:
                 c.contributors.append(ive)        

        c.issue = i
        c.title = i.periodical.title 
        c.bodySection = "issue"
        c.baseUrl = "http://localhost:5000/"
        return render("base.xml")
コード例 #2
0
ファイル: pages.py プロジェクト: mhermans/serialservice
    def volume(self, shortTitle, volume):
        s = shortTitle       
        c.volume = volume

        c.periodical = Periodical.get_by(shortTitle=s)
        c.issues = Issue.filter_by(periodical=c.periodical.resUri) #XXX filter on volume does not work!
        c.title = ' '.join([c.periodical.title, ':', 'volume', c.volume])
        c.bodySection = "volume"
        c.baseUrl = "http://localhost:5000/"
        return render("base.xml")
コード例 #3
0
ファイル: pages.py プロジェクト: mhermans/serialservice
 def periodical(self, shortTitle):
     s = shortTitle
     
     c.periodical = Periodical.get_by(shortTitle=s)
     c.issues = Issue.filter_by(periodical=c.periodical.resUri)
     
     c.title = c.periodical.title        
     c.bodySection = "periodical"
     c.baseUrl = "http://localhost:5000/"
     return render('base.xml')