Search

04 December, 2018

Production server launch using Django and Apache and mod wsgi

Some of us develop Django applications which can be used inside Intranet for various purposes.
Some ideas are:
  • HRMS apps
  • Interview Management Tools
  • Grievance Management Tool
  • Financial Report Generators. 

These apps running on intranet, generally don't face too much traffic at a time, but they do need to compute or face heavy queries which is why, it's a good idea to release them on a proper environment . Typically they are light on UI. I choose to use bootstrap which is enough to achieve a decent look . 
Still you should serve them using something which is good at serving static content. So I chose Apache. Lets get started. 

31 October, 2018

Migrating your Django Project database from SQlite3 to MySQL

Django comes with an in-build default setup for SQLLite3 which is good for learning and minor static page based websites. Like blogs which is a standard example . But as soon you decide to create projects that might entail multiple users performing different operations at the same time, SQLLite is not recommended.

Hence the decision to migrate to a better DB system must be as early as possible. I had to under go a similar experience recently . It look a lot of time, trials to finally get it working . I am going to share you the complete steps assuming you don't even have a MySQL setup .

22 October, 2018

Quick guide to Logging to a file using Python

This is for setting up of a file logging system using Logging module


Step 1: Import the logging module.



import logging


Step 2: Create a logger for yourself. 


logger = logging.getLogger(__name__)