-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Team Chennian #60
base: master
Are you sure you want to change the base?
Team Chennian #60
Conversation
# user = auth.authenticate(username=username,password=password) | ||
# auth.login(self.request, user) | ||
# except: | ||
# raise ValidateError("System error!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改后残存的代码?
class activityList(APIView): | ||
#获取活动列表 | ||
def get(self): | ||
# if self.request.user.is_authenticated(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
执行命令前检查登录状态的代码均被注释,是否未能实现相关功能?
remain_tickets = self.input['totalTickets'] | ||
status = self.input['status'] | ||
try: | ||
new = Activity(name=name, key=key, place=place, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议不要使用new这种变量名
if t.status == Ticket.STATUS_VALID: | ||
bookedTickets += 1 | ||
elif t.status == Ticket.STATUS_USED: | ||
usedTickets += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usedTickets不算在bookedTickets里吗?
activity.book_end = self.input['bookEnd'] | ||
activity.total_tickets = self.input['totalTickets'] | ||
activity.status = self.input['status'] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无意义的空行
activity = Activity.objects.get(id=actId) | ||
except: | ||
raise ValidateError("Activity for this ID does not exit!") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无意义的空行
No description provided.