예제 #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
    )