How to set up the project:
- Copy the project using:
https://github.com/retro-future/tgbot_shop
- Go to folder:
cd tgbot_shop
Rename .env.dist file to .env and enter your credentials
You can get BOT_TOKEN and PROVIDER_TOKEN(Payment token) in Telegram @BotFather
- Run the command:
docker-compose up
- This will start-up Bot and Django, once you start you'll get the notification in your bot like:
- After you have to execute commands consistently:
docker exec -it <container_id_or_name> python manage.py migrate
docker exec -it <container_id_or_name> python manage.py createsuperuser
- in order to create superuser to access django admin panel:
- The admin dashboard will be available at
http://127.0.0.1:8000/
- Admin Dashboard
Click on "Category" section and add one or more category,The category you've created will be shown on bot only if you're add "Subcategory" to it
Once You've added "Category" "Subcategory" and "Product" you can see it in your bot
Click on category you've created e.g. and you'll see your subcatecory:
After You clicked on subcategory you turn to inline-mode and list of your products will be displayed: