Matthias Omisore

Soft Diary

  • Coding
  • Linux
  • Cloud
  • OS Tweaks
  • Networking
  • Control Systems

Month: July 2016

Make ’email’ field to be unique in Django Model

July 8, 2016 Matthias 1

To create a unique email field in your Django User model, so that only one user can be associated with an email address, add below to your model:

Django delete file when object is deleted

July 8, 2016 Matthias 12

By default, when objects containing file fields such as FileField or ImageField are deleted, Django does not delete the attached files, leaving you with a lot of orphaned files on […]

Django: How to display only a filename in your template

July 7, 2016 Matthias 0

This is for situations you want to display only a filename without the entire path in your template. This solution is portable, allowing you to apply it to several apps […]

django.template.exceptions.TemplateDoesNotExist

July 5, 2016 Matthias 0

Django by default will look for the ‘templates’ folder under each app. For example below template folders will be located by default: However, Django will throw an django.template.exceptions.TemplateDoesNotExist when you […]

Display Image in a Django Template (using ImageField)

July 2, 2016 Matthias 34

This took me a lot of digging through the internet to figure it out and I hope it will help someone out there. After several trials, the solution here worked […]

Search This Page

Recent Posts

  • How to map an NFS drive as Persistent Volume in Kubernetes September 1, 2018
  • Kubernetes error: “The connection to the server localhost:8080 was refused – did you specify the right host or port ?” August 6, 2018
  • Django DRF – Create multiple Token per user February 14, 2018
  • How to add Bootstrap4 to your Angular project using Angular CLI January 11, 2018
  • Postgres – Basic administrative tasks – user, database, privilege and roles December 8, 2017

Tags

Angular (3) Angular2 (2) angular4 (1) apache (1) bootstrap (1) bootstrap4 (1) cloud (2) coding (18) database (1) Django (12) google cloud (1) google compute engine (1) google map (1) Ionic (1) ionic2 (1) Java (6) Linux (2) Magento (1) mobile development (1) MySQL (1) php (2) postgres (1) postgresql (1) programming (17) python (12) ubuntu (1) web development (1) web programing (3) Web Programming (11) Windows (1)
Tags
Angular Angular2 angular4 apache bootstrap bootstrap4 cloud coding database Django google cloud google compute engine google map Ionic ionic2 Java Linux Magento mobile development MySQL php postgres postgresql programming python ubuntu web development web programing Web Programming Windows
Archives
  • September 2018
  • August 2018
  • February 2018
  • January 2018
  • December 2017
  • October 2017
  • June 2017
  • January 2017
  • September 2016
  • July 2016
  • June 2016
  • August 2015
Recent Posts
  • How to map an NFS drive as Persistent Volume in Kubernetes
  • Kubernetes error: “The connection to the server localhost:8080 was refused – did you specify the right host or port ?”
  • Django DRF – Create multiple Token per user
  • How to add Bootstrap4 to your Angular project using Angular CLI
  • Postgres – Basic administrative tasks – user, database, privilege and roles
Search

Copyright © 2021 | WordPress Theme by MH Themes