Skip to content

Commit

Permalink
Merge pull request #105 from AlexanderBgit/lexxai
Browse files Browse the repository at this point in the history
Messages icons telegram
  • Loading branch information
lumi-ua authored Apr 17, 2024
2 parents 303afe8 + ef80044 commit 5369838
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
<!-- communications/templates/communications/main.html -->
{% extends "parking/base.html" %} {% block content %}
<h1>Messages</h1>
<p>We check for relevant news and speed it up to send it to the news channel.</p>
Our news channel: <a href="https://t.me/{{ news_channel }}">@{{ news_channel }}.</a>
{% if sent_messages %}
<p>Messages sent: {{ sent_messages }}.</p>
{% endif%} {% endblock content %}
{% extends "parking/base.html" %} {% block content %} {% load static %}
<div class="container-fluid">
<h2>Messages</h2>

<p>We check for relevant news and speed it up to send it to the news channel.</p>
<table class="table">
<tr>
<th class="text-center">Our news channel: <a href="https://t.me/{{ news_channel }}">@{{ news_channel }}.</a></td>
<th class="text-center">Our Telegram bot: <a href="https://t.me/{{ t_bot }}">@{{ t_bot }}.</a></td>
</tr>
<tr>
<td class="text-center"><img class="mt-2" src="{% static 'parking/qr_t_news.png' %}" width="80%" /></td>
<td class="text-center"><img src="{% static 'parking/qr_t_bot.png' %}" width="80%" /></td>
</tr>
</table>

{% if sent_messages %}
<p>Messages sent: {{ sent_messages }}.</p>
{% endif%} {% endblock content %}
</div>
1 change: 1 addition & 0 deletions FRONTEND/fastparking/communications/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def main(request):
{
"active_menu": active_menu,
"news_channel": settings.TELEGRAM_NEWS_NAME[1:],
"t_bot": settings.TELEGRAM_BOT_NAME,
"sent_messages": sent_messages,
"title": "Messages",
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions FRONTEND/fastparking/parking/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
path('', views.main, name='main'),
path('parking_plan/', views.parking_plan_view, name='parking_plan'),
path('registration/', views.registration_list, name='registration_list'),
path('registration/', views.registration_csv, name='registration_csv'),

]

10 changes: 10 additions & 0 deletions FRONTEND/fastparking/parking/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,13 @@ def registration_table(request):
"registrations": registrations,
}
return render(request, "registration_table.html", content)

def registration_csv(request):
active_menu = "registration"
registrations = Registration.objects.all()
content = {
"title": "Registration table",
"active_menu": active_menu,
"registrations": registrations,
}
return render(request, "registration_table.html", content)
Binary file added img/qr_t_bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/qr_t_news.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5369838

Please sign in to comment.