Django tips: Recovering Gracefully From ORM Errors

How do you handle ORM errors in Django? Learn how to make your Django function views more robust with try/except (or with a neat shortcut).

Django: Recovering Gracefully From ORM Errors

Django views are the glue between your users and the underlying database. When a user visits an url Django can map that url with a view. And most of the times the view is also responsible for fetching some data from the database.

Continue reading “Django tips: Recovering Gracefully From ORM Errors”

Django: How to Fix “missing 1 required positional argument: on_delete”

A quick fix for missing 1 required positional argument: on_delete on Django 2.0

Django 2.0: a quick fix for "missing 1 required positional argument: on_delete"

Django 2.0 has been released with some nice improvements over the older version.

I really like the new path method so I decided to check out Django 2.0. Among the new feature there are some minor changes such as with the ForeignKey field.

Continue reading “Django: How to Fix “missing 1 required positional argument: on_delete””