Skip to content

Commit

Permalink
Accept Merge Request QingdaoU#231 修改部分 jquery 插件为 AMD 模块 : (virusdefe…
Browse files Browse the repository at this point in the history
…nder-dev -> dev)

Merge Request: 修改部分 jquery 插件为 AMD 模块
Created By: @virusdefender
Accepted By: @virusdefender
URL: https://coding.net/u/virusdefender/p/qduoj/git/merge/231
  • Loading branch information
virusdefender committed Sep 14, 2015
2 parents ee6739d + f828faa commit 4cf6187
Show file tree
Hide file tree
Showing 40 changed files with 929 additions and 2,832 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ static/release/img
static/src/upload_image/*
build.txt
tmp/
test_case/
test_case/
release/
1 change: 0 additions & 1 deletion Accessories/__init__.py

This file was deleted.

74 changes: 0 additions & 74 deletions Accessories/reJudge.py

This file was deleted.

61 changes: 0 additions & 61 deletions Accessories/utils.py

This file was deleted.

17 changes: 15 additions & 2 deletions announcement/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,21 @@ def announcement_page(request, announcement_id):
try:
announcement = Announcement.objects.get(id=announcement_id, visible=True)
except Announcement.DoesNotExist:
return error_page(request, u"模板不存在")
return render(request, "oj/announcement/announcement.html", {"announcement": announcement})
return error_page(request, u"公告不存在")
# 公开的公告
if announcement.is_global == 0:
return render(request, "oj/announcement/announcement.html", {"announcement": announcement})
else:
if not request.user.is_authenticated():
return error_page(request, u"公告不存在")
# 判断是不是在组里面
if request.user.admin_type == SUPER_ADMIN or request.user == announcement.created_by:
return render(request, "oj/announcement/announcement.html", {"announcement": announcement})
else:
if request.user.groups.filter(id__in=[item.id for item in announcement.groups.all()]).exists():
return render(request, "oj/announcement/announcement.html", {"announcement": announcement})
else:
return error_page(request, u"公告不存在")


class AnnouncementAdminAPIView(APIView):
Expand Down
3 changes: 1 addition & 2 deletions contest/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
from problem.models import AbstractProblem
from group.models import Group


GROUP_CONTEST = 0
PUBLIC_CONTEST = 1
PASSWORD_PUBLIC_CONTEST = 2
PASSWORD_PROTECTED_CONTEST = 2


class Contest(models.Model):
Expand Down
Loading

0 comments on commit 4cf6187

Please sign in to comment.