diff --git a/abonapp/templates/abonapp/peoples.html b/abonapp/templates/abonapp/peoples.html index 1432448..e5be88d 100644 --- a/abonapp/templates/abonapp/peoples.html +++ b/abonapp/templates/abonapp/peoples.html @@ -75,23 +75,25 @@ {% else %} {% endif %} - {% if human.statcache.is_online %} - - {% else %} - - {% endif %} + + +{# {% if human.statcache.is_online %}#} +{# #} +{# {% else %}#} +{# #} +{# {% endif %}#} {{ human.username }} - {% if human.statcache %} - {% if human.statcache.is_today %} - {{ human.statcache.last_time|date:"H:i" }} - {% else %} - {{ human.statcache.last_time|date:"D H:i" }} - {% endif %} - {% endif %} +{# {% if human.statcache %}#} +{# {% if human.statcache.is_today %}#} +{# {{ human.statcache.last_time|date:"H:i" }}#} +{# {% else %}#} +{# {{ human.statcache.last_time|date:"D H:i" }}#} +{# {% endif %}#} +{# {% endif %}#} {{ human.ip_address|default_if_none:'—' }} {{ human.fio|default:'—' }} diff --git a/abonapp/views.py b/abonapp/views.py index ef628e4..de135df 100644 --- a/abonapp/views.py +++ b/abonapp/views.py @@ -51,9 +51,9 @@ class PeoplesListView(LoginRequiredMixin, OnlyAdminsMixin, if street_id > 0: peoples_list = peoples_list.filter(street=street_id) peoples_list = peoples_list.select_related( - 'group', 'street', 'statcache', 'current_tariff' + 'group', 'street', 'current_tariff' ).only( - 'group', 'street', 'statcache', 'fio', + 'group', 'street', 'fio', 'street', 'house', 'telephone', 'ballance', 'markers', 'username', 'is_active', 'current_tariff' ) diff --git a/systemd_units/djing.service b/systemd_units/djing.service index 974cef8..79be6fa 100644 --- a/systemd_units/djing.service +++ b/systemd_units/djing.service @@ -4,9 +4,9 @@ Description=A job for djing [Service] Type=simple ExecStart=/usr/bin/python3 periodic.py -WorkingDirectory=/srv/http/djing -User=http -Group=http +WorkingDirectory=/var/www/djing +User=www-data +Group=www-data [Install] WantedBy=multi-user.target diff --git a/systemd_units/djing_celery.service b/systemd_units/djing_celery.service new file mode 100644 index 0000000..931aa70 --- /dev/null +++ b/systemd_units/djing_celery.service @@ -0,0 +1,14 @@ +[Unit] +Description=Celery worker for djing + +[Service] +Type=simple +ExecStart=/var/www/djing/venv/bin/celery worker -A djing --loglevel=info --concurrency=4 +WorkingDirectory=/var/www/djing +TimeoutSec=7 +Restart=always +User=www-data +Group=www-data + +[Install] +WantedBy=multi-user.target diff --git a/systemd_units/djing_dial.service b/systemd_units/djing_dial.service index 8f2eab0..d3db17b 100644 --- a/systemd_units/djing_dial.service +++ b/systemd_units/djing_dial.service @@ -5,7 +5,7 @@ Description=Dialing inbox sms unit Type=simple ExecStart=/usr/bin/python3 dialing.py PIDFile=/run/dialing.py.pid -WorkingDirectory=/srv/http/djing +WorkingDirectory=/var/www/djing User=http Group=http diff --git a/systemd_units/djing_telebot.service b/systemd_units/djing_telebot.service index 2afa575..eb0de74 100644 --- a/systemd_units/djing_telebot.service +++ b/systemd_units/djing_telebot.service @@ -8,8 +8,8 @@ PIDFile=/run/djing_telebot.pid WorkingDirectory=/var/www/djing TimeoutSec=9 Restart=always -User=http -Group=http +User=www-data +Group=www-data [Install] WantedBy=multi-user.target