Complete process of changing database from SQLite to MySQL - How to migrate a Django DB from SQLite to MySQL

One of the main benefit to use django for web development is that it comes with an inbuilt database/filesystem i.e SQLITE. Managing database and files is super easy in django. But there are some drawbacks of using SQLITE. With my experience if your website has a minimum traffic of about 100-200 per day OR you have 1000-2000 files (or more obviously) in your database, then the problems start rising. SQLITE gives amazing performance if your data is upto 2GB (can vary with your file types & size). Thus, you can not handle large traffic efficiently by using SQLITE.

Here are some advantages & disadvantages of using SQLITE :
Advantages :
1) Sqlite is Lightweight.
2) No Installation Needed.
3) Portable & reliable

Disadvantages :
1) SQLite is used to handle low to medium traffic.
2) Database size is restricted upto 2GB (in most cases).

Today i will show you how you can migrate db from SQLITE to MySQL in 6 simple steps. Just bare with me & i will provide the easiest way to do stuff in right manner.


Read More
" How to download a file in django | Making a large file downloadable from a url in django | How to serve Large files in django | Downloading a file from Django project directory "

Sometimes we have to serve a file which may be a large file from our project directory. Suppose you want to transfer a file from your project directory to your friend or to some other person/server/platform. The one way is to download the file and then upload it to another platform or give it to the person manually, which is not a good approach.

This is a simple thing in Django. You can serve any file from any directory (i.e inside project directory) using a URL in Django. Just follow the steps shown below and you will find that some line of code will help you to do that.


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

Sometimes We need to scrape a website .......bla bla bla. Does it make any sense?? I am not going to do any kind of bullshit here. You all know whatever you are doing. This short article is going to be a small part of your long journey.
Today I am going to explain to you how you can use proxies during web scraping using python. There are 2 reasons behind your presence here. Either you are blocked by the server/website which you are trying to scrape or you are already smart enough to use proxies to bypass the firewall of a website's server.


Read More
Top Django Querysets, How to filter records | Fetching data from database efficiently - Django

Just learning a framework and implementing it is not enough for you as a developer. A good programmer always tries to write optimized code. In Django like framework, it is very important to make the execution of code efficient. Interacting with the database like saving the files, updating files in the database, deleting files and extracting files from the database are the point which can make your website slow.

Fetching data from the database should be as fast as possible. It makes the server response time fast (i.e minimum). For this purpose QuerySets plays an important role. So in this article, I am going to explain how you can fetch data efficiently from database using querysets.


Read More
How to change base url or domain in sitemap - Django

A sitemap is the first important SEO step which elaborates a website's content to search engines. It provides information to search engines about the available content on our site, which helps them to crawl webpages for indexing. Sometimes we have to change the base URL or the domain name in our sitemap. This can be because of using multiple domains to the same database or migrating the same website to another domain.

So today I am going to teach you how you can change the base URL or domain name in Django sitemap. This task is pretty much easy and simple as well.


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...