• How to automate your deployment and SSH activities with Fabric

    It is not uncommon for developers to interact with remote servers. Beside FTP clients many use terminals or consoles to carry out different tasks. SSH is usually used to connect with remote servers and execute different commands; from running git to initiating a web or db server, almost every thing can be done by using an SSH Client. Recently I came across an awesome tool called Fabric. It’s a Python based tool that automates your command line activities. What is Fabric? From official website:   Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. It provides a…

  • Develop your first web application in Django 1.10 – Part 5

    In last post I talked about using forms, in this last part of the series I am going to discuss about Django Admin and how can this powerful feature be used for records management. Django Admin Before we get into coding, we need to create a superuser(Admin). Open Terminal, go in your project’s root folder where manage.py resides and run the following command: Adnans-MacBook-Pro:ohbugztracker AdnanAhmad$ python manage.py createsuperuser Username (leave blank to use 'adnanahmad'): kadnan Email address: mymail@mail.com Password: Password (again): Superuser created successfully. Adnans-MacBook-Pro:ohbugztracker AdnanAhmad$ The interactive tool will ask a series of things. Once it’s over, check your settings.py file that whether admin app is available in INSTALLED_APPS or not. It…

  • Develop your first web application in Django 1.10 – Part 4

    Learn how to use Django Forms to submit user input data into Database. In previous post I discussed about Db interaction with a Django application and how to pass data in a html view and display it. Now we will move onto next step and will learn how to use HTML forms to store data in database. Django Forms The form I am going to deal is.. yeah, the project form so that I can submit project details. I will create a new folder under tracker/templates and will call it project. The reason to do is that I want to view file separate w.r.t modules. In the file I am going…

  • Develop your first web application in Django 1.10 – Part 3

    In part 2 you learnt how to use templates and views in Django. In this part I am going to discuss how to integrate database with Django app for pulling and storing data. Before we get into it, there are few things that need to be done before we start playing with data and database. Setting up database In order to make our application able to interact with a database, we need to setup the connection of it. Django can connect many RDBMS based db engines. Since Django rely on an ORM, you don’t need to worry about underlying DBMs being used for your app as you can always switch to…

  • Develop your first web application in Django 1.10 – Part 2

    First of all I am sorry for taking so much time to make a new post due to home shifting and travelling. In previous post you learnt how you can integrate HTML in Django application. Now we will go a step further and see how you can create a layout and how to extend it with inner HTML pages. Creating Site Layout Earlier I had just dumped the HTML of home page in master.html and then used extends to call it in inner home page. Now it’s time to make the layout file available for all other pages. Almost every website these days follow a certain theme; it consists of a header, footer,…

  • Develop your first web application in Django 1.10 – Part 1

    In part 0 I discussed initial installation and configuration. Now it’s time to get into the code. The things I am going to do in this post are: Understanding the concept of Project and Apps in Django world. Creation of App. Using templates to create home page. Projects vs Apps Django offers a very useful modular approach of creating web applications. Unlike other frameworks like PHP Laravel or Rails, Django let you create multiple apps under a project. This idea might look alien to those coming from the background of other frameworks where a project == app and you need to rely on routes etc to divide functionality. Let me take…

  • Develop your first web application in Django 1.10 – Part 0

      Django is a very popular and powerful web framework to make small to large scale web application in Python language. In this series I am going to make a simple issue tracking or bug tracking system in Django 1.10. OhBugz The application I am going to make is named as OhBugz. It is a simple issue tracking application for a single user which helps to track project related issues. It is not going to make JIRA guys sleepless but good enough to learn how to make a web application in Django. Some of the initial screens are:   Installation Since Django is a Python framework so it’s quite obvious…

  • Write your first web crawler in Python Scrapy

    The scraping series will not get completed without discussing Scrapy. In this post I am going to write a web crawler that will scrape data from OLX’s Electronics & Appliances’ items. Before I get into the code, how about having a brief intro of Scrapy itself? What is Scrapy? From Wikipedia: Scrapy (/ˈskreɪpi/ skray-pee)[1] is a free and open source web crawling framework, written in Python. Originally designed for web scraping, it can also be used to extract data using APIs or as a general purpose web crawler.[2] It is currently maintained by Scrapinghub Ltd., a web scraping development and services company.   A web crawling framework which has done all…

  • How to integrate Quickbooks online with Slack through Zapier APIs

    A few days back I was contacted by someone who wanted to get notified on Slack about new invoices created in Quickbooks online. In this post I am going to share how one can harness the power of Zapier to get notified on Slack about changes in Quickbooks. The work is done in Python. I am going to use sample invoices that I made on Quickbooks online. Before I move further, let me tell you about Quickbooks, Slack and Zapier. What is Quickbooks? Quickbooks is an online accounting software for small businesses which provides features like Invoice Management, Payroll Management, Inventory and a few others. Since it’s a SAAS based…

  • 5 Ways Developers Can Have Multiple Income Streams

    A couple of weeks back I was having a discussion with a former colleague who was upset due to no job and was not having some luck to find some freelance gig either. Another developer also had similar situation and despite of knowing something he was not able to get work. I have been working independently for 5 years. Prior to that I was engaged in typical 9-5 jobs. When you work solo, you should expect some tough time unless and until you have multiple revenue streams. What I learnt so far that developers are not good at selling themselves and they believe that they only way to earn money…