Using React to create a frontend to the Django API

Code inside of a text editor

In a previous article, I walked you through using Django, and Django Rest Framework to create a backend user authentication API. That article can be found here. In this article, we will use React to create a simple frontend to consume this API. Note that I will not be using anything fancy such as Redux or the context API. Instead, I will be keeping this simple by using React hooks such as useState and useEffect.

Creating the Project and Cleaning it Up:

I like to use create-react-app to scaffold my React projects. I will name this project client. Run the…


Using Django, Django Rest Framework, React, and React Router Dom to create a simple authentication system.

Django is my favorite web framework. When combined with Django Rest Framework (DRF) it allows you to create powerful and robust RESTful API’s using Python. One of the most common features needed in an application is user authentication. In this post I will guide you through using Django and DRF, along with some other packages to create a secure and fully featured authentication API that uses token based authentication. After the API is complete, we will use postman to test it and build a…


Handling Security, Dependencies, and More.

Introduction:

Django is one of my favorite Python packages. It’s a web framework that comes shipped with a default user model, an ORM, and a fully featured admin interface. The “batteries included” architecture of Django makes it fast and easy to get up and running with a new web application.

Although it can be tempting to jump right into your project, there are a handful of things you should take care of when starting a new Django project. This setup can save you a lot of headache down the road where you might run into conflicting dependencies or security issues.


Every line of code you write is a learning opportunity

Lightbulb in a cloud, representing a thought.
Lightbulb in a cloud, representing a thought.

Introduction:

Learning to code is both financially, and intellectually rewarding. This is what most people will tell you. Although this is 100% true, what a lot of them don’t mention is that it is difficult and will involves a lot of time dealing with silly mistakes and struggling to grasp complex topics. That doesn’t mean programming isn’t for you. It’s a challenge, and there are amazing members in every part of the community that are willing to help you out (myself included).

One of the things I still struggle with as a developer is coming up with cool project ideas…


The only thing worse than bad code documentation is no documentation. We hear it over and over to always document our code. Whether it is for the next person who will read it, or for our future selves. Bad documentation is one of my biggest pains as a developer. Especially if I wanna work with, or on an open source project. Good or bad documentation can make or break a project whether it is a companies proprietary code, or an open source project on GitHub.

There are a few simple rules that I follow when documenting my Python code. Although…


A person typing on a laptop, with a Python programming book.
A person typing on a laptop, with a Python programming book.

Overview of Pipenv:

Pipenv is a python package manager which gives programmers better control over their pip project dependencies. Pipenv allows you to select the specific version of python, and the versions of the pip packages required. For those that are familiar with JavaScript development, pipenv can be thought of as the python equivalent of npm.

Pipenv solves a few problems when it comes to using pip packages in python.

  1. Pipenv allows the user to select the specific version of python the project requires. Let’s say that a project named myapp uses async features in python. This requires python 3.5…

Tarric Sookdeo

I am a graduate of Flatiron School’s software engineering course. I love to code, and solving problems in finance with software.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store