-
Notifications
You must be signed in to change notification settings - Fork 56
Added option to approve multiple contest in Admin Dashboard #162
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
Added option to approve multiple contest in Admin Dashboard #162
Conversation
oshc/main/admin.py
Outdated
admin.site.register(chatSession, chatSessionAdmin) | ||
admin.site.register(Contest) | ||
admin.site.register(Contest, contestAdmin) |
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 newline at end of file
oshc/main/admin.py
Outdated
actions = ['approve_contest'] | ||
|
||
def approve_contest(modeladmin, request, queryset): | ||
queryset.update(approved = True) |
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.
unexpected spaces around keyword / parameter equals
@@ -10,5 +10,14 @@ class chatSessionAdmin(admin.ModelAdmin): | |||
list_display = ('title', 'start_date') | |||
|
|||
|
|||
class contestAdmin(admin.ModelAdmin): | |||
list_display = ('name', 'link', 'description', 'start_date', 'end_date', 'approved') |
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.
line too long (88 > 79 characters)
1964ef6
to
c523cef
Compare
d74958f
to
9135b1a
Compare
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.
works! merging this. Thanks! 🚀
admin.site.register(chatSession, chatSessionAdmin) | ||
admin.site.register(Contest) | ||
admin.site.register(Contest, contestAdmin) |
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.
Aah you are doing this in parts? :) I will close that one then. We can have a reject as well.
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.
@tapasweni-pathak I think I failed to express why I opened the PR you closed... actually what I think that before Approval we will look at the authenticity of contest so to do that you have to click on each contest if user had submitted 10 contests .....so I made this process easy by displaying all the fields in dashboard only. Let me know your thoughts
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.
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.
@tapasweni-pathak I am really sorry!! 😅😅 I don't how this happened...and yes thanks for merging.
While sending PR I thought, I had sent two PR for different issues...and this was mine misunderstanding 😅😅
Checklist
develop
branch.Which issue does this PR fix?: fixes #161
Brief description of what this PR does.
Admin now can select multiple contests and approve at once
Screenshot:
