Compare commits
2 Commits
1286ee4474
...
d20062dd74
Author | SHA1 | Date |
---|---|---|
Анатолий Богомолов | d20062dd74 | |
Анатолий Богомолов | 663e73da92 |
|
@ -62,6 +62,6 @@ def export_users_to_csv(id: int):
|
|||
writer = csv.DictWriter(si, fieldnames)
|
||||
|
||||
writer.writeheader()
|
||||
writer.writerows(map(lambda user: user.to_dict(), collection.users))
|
||||
writer.writerows(map(lambda user: user.to_dict(), filter(lambda user: not user.delete, collection.users)))
|
||||
|
||||
return si.getvalue(), 200, {'Content-Disposition': f'attachment; filename={filename}', 'Content-type': 'text/csv; charset=utf-8'}
|
|
@ -2,7 +2,7 @@
|
|||
<div class="card">
|
||||
<div class="card-header"><h5>{{ collection.name }}</h5></div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">Кол-во пользрвателей: {{ collection.users|length }}</li>
|
||||
<li class="list-group-item">Кол-во пользрвателей: {{ collection.users|selectattr("delete", "false")|list|length }}</li>
|
||||
</ul>
|
||||
<div class="card-footer px-2 pt-2">
|
||||
<div class="d-flex gap-2" role="group">
|
||||
|
|
Loading…
Reference in New Issue