<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Rishav Upadhaya</title>
    <description>The latest articles on Forem by Rishav Upadhaya (@rishav_upadhaya).</description>
    <link>https://forem.com/rishav_upadhaya</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2874118%2Fad42525f-6365-40e3-95c9-a7a95063e459.jpg</url>
      <title>Forem: Rishav Upadhaya</title>
      <link>https://forem.com/rishav_upadhaya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rishav_upadhaya"/>
    <language>en</language>
    <item>
      <title>The Model Context Protocol (MCP): The Future of LLM Tool Integration</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Sun, 13 Apr 2025 04:14:20 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/the-model-context-protocol-mcp-the-future-of-llm-tool-integration-1m5b</link>
      <guid>https://forem.com/rishav_upadhaya/the-model-context-protocol-mcp-the-future-of-llm-tool-integration-1m5b</guid>
      <description>&lt;p&gt;Imagine a world where large language models (LLMs) like ChatGPT can easily work with many tools—such as web browsers, email systems, and coding platforms—without developers needing to constantly change code when these tools update. This is the idea behind the Model Context Protocol (MCP), a promising framework that could change the way AI models connect with external tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is MCP?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;MCP can be understood as a universal “API layer” that lets LLMs communicate with a wide range of tools in a uniform way. Just as regular APIs allow applications to talk to external services, MCP serves as a bridge between an AI model and the tools it needs for tasks like sending emails, gathering data, or running automated workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Evolution of AI Tool Integrations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before MCP, there were two main stages in the evolution of AI:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Basic LLMs&lt;/strong&gt;: Models like ChatGPT that generate text but do not have direct access to external tools.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LLMs with Custom Tool Integrations&lt;/strong&gt;: Systems where models were hardcoded to use specific tools (for example, integrating directly with browsers or document readers).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;MCP introduces a new structure with two main components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MCP Clients&lt;/strong&gt;: These are the interfaces or applications (such as code editors or chat interfaces) where users interact with the LLM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MCP Servers&lt;/strong&gt;: Independent hubs that connect with external tools (e.g., automation tools like Selenium, email services, or PDF parsers). When an LLM needs a tool, it sends a request to an MCP server, which handles the task.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Move to MCP? The Problem It Solves&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The real challenge with direct tool integration is that many tools—like browser automation or email APIs—are maintained by different organizations and change frequently. If an LLM is directly connected to these tools, any change forces developers to update the LLM’s code each time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;br&gt;
Imagine an LLM that uses Selenium for browser automation, SendGrid for emails, and a tool for PDF parsing. If SendGrid updates its API, the change will be handled by its own MCP server. The LLM continues to work without needing any modifications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP solves this&lt;/strong&gt; by decentralizing responsibility. Each tool provider maintains its own MCP server, so updates are handled on their end. The LLM only communicates with MCP, eliminating the need for constant code rewrites.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How MCP Works: A Game Changer for Developers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;MCP’s simplicity is its strength:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decentralized MCP Servers&lt;/strong&gt;: Tools like Selenium or email services run their own servers, managed by their providers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plug-and-Play for LLMs&lt;/strong&gt;: Developers connect their model to MCP, which routes requests automatically.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fewer Dependency Issues&lt;/strong&gt;: Tool providers handle updates, not LLM developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Faster Innovation&lt;/strong&gt;: Focus on improving AI capabilities instead of maintaining integrations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wider Accessibility&lt;/strong&gt;: Anyone can create an MCP server for their tool, making it globally available.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why MCP Matters&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;MCP is not just an upgrade in technology—it represents a shift in how we think about AI tool integration. By separating tool integrations from the AI model itself, MCP enables &lt;strong&gt;more adaptable, scalable, and future-proof systems&lt;/strong&gt;. Whether automating workflows, processing data, or building intelligent assistants, MCP could reduce the complexity of maintaining tool integrations.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Want to Learn More?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For a deeper dive, check out this explainer video on MCP by &lt;a href="https://www.youtube.com/watch?v=7j_NE6Pjv-E&amp;amp;t=460s" rel="noopener noreferrer"&gt;RasMic&lt;/a&gt; and &lt;a href="https://www.youtube.com/watch?v=eur8dUO9mvE" rel="noopener noreferrer"&gt;IBM&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>llm</category>
      <category>ai</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Day 11: Customizing CBVs with Mixins &amp; Efficient Form Handling</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Thu, 27 Feb 2025 08:25:09 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-11-customizing-cbvs-with-mixins-efficient-form-handling-4agh</link>
      <guid>https://forem.com/rishav_upadhaya/day-11-customizing-cbvs-with-mixins-efficient-form-handling-4agh</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
On Day 11, I focused on taking my Django skills to the next level by customizing Class-Based Views (CBVs) with mixins and streamlining form submissions. By combining mixins with CBVs, I was able to create more modular, reusable code and handle form processing more efficiently. Here’s What I learned today:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Learn?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1) Customizing CBVs with Mixins:&lt;/strong&gt;&lt;br&gt;
Mixins allow you to inject reusable functionality into your CBVs. I created a custom mixin to handle common tasks, like logging user actions or pre-processing data, which keeps my views clean and DRY.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Efficient Form Handling:&lt;/strong&gt;&lt;br&gt;
I enhanced form submissions by overriding the form_valid method in my CBV. This approach not only validates the form but also lets me perform additional tasks like sending notifications or logging submissions before redirecting the user. The result is a more robust and maintainable form handling process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Combining Security with Efficiency:&lt;/strong&gt;&lt;br&gt;
By incorporating LoginRequiredMixin, I ensured that only authenticated users can access sensitive forms. This mixin, combined with my custom logic, streamlined the process while keeping security in check.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;br&gt;
Customizing CBVs with mixins helps reduce code repetition and enhances modularity. Efficient form handling ensures that user submissions are processed smoothly, leading to a better user experience. Together, these practices make the application more scalable and easier to maintain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;br&gt;
With these advanced techniques under my belt, I'm excited to further refine my application's functionality. Next, I plan to explore additional mixins for handling permissions and data validation, as well as integrating more complex forms.&lt;/p&gt;

&lt;p&gt;If you’re also learning Django or have tips on using CBVs effectively and mixins effectively, I'd love to connect and learn from your experiences 🤝. Let’s keep growing together in this journey! 🌱&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 12 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding!&lt;/strong&gt; 😊&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbq35c139bryjaymm73yb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbq35c139bryjaymm73yb.png" alt="Image description" width="612" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0kelbokz3axvz8yytnti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0kelbokz3axvz8yytnti.png" alt="Image description" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 10: Introduction to Django Class-Based Views (CBVs)</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Wed, 26 Feb 2025 15:19:53 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-10-introduction-to-django-class-based-views-cbvs-le</link>
      <guid>https://forem.com/rishav_upadhaya/day-10-introduction-to-django-class-based-views-cbvs-le</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
Today, I learned about Django's Class-Based Views (CBVs). Unlike function-based views, CBVs organize your view logic into reusable classes, which can simplify your code and make it more maintainable. In Day 10, I explored how to implement CBVs. Here's how it went:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Learn?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1) What are CBVs?&lt;/strong&gt;&lt;br&gt;
CBVs are Python classes that inherit from Django’s built-in generic views (e.g., ListView, DetailView). They encapsulate common logic, letting you override methods for customization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Creating a ListView:&lt;/strong&gt;&lt;br&gt;
I started by implementing a ListView to display a list of blog posts.This view automatically fetches all blog posts and renders them using the specified template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Implementing a DetailView:&lt;/strong&gt;&lt;br&gt;
Next, I set up a DetailView to show individual blog post details. This view simplifies the process of displaying detailed information for each blog post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Other Common Generic Views&lt;/strong&gt;&lt;br&gt;
CreateView/UpdateView : Handle form submissions for creating/updating records.&lt;br&gt;
DeleteView : Safely delete objects with confirmation steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) Advantages over FBV's:&lt;/strong&gt;&lt;br&gt;
Reusability : Extend and override methods instead of rewriting logic&lt;br&gt;
DRY Principle : Avoid repetitive code (e.g., fetching objects, handling pagination).&lt;br&gt;
Maintainability : Organize code into logical components&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Class-Based Views?&lt;/strong&gt;&lt;br&gt;
While function-based views (FBVs) are simple and intuitive, class-based views (CBVs) offer a powerful, object-oriented approach to handle common web patterns like displaying lists, editing data, or rendering forms. CBVs reduce boilerplate code, promote reusability, and align with Django’s "batteries-included" philosophy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;br&gt;
With an introduction to CBVs, I'm excited to explore more advanced topics in Django. Tomorrow, I plan to dive deeper into customizing CBVs with mixins and handling form submissions more efficiently.&lt;/p&gt;

&lt;p&gt;If you’re also learning Django or have tips on using CBVs effectively, I'd love to connect and learn from your experiences 🤝. Let’s keep growing together in this journey! 🌱&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 11 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding! 😊&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqhzm00wckupvm4d23zy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyqhzm00wckupvm4d23zy.png" alt="Image description" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdipw8th6ex66thyxltzf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdipw8th6ex66thyxltzf.png" alt="Image description" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7v1q8ui8facddx2vea9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7v1q8ui8facddx2vea9z.png" alt="Image description" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzov7dmdmgz4f99sb2tpj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzov7dmdmgz4f99sb2tpj.png" alt="Image description" width="783" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7x02pdrlovnd6ukx9rle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7x02pdrlovnd6ukx9rle.png" alt="Image description" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 9: Adding Edit &amp; Delete Features to My Blog Project</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Tue, 25 Feb 2025 07:49:00 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-9-adding-edit-delete-features-to-my-blog-project-li6</link>
      <guid>https://forem.com/rishav_upadhaya/day-9-adding-edit-delete-features-to-my-blog-project-li6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
Day 9 of my Django journey, I enhance my blog application by adding edit and delete functionality for blog posts. These features are essential for any content management system, allowing users to update or remove their posts seamlessly. Building on the foundation from Day 8, I implemented these features using function-based views (FBVs) while ensuring secure access through user authentication. Here’s how it went:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Accomplish?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Adding Edit Functionality:&lt;/strong&gt;&lt;br&gt;
I created a view to allow users to edit their existing blog posts. Using Django’s models and form handling, I made it easy to update post details.&lt;br&gt;
This view ensures that only authenticated users can edit posts, and it pre-fills the form with the existing data for easy updates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Implementing Delete Functionality:&lt;/strong&gt;&lt;br&gt;
Next, I added a view to allow users to delete blog posts. This required a simple confirmation step before permanently removing the post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Updating Templates and URLs for Edit &amp;amp; Delete Actions:&lt;/strong&gt;&lt;br&gt;
I updated my templates to include links for editing and deleting posts. I also updated the URLs to ensure the connectivity between templates and views.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Enhancing User Experience:&lt;/strong&gt;&lt;br&gt;
To ensure a smooth experience, I added confirmation prompts for the delete action in the index.html template using JavaScript. This extra step prevents accidental deletions and gives users a friendly experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;br&gt;
The ability to edit and delete content is crucial for any dynamic web application. By implementing these features, I’ve made my blog project more functional and user-friendly. Combining these actions with Django’s built-in authentication ensures that only authorized users can modify or remove posts, keeping the app secure and reliable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;br&gt;
With edit and delete functionality in place, my blog project is starting to feel like a real content management system. As I learn more on this Django Journey, I will be implementing all of learnings and make this blogpage more user friendly. &lt;/p&gt;

&lt;p&gt;If you’re also learning Django or have tips on building the projects or enhancing this project, I’d love to connect and learn from your experiences 🤝. Let’s keep growing together in this journey! 🌱&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 10 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding!&lt;/strong&gt; 😊&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fee6lxnaw8fv443npxfg2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fee6lxnaw8fv443npxfg2.png" alt="Image description" width="553" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkw7pfukmi8qz85233v6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkw7pfukmi8qz85233v6.png" alt="Image description" width="399" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcw0o973gj78mnk1zbdx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcw0o973gj78mnk1zbdx.png" alt="Image description" width="572" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrukd376xk29cufojlm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrukd376xk29cufojlm3.png" alt="Image description" width="733" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj0o9s7dbltvn02s7l2wi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj0o9s7dbltvn02s7l2wi.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqp0y8q18nb5y3cr6tfqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqp0y8q18nb5y3cr6tfqv.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4kl2sdb5yrjdud81iwj8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4kl2sdb5yrjdud81iwj8.png" alt="Image description" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 8: Building a Blog with Function-Based Views &amp; Dynamic Homepages</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Mon, 24 Feb 2025 12:46:53 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-8-building-a-blog-with-function-based-views-dynamic-homepages-4cnd</link>
      <guid>https://forem.com/rishav_upadhaya/day-8-building-a-blog-with-function-based-views-dynamic-homepages-4cnd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
Day 8 of my Django journey was all about bringing my blog application to life using function-based views (FBVs) , user authentication, and dynamic homepage templates. I focused on rendering blog posts, ensuring secure access for authenticated users, and displaying data fetched from models on the homepage. Here’s how it went:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Learn?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1) Rendering Blog Posts with Function-Based Views:&lt;/strong&gt;&lt;br&gt;
I created function-based views to handle the display of individual blog posts. These views process requests and return responses by fetching data from the database. This view retrieves a specific blog post and renders it in a detailed template. ✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Securing Content with User Authentication:&lt;/strong&gt;&lt;br&gt;
Building on the authentication system I set up on Day 7, I ensured that only logged-in users can view blog posts. Using Django’s @login_required decorator, I restricted access to certain views.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Designing a Dynamic Homepage:&lt;/strong&gt;&lt;br&gt;
I built a homepage that dynamically displays the latest blog posts by fetching data from the Blog model.&lt;br&gt;
In the index.html template, I looped through the fetched posts to display them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;br&gt;
Function-based views are a great way to handle requests and render templates in Django. They’re straightforward, easy to understand, and perfect for smaller projects or specific use cases. By combining FBVs with user authentication, I ensured that my app is both functional and secure. Additionally, designing dynamic templates that fetch and display data from models enhances user engagement by keeping content fresh and relevant 🚀.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;br&gt;
Day 8 gave me a solid foundation for rendering content, securing user actions, and displaying dynamic data. Next, I plan to enhance the user experience by adding features like reading each blog, creating a blog and deleting the blog. These improvements will make the app more robust and user-friendly 🧩.&lt;/p&gt;

&lt;p&gt;If you’re also learning Django or have tips on building the projects, I’d love to connect and learn from your experiences 🤝. Let’s keep growing together in this journey! 🌱&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 9 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding!&lt;/strong&gt; 😊&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tiqx89m1lrg23dojb2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tiqx89m1lrg23dojb2t.png" alt="Image description" width="800" height="574"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5y5x5183cvz1dd5c9yf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5y5x5183cvz1dd5c9yf.png" alt="Image description" width="794" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwi4xn6pwruh595t9veg7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwi4xn6pwruh595t9veg7.png" alt="Image description" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 7: Unlocking User Authentication &amp; Authorization</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Sun, 23 Feb 2025 05:31:00 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-7-unlocking-user-authentication-authorization-53e0</link>
      <guid>https://forem.com/rishav_upadhaya/day-7-unlocking-user-authentication-authorization-53e0</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Day 7 of my Django journey, I focused on user authentication and authorization, the key element in user management in any web application. From allowing users to register and log in to controlling access to specific parts of the app, authentication is crucial for building secure and personalized experiences. Here’s what I learned:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Learn?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Why Authentication Matters? 🤔&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Authentication ensures that users are who they claim to be, while authorization determines what they’re allowed to do. Together, they form the foundation of a secure app. Django makes this process seamless with its built-in auth system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Setting Up User Registration:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I created a simple registration form using Django’s UserCreationForm. This allows users to create accounts with a username and password securely ✅.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Handling Login &amp;amp; Logout:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I implemented login and logout functionality using Django’s built-in views. These views manage user sessions, ensuring secure access control.​&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Restricting Access with Decorators:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To restrict access to certain pages, I used the @login_required decorator. Now, only logged-in users can access the dashboard, and unauthorized users are redirected to the login page 🔐.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) Customizing the User Model:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I learned how to extend Django’s default User model by creating a custom user profile. This allows me to store additional information about users, like their bio or location. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Authentication and authorization are essential for building apps where users can create accounts, log in, and interact securely. Django’s built-in tools make it easy to implement these features without reinventing the wheel, saving time and ensuring best practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Day 7 gave me a solid understanding of how to handle user authentication and permissions in Django. Tomorrow, I’ll be diving into class-based views, a powerful way to write reusable and scalable views in Django. I’m excited to see how they can simplify my code and improve efficiency!&lt;/p&gt;

&lt;p&gt;If you’re also learning Django or have tips on working with handling the users and decorators, I’d love to connect and learn from your experiences 🤝. Let’s keep growing together in this journey! 🌱&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 8 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding!&lt;/strong&gt; 😊&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Snippets:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9zp8z5q9zaqb29cg8j3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9zp8z5q9zaqb29cg8j3.png" alt="Image description" width="620" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7gh4t2n2327puir922l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7gh4t2n2327puir922l.png" alt="Image description" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frg5o6absob8hxs27cfam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frg5o6absob8hxs27cfam.png" alt="Image description" width="561" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskytp756jcfap6tix3ps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskytp756jcfap6tix3ps.png" alt="Image description" width="800" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1hfftz4e455s2vhkutrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1hfftz4e455s2vhkutrj.png" alt="Image description" width="709" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 6: Mastering Models &amp; Database Relationships</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Sat, 22 Feb 2025 05:25:00 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-6-mastering-models-database-relationships-4ap3</link>
      <guid>https://forem.com/rishav_upadhaya/day-6-mastering-models-database-relationships-4ap3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
Day 6 of my Django journey, I focused on models and database relationships, which are essential for any dynamic web application. Models define the structure of your data, while relationships allow you to connect different pieces of information in meaningful ways. Today, I learned more into Django’s ORM (Object-Relational Mapping) and learned how to design efficient database schemas. Here’s what I learned:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Learn?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) What Are Models?&lt;/strong&gt;&lt;br&gt;
Models are Python classes that represent database tables. They define the fields and behaviors of the data you want to store.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Running Migrations:&lt;/strong&gt;&lt;br&gt;
After defining my models, I ran migrations to create the corresponding database tables:&lt;br&gt;
python manage.py&lt;br&gt;
 makemigrations&lt;br&gt;
python manage.py&lt;br&gt;
 migrate&lt;br&gt;
It’s amazing how Django handles all the SQL behind the scenes—no need to write raw queries!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Exploring Relationships:&lt;/strong&gt;&lt;br&gt;
I experimented with different types of relationships:&lt;br&gt;
One-to-Many: An Author can write many Articles.&lt;br&gt;
Many-to-Many: A Tag can belong to many Articles, and an Article can have many Tags. These relationships make it easy to query and organize complex data structures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Querying the Database with Django’s ORM:&lt;/strong&gt;&lt;br&gt;
I practiced querying the database using Django’s ORM. The ORM makes database interactions feel like working with Python objects—it’s intuitive and powerful.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;br&gt;
Models and relationships are the foundation of any data-driven application. By mastering Django’s ORM, I can efficiently design, query, and manage databases without writing complex SQL queries. This not only saves time but also ensures clean, maintainable code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt; &lt;br&gt;
Day 6 gave me a deeper understanding of how Django handles data and relationships. Tomorrow, I’ll be diving into authentication and authorization the key components for building secure user systems. I’m excited to learn how to implement login, registration, and permissions in my app!&lt;/p&gt;

&lt;p&gt;If you’re also learning Django or have tips on working with models and ORM, I’d love to connect and learn from your experiences 🤝. Let’s keep growing together in this journey! 🌱&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 7 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding! 😊&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Snippets:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyzqkt00kegecc0cypxjs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyzqkt00kegecc0cypxjs.png" alt="Image description" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxoa0extl6pi4k3315h1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flxoa0extl6pi4k3315h1.png" alt="Image description" width="800" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsj60tkppqhbtfk9xgjku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsj60tkppqhbtfk9xgjku.png" alt="Image description" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 5: Managing User Input with Forms</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Fri, 21 Feb 2025 10:59:18 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-5-managing-user-input-with-forms-mjd</link>
      <guid>https://forem.com/rishav_upadhaya/day-5-managing-user-input-with-forms-mjd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
Day 5 of my Django journey was all about forms, the bridge between users and the backend. Forms are how users interact with your app, whether it’s submitting data, logging in, or leaving feedback. Today, I learned how to handle user input securely and efficiently. Here’s how it went:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Learn?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Why Forms Matter?🤔&lt;/strong&gt;&lt;br&gt;
Forms are essential for collecting user input whether it’s a simple contact form, a login page, or a complex data entry system. Django makes handling forms easy by providing tools to validate, process, and store user data securely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Creating My First Form:&lt;/strong&gt;&lt;br&gt;
I started by creating a simple Django form using the forms module:&lt;/p&gt;

&lt;p&gt;from django import forms&lt;/p&gt;

&lt;p&gt;class ContactForm(forms.Form):&lt;br&gt;
 name = forms.CharField(max_length=100)&lt;br&gt;
 email = forms.EmailField()&lt;br&gt;
 message = forms.CharField(widget=forms.Textarea)&lt;/p&gt;

&lt;p&gt;This defines the structure of the form, including field types and validation rules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Rendering the Form in a Template:&lt;/strong&gt;&lt;br&gt;
Next, I passed the form to a view and rendered it in a template. In the template (contact.html), I used Django’s form rendering capabilities.&lt;br&gt;
The &lt;strong&gt;csrf_token&lt;/strong&gt; ensures protection against Cross-Site Request Forgery (CSRF) attacks—a key security feature in Django.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Handling Form Submission:&lt;/strong&gt;&lt;br&gt;
I updated my view to handle POST requests and validate the submitted data by printing the data onto my terminal. Seeing the form validation in action was incredible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) Customizing Form Appearance:&lt;/strong&gt; &lt;br&gt;
I also learned how to customize the form’s appearance by manually rendering fields in the template. I used form.name&lt;br&gt;
, for name and similarly for other fields. This gives me full control over the form’s layout and styling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;br&gt;
Forms are the primary way users interact with your app, so handling them properly is crucial. Django’s form framework not only simplifies this process but also ensures data integrity and security. Mastering forms is a key step toward building robust, user-friendly applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;br&gt;
Day 5 gave me a solid foundation in handling user input with Django forms. Tomorrow, I’ll be diving into models and database relationships, the backbone of any dynamic web application. I’m excited to explore how Django’s ORM works and how to design efficient database schemas.&lt;/p&gt;

&lt;p&gt;If you’re also learning Django or have tips on working with forms, I’d love to connect and learn from your experiences 🤝. Let’s keep growing together in this journey! 🌱&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 6 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy coding! 😊&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Froqnbjef7lswz02bcry5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Froqnbjef7lswz02bcry5.png" alt="Image description" width="612" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgwebdiun4p2sgbkolb2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgwebdiun4p2sgbkolb2.png" alt="Image description" width="727" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fziqgnunwm579tt1dnrtq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fziqgnunwm579tt1dnrtq.png" alt="Image description" width="800" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 4: Bringing My App to Life with Templates &amp; Static Files</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Thu, 20 Feb 2025 07:54:00 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-4-bringing-my-app-to-life-with-templates-static-files-2ie5</link>
      <guid>https://forem.com/rishav_upadhaya/day-4-bringing-my-app-to-life-with-templates-static-files-2ie5</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Description:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Day 4 of my Django journey was all about templates and static files —the tools that make my app visually appealing and user-friendly. If views and URLs are the framework's structure, templates and static files are the design that make the application engaging. Here's what I learned today:&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;What Did I Learn?&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;1) Templates:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Templates in Django enable the creation of dynamic HTML pages that display data from the backend. I began by crafting a layout.html template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My Django App&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
      {% block body %}{% endblock %}
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This serves as a foundational template, promoting code reuse and consistent design across different pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Template Inheritance:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
It helps to enhance reusability. I utilized template inheritance to extend layout.html in a child template (home.html):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;{% extends 'blogs/layout.html' %} 
{% block body %} 
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is the home page of my blog app! &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt; 
{% endblock %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach streamlines development saves so much time and keeps my code DRY (Don’t Repeat Yourself) 💯.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Incorporating Styles and Scripts on Static Files:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I learned to manage CSS, JavaScript, and images using Django’s static files framework. After creating a static/ directory and adding a CSS file (styles.css):&lt;/p&gt;

&lt;p&gt;After writing some CSS for the index.html. I linked it in my template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{% static 'assets/css/styles.css' %}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This integration allowed me to enhance the visual presentation of my app effectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Template Tags and Filters: Managing Dynamic Content&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I explored Django’s built-in template tags and filters to manipulate data. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Today is {{ today|date:"F j, Y" }}.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This displayed the current date in a human-readable format 📅.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Why Does This Matter?&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Templates and static files are what users see and interact with—they’re the face of your application. By mastering these tools, I can create clean, responsive, and visually appealing web pages that enhance the user experience 🚀.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;Looking Ahead:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Day 4 provided valuable insights into how Django handles frontend design while keeping things modular and organized. Tomorrow, I’ll be diving into forms and user input, aiming to build interactive features that handle user data securely and efficiently.&lt;/p&gt;

&lt;p&gt;If you’re exploring Django too or have tips on working with templates and static files, I’d love to connect and learn from you. Let’s grow together in this tech journey! 🤝&lt;/p&gt;




&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 5 is just around the corner, and I’m excited to see what’s next! 🚀 🔥&lt;/p&gt;

&lt;p&gt;Happy coding! 😊&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Snippets&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0zdgg08x7hnyxiga8yj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0zdgg08x7hnyxiga8yj.png" alt="layout.html" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5pgjgopr3ppos0e7i4q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5pgjgopr3ppos0e7i4q.png" alt="Home and Styles" width="742" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtivi6qq922x094xeja8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtivi6qq922x094xeja8.png" alt="Views" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flas4nzrpqkrjoffqqedc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flas4nzrpqkrjoffqqedc.png" alt="Preview" width="613" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 3: Connecting the Dots with Views &amp; URLs</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Wed, 19 Feb 2025 05:15:00 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-3-connecting-the-dots-with-views-urls-5g8c</link>
      <guid>https://forem.com/rishav_upadhaya/day-3-connecting-the-dots-with-views-urls-5g8c</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt;&lt;br&gt;
Day 3 of my Django journey was all about views and URLs, the components that manage user requests and responses. If Django apps are the building blocks of a project, views and URLs are the connections that link everything together. Here's what I learned today:&lt;/p&gt;

&lt;p&gt;**What Did I Learn?&lt;/p&gt;

&lt;p&gt;1) What Are Views?**&lt;br&gt;
Views are process in Django's request-response that handle user requests, process data, and return responses, such as web pages or JSON data.&lt;/p&gt;

&lt;p&gt;I began with function-based views, which are straightforward Python functions. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.http import HttpResponse 

def blog_home(request): 
 return HttpResponse("This is the Blog Page Home!")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2) Mapping URLs to Views:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To make the view accessible, I mapped it in urls.py:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.urls import path
from . import views

urlpatterns = [
 path('home/', views.blog_home, name='blog_home'),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigating to /home/ displayed "This is the Blog Page Home!" in the browser—a confirmation that the URL and view were correctly linked. 🎉&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Rendering Templates:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I advanced to rendering HTML templates. After creating a index.html template, I updated the view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.shortcuts import render

def blog_home(request):
 return render(request, 'blogs/index.html')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach allows for dynamic and visually appealing web pages. 🖥✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Dynamic URLs:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I experimented with dynamic URLs by incorporating variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;path('greet/&amp;lt;str:name&amp;gt;/', views.greet_user, name='greet_user'),
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the corresponding view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def greet_user(request, name): 
 return HttpResponse(f"Hello, {name}!")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visiting /greet/Rishav/ displayed "Hello, Rishav!"—a step toward creating personalized user experiences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;br&gt;
Views and URLs are the bridge between users and your application. They define how users interact with your app and what they see. Mastering these concepts is crucial for building functional, user-friendly web applications. 🔗&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;br&gt;
Day 3 gave me a solid understanding of request handling in Django. Tomorrow, I’ll be focusing will be on templates and static files. I'm eager to learn how to design clean, reusable templates and incorporate CSS/JavaScript to enhance the user interface.&lt;/p&gt;

&lt;p&gt;If you’re exploring Django too or have tips on structuring views and URLs effectively, I’d love to connect and learn from you. Let’s grow together in this tech journey! 🤝&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 4 is just around the corner, and I’m excited to see what’s next! 🚀 &lt;/p&gt;

&lt;p&gt;** Code Snippets: **&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsl9bpq7ud2j8ezdb5nek.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsl9bpq7ud2j8ezdb5nek.png" alt="Image description" width="665" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi68koynwekumjfg5x0t5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi68koynwekumjfg5x0t5.png" alt="Image description" width="735" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjua26qqb4fisqgs0mnyy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjua26qqb4fisqgs0mnyy.png" alt="Image description" width="646" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foauuoozbs4fkkyjduurw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foauuoozbs4fkkyjduurw.png" alt="Image description" width="653" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>django</category>
    </item>
    <item>
      <title>Day 2: Breaking Down Django Apps &amp; Project Structure</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Tue, 18 Feb 2025 10:42:35 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-2-breaking-down-django-apps-project-structure-2g0k</link>
      <guid>https://forem.com/rishav_upadhaya/day-2-breaking-down-django-apps-project-structure-2g0k</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;br&gt;
Day 2 of my Django journey, I went deeper into Django by learning how apps fit into a project. If Day 1 was about setting up the basics, today was about organizing those basics into manageable pieces. Here’s how it went:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Did I Learn?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) *&lt;em&gt;What Are Django Apps? *&lt;/em&gt; Django apps are modular components that handle specific functionalities in your project. Think of them as mini applications within your main project. For example, a blog app, a user authentication app, or a comments system. This modularity makes Django projects scalable and maintainable.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Creating My First App:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I created my first Django app using the command:&lt;/p&gt;

&lt;p&gt;python manage.py startapp blogs&lt;/p&gt;

&lt;p&gt;This generated a new folder with files like models.py, views.py, and admin.py.&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;Registering the App:&lt;/strong&gt; &lt;br&gt;
To make Django aware of my new app, I added it to the "INSTALLED_APPS" list in settings.py. This step is crucial because it tells Django to include the app in the project’s ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbr4tlxxoapfqxs2h4wt8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbr4tlxxoapfqxs2h4wt8.png" alt="Image description" width="705" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) &lt;strong&gt;Understanding Models:&lt;/strong&gt; I got introduced to models, which are Python classes that define the structure of your database tables. For example, I created a simple model for a blog post:&lt;/p&gt;

&lt;p&gt;from django.db import models&lt;/p&gt;

&lt;p&gt;class Blog(models.Model):&lt;br&gt;
 head = models.CharField(max_length=100)&lt;br&gt;
 description = models.TextField()&lt;br&gt;
 author = models.ForeignKey(User, on_delete= models.CASCADE, related_name="blogs")&lt;br&gt;
 published_at = models.DateTimeField(auto_now_add=True)&lt;br&gt;
 blog_image = models.ImageField(null=True, blank= True, upload_to="images/")&lt;/p&gt;

&lt;p&gt;Models are the backbone of Django’s ORM (Object-Relational Mapping), making database interactions seamless.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3w05bj8c2loob5767kua.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3w05bj8c2loob5767kua.png" alt="Image description" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) *&lt;em&gt;Running Migrations: *&lt;/em&gt; &lt;br&gt;
After defining my model, I ran migrations to create the corresponding database table:&lt;/p&gt;

&lt;p&gt;python manage.py makemigrations&lt;br&gt;
 python manage.py migrate&lt;/p&gt;

&lt;p&gt;Seeing Django automatically generate SQL commands for my model was mind-blowing! ✨&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;br&gt;
Understanding how to structure your project with apps and models helps keep your work organized and scalable. Plus, Django’s ORM eliminates the need to write raw SQL queries, saving time and reducing errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Looking Ahead:&lt;/strong&gt;&lt;br&gt;
Today helped me see how all the pieces of a Django project fit together. Tomorrow, I’ll explore views and URLs—the parts that manage how users interact with the app. I’m excited to see how data flows through the system! 🔗&lt;/p&gt;

&lt;p&gt;If you’re exploring Django too or have tips on structuring apps, I’d love to connect and learn from you. Let’s grow together in this tech journey! 🤝&lt;/p&gt;

&lt;p&gt;Stay tuned for more updates as I continue this journey. Day 3 is just around the corner, and I’m excited to see what’s next! 🚀 &lt;/p&gt;

&lt;p&gt;Happy coding! 😊&lt;/p&gt;

</description>
      <category>django</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 1 – Starting My Django Journey</title>
      <dc:creator>Rishav Upadhaya</dc:creator>
      <pubDate>Mon, 17 Feb 2025 09:54:44 +0000</pubDate>
      <link>https://forem.com/rishav_upadhaya/day-1-starting-my-django-journey-3o4c</link>
      <guid>https://forem.com/rishav_upadhaya/day-1-starting-my-django-journey-3o4c</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Today was the start of something new and exciting—my journey into Django, the powerhouse Python framework that’s behind so many incredible web applications. I’ve been comfortable with Python for a while now, but diving into backend development with Django felt like stepping into uncharted territory. And honestly? It was awesome. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Did Today:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ll be honest—I didn’t build anything flashy or groundbreaking today. But sometimes, the most important steps are the small ones. Here’s how I spent my first day:&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Getting to Know Django:&lt;/strong&gt; I started by just getting familiar with what Django is all about. It’s this amazing framework that helps you build web apps quickly without having to reinvent the wheel. Whether it’s a blog, an e-commerce site, or even a social media platform, Django’s got tools to make it happen.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Setting Up My Environment:&lt;/strong&gt; The first real task was setting up my workspace. I created a virtual environment (using venv) to keep everything neat and tidy. This might sound boring but trust me—it’s a game-changer. Keeping dependencies organized from the start saves so much headache later. After that, I installed Django with a simple pip install django.&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;Creating My First Project:&lt;/strong&gt; &lt;br&gt;
Then I created my very first Django project. With a quick command:&lt;/p&gt;

&lt;p&gt;django-admin startproject myproject&lt;/p&gt;

&lt;p&gt;This command generated the foundational structure of a Django project. Starting the development server with python manage.py runserver and seeing it worked was a rewarding milestone. 🎉&lt;/p&gt;

&lt;p&gt;4) &lt;strong&gt;Exploring the Project Layout:&lt;/strong&gt; I took time to examine the auto-generated files, such as settings.py for configurations, urls.py for routing, and manage.py for command-line interactions. Understanding this layout is essential for future development. 🗂️&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Django?&lt;/strong&gt;&lt;br&gt;
Django is an ideal choice for developers who want to build robust web applications quickly. It offers built-in features for authentication, database management, and more, ensuring scalability and security for projects of all sizes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Today was about laying the groundwork. In the upcoming days, I plan to delve deeper into Django's features, undertake real-world projects, and master advanced topics like REST APIs, asynchronous views, and deployment strategies. I'm eager to see how this journey unfolds and how Django will enable me to realize my ideas. 🌟&lt;/p&gt;

&lt;p&gt;If you’re also interested in backend development or have experience with Django, I’d love to connect and exchange insights. Let’s grow together in this ever-evolving tech landscape! 🤝&lt;/p&gt;

&lt;p&gt;Happy coding! 😊&lt;/p&gt;

</description>
      <category>django</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
