Blog

Page 124 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Django: Redirect to previous page after login
python

Django: Redirect to previous page after login

Published on September 2, 2023

# Django: Redirect to previous page after login Are you building a website with login functionality, and want to redirect users back to the page they were on after they successfully login? Look no further! In this blog post, I will walk you through the st

Cover Image for Multiple ModelAdmins/views for same model in Django admin
python

Multiple ModelAdmins/views for same model in Django admin

Published on September 2, 2023

# Creating Multiple ModelAdmins/Views for the Same Model in Django Admin Are you facing the challenge of creating multiple ModelAdmins/views for the same model in Django Admin? Perhaps you want to customize the views differently and link them to different

Cover Image for How do I convert a Django QuerySet into list of dicts?
python

How do I convert a Django QuerySet into list of dicts?

Published on September 2, 2023

## Converting a Django QuerySet into a List of Dicts: It's Easier Than You Think! šŸ’ŖšŸ”Ž So, you want to convert a Django `QuerySet` into a `list` of `dict`s? You're not alone! Many Django developers have encountered this challenge and wondered if there's a

Cover Image for In Django, how does one filter a QuerySet with dynamic field lookups?
python

In Django, how does one filter a QuerySet with dynamic field lookups?

Published on September 2, 2023

# How to Filter a Django QuerySet with Dynamic Field Lookups Are you struggling with filtering a Django QuerySet based on dynamic arguments? šŸ¤” Don't worry, we've got you covered! In this blog post, we will address this common issue and provide you with e

Cover Image for How exactly do Django content types work?
python

How exactly do Django content types work?

Published on September 2, 2023

# How exactly do Django content types work? šŸ¤” If you've ever found yourself scratching your head over Django's content types, you're not alone! But fear not, because in this blog post, we're going to break down the concept of Django content types in a pr

Cover Image for The plugin generated X characters of unexpected output during activation (WordPress)

The plugin generated X characters of unexpected output during activation (WordPress)

Published on September 2, 2023

šŸ“ **Title: How to Fix "Plugin Generated X Characters of Unexpected Output" Error in WordPress** šŸ‘‹ **Introduction** So you've just activated your new plugin in WordPress and encountered the irritating message: "The plugin generated X characters of unexpe

Cover Image for What is choice_set in this Django app tutorial?
python

What is choice_set in this Django app tutorial?

Published on September 2, 2023

# What is choice_set in this Django app tutorial? šŸ¤” If you've been following the Django tutorial, you may have come across the line `p.choice_set.create(choice='Not much', votes=0)` and wondered what this mysterious `choice_set` is all about. Fear not! I

Cover Image for Django Admin - Disable the "Add" action for a specific model
python

Django Admin - Disable the "Add" action for a specific model

Published on September 2, 2023

šŸ“ **Django Admin - Disable the 'Add' action for a specific model** Are you facing issues with the Django admin 'Add' action for a specific model? Do you want to disable the 'Add' functionality and display a custom error message or a 404 page instead? In

Cover Image for Format numbers in django templates
python

Format numbers in django templates

Published on September 2, 2023

šŸ“šŸ¤” transforming numbers using filters in Django templates... Oh hi there! šŸ‘‹ Are you struggling to format numbers in your Django templates? I totally get it! It seems like a simple task, but can be quite confusing trying to figure out which filter to us

Blog | Matheus Mello