Django

Django for beginners: Making an API for Django (POST)

In this article, we’re going to continue to look at how to make a basic REST API using Django. Specifically, we will be looking at a POST request in this article, which sends data to the application. In the below, we have a snippet from my signup function of the views.py file. Here, we generate […]

Read more
Django

Django for beginners: Making an API for Django (GET)

In this article, we’re going to look at how to make a basic REST API using Django. This is a nice, simple method to implement an API using unique keys. Specifically, we will be looking at a GET request in this article, which requests data from a specified resouce, via HTTP. In the below, we […]

Read more
Django

Django for beginners: Security considerations

There are a large number of security considerations for your projects. This article covers a large number of them, but it may not be sufficient, depending on your requirements/use-case. I would also recommend not implementing these settings directly on a production server, as it can be quite easy to make things inaccessible – proceed with […]

Read more
Django

Django for beginners: querying your models

In this article, we’ll look at how we can extract data from & insert data into our models. Below, we have a simple select all query. It will return an unfiltered dataset from the skills model. This should be used with care, expecially if your dataset is quite large. Next, we may want to apply […]

Read more
Django, Python

Django: File uploads in forms

There are so many usecases where you’ll want to be able to upload a whole bunch of files to a website at once and yet, there isn’t really a well documented way to do it. The Django documentation itself is a bit half baked and not really all that helpful. So, in this article, I’m […]

Read more
Django, Python

Building an app in Django: the login

I’ve spoken in depth about getting Django ready to use in this article, so I’m not going to go through the general setup commands in too much detail. Suffice to say, once you’ve got your server up and running, you’ll want to configure the firewall and start your Django app. Now, to create your login […]

Read more
Django, Python

Pulling data from MySQL into Google Charts using Django

Pulling data from MySQL into Django is pretty straightforward. This article will show you some code samples of exactly that. In the below, you’ll see I have a load of DB queries. Each query is handled in a specific way and then a value is returned. Those values are populated into the Python dictionary at […]

Read more
Django, Python

An in depth look at Django

In Django, we have a few concepts. We have projects, apps, views, models, templates and a few more bits and bobs. In this article, I want to go through  Django Project App Views.py Models.py Templates admin.py Project Config Settings.py Urls.py So how do all of these things work and how do they link together? When […]

Read more