修复 announcement url 前缀错误;修复 api doc 格式错误

This commit is contained in:
virusdefender 2015-08-06 16:49:48 +08:00
parent e0dec79066
commit 529cea5476
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class AnnouncementAPIView(APIView):
"""
公告分页json api接口
---
request_serializer: AnnouncementSerializer
response_serializer: AnnouncementSerializer
"""
announcement = Announcement.objects.all().order_by("last_update_time")
return paginate(request, announcement, AnnouncementSerializer)

View File

@ -23,7 +23,7 @@ urlpatterns = [
url(r'^api/admin/announcement/$', AnnouncementAdminAPIView.as_view(), name="announcement_admin_api"),
url(r'^problem/(?P<problem_id>\d+)/$', "problem.views.problem_page", name="problem_page"),
url(r'^announcements/$', AnnouncementAPIView.as_view()),
url(r'^api/announcements/$', AnnouncementAPIView.as_view(), name="announcement_list_api"),
url(r'^admin/contest/$', TemplateView.as_view(template_name="admin/contest/add_contest.html"), name="add_contest_page"),
url(r'^problems/$', TemplateView.as_view(template_name="oj/problem/problem_list.html"), name="problem_list_page"),