Posts

Showing posts from February, 2017

Django Basics - First step to Simple REST API

Image
         Recently I had been watching  Bucky's django  series and I got this idea to make a simple API. After few attempts I made it. Its really a simple one. For the initial phase, I just used post title and first name in my database. API, basically  a way to communicate between different parties. One party is providing its data to others. Others need to ask polite (protocal) to get data. Always API returns standard format.Like JSON. other parties can use these data for their own works.(as I understood)         Lets get started, first we need to have django installed in your PC. Its very easy. Open your Terminal (CMD) and type,               sudo easy_install django  (Here I am explaining the Linux terminal way, if you use windows. Just ignore the sudo part.) Ok, we now have Django in our PC, create a folder somewhere you want, and go to it from terminal (cd command).             sudo django-admin startproject your_project_name Here you can use an appropriate name fo

Git - In a nutshell (Part -1)

Image
                 If you are coding, then you must know about the guy called 'GIT'. Here in this post I m trying to post the most essential git coding for you. Here I will code the basic git commands. I assume you have installed git in your local machine. To verify it, open your terminal and type   git   If its installed, you should get something like this. Fig-1 : git installed machine If you are not getting this kind of window, you have to install git, please follow this official git guide. 1) Initializing a git repository in your local machine     Go to your project folder using cd command in terminal. Type           g it init           # creates an empty git repository               g it add .        # add all the files in the current directory to git repo           g it commit - m "type your message"         # commit all the files to git repo     These will create your first git repository in your local machine. Follow step by step. In the co