Word Counter Python Django Project (With Source Code)

Word Counter Python Django Project Overview

Word Counter is simple web based application made with python and django. This application count every words and presents repetition of each word in a paragraph. Basic python with django framework is used to built this application.

By the way, Python is high level programming language for general programming purposes. It is very popular these days as python can be used in various fields of programming sector. Its syntax is simple and easier better for beginner programmers. Django on the other hand is a framework for python. Basically, django provides a base and prebuilt codes for our python project to work on. This makes the project faster and a whole lot efficient.

Hence, The picture above the after the word counting process. So, you have to get bunch of text or paragraph or essay and copy on to the text area. After this, click on count button to proceed. As you press the count button, the projects counts all the words repetition in the paragraph and displays as a list of each word count. That’s it, pretty simple.

Inside Description

So, the whole is a django project which a framework. The project contains basic set of files as you start a django project. The main python files which I made changes to make the word count project are:

  • urls.py

    Urlspatterns are path that redirects users to specific views depending upon what user has type on the browser.  The first paths is home path where user type nothing except the domain name. Second path lead to views.count upon user requesting for ‘domain_name/count’.
  • views.py

    Thus, views.py responds as redirecting user to the actual page on the website depending upon their request. The count() function is the one that counts all the text and stores ia dictionary in ascending order. Then, it passed into the count.html through url.
  • setting.py

    The template directory were changes to  ‘DIRS’: [‘templates’]. Basically, this points to the static html files on the templates folder on the root of the project.

    Download link is Below:

    Finally, Complete small task below to unlock the download button. Don’t worry, its not a spam.

[sociallocker]

[/sociallocker]

You may also like...