From 78d5d21a42c42fff521c9d3fb76a94b50c32e7f4 Mon Sep 17 00:00:00 2001 From: "Francesco Scarlato (Jungmann)" Date: Thu, 28 Jan 2016 16:11:27 +0000 Subject: [PATCH] Fix ImportError: No module named 'views' --- django_telegrambot/__init__.py | 2 +- django_telegrambot/urls.py | 4 ++-- example/telegrambot.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/django_telegrambot/__init__.py b/django_telegrambot/__init__.py index a4ad610..88ae7f0 100644 --- a/django_telegrambot/__init__.py +++ b/django_telegrambot/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.1.4' +__version__ = '0.1.5' default_app_config = 'django_telegrambot.apps.DjangoTelegramBot' \ No newline at end of file diff --git a/django_telegrambot/urls.py b/django_telegrambot/urls.py index 233595b..1f8a6f8 100644 --- a/django_telegrambot/urls.py +++ b/django_telegrambot/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import url, include, patterns -from views import webhook +from . import views urlpatterns = [ - url(r'(?P.+?)/$', webhook, name='webhook'), + url(r'(?P.+?)/$', views.webhook, name='webhook'), ] \ No newline at end of file diff --git a/example/telegrambot.py b/example/telegrambot.py index bc1b86d..c630f57 100644 --- a/example/telegrambot.py +++ b/example/telegrambot.py @@ -3,7 +3,7 @@ from django_telegrambot.apps import DjangoTelegramBot import logging -logger = logging.getLogger() +logger = logging.getLogger(__name__) #in questa parte del file definire il funzionamento del bot aggiungendo gli handler @@ -22,7 +22,7 @@ def error(bot, update, error): def main(): - print "Handlers for telegram bot" + logger.info("Loading handlers for telegram bot") # Default dispatcher (this is related to the first bot in settings.TELEGRAM_BOT_TOKENS) dp = DjangoTelegramBot.dispatcher