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

Sort Questions by Date #27

Open
ishan-xy opened this issue Oct 14, 2024 · 0 comments
Open

Sort Questions by Date #27

ishan-xy opened this issue Oct 14, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ishan-xy
Copy link
Collaborator

Admin Dashboard Question Sorting Issue

Description

The questions displayed on the admin dashboard are currently not sorted by date, making it difficult for admins to manage questions.

Steps to Reproduce:

  1. Create a superuser or a staff user in the database.
  2. Go to http://localhost:4881/api/admin/dashboard.
  3. Add a few questions and observe their display order.

Expected Behavior:

Questions should be displayed in a sorted order, ideally by date, to improve readability and organization.
You can also separate the questions into different tables, based on their date.

Current Behavior:

Questions are displayed in an unsorted order, which can be confusing when viewing recent updates.

Suggested Fix:

In the dashboard.html file, located at admin_dash/templates/admin_dash, modify the template logic to sort questions by their question.questionDate. This field is populated from the database and is referenced in the admin_dashboard() function in views.py.

Additional Notes:

  • Ensure the sorting order is in descending order, so the most recent questions appear first.
  • Implementing this change will improve the user experience by displaying the latest questions at the top of the list.
@ishan-xy ishan-xy added enhancement New feature or request good first issue Good for newcomers labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant