-
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
work #63
base: master
Are you sure you want to change the base?
work #63
Conversation
#获取登录状态 | ||
def get(self): | ||
if not self.request.user.is_authenticated(): | ||
raise ValidateError(self.input) |
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.
需要return
#登出 | ||
def post(self): | ||
try: | ||
auth.logout(self.request) |
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.
需要判断if self.request.user.is_authenticated():
# if self.request.user.is_authenticated(): | ||
activity_List = [] | ||
activites = Activity.objects.all() | ||
for activity in activites: |
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.
该处应使用try...except..结构
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.
需要对status进行讨论,以及对活动时间进行判断,是否时间错误或者冲突等
for b in wechat_menu: | ||
if b['name'] == '抢票': | ||
current_btns += b.get('sub_button', list()) | ||
activity_ids = list() |
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.
b变量名起的不好
No description provided.