forked from JungDev/django-telegrambot
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Francesco Scarlato (Jungmann)
committed
Apr 8, 2017
1 parent
dd0d41c
commit 5ca49c0
Showing
8 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
__version__ = '0.2.5' | ||
__version__ = '0.2.6' | ||
default_app_config = 'django_telegrambot.apps.DjangoTelegramBot' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
django>=1.8.0 | ||
django>=1.8.18 | ||
# Additional requirements go here | ||
python-telegram-bot>=5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
{% block title %}<title>Django-Telegrambot</title>{% endblock %} | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | ||
|
||
<!-- Add additional CSS in static file --> | ||
{% load static %} | ||
<!--link rel="stylesheet" href="{% static 'css/styles.css' %}" --> | ||
<style> | ||
.sidebar-nav { | ||
margin-top: 20px; | ||
padding: 0; | ||
list-style: none; | ||
} | ||
.nolist { | ||
list-style: none; | ||
font-size: 1.5em; | ||
color: #337ab7; | ||
} | ||
.nolist a:hover{ | ||
text-decoration: none; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="container-fluid"> | ||
|
||
<div class="row"> | ||
<div class="col-sm-2"> | ||
{% block sidebar %} | ||
<ul class="sidebar-nav"> | ||
<li><a href="{% url 'index' %}">Home</a></li> | ||
</ul> | ||
{% endblock %} | ||
</div> | ||
<div class="col-sm-10 "> | ||
{% block content %}{% endblock %} | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends "base_generic.html" %} | ||
|
||
{% block content %} | ||
<h1><a href="https://github.com/JungDev/django-telegrambot#django-telegrambot">Django-TelegramBot</a></h1> | ||
<p> | ||
Welcome in the sample project of Django-Telegrambot, aka how add Telegram bots to your Django app! | ||
<br> | ||
The full documentation is at <a href="https://django-telegrambot.readthedocs.org">https://django-telegrambot.readthedocs.org</a>. | ||
</p> | ||
|
||
{% if bot_list %} | ||
<h3>Bot's List:</h3> | ||
<ul class="nolist"> | ||
{% for bot in bot_list %} | ||
<li><a href="https://t.me/{{ bot.username }}/"> | ||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAABNJJREFUWIXFlm2IVFUYx3/PuTO7M7OrbqlISparGxWVRYuSSbokRlmmVkKC+IIRRF+qbyVoH4wgqU9+EIQ+WClKQUGSpIGm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BIQiuz2Q79iOuQZOHJFae8L+ejoNU6nErx1Is3Gb6/Qk/YANLZmE1BtwM0izKwbocnuHG/RJk7YmzwhWH3Zjc0lTyYDXR1YohoXi4EZPpmkLkiyed5Etp1N02zVI/1r9Xr1s3vXTLhaIqBqT3KxmP4A5bJrIJPNMO+RIMiHmaHpfqw/hYsnkGiUXCkrVaJbe9ZUv1/WAYDEF307MN4oLiFDgcoBD/jspEzsINWZZDQ+n9WSzs2W/BH1tcbf9qrH1Yx8h5GfB8ZEhokFNbumyEuF5GUdAODTGzXRSMUB4InSybG4MWTcuIrq0sz6CWeHRg2fKvssHqT6dgq2drTQkZphjd4Hr7AhfrHc/Oiou3tXOrXtQO04mbtwfKjJqu28Lpnhwsa2rJ0WJd6zGpWNgj0FEsmxDNkOAzlnxmeE4S5eq2kfDXr8vu6+PpFMZT3O1WE2BXBgnZi7gHKSTVUt48a8ne1frXIrn7AjhjAAAAAASUVORK5CYII="> | ||
{{ bot.first_name}} <small>(@{{ bot.username}})</small></a></li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<p>No bots are available. Please <a href="https://github.com/JungDev/django-telegrambot#configure-your-installation">configure it</a> in settings.py</p> | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from django.conf.urls import url | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
url(r'^$', views.index, name='index'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
from django.shortcuts import render | ||
from django_telegrambot.apps import DjangoTelegramBot | ||
|
||
# Create your views here. | ||
def index(request): | ||
bot_list = DjangoTelegramBot.bots | ||
context = {'bot_list': bot_list} | ||
return render(request, 'bot/index.html', context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters