5a35e8b1b18c05f8f9a5cfbcfa1def44e9b83bc2,django/comicmodels/admin.py,RegistrationRequestsAdmin,accept,#RegistrationRequestsAdmin#Any#Any#,259
Before Change
from comicmodels.models import RegistrationRequest
def accept(self, request, queryset):
queryset.update(status=RegistrationRequest.ACCEPTED,
accepted=datetime.datetime.today())
// add user to participants group
// send email to user
After Change
def accept(self,request,obj):
obj.status = RegistrationRequest.ACCEPTED
obj.changed = datetime.datetime.today()
obj.save()
messages.add_message(request, messages.SUCCESS, "User ""+obj.user.username+""\
is now a participant for "+ obj .project.short_name +
". An email has been sent to notify the user")
from comicsite.models import send_participation_request_accepted_email
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: comic/grand-challenge.org
Commit Name: 5a35e8b1b18c05f8f9a5cfbcfa1def44e9b83bc2
Time: 2013-12-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/admin.py
Class Name: RegistrationRequestsAdmin
Method Name: accept
Project Name: comic/grand-challenge.org
Commit Name: 2f300e8eeeff5f2452764d25193fd8d846d1465f
Time: 2013-12-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/admin.py
Class Name: RegistrationRequestsAdmin
Method Name: accept
Project Name: comic/grand-challenge.org
Commit Name: 5a35e8b1b18c05f8f9a5cfbcfa1def44e9b83bc2
Time: 2013-12-10
Author: w.s.kerkstra@gmail.com
File Name: django/comicmodels/admin.py
Class Name: RegistrationRequestsAdmin
Method Name: accept
Project Name: polyaxon/polyaxon
Commit Name: d3fa21f5028ffa6790b45e8ba6913c5e90bd6073
Time: 2019-01-08
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/tokens.py
Class Name: Token
Method Name: refresh