<?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>DEV Community: Eshat Jubayer</title>
    <description>The latest articles on DEV Community by Eshat Jubayer (@eshat002).</description>
    <link>https://dev.to/eshat002</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%2F2437963%2F2833aede-d9ab-4e01-93f7-4f216b98f1ea.jpeg</url>
      <title>DEV Community: Eshat Jubayer</title>
      <link>https://dev.to/eshat002</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eshat002"/>
    <language>en</language>
    <item>
      <title>Djoser+SimpleJWT</title>
      <dc:creator>Eshat Jubayer</dc:creator>
      <pubDate>Wed, 11 Dec 2024 14:07:19 +0000</pubDate>
      <link>https://dev.to/eshat002/djosersimplejwt-1pli</link>
      <guid>https://dev.to/eshat002/djosersimplejwt-1pli</guid>
      <description>&lt;p&gt;I'm using Djoser for authentication in my Django project, and I've noticed that the default behavior doesn't prevent a user who is already logged in from logging in again, nor does it prevent logged-in users from creating new accounts. Is this the expected behavior, or is there something I might be missing?&lt;/p&gt;

</description>
      <category>django</category>
      <category>djoser</category>
      <category>drf</category>
      <category>jwt</category>
    </item>
    <item>
      <title>Where do you put JWT in your React application?</title>
      <dc:creator>Eshat Jubayer</dc:creator>
      <pubDate>Sat, 30 Nov 2024 19:47:59 +0000</pubDate>
      <link>https://dev.to/eshat002/where-do-you-put-jwt-in-your-react-application-o4h</link>
      <guid>https://dev.to/eshat002/where-do-you-put-jwt-in-your-react-application-o4h</guid>
      <description></description>
      <category>react</category>
      <category>javascript</category>
      <category>api</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Simplify Your Django Admin with django-unfold</title>
      <dc:creator>Eshat Jubayer</dc:creator>
      <pubDate>Sat, 16 Nov 2024 12:05:25 +0000</pubDate>
      <link>https://dev.to/eshat002/simplify-your-django-admin-with-django-unfold-5g16</link>
      <guid>https://dev.to/eshat002/simplify-your-django-admin-with-django-unfold-5g16</guid>
      <description>&lt;p&gt;Django's built-in admin is incredibly powerful and highly customizable. However, customizing it from scratch can be time-consuming and daunting. Fortunately, there's an amazing package to address this issue: &lt;strong&gt;django-unfold&lt;/strong&gt;. Built on top of &lt;strong&gt;Tailwind CSS&lt;/strong&gt;, it’s not only powerful but also polished and highly customizable.&lt;/p&gt;

&lt;p&gt;In this post, I’ll walk you through what django-unfold is, how to integrate it into your project, and how it can make managing your Django admin more intuitive.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is django-unfold?
&lt;/h2&gt;

&lt;p&gt;Unfold is a theme for the Django admin interface that incorporates best practices for building full-fledged admin areas. It is designed to enhance and extend the default administration features provided by Django.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Use It?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Highly Customizable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Polished Look&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dark Mode:&lt;/strong&gt; Supports both light and dark mode versions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Responsive Design&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;And Many More&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more details, visit their official &lt;a href="https://unfoldadmin.com/features/" rel="noopener noreferrer"&gt;website&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Install django-unfold
&lt;/h3&gt;

&lt;p&gt;Install the package via pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;django-unfold
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 2: Configure &lt;code&gt;INSTALLED_APPS&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Add &lt;code&gt;unfold&lt;/code&gt; to your &lt;code&gt;INSTALLED_APPS&lt;/code&gt; in &lt;code&gt;settings.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;unfold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# Add this before django.contrib.admin
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;django.contrib.admin&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 3: Apply django-unfold to Your Admin Models
&lt;/h3&gt;

&lt;p&gt;In your app's &lt;code&gt;admin.py&lt;/code&gt;, use django-unfold like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Doctor&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;unfold.admin&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ModelAdmin&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;UnfoldModelAdmin&lt;/span&gt;


&lt;span class="nd"&gt;@admin.register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Doctor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DoctorAdmin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;UnfoldModelAdmin&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;If you want to customize filters and other admin options, you can do so like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@admin.register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Doctor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DoctorAdmin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;UnfoldModelAdmin&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;list_display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;first_name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;specialization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;years_of_experience&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;available&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;date_joined&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;list_filter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;specialization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;available&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gender&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;search_fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;first_name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;email&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;phone&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Example: Before and After
&lt;/h2&gt;

&lt;p&gt;Below is an example of how django-unfold transforms the default Django admin theme:&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%2Fzz2ki9dpeoamwjzqy4au.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%2Fzz2ki9dpeoamwjzqy4au.png" alt="django-unfold admin" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;If you found this helpful, let me know by leaving a 👍 or a comment!, or if you think this post could help someone, feel free to share it! Thank you very much!&lt;/code&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>tailwindcss</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
