Handling arguments in django urls - path(), re_path() & url() functions

When developing a web application you may notice that some programmers uses path() where some uses url() in django urls.py . This may puzzles you to use whether path() or url(). If you try django's documentation you may still have doubts (don't worry documentations are for experienced developers not for newbies)

Today i will explain the use of re_path() & the difference between path() and url().

Read More
3 steps to send automatic emails in django - How to send e-mails using python

Sometimes we have to use automatic email service in our website for sending OTPs, Tokens, passwords or login credentials etc. For this purpose we use smtplib module of python. To use this module in django we have to just import the module and django.core.mail
Just make some changes in our code to send the emails automatically. We will use the G-mail's SMTP server to send the mails.
But there is a problem to use the g-mail SMTP server i.e due to security reasons google blocks our accounts if wwe send emails directly. So to keep it secure we have to enable SMTP service of our g-mail and we will generate specific password for our G-mail account for this specific purpose.
Follow the easy and simple steps described below to send emails automatically in django.

Read More
How to deploy a django website on pythonanywhere | django Web app deploying issues

It's a little bit annoying to find the best hosting service for your website when the development is completed. There are several hosting services which provides different plans to host a website. But it is very important to choose the right one because the speed does matter.
Today i am going to teach you that how you can deploy your website on Pythonanywhere
i will keep the process simple and step by step to make better understanding.
PythonAnywhere runs on super-powerful servers hosted by Amazon EC2 , and you can take full advantage of that. This is the main reason for selecting Pythonanywhere for web hosting. You can run or test your django web app on pythonanywhere for free (3 months free trial) .
Although if you want to use some other hosting services then you should visit any of the link from the following list.

Read More
why Django - All you need to know about Django framework | Features of Django

Django is a Python based web development framework. It is free and open-source. Django is gaining popularity day by day since it was introduced (in 2005). Django is a high-level Python Web framework. You can built any type of web application by using django. There are many web frameworks built in python like Flask, Bottle, web2py and the Django itself.

Django is a full-stack web framework, whereas Flask, Bottle and Web2py are micro and lightweight web framework. The features provided by Django help developers to build large and complex web applications.

Read More
4 Steps to create robots.txt file in Django

robots.txt is a standard used by websites to communicate with web crawlers and other web robots. The standard specifies how to inform the web robots about which areas of the website should not be processed or scanned. The pages or the url patterns included in robots.txt file will not indexed by the search engines.

When a site owner wishes to give instructions to web robots they place a text file ( called robots.txt) in the root of the web site hierarchy (e.g. https://www.example.com/robots.txt). This text file contains the instructions in a specific format (see examples below). Robots that choose to follow the instructions try to fetch this file and read the instructions before fetching or scanning any other file from the website. If this file doesn't exist, web robots assume that the website owner is not wishing to place any limitations on crawling the entire site.

User-agent: *
allow: /blog/
Disallow: /cgi-bin/
Disallow: /tmp/
Disallow: /junk/
Creating a robots.txt file in django is a simple task. Just follow the following steps to make a robots.txt file in django.

Read More

Some recent posts

Complete process of changing database from SQLite to MySQL - How to migrat...

" How to download a file in django | Making a large file downloadable from ...

How to use proxy in python requests | http & https proxies - Scraping...

Top Django Querysets, How to filter records | Fetching data from database e...

How to change base url or domain in sitemap - Django ...

How to Make a Website - Everything you should know about web development...

What is Javascript - Features and usages ...

Top 5 Interview Questions : Tips for HR round ...

How to get job in IT : Perfect resume guide for IT job ...

Programming vs coding | difference between programming and coding ...

View all...