Journal logo

Day 1 of posting about learning Python(Django) until I land a job.

Day 1 of Python Learning

By Muhammad UsmanPublished 3 months ago 3 min read
1
Day 1

Day 1: Diving into Django — Building a Chatbot

Alright folks, day one of building my very own chatbot using Python and Django is officially in the books! I’m documenting my journey through daily blog posts, so buckle up and get ready to join the ride.

Today’s mission was all about laying the foundation for this future conversational companion. It wasn’t just lines of code and cryptic commands, though. The instructor sprinkled in some insightful nuggets of wisdom, making the learning process surprisingly engaging and interactive.

Here’s a breakdown of what I accomplished:

Gearing Up: Installing Django

First things first, I needed to welcome the main player onto the scene - Django! I opened up the command line and typed in:

Bash

pip install django

With that, I officially recruited Django using the pip package manager. It felt like welcoming a new teammate, ready to collaborate on creating something truly awesome.

Project Initiation: Hello, “Django_Chatbot!”

With Django on board, it was time to christen our project. I used the following command to create a brand new Django project named “Django_Chatbot”:

Bash

django-admin startproject Django_Chatbot

This command felt like casting a spell, bringing the project to life with all the necessary directories and files.

App Creation: Introducing “chatbot”

Next, I navigated to the project directory using the cd command and then used this line to create a dedicated app named "chatbot":

Bash

cd Django_Chatbot

python manage.py startapp chatbot

This command essentially built a specialized workshop within the project, specifically focused on crafting the chatbot’s functionalities.

Connecting the Dots: Integrating “chatbot”

To ensure smooth communication between the project and the newly created app, I ventured into the settings.py file, located in the main project directory. Here, I meticulously added the "chatbot" app to the INSTALLED_APPS list:

#Python

INSTALLED_APPS = [

# ... other apps

'chatbot',

]

Think of this as introducing the “chatbot” app to the team, making sure everyone knows they’re part of the project and ready to work together seamlessly.

Preparing the Stage: Setting Up Templates

Finally, I created a folder named “templates” within the project directory using this command:

Bash

mkdir templates

This folder will serve as the stage for my chatbot, holding the HTML files that will define its look and feel, and how users will interact with it. It’s like building a theatre where the chatbot will perform its interactive magic.

Beyond the Code: A Glimpse into the Future

While today was all about setting the stage, the instructor hinted at the exciting adventures to come. We’ll be diving deeper into the world of Python and Django, learning how to make my chatbot understand user input, respond effectively, and ultimately become a valuable conversational partner.

I’m buzzing with excitement to continue this journey! Stay tuned for future blog posts where I’ll share my progress, challenges, and (hopefully) breakthroughs as I build my very own chatbot. Feel free to leave comments below if you have any questions or want to share your own coding adventures!

The Road Ahead

I know this might seem like a small step, but it feels like a giant leap for me. I'm starting from scratch, with no prior experience in building chatbots or using Django. But the good news is, I'm not afraid to learn and experiment.

This journey won't be a walk in the park. There will be moments of frustration, head-scratching, and Googling like crazy trying to find solutions. But I'm determined to persevere, learn from my mistakes, and hopefully, in the not-so-distant future, I'll be able to share a fully functional chatbot with you all.

So, if you're interested in learning about building chatbots with Python and Django, or if you're simply curious about my progress, be sure to follow along! I'll be sharing my experiences, challenges, and (hopefully) successes along the way. Together, let's embark on this exciting adventure

Here is my GitHub link for above project.

https://github.com/MuhammadUsman15/ChatBot

Vocalindustrycareer
1

About the Creator

Muhammad Usman

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.