Skip to content

work#63

Open
qhq16 wants to merge 1 commit intoTHUCampus:masterfrom
qhq16:dev-alice
Open

work#63
qhq16 wants to merge 1 commit intoTHUCampus:masterfrom
qhq16:dev-alice

Conversation

@qhq16
Copy link
Copy Markdown

@qhq16 qhq16 commented Nov 16, 2018

No description provided.

Comment thread adminpage/views.py
#获取登录状态
def get(self):
if not self.request.user.is_authenticated():
raise ValidateError(self.input)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要return

Comment thread adminpage/views.py
#登出
def post(self):
try:
auth.logout(self.request)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要判断if self.request.user.is_authenticated():

Comment thread adminpage/views.py
# if self.request.user.is_authenticated():
activity_List = []
activites = Activity.objects.all()
for activity in activites:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该处应使用try...except..结构

Comment thread adminpage/views.py
activity.book_end = self.input['bookEnd']
activity.total_tickets = self.input['totalTickets']
activity.status = self.input['status']

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要对status进行讨论,以及对活动时间进行判断,是否时间错误或者冲突等

Comment thread adminpage/views.py
for b in wechat_menu:
if b['name'] == '抢票':
current_btns += b.get('sub_button', list())
activity_ids = list()
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b变量名起的不好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant