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

Team Chennian #60

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

Team Chennian #60

wants to merge 1 commit into from

Conversation

chennianw
Copy link

No description provided.

# user = auth.authenticate(username=username,password=password)
# auth.login(self.request, user)
# except:
# raise ValidateError("System error!")
Copy link
Author

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

@chennianw chennianw Nov 16, 2018

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,
Copy link
Author

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
Copy link
Author

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

Copy link
Author

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!")

Copy link
Author

Choose a reason for hiding this comment

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

无意义的空行

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