Skip to main content

Posts

Working With AJAX

In the last post, we discussed the error I have got and how I overcame those. In this blog, we will see how I dealt with AJAX. To begin with, all of you have used some social media like facebook, Instagram etc and all of them have some things in common. One of them is the like feature. Yow can like anything you find useful, fun or interesting. That simple "like" feature. Many of the normal users don't observe this actually, they don't have to observe this but whenever you hit the like button or double-tap in Instagram and the information that you liked that post is sent to the server, saved in the databases and some indication is given to you as well, so that you know that you have liked this post. All of this happens without the page getting reloaded. This sounds like usual stuff to the normal people but it's not as simple as it looks like. Not for an amateur web developer who has just started with web developing Generally, if we wish to make a get request to
Recent posts

The First Big Error

So everything was going fine till now and I was progressing in my project, but as we know that coding is riding a bike in Jurassic Park, where you can encounter a dinosaur like errors. I encountered an error in my code. First I will tell you the background details that are necessary to know to be clear about the error occurred, then I will tell you about the error and then we would go to how I solved it. So all of you must have read about how I was maintaining the user profile if not you can read it here  "The User Profile" . I would insist on going back to this link again as I have uploaded an image to make things even more clear about how did it. So I had additional fields on my user profile such as image, email, status, city etc. I have used Django signals to create user profile whenever a user is created. To those who don't know what signals are, Signals are built-in in Django which are used to execute some lines of code when some other line of code is executed. Th

The Follow Feature

In my last blog, I described how I dealt with the user profile issue I faced but it wasn't over, a bigger issue was yet to be solved. Instagram has given us a really good feature which we call "Follow", that lets us follow any other user and see whatever they post or in simpler words whatever they want the world to see. Simple, isn't it? Well in programming point of view, not really. Friends and Followers are the next most important part of an SNS (Social networking site). Why shouldn't it be? Most of the people use them so they could showoff things to other friends, family or someone totally unknown just because it somehow makes them feel valued. What kind of a disorder is that? Well, that's a totally different story which we are not supposed to discuss now. This feature so important because what's the point of calling it a social networking site when you don't have a network. So this problem is solved by me in the following manner To begin with,

The User Profile

This is my second blog about my Instagram project and till now I am confronted with many questions and problems, two such problems are how to store the user profile and how to implement the "follow" feature of Instagram. In this blog, I will describe the prior problem To any social networking site, the most important component is its end user. The user has his/her important role in the functioning of a social networking site and that part doesn't need a description. Till now, for all my mini projects, whenever the user was required I have used the User model of the Django framework, but this is something different. An SNS(social networking site) always has a user profile which holds a wide variety of information such as status, display picture, email, links to other sites etc but the Django's User model has only some fields namely first name, last name, email, username, password. Only this handful of information cannot account for the user profile. I know many of y

The Beginning

This is the beginning of my Django project. I  have decided that first, I will work on the Django part making my server working and then I will work on the user interface using REACT. As I have just started, I am highly confused about what kind of models to be used how my user profiles must look like etc. For making a successful website or any other project in that case, these initial thinking play a vital role as if not done at an early stage of a project, it becomes very hard to make some minimal changes when you have written a sufficient amount of code. As a human, I learn from my own mistakes and for those who are thinking about what makes me so sure that it is difficult to make changes later own, this statement is the answer.  For those who are new to Django or even to programming, Models are the way you represent your data in Django. These contain important information such as how many fields are there, what kind of data is represented in each and every field. Django is a self-