<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bidhan Majhi on Medium]]></title>
        <description><![CDATA[Stories by Bidhan Majhi on Medium]]></description>
        <link>https://medium.com/@bidhanmajhi?source=rss-da3fb1d6912c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9a4tP1T6nKLllPJn3r-IrA.jpeg</url>
            <title>Stories by Bidhan Majhi on Medium</title>
            <link>https://medium.com/@bidhanmajhi?source=rss-da3fb1d6912c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:39:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bidhanmajhi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automate your workflow with gulp js.]]></title>
            <link>https://medium.com/@bidhanmajhi/automate-your-workflow-with-gulp-js-ecb2458fcf5a?source=rss-da3fb1d6912c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecb2458fcf5a</guid>
            <category><![CDATA[gulp]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Bidhan Majhi]]></dc:creator>
            <pubDate>Wed, 17 Apr 2019 14:04:03 GMT</pubDate>
            <atom:updated>2019-04-17T14:04:03.405Z</atom:updated>
            <content:encoded><![CDATA[<p>Gulp is an opensource JavaScript toolkit built and maintained by lots of developers and opensource contributors. It is mainly used to automate some boring, repetitive but important tasks in web development. It does a lot of different tasks, so its kind of difficult to explain what exactly it does. However, we will go through how we can use it in our project with one example. Most of the tasks you will use will be more or less same as the example. Before we start, I’m assuming you have some knowledge of web development and java script. Let’s get in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZ6JaaBWzJrCtMuT1KbEgg.png" /><figcaption>Gulp.js</figcaption></figure><h3>How to install gulp</h3><p>Before installing gulp, make sure you have node installed in your system. The main reason to check it because we will require npm which comes with node to install gulp. To check it, open the command line and write,</p><pre>$ node -v </pre><p>If it returns the version e.g. v10.15.0, then you have node of version 10 already installed. If you are getting error, then you need to download node first. To do that, you can simple go to <a href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a> and select according to your system. Once it is downloaded and installed, make sure you add the correct PATH in the system environmental variables. Once everything is done, check the node version again, if you don’t get any error, you are ready to install gulp.</p><p>First create a folder any where on your system. This folder will be the place of your project and gulp js. Open it with whatever IDE you have. I’m using Visual Studio Code. You can use any thing you want.</p><p>Now in the terminal, go to that folder and run,</p><pre>$ npm install gulp-cli -g</pre><p>Here, we are installing gulp-cli that stands for gulp command line interface and g means global means we can run it on anywhere on our computer.</p><p>Now go ahead and add all the modules using this command,</p><pre>npm install gulp -D</pre><p>Now you can create gulpfile.js in your folder either just by creating a new file or writing this command,</p><pre>$ npx -p touch nodetouch gulpfile.js</pre><p>Your gulpfile.js is the most important file. Here we will add our functions. Make sure you name it correctly.</p><p>Now go ahead and initiate a project, just type,</p><pre>$ npm init</pre><p>After you write this line, you will see a bunch of lines in your terminal, add any name in the package name, and make everything else blank for now. We don’t need that here. (But they are important when you create actual project)</p><h3>Write our first task</h3><p>After everything is done successfully, you can check how the gulpfile.js works. Let’s print ‘Hello World’,</p><pre>var gulp = require(&#39;gulp&#39;);</pre><pre>gulp.task(&#39;hello&#39;, function(){<br>     console.log(&#39;Hello World&#39;);</pre><pre>});</pre><p>Here we have created a task to print Hello World. This is basic Java Script like function. To run this, go to your terminal, and write,</p><pre>$ gulp hello</pre><p>It will print out Hello World. You may see a lot of warnings, just ignore them for now.</p><h3>Create First Task</h3><p>In our first task we will convert one scss file to a css file. In web development we use css file. To do that we need some packages called plugins. As mentioned earlier, gulp is used to do a lot of things, so you need to add plugins according to the work you want to accomplish.</p><p>In your base folder create a folder called app. Inside app create a folder called scss and another called css. Here scss will be our source folder and css will be our destination folder.</p><p>Let us write our first task in gulpfile.js, where we will convert scss file to css file. For that we need a plugin called gulp-sass, To install it,</p><pre>$ npm install gulp-sass --save-dev</pre><p>This will install gulp-sass and save it in the node-modules. After installing let’s use it. Go to gulpfile.js and write,</p><pre>var gulp = require(&#39;gulp&#39;);<br>var sass = require(&#39;gulp-sass&#39;);</pre><pre>gulp.task(&#39;sass&#39;, function(){<br>     return gulp.src(&#39;app/scss/mycontent.scss&#39;)<br>         .pipe(sass())<br>         .pipe(gulp.dest(&#39;app/css&#39;))<br>});</pre><p>Now we have created the task that will convert scss file to css. Our scss file is inside scss folder named as mycontent.scss, which we will create just in a while. Before that let’s understand what this syntax means. Here gulp.src() means the location of the source file, .pipe() means the method. gulp.dest() means the destination where the new file will be saved.</p><p>Let’s create mycontent.scss file.</p><pre>$red: #f00 !default;</pre><pre>.content{<br>      width: percentage($number: 1);<br>      color: $red;<br>}</pre><p>If you are not familiar with the syntax, this means class content has width 100%, and font color red.</p><p>To convert the file, go to the terminal and write,</p><pre>$ gulp sass</pre><p>Now you will see mycontent.css in your app/css folder. It will be something like this,</p><pre>.content {<br>    width: 100%;<br>    color: #f00; }</pre><p>Congrats! You have created your first task in gulp. Now go ahead and play around with different other plugins. I will write, how to use gulp.js in Django project next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecb2458fcf5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Django Project on Heroku]]></title>
            <link>https://medium.com/@bidhanmajhi/create-django-project-on-heroku-2e5d86b94f14?source=rss-da3fb1d6912c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e5d86b94f14</guid>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[herokuapp]]></category>
            <dc:creator><![CDATA[Bidhan Majhi]]></dc:creator>
            <pubDate>Sat, 09 Feb 2019 14:22:17 GMT</pubDate>
            <atom:updated>2019-04-19T11:51:48.029Z</atom:updated>
            <content:encoded><![CDATA[<h3>Build Django Project on Heroku using Heroku Toolbelt</h3><p>Let’s create a Django Project and see it live on google using Heroku server. The main reason for writing this is to get a quick reference on what are the required steps in one post without looking at bunch of different stuffs. Before starting this, I’m assuming you have decent knowledge of Django framework and basic knowledge of what is Heroku.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nL01WyxcWrzIgsfHijutFg.png" /><figcaption>Django Project on Heroku</figcaption></figure><p>Before starting, make sure you have a Heroku account. If not then create one using <a href="https://www.heroku.com/">Heroku</a> . Once you have done, go ahead and install ‘<em>Heroku Toolbelt’</em> in your local system.</p><p>Then go ahead and create a Django project. My project name here is `mysite` and I then create app called ‘webapp’ inside it. Then you need to create all the required files accordingly. Here I’m adding a screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*3O_MLD6XeSw67Qtziyz_Ug.png" /><figcaption>the project tree structure</figcaption></figure><p>For heroku, you need to add three files, 1. Procfile , 2. requirements.txt, 3. runtime.txt, let me explain why these files are required.</p><h3>Procfile</h3><p>Create the file called <em>Procfile </em>without any extension and P in capital letter. This will tell Heroku, what kind of application you have and how to allocate it. Here is my Procfile,</p><pre>web: gunicorn mysite.wsgi --log-file -</pre><h3>requirements.txt</h3><p>Next is <em>requirements.txt</em>, this will add all the requirements and third party library we are using in our Django project. Make sure you have written requirements (plural), many a times I have seen people asking for help in StackOverflow and the only mistake they make is by writing requirement. Don’t do that. This is my requirements.txt file.</p><pre>Django==2.1.1<br>gunicorn==19.9.0<br>psycopg2==2.7.6<br>whitenoise==4.1.2<br>dj-database-url==0.5.0<br>Pillow==5.1.0</pre><h3>runtime.txt</h3><p>In runtime.txt we declare the python version of our project. You can’t add the python version running on your system. Make sure you check <a href="https://devcenter.heroku.com/articles/python-runtimes">this</a>, and add the runtime according to the Heroku. In my project,</p><pre>python-3.7.1</pre><p>Now we are all set with the project folder. We can go ahead and edit our project. First thing we will change is the project settings file. Before that make sure your Django project is running in your own system without any error. If your project is working fine, then go ahead and edit your settings.py,</p><h4>settings.py</h4><pre>import os<br>import dj_database_url</pre><pre># Build paths inside the project like this: os.path.join(BASE_DIR, ...)</pre><pre>BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))</pre><pre>SECRET_KEY = &#39;Your Secret Key&#39;</pre><pre># SECURITY WARNING: don&#39;t run with debug turned on in production!</pre><pre>DEBUG = False</pre><pre>ALLOWED_HOSTS = [<br>     &#39;your-heroku-app-name-here.herokuapp.com&#39;,<br>     &#39;127.0.0.1&#39;<br>]</pre><pre>INSTALLED_APPS = [<br>      &#39;django.contrib.admin&#39;,<br>      &#39;django.contrib.auth&#39;,<br>      &#39;django.contrib.contenttypes&#39;,<br>      &#39;django.contrib.sessions&#39;,<br>      &#39;django.contrib.messages&#39;,<br>      &#39;django.contrib.staticfiles&#39;,<br>      &#39;webapp&#39;,  # Here is the app<br>]</pre><pre># Add white noise in the middleware</pre><pre>MIDDLEWARE = [<br>   &#39;django.middleware.security.SecurityMiddleware&#39;,<br>   &#39;whitenoise.middleware.WhiteNoiseMiddleware&#39;,  #whitenoise<br>   &#39;django.contrib.sessions.middleware.SessionMiddleware&#39;,<br>   &#39;django.middleware.common.CommonMiddleware&#39;,     <br>   &#39;django.middleware.csrf.CsrfViewMiddleware&#39;,<br>   &#39;django.contrib.auth.middleware.AuthenticationMiddleware&#39;,<br>   &#39;django.contrib.messages.middleware.MessageMiddleware&#39;,<br>   &#39;django.middleware.clickjacking.XFrameOptionsMiddleware&#39;,<br>]</pre><pre>ROOT_URLCONF = &#39;mysite.urls&#39;</pre><pre>TEMPLATES = [{<br>    &#39;BACKEND&#39;: &#39;django.template.backends.django.DjangoTemplates&#39;,<br>    &#39;DIRS&#39;: [os.path.join(BASE_DIR, &#39;templates&#39;)],<br>    &#39;APP_DIRS&#39;: True,</pre><pre>    &#39;OPTIONS&#39;: {<br>       &#39;context_processors&#39;: [<br>       &#39;django.template.context_processors.debug&#39;,<br>       &#39;django.template.context_processors.request&#39;,<br>       &#39;django.contrib.auth.context_processors.auth&#39;,<br>       &#39;django.contrib.messages.context_processors.messages&#39;,<br>       ],<br>     },<br>  },<br>]</pre><pre>WSGI_APPLICATION = &#39;mysite.wsgi.application&#39;</pre><pre># change your database like this<br>DATABASES = {<br>     &#39;default&#39;: dj_database_url.config()<br>}<br></pre><pre>AUTH_PASSWORD_VALIDATORS = [</pre><pre>{&#39;NAME&#39;: &#39;django.contrib.auth.password_validation.UserAttributeSimilarityValidator&#39;,},</pre><pre>{&#39;NAME&#39;: &#39;django.contrib.auth.password_validation.MinimumLengthValidator&#39;,},</pre><pre>{&#39;NAME&#39;: &#39;django.contrib.auth.password_validation.CommonPasswordValidator&#39;,},</pre><pre>{&#39;NAME&#39;: &#39;django.contrib.auth.password_validation.NumericPasswordValidator&#39;,},<br>]</pre><pre># Internationalization<br># https://docs.djangoproject.com/en/2.1/topics/i18n/</pre><pre>LANGUAGE_CODE = &#39;en-us&#39;<br>TIME_ZONE = &#39;UTC&#39;<br>USE_I18N = True<br>USE_L10N = True<br>USE_TZ = True</pre><pre># This is the static path<br>STATIC_URL = &#39;/static/&#39;<br>STATIC_ROOT = os.path.join(BASE_DIR, &#39;static&#39;)<br># static root will be used if you want to add a common folder by running collect static else it will search for static folder inside your app</pre><p>Let me explain this. In case of database, <strong>dj_database_url </strong>will allocate the server database we will create in a while. <strong>Whitenoise</strong> will be used for compressing our static files.</p><blockquote>Note —It is not a good idea to use static files in the project directory and push it to the server. You actually need to use AWS, Google Cloud Bucketor any thing like that in order to store your static files. In this case, just to make a basic project I have not added any AWS or Bucket and pushed it directly into the project much like we do in the local machine.</blockquote><blockquote>Note 2 — Always run make migration locally and push it to the server. In the server if you run makemigration it will definitely show you error.</blockquote><p>After everything is ready, let’s head to the Heroku website. In the dashboard you can find a section called create project/ create app. Go ahead and create a project. Use hobby to create a free one. This will give you 500mb of slug size.</p><p>After you create a project, go to your dashboard, which will look something like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47RwxU8avXjCvC6iUBgqMw.png" /></figure><p>Now go to the resources section and there you can find add-ons, and a search bar in add-on section. Search <em>Heroku Postgres</em> and create your database there. In the settings, Reveal Config, you can see your database is created.</p><blockquote>You can create all these from the shell as well, but it is much easier to create here and connect your app in the local machine to it.</blockquote><p>Now it is the time to deploy our applications.</p><p>Go to your power shell and go to the project folder. In this case my project is in mysite. Then write,</p><pre>$ heroku login</pre><p>This will prompt a login browser. Login with your email and password.</p><p>First we need to add git to our project. This is required to tell the heroku server, what are the changes to be made and the files to be added. For our project, let’s run this command,</p><pre>$ heroku git:clone -a mysite</pre><p>Before deploying, make sure you are in the correct folder. In our case the correct project is mysite. The path has to be …/mysite/. Once you are in the correct directory, git add all these files to heroku server using,</p><pre> $ git add .</pre><p>Now you can see all those files are getting added to the server, the next command is to commit.</p><pre>$ git commit -am &quot;my first commit&quot;</pre><p>If everything goes right upto here, the last step is to push all these commit to the master branch,</p><pre>$ git push heroku master</pre><p>All right, you have now deployed all these files to the server. So its time to migrate,</p><pre>$ heroku run python manage.py migrate</pre><p>The next thing is to make the super user for the admin,</p><pre>$ heroku run python manage.py createsuperuser</pre><p>Congratulation, your app is now running on heroku server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e5d86b94f14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[User Authentication with Verification Email in Django 2.1]]></title>
            <link>https://medium.com/@bidhanmajhi/signup-with-verification-email-in-django-2-1-2d43fb94f7cd?source=rss-da3fb1d6912c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d43fb94f7cd</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Bidhan Majhi]]></dc:creator>
            <pubDate>Fri, 30 Nov 2018 13:48:22 GMT</pubDate>
            <atom:updated>2018-12-05T11:57:46.492Z</atom:updated>
            <content:encoded><![CDATA[<p>Here we will create user signup in Django 2.1. I’m using Python 3.5 here. And also we will check is the email and username is unique. I have seen in a lot of platforms, during implementation, signup with verification email is giving error, especially after the current Python update. These instructions will help you to make it correct. Note that, I will write this for development purpose. If you want to use it in production, follow the instruction given by the Email Provider you are using. With few changes you can use it in production.</p><p>Here we will use our Console to get the email. Make sure you remove this from production.</p><p>In your project’s settings.py,</p><pre>EMAIL_BACKEND = ‘django.core.mail.backends.console.EmailBackend’</pre><p>First we will create User Profile in models.py which is only an extend of the inbuilt user model. In your models.py,</p><pre>class Profile(models.Model):<br>  user = models.OneToOneField(User, on_delete=models.CASCADE)<br>  email_confirmed = models.BooleanField(default=False)</pre><pre>@receiver(post_save, sender=User)<br>def create_user_profile(sender, instance, created, **kwargs):<br>   if created:<br>     Profile.objects.create(user=instance)</pre><pre>@receiver(post_save, sender=User)<br>def save_user_profile(sender, instance, **kwargs):<br>    instance.profile.save()</pre><p>Now we will create Signup Form in app’s forms.py. In forms.py,</p><pre>from django import forms<br>from django.contrib.auth.models import User<br>from django.core.exceptions import ValidationError</pre><pre>class SignupForm(forms.ModelForm):<br>   class Meta:<br>      model = User<br>      fields = [‘first_name’, ‘last_name’,’username’, ‘email’, ‘password’, ‘password2’]<br>    <br>    # Add this to check if both passwords are matching or not<br>    def clean(self):<br>      cleaned_data = super(SignupForm, self).clean()<br>      password = cleaned_data.get(‘password’)<br>      password2 = cleaned_data.get(‘password2’)<br>      if password != password2:<br>          raise forms.ValidationError(‘Passwords do not match!’)</pre><pre># Add this to check if the email already exists in your database or not<br>    <br>     def clean_email(self):<br>        username = self.cleaned_data.get(‘username’)<br>        email = self.cleaned_data.get(‘email’)<br>        if email and User.objects.filter(email=email).exclude(username=username).count():          raise forms.ValidationError(‘This email is already in use! Try another email.’)<br>        return email<br>       <br>     # Add this to check if the username already exists in your database or not</pre><pre>     def clean_username(self):<br>         username = self.cleaned_data.get(‘username’)<br>         email = self.cleaned_data.get(‘email’)</pre><pre>        if username and User.objects.filter(username=username).exclude(email=email).count()<br>            raise forms.ValidationError(‘This username has already been taken!’)<br>        return username</pre><p>Now add tokens.py in the app,</p><pre>from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.utils import six</pre><pre>class AccountActivationTokenGenerator(PasswordResetTokenGenerator):<br>    <br>     def _make_hash_value(self, user, timestamp):<br>        return(<br>               six<strong>.</strong>text_type(user<strong>.</strong>pk) <br>               <strong>+</strong> six<strong>.</strong>text_type(timestamp) <br>               <strong>+</strong> six<strong>.</strong>text_type(user<strong>.</strong>profile<strong>.</strong>email_confirmed)<br>              )</pre><pre>account_activation_token <strong>=</strong> AccountActivationTokenGenerator()<br></pre><blockquote>We are not saving the tokens anywhere, it will be generated in the views. This makes it safe to use.</blockquote><p>Now the form is created. Let us add this in our views.py,</p><pre># Class to add Signup View<br>class SignupView(View):<br>   form_class = SignupForm<br>   template_name = ‘signup.html’<br>   <br>   def get(self, request):<br>      form = self.form_class(None)<br>      return render(request, self.template_name, {‘form’:form})<br>   <br>   def post(self, request):<br>      form = self.form_class(request.POST)<br>      <br>      if form.is_valid():<br>        user = form.save(commit=False)<br>        password = form.cleaned_data[‘password’]<br>        user.set_password(password)<br>         <br>        user.is_active = False<br>        user.save()</pre><pre>        current_site = get_current_site(request)<br>        subject = ‘Activate Your Account’<br>        message = render_to_string(‘account_activation_email.html’,{<br>         ‘user’: user,<br>         ‘domain’: current_site.domain,<br>         ‘uid’:urlsafe_base64_encode(force_bytes(user.pk)).decode(),<br>         ‘token’: account_activation_token.make_token(user),<br>        })<br>         user.email_user(subject, message)<br>         return redirect(‘account_activation_sent’)<br>      else:<br>         return render(request, self.template_name, {‘form’:form})</pre><pre># Activation Sent<br>def account_activation_sent(request):<br>  return render(request, ‘account_activation_sent.html’)</pre><pre># This will activate user’s account<br>def activate(request, uidb64, token):<br>   try:<br>      uid = force_text(urlsafe_base64_decode(uidb64))<br>      user = User.objects.get(pk=uid)<br>   except (TypeError, ValueError, OverflowError, User.DoesNotExist):<br>      user = None<br>   <br>   if user is not None and account_activation_token.check_token(user, token):<br>       user.is_active = True<br>       user.profile.email_confirmed = True<br>       user.save()<br>       login(request, user)<br>       return redirect(‘home’) #This will redirect to home page, add your path accordingly<br>   <br>   else:<br>       return render(request, ‘account_activation_invalid.html’)</pre><blockquote>Note: In some interpreter, User.DoesNotExist is shown as error. This is interpreter’s fault. However, youwill not face any error after you write runserver.</blockquote><p>In urls.py,</p><pre>urlpatterns = [<br>     # Signup Link<br>     path(‘signup/’, views.SignupView.as_view(), name=’signup’),<br>     <br>     # account activation sent<br>     path(‘account_activation_sent/’, views.account_activation_sent,<br>name=’account_activation_sent’),<br>     <br>     # activate<br>     path(‘activate/&lt;uidb64&gt;/&lt;token&gt;/’, views.activate, name=’activate’),<br>     <br>     # Add rest of your urls<br>]</pre><p>Make sure you add the required templates correctly in the correct path. When user will signup, a verification link will be sent to the email, which you can see in the console. Click on the link to complete signup process.</p><p>I hope this will help you, if you find any error, please add it in the comment section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d43fb94f7cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Django — #1 Introduction & Installation]]></title>
            <link>https://medium.com/@bidhanmajhi/getting-started-with-django-1-introduction-installation-65c035d19d4f?source=rss-da3fb1d6912c------2</link>
            <guid isPermaLink="false">https://medium.com/p/65c035d19d4f</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django-installation]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Bidhan Majhi]]></dc:creator>
            <pubDate>Fri, 27 Jul 2018 05:50:28 GMT</pubDate>
            <atom:updated>2018-07-27T05:50:28.257Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome you all to Django Web Development series. Here we will make a complete guide on how to make Django based web applications from scratch. It will be complete beginner friendly, so you do not have to have any knowledge in web development. It will be a plus if you know basic python and Html &amp; CSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*4cOZ5UCAf9SkGSM_4j8gKQ.png" /><figcaption>#1 Introduction &amp; Installation</figcaption></figure><p>Before we start, let me tell you why Django is getting popular and why you can make any professional website without any prior knowledge. If you are reading this, the chances are you already have knowledge on what is Django. Those who do not know, it is a Python based web framework. It is completely open source and it has a large community, where you can get help and support. It is very secure, fast and well structured.</p><p>So now, let us make our first move towards making a web application. The best way to learn about something is doing it by yourself. So, let’s get started.</p><p><strong>How web application works</strong></p><p>A simple website or a website where you have to sign in (web application), has these following things –</p><p>First, it has a server. A server is a system that stores all the data that we can get from or uploads to that particular website. Either it can be with you physically or you can use cloud-based service.</p><p>Second, we need a backend framework to use the data that has been stored in that server. For using that data we use structured query language. It can be MySQL, PostgreSQL, and SQLite etc. and in recent times, no SQL is gaining popularity.</p><p>Third, we need the frontend. The users will interact to the side. It has written in HTML, CSS, and JavaScript etc.</p><p>In our project, our system will work as a server. Django comes with SQLite for development purpose. Therefore, we will use that only to make our web application working.</p><p><strong>Installing Python</strong></p><p>First step is to install Python in your system. If you have already Python installed in your system, then you can upgrade to its latest version or you can download it from <a href="https://www.python.org/downloads/"><em>https://www.python.org/downloads/</em></a> . It is completely free and open source. I am using Python 3.5 (I like it that is why I am not upgrading, but you can). Python is a high level programming language. You can download the docs if you want to read how it works.</p><p><strong>Installing Django</strong></p><p>Go to <a href="https://www.djangoproject.com/download/"><em>https://www.djangoproject.com/download/</em></a> and install the latest version of Django. We will use Django version 2.0.7. There is also another way to install Django. You can go to your command prompt and type <strong>pip install Django</strong>, it will install your Django.</p><p>Congratulation. We have installed both Django and Python and we are ready to make our first web application. In this series, our focus will be on class-based view rather than function based view. The main reason for class-based view is to make the code more human readable so you can understand what is happening in the background. It is better structured than the function based view. Also in the process, you will realize that class base view has a bit of advantage over function base view. What are you waiting for; let us make our first Django based project.</p><p><strong>Installing Text Editor</strong></p><p>Everyone has his or her own choice and preference when it comes to text editor. You can use anything as you want. You can use Notepad++, Visual Studio Code, Atom, and Sublime etc. Everything works fine and everyone is effective in its own way.</p><p><strong>Getting started with Django</strong></p><p>Go to your shell prompt or command prompt and write the following,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bdq0MjBcicDNOnO_KbHEtA.png" /><figcaption>create project</figcaption></figure><p>It will create a folder like this,</p><blockquote>mysite/</blockquote><blockquote>- __init__.py</blockquote><blockquote>- settings.py</blockquote><blockquote>- urls.py</blockquote><blockquote>- wsgi.py</blockquote><p>When you run the server, go to the local address <a href="http://127.0.0.1:8000/">http://127.0.0.1:8000</a> in your web browser. You will see something like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ik2xdGsFOIFt58tkanPGfQ.png" /></figure><p>Congrats again. You have successfully completed the few basic steps. Now, it is time to make our first move. We will create our first web application. It will be a blog with user registration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65c035d19d4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>