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

Added option to approve multiple contest in Admin Dashboard #162

Conversation

vaibhavsingh97
Copy link
Member

@vaibhavsingh97 vaibhavsingh97 commented Oct 19, 2017

Checklist

  • My branch is up-to-date with the upstream develop branch.
  • I have added necessary documentation (if appropriate).

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:
image

admin.site.register(chatSession, chatSessionAdmin)
admin.site.register(Contest)
admin.site.register(Contest, contestAdmin)

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

actions = ['approve_contest']

def approve_contest(modeladmin, request, queryset):
queryset.update(approved = True)

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

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)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 70.297% when pulling 7d319cc on vaibhavsingh97:Patch3/approveContest into b709a40 on OpenSourceHelpCommunity:predev.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 70.297% when pulling c523cef on vaibhavsingh97:Patch3/approveContest into b709a40 on OpenSourceHelpCommunity:predev.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.8%) to 70.297% when pulling c523cef on vaibhavsingh97:Patch3/approveContest into b709a40 on OpenSourceHelpCommunity:predev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 67.619% when pulling 9135b1a on vaibhavsingh97:Patch3/approveContest into b709a40 on OpenSourceHelpCommunity:predev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 67.619% when pulling 9135b1a on vaibhavsingh97:Patch3/approveContest into b709a40 on OpenSourceHelpCommunity:predev.

Copy link
Member

@tapaswenipathak tapaswenipathak left a 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)
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

This one also has those changes (#160), that's why I closed that one.

In #160 you enabled the display of all the fields on the initial page. In this one you enabled the display as well as approval. Am I missing something here? 😕

Copy link
Member Author

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 😅😅

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.

Approve contests in Admin
4 participants