controllers/article.py

#http://...../article/add
def add():
    form = SQLFORM(db.article).process()
    return dict(form=form)

#http://..../article/edit/1
def edit():
    article_id = request.args(0) or redirect(URL('index'))
    form = SQLFORM(db.article, article_id).process()
    return dict(form=form)

#http://..../article/show/1
def show():
    article_id = request.args(0) or redirect(URL('index'))
    article = db.article[article_id]
    return dict(article=article)

def index():
   articles = db(db.article).select()
   return dict(articles=articles)



On Thu, Jan 17, 2013 at 12:49 PM, BlueShadow <kevin.bet...@gmail.com> wrote:

> Hi,
> I got a table for articles me and other people write(authors) I want all
> the authors to be able to edit those articles. I currently got no clue
> where I'm going to start this project. Any help is greatly appreciated.
>
> --
>
>
>
>

-- 



Reply via email to