What we are going to build is shown on the image below. Our feature consists of a simple search bar and a drop-down bow where our search results are displayed. …
I have been working on a personal project for a while and stumble across an interesting point during the build. To put things into context, I wanted to build a site footer that holds additional information to the site content. As probably most of you know footer section is shared across your whole application regardless the page you are on. So in this article I will go over two different ways of building such feature.
For those who never worked with Django I would recommend checking some of my other articles where I explain some basic principles about Django framework…
The first thing we have to do is build a mock data set that…
Lately, I’ve been exploring the asynchronous world and primarily the asyncio library and stumble across an interesting finding. Most of the async stuff going on is based on Coroutines, Future objects, Generators and much more. Since I am a guy who loves to dig deeper into stuff I decided to explorer Python generators and how they are related to the async world.
First things first. What is a generator. A generator is a special class of functions that simplify the task of writing iterators. Regular functions compute a value and return it, but generators return an iterator that returns a…
In a previous article, we built a contact application where users can submit their requests via a form on the website. Just as a reminder here is how the form looks like.
When a user submits the form it gets verified and saved by Django’s
form_valid() method. By utilizing this method, as well as
form_invalid() we can send different notification emails to regular users, admins depending on which method is trigger after form submission. In addition to regular information that could be sent via email (such as the user submitting the form, his/her email, subject, and actual message) we are…
In the last article, I have covered the basics of setting up a Django project. In this article, I am going to cover something that many people underestimate and that is the Model View Controller Framework that Django relies on. Even though most people know it as MVC framework, Django uses a slightly different approach and the actual framework that is being used is Model View Template. One area of Django that most people are missing is how requests are actually handled and what is the information flow.
A model is the single, definitive source of information about data. It…
Asyncio is also something to be considered also but the point of the article was elsewhere. asyncio is not trully asynchronous because all tasks are executed in an synchonous manner. It appears to be async because tasks are switching between each other when on wait.
I am about to publish another article for asyncio and I have decided not to include it here.
In the last article, I have covered the basics of setting up a Django project. In this article, we are going to create a simple contact application that will help our users to contact us.
The first thing to do is to create the application itself. That pretty easy thing to do and Django provides a tool for it. Do not forget to activate your virtual environment before application creation.
$ python manage.py startapp contact
When you create a Django application you get a folder similar to this one.
This is the first in a series of articles in which we are going to build a portfolio application where you can showcase yourself and your work. We are going to cover important topics and I will try to explain each of them in a separate article. This series of articles will mainly focus on the Django development side of things. If you are interested in the front-end, I may write a couple of articles explaining that part of the application. …
In this article we are going to take a closer look at Twitter API (Application Programming Interface) and how can we use it to retrieve tweets based on certain criteria. This article assumes that you have a basic knowledge of Python and APIs. For those who are new to the world of software development here is a quick reminder.
In computing, an application programming interface (API) is an interface that defines interactions between multiple software applications or mixed hardware-software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data…
Network, system and software engineer with true passion about technology. Love to read and spend time in nature.