mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00

The collection facility was added in [200~9e70a4e0c32f8db0178f05dac4c1fca7b317e7c5, but no way was added to view it. To make it a bit more useful, add a static set of info on the user edit page in /admin/ that shows the last login and number of logins per site.
13 lines
351 B
Python
13 lines
351 B
Python
from django.forms.widgets import Widget
|
|
|
|
|
|
class TemplateRenderWidget(Widget):
|
|
def __init__(self, *args, **kwargs):
|
|
self.template_name = kwargs.pop('template')
|
|
self.templatecontext = kwargs.pop('context')
|
|
|
|
super().__init__(*args, **kwargs)
|
|
|
|
def get_context(self, name, value, attrs):
|
|
return self.templatecontext
|