added crud operations for Course
This commit is contained in:
+11
-1
@@ -1,7 +1,17 @@
|
||||
from . import students, teachers
|
||||
from . import students, teachers, courses
|
||||
from bot.handlers.start import startMarkup
|
||||
|
||||
|
||||
def register_all_callbacks(bot):
|
||||
"""Register all callback handlers"""
|
||||
students.register(bot)
|
||||
teachers.register(bot)
|
||||
courses.register(bot)
|
||||
|
||||
# Cancel is common among all
|
||||
@bot.callback_query_handler(func=lambda call: call.data == 'cancel')
|
||||
def cancel_action(call):
|
||||
bot.clear_step_handler(call.message)
|
||||
bot.send_message(call.message.chat.id,
|
||||
"Action cancelled.", reply_markup=startMarkup())
|
||||
bot.answer_callback_query(call.id)
|
||||
|
||||
Reference in New Issue
Block a user