Before that, you should know the main difference between Flask and Django. Both are famous in Python arena. But they have different necessity and outlook. Flask is a microframework. The “micro” in microframework means Flask aims to keep the core simple but extensible. Flask won’t make many decisions for you, such as what database to use. Django comes with batteries-included. Django takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel.
Learning Django isn’t hard at all. But when I start to learn it, it seems very hard to me. So I stop learning Django and start learning Flask. But why? Django comes with MTV (Model-Template-View) architecture. In this architecture, a web App is divided into some parts. The code for database will be in models.py, the code for views, I mean how the web App will response with user interaction will be written in views.
When I have seen this question, I have asked myself ‘better in where?’. Surely BootStrap is the most famous CSS framework in present world. It is famous because it is easy to learn and use. Its great documentation has made it easier to use. That’s why it is the most famous CSS framework. When you are gonna build a website, BootStrap is a charm. But what about a WebApp? BootStrap is just like a waste of time.
You may see that, Django has two different ideas in its structure. One is project and the other is app. Project holds apps. You can create as many as apps you need. But the question is how many app will you need? Just one or more? For example, you are gonna make a blog. Now you can create an app as main which will manage the blog’s posts. Now your blog needs commenting.
I have been programming for about 3 years. And just I have realized I know nothing about it. You may be surprised! But believe me, I have learnt a little about data structures and algorithms. To say the very truth, they are the heart of programming. So I should learn them as many as I can. The time doesn’t wait. But fortunately, I have time to learn till now. You may start with me too.
Deploying Django on VPS is an easy task if and only if you know some system administration tasks. You may think on which I have written this statement. But believe me, it’s my personal realization when I deploy my personal blog (made on Django). Let’s go back. Previously, my personal site was on WordPress, a PHP based CMS. It is free, Open Source and the top blogging CMS.. Everything was going right.
Last 2 years, I am using runit to run any script automatically during booting. When I was using Ubuntu 14.04 in my server, I wasn’t having any issue. But in Ubuntu 16.04, an issue has been found. runit plays with upstart which was default in Ubuntu 14.04. But in Ubuntu 16.04, upstart has been replaced with systemd. So, runit isn’t working normally. But the issue can be fixed as follows: