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

feat(blogs): added functionality to approve or discard blogs by admin #174

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

Conversation

rohansen856
Copy link

@rohansen856 rohansen856 commented Jul 19, 2024

Work done in this PR:

  • added a new field approved in blogs model in application/blog/models.py
  • updated the admin dashboard and added a responsive blogs table to show pending blogs for approval or discarding in templates/adminportal/index.html
  • added new route to approve blogs in applications\blog\urls.py

Proof of work:

Dashboard._.Alumni.Connect.-.Google.Chrome.2024-07-19.18-32-58.mp4

in case no blogs are awaiting approval:

Screenshot 2024-07-19 184725

final notes:

file changes

  1. Frontend: templates/adminportal/index.html
  2. Backend:
    • applications/adminportal/views.py
    • applications/blog/models.py
    • applications/blog/urls.py
    • applications/blog/views.py
  3. the demidata I used:
    blogs = [
    {"id": 1, "title": "hello this is title 1", "description": "description very very short though"},
    {"id": 2, "title": "hello this is title 2", "description": "description very very short though"},
    {"id": 3, "title": "hello this is title 3", "description": "description very very short though"},
    {"id": 4, "title": "hello this is title 4", "description": "description very very short though"},
    {"id": 5, "title": "hello this is title 5", "description": "description very very short though"},
    ]

@SamakshAgarwal1112 Please let me know if any more changes are required

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