You are here:-Happiness

About Happiness

This author has not yet filled in any details.
So far Happiness has created 8 blog entries.
1 01, 2020

How to search CloudWatch logs for Metrics (or errors) on lambda

By | January 1st, 2020|Categories: Uncategorized|0 Comments

This post is a simple step by step guide on how to search Cloudwatch for errors on a lambda function. I find that this simple task can be confusing sometimes, at least for me, so I'm sharing what I do about this that helps me, enjoy :) Steps to search:- Go to AWS console- Under

26 10, 2017

Django management commands from admin interface

By | October 26th, 2017|Categories: code, Django, git, python|0 Comments

This need came up when during app deployment, needed to run some management commands without ssh-ing into the server or using the terminal. Thankfully Django management command can be called anywhere using management.call_command() This is a brief one, view code on GitHub here: https://github.com/NEbere/data-import/tree/master You need to install the admin_plus package with pip, ensure your

17 10, 2017

Import data into database – django app

By | October 17th, 2017|Categories: code, git|Tags: , , , |0 Comments

Steps to import data into your Django app So you have a Django app and want to load data from a URL, a CSV file or a JSON file, I got you :smile: First, create your models, make migrations, migrate and all that setup you have to do, but I'm sure you got all that covered

29 05, 2017

Effective collaboration and communication

By | May 29th, 2017|Categories: Uncategorized|0 Comments

So I did this small talk on effective collaboration and communication where I work so I thought I'd share. Download here

29 05, 2017

Bower install from a forked repository

By | May 29th, 2017|Categories: bower install, git, Hacks|Tags: , |0 Comments

If for any reason you need to fork a repo and want to install your forked version using Bower, follow these steps:  Fork the repository Clone the forked repo on your computer Make desired changes Increment version number in bower.json (create one if none exists e.g. 4.0.1) Commit and push Create a new version tag

3 05, 2017

Update a model field – Django

By | May 3rd, 2017|Categories: Fixes|Tags: , , |0 Comments

I noticed a typo in a field name after running migrations, I followed these steps to update the field without loosing data. Update the filed name in the model with the desired name (taking note of the current name) Create an empty migration. If you have previous migrations, this one must be named in such

1 05, 2017

virtualenv for python3

By | May 1st, 2017|Categories: Fixes, Hacks|Tags: , , |0 Comments

Simple steps to setup virtualenv for Python3 To setup virtualenv for python3 for Django projects, create and cd into the desired folder for the Django project. Create a folder for virtualenv, eg mkdir venv $ cd venv // The created folder for virtualenv Then run these commands worked for me in this order: $ virtualenv

28 04, 2017

Fix IOError: [Errno 2] No such file or directory error for appdirs

By | April 28th, 2017|Categories: Fixes, Hacks|Tags: , , , , |0 Comments

Appdirs is a small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir". Github repo - https://github.com/ActiveState/appdirs This error from my experience occurred when I updated my local branch from origin and ran pip install to get the latest installed packages. pip tried to upgrade appdir but it failed for some unknown reasons,