digital hedgehog illustration

Backend

Hero

How to Manage Slugs for Database Entities with Flask and SqlAlchemy

This tutorial is about the technique I use to manage slugs.

Introduction

If you have ever tried to create a blog-like application or something that needs unique slugs, you might run on two problems:

  • How to not repeat yourself? Imagine you have articles, categories, and products, and they all need slugs.
  • What to do in a case where two or more entities have the same names used to generate slug?

Written by StefanJeremic on Apr 11, 2022


Hero

How to use Flask with Webpack

I had a hard time figuring out how to set up the Flask with Webpack. So this is the solution I came up with.

Introduction

I have probably spent a week or two looking for some "best practices" for this problem: How to set up a Webpack for multi-page apps or websites? I haven't found many resources on the internet, so I decided to dedicate a blog post to it. Hopefully, you will find this helpful. So let's start!

Project Setup

Go on and create flask-with-webpack to try this out. The project structure should be like this.

Written by StefanJeremic on Dec 7, 2021