-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "downloads" page to console with link to CSV files (#2270)
This pull request adds a new page at "/console/downloads/" that allows administrators (`@console_permission_required('project.can_view_stats')`) to download the following CSV files: - "Users": Contains information on all active users. Example: [users_example.csv](https://github.com/user-attachments/files/16530731/users_example.csv) - "Projects": Contains information on all published projects. Example: [projects_example.csv](https://github.com/user-attachments/files/16530736/projects_example.csv) Some additional notes: - I sneaked in a change to the the menu item from "Usage stats" to "Metrics". - We may want to introduce a new permission for these tools later (preferably in a new pull request). - We will want to introduce new variables and datasets later. - This pull request is needed to generate metrics for our U24 proposal, so a quick review/merge would be appreciated!
- Loading branch information
Showing
7 changed files
with
259 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% extends "console/base_console.html" %} | ||
|
||
{% load static %} | ||
|
||
{% block title %}Download data{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<div class="card mb-3"> | ||
<div class="card-header"> | ||
Download data | ||
</div> | ||
<div class="card-body"> | ||
<div class="table-responsive"> | ||
|
||
<div class="mb-4"> | ||
<h6>Users</h6> | ||
<p>Download a complete list of users, including their names, email addresses, and registration dates.</p> | ||
<a href="{% url 'download_users' %}" class="btn btn-primary"> | ||
Download users | ||
</a> | ||
</div> | ||
|
||
<div class="mb-4"> | ||
<h6>Projects</h6> | ||
<p>Download a complete list of published projects, including project names, descriptions, and timelines.</p> | ||
<a href="{% url 'download_projects' %}" class="btn btn-primary"> | ||
Download projects | ||
</a> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters