0

I am trying to add a date that displays at the top of every page in Django admin but I haven't been able to find any documentation that discusses this. It needs to be a date that populates based on a script that says when the data was last pulled. Would anyone have any ideas on how to do this?

bballboy8
  • 400
  • 6
  • 25
  • Please have a look at https://stackoverflow.com/a/6586068/4151233 and the Django documentation. It describes how you can override/extend the Django template. – Marco Jan 13 '21 at 16:52

2 Answers2

0

you can add new field to your model last_edit_at = models.DateTimeField(auto_now=True) and it will be automatically store date and time of last edit here

0

in your settings

INSTALLED_APPS = [
    'yourapphere', # your app here
    'django.contrib.admin',  # the admin here
    ...
]

in yourapp/templates/admin/base_site.html

{% extends "admin/base_site.html" %}


{% block nav-global %}
    
    // your html and js here to make your clock
    
{% endblock %}