Этот проект представляет собой веб-приложение на базе Django, с фронтендом и интеграцией с Telegram ботом. Проект разработан для демонстрации основных функциональных возможностей Django в сочетании с интерфейсом пользователя и взаимодействием через мессенджер Telegram.
- Клонируйте репозиторий:
git clone https://github.com/humoyunxujaev/devfiles.git
- Create a virtual environment:
python -m venv venv
2.Activate the virtual environment:
For Windows:
bash venv\Scripts\activate
For Unix/Mac:
bash source venv/bin/activate
3.Install dependencies:
bash pip install -r requirements.txt
4.Apply migrations:
bash python manage.py migrate
5. Run the development server:
bash python manage.py runserver
6. Create a Telegram bot and obtain the token from BotFather. Set the token in the settings.py file:
BOT_TOKEN = 'your_telegram_bot_token'- Run the bot
python bot.py
Usage 1.Start the development server:
python manage.py runserver2.Open a web browser and go to http://localhost:8000/. 3.Interact with the web application and the Telegram messenger to demonstrate integration.
Project Structure mysite/: main Django application. templates/: HTML templates. static/: static files (CSS, JavaScript). bot.py/: telegram bot script manage.py: main Django management script.