mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-28 22:37:44 +00:00
* Article This is a simple "article" application with ReST support. Instances could be marked as "main" and a templatetag retrieve them. * Blog Django blog application, needs a better integration yet. * Download Little application to manage "download" links * Link Little application to manage links (like those displayed on top and in the footer) --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%403
17 lines
482 B
Python
17 lines
482 B
Python
from django.shortcuts import get_object_or_404
|
|
from django.http import HttpResponseRedirect
|
|
|
|
from article.models import Article
|
|
|
|
|
|
def order_up(request, article_id):
|
|
article = get_object_or_404(Article, pk=article_id)
|
|
article.order_up()
|
|
return HttpResponseRedirect("/admin/article/article/")
|
|
|
|
|
|
def order_down(request, article_id):
|
|
article = get_object_or_404(Article, pk=article_id)
|
|
article.order_down()
|
|
return HttpResponseRedirect("/admin/article/article/")
|