feat(blogs): added functionality to approve or discard blogs by admin #174
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work done in this PR:
approved
in blogs model inapplication/blog/models.py
templates/adminportal/index.html
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:
final notes:
file changes
templates/adminportal/index.html
applications/adminportal/views.py
applications/blog/models.py
applications/blog/urls.py
applications/blog/views.py
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