Creating Reports in Django Admin Panel

635 views
Skip to first unread message

Mukul Mantosh

unread,
Jun 1, 2018, 11:23:02 PM6/1/18
to Django users
How to create a report in  django-admin panel of number of users added to the database in a day, week and month. Also, how many API calls for every particular API has been made in a day, week and month.

Joseph Mutumi

unread,
Jun 4, 2018, 11:56:01 AM6/4/18
to django-users@googlegroups com
Hello,

You'll first need to create a custom admin page. Create your view and add it to the urls.py like normal.

Then you extend the admin base template and display your aggregation in there:

{% extends "admin/base_site.html" %} {% block title %}Stats title{% endblock %} {% block content %}Stats HTML{% endblock %}

The you aggregate what you need in the view function and pass that. You'll need to have the relevant
data counters before hand though. You might want to checkout signals to implement that?

Kind regards

On Sat, Jun 2, 2018 at 6:23 AM, Mukul Mantosh <mukulma...@gmail.com> wrote:
How to create a report in  django-admin panel of number of users added to the database in a day, week and month. Also, how many API calls for every particular API has been made in a day, week and month.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cde57aba-e168-4c74-97b9-7e4b3a48458c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages