Connect with us


Create a Resume Builder website in django [2020]



How to Create website Dijango

Hi, in this article I will teach you how to create a resume builder website in django. By the end of reading this complete article you will have a complete website that you can edit and put online to provide resume building services online. So let’s get started.

Let’s discuss how we are going to create a resume builder website in django one by one.

  1. We will have a form in the homepage that we will use to get data from the user and then saves it inside our database.
  2. Once the user fills out the form and click on generate cv button then we will render the data onto a html template and you probably add some more functionality to it in order to make it better.

Requirements to make this project

To create our resume builder website in django we need to have python and django installed, if you haven’t till now go ahead and install them and after installing both of them just activate your virtual environment and follow along.

Inside command prompt type the following command to create a new project

django-admin startproject cvMaker

Then change your directory to cvMaker by typing the following command.

cd cvMaker

Running our project.

Now go ahead and check weather our project is successfully created or not by typing the below command.

Python runserver

This will run your server and know type the following address in any of your browser to see the results. and you will a page like this.

The above message indicates that we have created our project successfully. Now start editing this project.

To edit this project and make it according to our flavor, first we need to create an app so that we add some functionality to our project.

To create an app in django, type the following command in command prompt:

python createapp cv

This will create an app named cv inside your project root folder.

Open up your project in any text editor you want and you will see a folder structure like this:

Here cvMaker is the main project and cv is the app that we just created.

Registering our app.

Open up file inside cvMaker and register our cv app under installed apps.

Start coding resume builder website in django

Now let’s open up file inside cv application folder and add these lines of code to it.

from django.db import models
# Create your models here.
class cv(models.Model):
    name = models.CharField(max_length=200)
    email = models.CharField(max_length=200)
    phone = models.CharField(max_length=50)
    # Address info
    country = models.CharField(max_length=20)
    state = models.CharField(max_length=20)
    city = models.CharField(max_length=20)
    address = models.TextField()
    # Education info
    lastDegree = models.CharField(max_length=50)
    degreeName = models.CharField(max_length=200)
    institute = models.CharField(max_length=200)
    dateOfJoining = models.DateField()
    dateofEnd = models.DateField()
    # Interest & Hobbies
    favSport = models.CharField(max_length=50)
    interest = models.CharField(max_length=50)
    shortBio = models.TextField()
    def __str__(self):

let’s know migrate our database by typing the following line inside command prompt.

python makemigrations

And then finally type the following command to sync our model into database.

python migrate

You will see some migrations taken place inside command prompt.

Then just go ahead and create a super user account that we will be using to manage our website administration. To do that just type the following command inside command prompt.

python createsuperuser

Then you will be asked to enter the username, email and password. Just fill out the info inside command prompt and a user with the username you provided is successfully created. Now open up inside cv application folder and add these lines of code to it.

from django.contrib import admin
from .models import cv

Now go ahead and run your project again by typing python runserver

Open up any browser and in address bar type the following.

You will see a page like this.

Just enter the username and password you’ve just created to login.

Once you logged in then you will see a page like this.

Here the Cvs is the model that we had created before and we can add cvs from here and also can check the cv’s details from here by clicking on cvs link you have seen in the above screen shot.

Now go ahead and open up file inside cv application folder and add these lines of code to it.

from django.shortcuts import render
from .models import cv
# Create your views here.
def homeView(request):
    return render(request, 'cv/cv_home.html')
def detailView(request):
    if request.method == 'POST':
        #Acessing data
        name = request.POST.get('name')
        email = request.POST.get('email')
        phone = request.POST.get('phone')
        country = request.POST.get('country')
        state = request.POST.get('state')
        city = request.POST.get('city')
        address = request.POST.get('address')
        lastDegree = request.POST.get('lastDegree')
        degreeName = request.POST.get('degreeName')
        institute = request.POST.get('institute')
        dateOfJoining = request.POST.get('dateOfJoining')
        dateOfEnd = request.POST.get('dateofEnd')
        favoriteSport = request.POST.get('favSport')
        interest = request.POST.get('interest')
        shortBio = request.POST.get('shortBio')
        #Adding to model
        new_data = cv(name=name, email=email, phone=phone, country=country,
                                            state=state, city=city, address=address,
                                            lastDegree=lastDegree, degreeName=degreeName,
                                            institute=institute, dateOfJoining=dateOfJoining,
                                            dateofEnd=dateOfEnd, favSport=favoriteSport,
                                            interest=interest, shortBio=shortBio)
        context = {
        'name':name, 'email':email, 'phone':phone, 'country':country,
                                            'state':state, 'city':city, 'address':address,
                                            'lastDegree':lastDegree, 'degreeName':degreeName,
                                            'institute':institute, 'dateOfJoining':dateOfJoining,
                                            'dateofEnd':dateOfEnd, 'favSport':favoriteSport,
                                            'interest':interest, 'shortBio':shortBio,
        context = {'name': 'no_data found'}
    return render(request, 'cv/cv_detail.html', context)

In the above code we have just created two views. In homeView we are simply displaying the form and in detailView we are taking inputs from user and storing it inside database and also render the user details onto a html template by retrieving data from the database.

Now create a new file inside cv application folder and name it as and add these lines of code to it.

from django.urls import path
from . import views
urlpatterns = [
    path('', views.homeView, name='home'),
    path('detail/', views.detailView, name='detail')

In above code we are simply setting path to our pages or we are setting routes.

Adding templates in our website.

Create a new folder inside cv application folder and name it as templates. Then create a new folder inside that template folder and name it as cv. Our folder structure might look like this.

Now create a new file inside cv folder that we just created and name it as cv_home.html and add these lines of code.

{% load static %}
<!DOCTYPE html>
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <link rel="stylesheet" href="{% static 'cv/style_home.css' %}">
    <h1>Welcome to cv maker</h1>
    <p>Please enter your details to generate cv</p>
    <div class="container">
      <form action="{% url 'detail' %}" method="post">
      {% csrf_token %}
      Name: <input type="text" name="name" value="">
      Email: <input type="text" name="email" value="">
      Phone: <input type="text" name="phone" value="">
      <div class="address">
      Country: <input type="text" name="country" value="">
      State: <input type="text" name="state" value="">
      City: <input type="text" name="city" value="">
      Address: <textarea name="address" rows="8" cols="80"></textarea>
      <div class="education">
      Last Degree: <input type="text" name="lastDegree" value="">
      Degree Name: <input type="text" name="degreeName" value="">
      Institute: <input type="text" name="institute" value="">
      Date of Joining: <input type="text" name="dateOfJoining" value="">
      Date of Ending: <input type="text" name="dateofEnd" value="">
      <div class="fav_sport">
      Favorite Sport: <input type="text" name="favSport" value="">
      Interest: <input type="text" name="interest" value="">
      <div class="short_bio">
      Short Bio: <textarea name="shortBio" rows="8" cols="80"></textarea>
      <input type="submit" name="" value="Submit">

Create another file inside cv folder and name it as cv_detail.html and add these lines of code to it.

{% load static %}
<!DOCTYPE html>
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <link rel="stylesheet" href="{% static 'cv/style_detail.css' %}">
    <div class="container">
    <p> Email: {{email}} </p>
    <p>Phone: {{phone}}</p>
    <h2>Address Detail</h2>
    <p>Country: {{country}}</p>
    <p>State: {{state}}</p>
    <p>City: {{city}}</p>
    <p>Parmanent Address: {{address}}</p>
    <h2>Educational Details</h2>
    <p>Education: {{lastDegree}}</p>
    <p>Degree Name: {{degreeName}}</p> <p>From {{dateOfJoining}} to {{dateOfEnd}}</p>
    <p>Institute: {{institute}}</p>
    <p>Favorite Sport: {{favSport}}</p>
    <p>Area of Interest: {{interest}}</p>
    <h2>A Short Description about myself</h2>

Start styling our website:

Now comes the styling part of our website. Create a new folder inside cv application folder and name it as static. Then again create a new folder inside static and name it as cv.

Create a new file inside cv folder we just created inside static folder and name it as style_home.css. You file structure should look like this.  Static/cv/style_home.css Add these lines of code to style_home.css.

.container {
  text-align: center;
  font-size: 20px;
  text-align: center;
  text-align: center;

Create another file inside cv folder and name it as style_detail.css and add the following lines of code to it.

  text-align: center;
.container h1{
  font-size: 50px;
  font-family: Arial;
  font-weight: 400;
.container h2{
  font-size: 40px;
  font-family: Arial;
  font-weight: 400;
.container p{
  font-size: 20px;
  font-family: Arial;
  font-weight: 200;

Including application URL to the main URL file.

Now include the file of our cv application into the main file present at cvMaker.

Open up file inside cvMaker project folder and add these lines of code to it.

from django.contrib import admin
from django.urls import path, include
urlpatterns = [
    path('', include('cv.urls')),

Here we’ve just included our application file, rest of the code is already present there. Now lets test our website.

Running our cv maker project:

Run your project and open up any browser and type the following address. and press enter. You will see a page like this.

Once you fill out all the details and press the generate button then you will taken to cv detail page and your data will also be saved inside database and you can check that by simply going to and click on cv and you’ll see and cv will be added there.

With this our project is successfully created and now you can edit it according to your taste and you are free to use this project anywhere you want. I have also created a tutorial on creating a personal website in django, you can check it here Thanks for reading and if something didn’t work for you please ask it in the comment section and I will definitely answer.

Continue Reading


  1. Pingback: Online Teech

  2. Pingback: Online Teech

Leave a Reply

Your email address will not be published. Required fields are marked *


How to Connect django to mysql in ubuntu[2020]




Connect Django to MySQL is required because the database that comes with Django by negligence is sqlite3. Sqlite3 is a database that can be used inside small apps and outlines. But when it comes to exhibiting some high-quality apps/web apps in Django, it became wanted to connect it with a good database that can handle a large amount of data. In this post, we are working to do that.

To rise connecting our Django project to the database, you should oblige Python, Django, and XMPP server installed on your system.

To install xampp on your system, you must download the app and next install it inside your system. Here is an expeditious guide to installing xampp on your ubuntu running system.

You can likewise install the virtual environment and Django by following this example.

If you have Django and app installed on your system, suddenly, you can start to connect Django to MySQL.

Create a new project in Django:

To build a new project in Django, type the following commands in your terminal.

Django-admin start project MySQL connection

Open up xampp and run everything the services.

Once you do that, go to localhost/PHPMyAdmin and generate a new database.

I will name it a MySQL connection, and you can call it whatever you need.

Once you function to create, then you are good to go. You don’t need to change anything there.

Startup file inside your Django project and move to the following part.

By default, our Django project is pointing to the sqlite3 database, and we require to improve this to manage a MySQL database. So let us go ahead and replace all of this text with the following code.

Once you change these settings, then you are good to go.

Now Save all the settings and open up the terminal and type the following command.

python migrate

Everything is running fine, and if you go to PHPMyAdmin, you would reasonably see something like this.

You see that all the tables are favourably created. Thanks for reading this comprehensive post. If you have any questions, you can ask me in the comment section. Thanks.

Continue Reading


5 amazing books to read as a django developer [2020]




In this chapter, I will talk about five superb books to learn as a Django developer in 2020. So let us perceive started.

As you all might know that books play a significant role in learning anything weather, it is about the stock market or any other field like programming. So as readers have a significant role in learning to program quickly and efficiently, we will be discussing five amazi////////ng books to read as a Django developer in 2020 because Django is a high-level framework. If you want to master it, then you should probably go with the books written by Django experts to learn the crucial topics of Django.

My no. 1 advice for Django beginners:

Before diving into the books list first, let us discuss what a beginner should do when starting Django development.

When You are starting in Django, then you should go with its Documentation.

Because Django has very comprehensive and clear Documentation and you could see a lot of Documentation. But that Documentation is written professionally, and as a beginner, you might be stuck. So here is the list of books you might concern when you are starting in Django development.

Learn through building projects in Django:

While you are learning to program, you might not follow some professional practices that will lead you to be good. To understand the important stuff that you will need to use in some professional projects, you should start to learn to code by building projects.

I have some cool projects that I write about so that beginners in Django and intermediate-level programmers benefit. Here is the list of some cool projects that I recommend you start building with.

i – Create your website with Django: you can get the tutorial by clicking here.

Ii – Create a resume builder website with Django: Here is the complete tutorial you can follow.

Iii – How to use bootstrap with Django: This post will teach you the best way to use bootstrap with your Django projects to make them responsive. Could you get it here?

Also, I have prepared a list of projects that you can build right now. You can check that complete article here.

Now you can begin with the list of notable books for you to be good at Django.

A list of 5 Amazing books you should read as a Django developer.

Book # 1:

Django for Beginners (best book on this list):

The best book on Django is Django for beginners by William S. Vincent. I kept this book on top of the list because it is hugely summarized and very comprehensively explained all the topics for beginners. This book starts with a beginner teaching the basics of Django. It then moves you around some high-level programming in the Django framework whenever you feel comfortable in Django development. In short, it will teach everything you need to become a master in the Django framework.

Book # 2:

Django 2 web development Cook Book:

The next great book on this list is also a very great book for beginners. Jake Kronika writes it, and it also covers a lot of beginner stuff. This book talks about Django 2, but the logic builds through this book can be used inside Django 3.

Book # 3:

Django 2 by Example:

Antonio Mele writes this book, and it is one of my favorite books because it starts with build the projects, and then by the end of building many projects taught in this, you will eventually become a master in Django.

Book # 4:

Two Scoops of Django:

Another favorite book of mine is Two scoops of Django, and it is a bit older. It only talks about Django 1.8, but the logic you will learn in this book can be implied in the latest versions.

Book # 5:

The definitive guide to Django:

This book is also very informative if you want to learn about Django web development from start to end. Once you finish reading and practicing the lessons inside this book, you will have a thorough understanding of how Django works.

I hope you have enjoyed reading this tutorial now; if you have any questions, please ask them in the comment section, and I will answer. You can also check out the post about Django books by data-flair here. Thanks.

Continue Reading


Amazing Project ideas for beginners in django [2020]





Hi, in this article, I will introduce you to some of my Amazing project ideas for beginners in Django, So lets get started.

Remember one thing in mind you cannot proceed further without doing projects and practicing much in the language or framework you are working on. Once you do some tasks, eventually, your knowledge will become apparent, and you will start doing what you want to do in programming.

Now you might know the importance of doing projects in Django. Let us Discuss some Amazing project ideas for beginners in Django.

No 1: Build a TodoList App

While building this project, you will learn quite a lot in Django because it will give you in-depth knowledge of how everything fits in Django. After all, you will be using HTML, CSS, and javascript with Django to make your to-do list app cool, and you will learn a lot.

No 2: Build Your Blog Using Django:

Importance of building your blog for being programming is even more. Because by having a blog, you can share your thoughts with others, and you will learn a lot. If you want to do a project using Django, then you should go with making your blog.

No 3: Build a Personal website using Django:

This is quite similar to the application above because you can embed your blog inside a static home page website. So here is my advice for creating your website.

Try to create a website with a static homepage and create contact and about us pages. Then create a blog application and embed it inside your website. In this, your website will look more professional, and you will learn many fundamentals of Django by building this project. So go ahead and do that. I have a pretty great tutorial on this project, and you can reference that tutorial by going to the below link.

My website tutorial link: click here.

No 4: Build your portfolio Website:

Let me introduce you to what a portfolio website is:

A portfolio website is simply a website where you can showcase your work. Try to make a website where you will tell other people what you can do and post some of your projects there.

I have a comprehensive tutorial on this project as well, and you can check that as well.

No 5: Build an Ecommerce Website:

Building an eCommerce website in Django can be challenging, and it will also help you make a strong logic about building an eCommerce website using Django. Try to make a simple online shop and add cart options to it, and then you can use this application to sell your projects online.

You can also read 12 project ideas by pythonistaplanet by clicking here.

I hope you have quite a good knowledge of how to think for a project and start building it. If you have any questions or queries, then feel free to ask in the comment section, and I will answer. Thanks.

Continue Reading