<?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: Soumya Ranjan Naik</title>
    <description>The latest articles on DEV Community by Soumya Ranjan Naik (@soumyaranjannaik).</description>
    <link>https://dev.to/soumyaranjannaik</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%2F359496%2Ff2c4b7ca-f0f4-4ea9-9a32-ec6887eacf56.JPG</url>
      <title>DEV Community: Soumya Ranjan Naik</title>
      <link>https://dev.to/soumyaranjannaik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/soumyaranjannaik"/>
    <language>en</language>
    <item>
      <title>JS equivalent for pydantic or dataclasses in python?</title>
      <dc:creator>Soumya Ranjan Naik</dc:creator>
      <pubDate>Sun, 27 Nov 2022 18:54:54 +0000</pubDate>
      <link>https://dev.to/soumyaranjannaik/js-equivalent-for-pydantic-or-dataclasses-in-python-43oo</link>
      <guid>https://dev.to/soumyaranjannaik/js-equivalent-for-pydantic-or-dataclasses-in-python-43oo</guid>
      <description>&lt;p&gt;I am just getting into the JS ecosystem and I have 4 years of experience in the python ecosystem.&lt;/p&gt;

&lt;p&gt;I wanted to know if there is a direct equivalent of pydantic or dataclasses equivalent in JS (not typescript).&lt;/p&gt;

&lt;p&gt;I am aware that json schema would be a worthy replacement but wanted class based capabilities if possible.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Flutter is based on Adaptive or Responsive Design ?</title>
      <dc:creator>Soumya Ranjan Naik</dc:creator>
      <pubDate>Sun, 01 Aug 2021 15:47:15 +0000</pubDate>
      <link>https://dev.to/soumyaranjannaik/flutter-is-based-on-adaptive-or-responsive-design-3m6o</link>
      <guid>https://dev.to/soumyaranjannaik/flutter-is-based-on-adaptive-or-responsive-design-3m6o</guid>
      <description>&lt;p&gt;I was learning flutter because I need to develop a few highly interactive websites and I found everyone was utilizing MediaQueries and Device Orientation to change size fixed by pixels on each Widget and called it Responsive design.&lt;/p&gt;

&lt;p&gt;As far as I know that method is Adaptive design in which the elements change depending upon Device or Screen whereas in Responsive it should scale things i.e. make it smaller or Bigger depending on Resolution.&lt;/p&gt;

&lt;p&gt;Did I making some mistake in understanding the concepts or Flutter is based on Adaptive instead of Responsive ?&lt;/p&gt;

&lt;p&gt;Let's have a discussion on this topic.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>flutter</category>
      <category>dart</category>
      <category>frontend</category>
    </item>
    <item>
      <title>How to convert aws sam into terraform ?</title>
      <dc:creator>Soumya Ranjan Naik</dc:creator>
      <pubDate>Mon, 05 Jul 2021 16:35:28 +0000</pubDate>
      <link>https://dev.to/soumyaranjannaik/how-to-convert-aws-sam-into-terraform-59l7</link>
      <guid>https://dev.to/soumyaranjannaik/how-to-convert-aws-sam-into-terraform-59l7</guid>
      <description>&lt;p&gt;I have a AWS SAM app and I want the equivalent Terraform code for that because our organization uses another tool to manage AWS which only accepts terraform.&lt;/p&gt;

&lt;p&gt;I want atleast the sam template to convert into terraform.&lt;/p&gt;

&lt;p&gt;If you have any idea on how to do it or any reference then please comment.&lt;/p&gt;

</description>
      <category>help</category>
      <category>terraform</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Is django underrated and node.js(express.js) overrated ?</title>
      <dc:creator>Soumya Ranjan Naik</dc:creator>
      <pubDate>Mon, 25 Jan 2021 14:54:19 +0000</pubDate>
      <link>https://dev.to/soumyaranjannaik/is-django-underrated-and-node-js-express-js-overrated-2148</link>
      <guid>https://dev.to/soumyaranjannaik/is-django-underrated-and-node-js-express-js-overrated-2148</guid>
      <description>&lt;p&gt;I was recently working on a project recently and one of my friend asked have you ever used express.js ? While I have asked node/express vs django question before also this time I was really interested in checking out what am I losing/missing by not using express.js because I have been working on django for nearly 2 years now I have faced this question several times. &lt;/p&gt;

&lt;p&gt;Hence, I decided to give it a spin and guess what my experience was...I was like what the heck is this. I was shocked with the amount of the configuration that was required just to get the project to basic working condition with authentication and user creation.&lt;/p&gt;

&lt;p&gt;I also used typeorm to generate a default template for starting a express project with typeorm and experess Router.&lt;/p&gt;

&lt;p&gt;I tried passport.js for the auth and the setup required for that was way more than what I would expect and configure for any django project.&lt;/p&gt;

&lt;p&gt;Yes, I felt the amount of flexibility that it offered but also felt the amount of work that each response required to get desired result.&lt;/p&gt;

&lt;p&gt;While this is only my experience I don't know if it is that people who know frontend and just preferred to use the same JavaScript or TypeScript for backend and made node.js or express.js popular or is there something that I am missing or  have I taken a wrong approach or did I choose it for a wrong project (my project relies too heavily on database transaction and updation).&lt;/p&gt;

&lt;p&gt;Maybe I am too comfortable with django but I felt that anyone would be way faster and also would write more DRY and modular code wile using it but I can see a lot of people learning node.js and that population is way higher than what I can see for django.&lt;/p&gt;

&lt;p&gt;So, is there any aspect that I am missing ? or was my application domain not suitable for node.js because I can see Coursera using it and at the same time I can see Udemy using django for almost a similar application domain of video tutorials and courses.&lt;/p&gt;

&lt;p&gt;While there were many tutorials for auth and middleware for express.js those weren't as simple to implement as they were on django.&lt;/p&gt;

&lt;p&gt;And yes I missed the inbuilt admin panel very badly while trying to build express.js let alone the class views and viewsets which handled a lot of error handling by default for me.&lt;/p&gt;

&lt;p&gt;If I was wrong on any approach somewhere or &lt;strong&gt;if someone has worked on both technologies can they please share their views and experience in the comments.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>django</category>
      <category>javascript</category>
      <category>python</category>
    </item>
    <item>
      <title>Is GitHub going to disable command line access for git ?</title>
      <dc:creator>Soumya Ranjan Naik</dc:creator>
      <pubDate>Mon, 21 Dec 2020 01:55:28 +0000</pubDate>
      <link>https://dev.to/soumyaranjannaik/is-github-going-to-disable-command-line-access-for-git-3ck1</link>
      <guid>https://dev.to/soumyaranjannaik/is-github-going-to-disable-command-line-access-for-git-3ck1</guid>
      <description>&lt;p&gt;I received a mail that&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hi @SoumyaRanjanNaik,

You recently used a password to access the repository at &amp;lt;sensitive data&amp;gt; with git using git/2.25.1.

Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates.

Thanks,
The GitHub Team
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So I want to understand if &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I should stop using git and instead start using the github-cli instead ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is git access being deprecated to older git version or is it the case for all git versions ? &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>Django vs Express/Node which one would you choose and why ?</title>
      <dc:creator>Soumya Ranjan Naik</dc:creator>
      <pubDate>Tue, 04 Aug 2020 12:29:56 +0000</pubDate>
      <link>https://dev.to/soumyaranjannaik/django-vs-express-node-which-one-would-you-choose-and-why-1mke</link>
      <guid>https://dev.to/soumyaranjannaik/django-vs-express-node-which-one-would-you-choose-and-why-1mke</guid>
      <description>&lt;p&gt;Please explain why would you prefer one over another ?&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Automatically deploying Django app to PythonAnywhere through GitHub.</title>
      <dc:creator>Soumya Ranjan Naik</dc:creator>
      <pubDate>Fri, 03 Apr 2020 14:28:31 +0000</pubDate>
      <link>https://dev.to/soumyaranjannaik/automatically-deploying-django-app-to-pythonanywhere-through-github-282j</link>
      <guid>https://dev.to/soumyaranjannaik/automatically-deploying-django-app-to-pythonanywhere-through-github-282j</guid>
      <description>&lt;p&gt;This post will explain how to setup automatic deployments to a Django Web-App hosted on PythonAnywhere.&lt;/p&gt;

&lt;p&gt;What people normally do:&lt;br&gt;
&lt;strong&gt;1. Everyone does this:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Local -&amp;gt; GitHub&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. People with &lt;em&gt;PAID&lt;/em&gt; account do this(using ssh access):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Local -&amp;gt; PythonAnywhere&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. What I do(with a free or paid account):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Local -&amp;gt; GitHub -&amp;gt; PythonAnywhere&lt;/p&gt;

&lt;p&gt;Let me first explain why I do this and then I will explain how to do this stuff. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: You are free to Jump to the Implementation section&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Why?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Putting it simply GitHub is great place to collaborate and they have a better UI than PythonAnywhere to view code. Setting up PythonAnywhere's ssh access for everyone who will be working on the project is just too time taking for me and then again explain them what I did is another difficult task and that too if I have a paid account.&lt;/p&gt;

&lt;p&gt;So, I thought it would be amazing if we can just push code onto GitHub and GitHub automatically updates the code on PythonAnywhere and not to mention the default features that are provided by GitHub like Pull Requests, Issues, Actions(haven't used them till now still a feature) and everything else that GitHub offers.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;How&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;We will be using something known as &lt;strong&gt;Deploy Keys&lt;/strong&gt; and &lt;strong&gt;Webhooks&lt;/strong&gt; provided by GitHub to tell our Django Web-App tha it has been updated so it pulls the latest code.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;First&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Install the Python package named GitPython by using the following command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;GitPython


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Second&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Write the view function that will receive the update and update the code on the server.&lt;/p&gt;

&lt;p&gt;Go to your &lt;strong&gt;&lt;em&gt;views.py&lt;/em&gt;&lt;/strong&gt; and add the following code:&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;import&lt;/span&gt; &lt;span class="n"&gt;git&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.http&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HttpResponse&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.views.decorators.csrf&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csrf_exempt&lt;/span&gt;

&lt;span class="nd"&gt;@csrf_exempt&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;POST&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;
        pass the path of the diectory where your project will be 
        stored on PythonAnywhere in the git.Repo() as parameter.
        Here the name of my directory is &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;test.pythonanywhere.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;
        &lt;/span&gt;&lt;span class="sh"&gt;'''&lt;/span&gt;
        &lt;span class="n"&gt;repo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Repo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;test.pythonanywhere.com/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
        &lt;span class="n"&gt;origin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;remotes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;origin&lt;/span&gt;

        &lt;span class="n"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pull&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;HttpResponse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Updated code on PythonAnywhere&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;HttpResponse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Couldn&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;t update the code on PythonAnywhere&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;p&gt;You can also send response codes with them by passing the parameter "status" within the "HttpResponse" that will be returned.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Third&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Set the URL where the Payload from GitHub will be sent.&lt;/p&gt;

&lt;p&gt;To add the payload URL add the following lines into &lt;strong&gt;&lt;em&gt;urls.py&lt;/em&gt;&lt;/strong&gt; file of your Django Project:&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.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;

&lt;span class="sh"&gt;'''&lt;/span&gt;&lt;span class="s"&gt;
here the name of my app is updater so I add the import my view from there
replace updater with your app-name where you have your views.py
&lt;/span&gt;&lt;span class="sh"&gt;'''&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;updater&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;update_server/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;update&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;
  
  
  &lt;strong&gt;Fourth&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Now push this code to GitHub and login to our account on PythonAnywhere.&lt;/p&gt;

&lt;p&gt;Now follow the following steps:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 1&lt;/em&gt;: Open a bash terminal on PythonAnywhere.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 2&lt;/em&gt;: Issue the following command:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;after this command you will be shown the following prompt:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; Generating public/private rsa key pair.


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Step 3&lt;/em&gt;: When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Step 4&lt;/em&gt;: At the prompt, type a secure passphrase.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;gt; Enter passphrase (empty for no passphrase): [Type a passphrase]
&amp;gt; Enter same passphrase again: [Type passphrase again]


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Step 5&lt;/em&gt;: Issue the following command on the bash terminal of PythonAnywhere to get your key.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ cat ~/.ssh/id_rsa.pub 


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;then press CTRL+C to copy the key.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Fifth&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Go to your GitHub Account and then Go to the Repository in which you have your Django Project.&lt;/p&gt;

&lt;p&gt;Then follow the following steps:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 1&lt;/em&gt;: From your repository, click Settings as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7ej7tula7p3uswybzmfp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7ej7tula7p3uswybzmfp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 2&lt;/em&gt;: In the sidebar, click Deploy Keys, then click Add deploy key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyqm9vqm29n4l6gy67tmz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyqm9vqm29n4l6gy67tmz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 3&lt;/em&gt;: Provide a title, paste in your public key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb9r5drrg23od6hfgx0is.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb9r5drrg23od6hfgx0is.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 4&lt;/em&gt;: Select Allow write access if you want this key to have write access to the repository. A deploy key with write access lets a deployment push to the repository.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 5&lt;/em&gt;: Click Add key.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Sixth&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Go to your PythonAnywhere account and go to the bash terminal and setup your Web-App but &lt;strong&gt;use the SSH instead of HTTPS for cloning your Repository from GitHub&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: I would suggest to use the automated script&lt;/em&gt; &lt;strong&gt;pa_autoconfigure_django.py&lt;/strong&gt; &lt;em&gt;available in pythonanywhere package which can be installed via pip to automatically setup my project on PythonAnywhere.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you already have a project setup on PythonAnywhere using HTTPS then open a bash terminal and edit the remote URL to set SSH by using the following command :&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&lt;p&gt;$ git remote set-url origin &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;:USERNAME/REPOSITORY.git&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;strong&gt;Seventh&lt;/strong&gt;:&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;Go back to the settings tab of your Repository on GitHub and follow the following steps :&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 1&lt;/em&gt;: In the sidebar, click Webhooks, then click Add webhook.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fp5sdbtm71rquv6hu3enw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fp5sdbtm71rquv6hu3enw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 2&lt;/em&gt;: Fill in the Payload URL and set the "Content type" to "application/json" as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjv61nox1yw5gbozwbgjm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjv61nox1yw5gbozwbgjm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 3&lt;/em&gt;: click "Add webhook".&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Finally&lt;/strong&gt;:
&lt;/h1&gt;

&lt;p&gt;You will see the following when it is success&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flz3oyvckcs0itbgrnlmr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flz3oyvckcs0itbgrnlmr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If it show some other icon in place of a green tick then click on edit and at the bottom you can see the "Recent Deliveries" here you can click on the button shown below to see the details of that delivery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgtzbld6lrmuyt8feitkr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgtzbld6lrmuyt8feitkr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking you will see two tabs "Request" and "Response" to see the details of failure you can click on response and you will get the details as shown below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjdgj2gbdocedykbot9uz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjdgj2gbdocedykbot9uz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you get any &lt;strong&gt;response code other than 200&lt;/strong&gt; then go to the error log on your PythonAnywhere account and check what's the problem.&lt;/p&gt;

&lt;p&gt;The most common mistake that I make is when I return something else instead of HttpResponse it will throw some Attribute error.&lt;/p&gt;

&lt;p&gt;If you get stuck somewhere then feel free to contact me on telegram using the link &lt;a href="https://t.me/soumya_r" rel="noopener noreferrer"&gt;https://t.me/soumya_r&lt;/a&gt; .&lt;/p&gt;

</description>
      <category>django</category>
      <category>github</category>
      <category>python</category>
      <category>pythonanywhere</category>
    </item>
  </channel>
</rss>
