Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

work #63

wants to merge 1 commit into from

Conversation

qhq16
Copy link

@qhq16 qhq16 commented Nov 16, 2018

No description provided.

#获取登录状态
def get(self):
if not self.request.user.is_authenticated():
raise ValidateError(self.input)
Copy link
Author

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)
Copy link
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():

# if self.request.user.is_authenticated():
activity_List = []
activites = Activity.objects.all()
for activity in activites:
Copy link
Author

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']

Copy link
Author

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()
Copy link
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