コード例 #1
0
ファイル: views.py プロジェクト: Calvin-CS/csweb
def down_tech_news_article_refresh(url,inNews= True):
    '''This routine does one of two things: if the user has asked to edit a
    news article (GET), it displays an editing form for the given article
    id, populated with the current database content; if the user has filled
    and submitted the editing form (POST), it writes the (modified) form
    contents into the database entry for the given article id.
    '''
    TechNews.down_unit(url,inNews= True)
    return redirect('/admin/technews/refresh')
コード例 #2
0
ファイル: views.py プロジェクト: Calvin-CS/csweb
def up_technews_article(url):
    '''This routine does one of two things: if the user has asked to edit a
    news article (GET), it displays an editing form for the given article
    id, populated with the current database content; if the user has filled
    and submitted the editing form (POST), it writes the (modified) form
    contents into the database entry for the given article id.
    '''
        
    TechNews.up_unit(url)
    return redirect('#')
コード例 #3
0
ファイル: views.py プロジェクト: Calvin-CS/csweb
def display_admin_tech_news():
    '''This routine displays the administration tools for tech news from feeds.
    '''
    return display_content(
        breadcrumbs=get_breadcrumbs('admin', 'technews'),
        title='Administration: TechNews Articles',
        primary='<p>Thumbs up/down relevant news articles to adjust the list of articles. ' +
        '<a href = "/admin/technews/refresh" >Click here to refresh the page listings.</a></p>' +
        '<p>To see the current items <a href="/admin/news">click here.</a></p>',
        primaryList=create_techNewsarticle_list(TechNews.read_units(refreshList = False)),
        primaryListHr=True,
        editable=False
    )