If you prefer a video version, watch below..

If you’re using Kartra, or you’re thinking about using Kartra..and you’re wondering if your course members can receive a completion certificate or PDF like users can on some other platforms, this article is for you.

To cut to the chase, as of writing (April 2021), Kartra does offer a type of completion certificate, but it is not like you may expect..

Kartra’s completion badge

The completion certificate is essentially a pop-up that happens “in-app”. And the users do not receive an email with a PDF of some sort.

If you do want your users…


If you prefer a video version, click below..

If you’re using Kartra, or you’re thinking about using Kartra..and you’re wondering if you can limit the number of times one of your products can be sold, this article is for you.

To cut to the chase, as of writing (April 2021), Kartra does not give the ability to limit number of times a product is sold, but there is a work-around using Zapier which we will discuss in this article.

With the work around, we can at least notify ourselves when our product has been sold a number of times…


We all want our Kartra membership site i.e. course, to reflect our style and branding.

But styling your membership sites can be a little tricky.

You can choose from their style presets but you can only choose from a set number of colours and layouts.

Adding just a background can really improve the look of your membership site.

Before


From my experience with my students and new programmers, environment variables are a highly overlooked concept. It does not matter if you’re working with Python, Django, Ruby, etc, it just so happens that Python and Django are my expertize.

I literally had some say to me on Twitter the other day,

“To validate your point, I don’t even know what environment variables are! “

We’re going to discuss;

  • What are Environment Variables
  • How are Environment Variables Used
  • Benefits of Using Environment Variables
  • How to use Environment Variables in Your Projects
  • An Important Warning

If your focus is also Python and…


This short quick tip serves more as a reminder for myself. I know I’m not speaking just for myself when I say converting dates and times between timezones can be a real headache. This is a quick summary of handling timezone conversions with datetime objects in Python

This quick article will describe:

  1. Understanding timezone aware and not timezone aware
  2. Assigning at timezone
  3. Converting to another timezone

Save yourself hours today on Django projects with my free guide, “Top Time-Wasting Beginner Django Mistakes” while still available

Intro to Timezone Aware and Not Timezone Aware

We’ll need two Python libraries for this, pytz and Python’s datetime .

from datetime import…


Save yourself hours today on Django projects with my free guide, “Top Time-Wasting Beginner Django Mistakes” while still available

It would be surprising if you haven’t heard of a django-allauth as a Django developer. It’s a 3rd party application which makes user registration, sign-up, and social account registration a lot easier. Specifically to my use-case, it also allows users to register and login with just an email and password instead of a username.

But there are times when you when you need extend beyond just a email/password signup e.g. the user must add the name of an “organization” they are…


TLDR:

find . -type f -newermt ‘5/1/2019 11:55:00’ -not -newermt ‘5/1/2019 12:55:00’ | sudo xargs -I ‘{}' mv ‘{}' 12

mv '{}' 12 is the command, “Move each file to a folder named 12”. This command was executed in the target directory and the destination folder was on the same level. By default, the argument is passed to the end of the command, therefore, a placeholder, '{}', was required.

The following example will find files created between a date-time range (greater than, less than), the date format is MM/DD/YYYY HH:mm:ss, and each of those files will be processed by xargs. …


You like Python for scripting? GREAT! Click here to get your free guide “Top Time-Wasting Beginner Django Mistakes” now

As I’ve built projects for clients and myself, I’ve set up a few interesting cronjobs (or at least I think so) and pieced together shell commands which I have found useful.

I’ve included a one in this article which I’ve found myself frequently using and, in the case of cronjobs, have been running consistently for months and years on end

The Situation

I needed to create a backup of a MySQL database once a week of weather data, also, it defeats…


You like Python with your MySQL, GREAT! Click here to get your free guide “Top Time-Wasting Beginner Django Mistakes” now

Connecting to a remote MySQL instance with MySQL Workbench is easy if your server has been set-up.

Step 1: If the server is a clean-install, the public SSH key for the machine remotely connecting to the server must be added to the authorized_keys file in ~/.ssh . If SSH keys are not setup on the machine remotely connecting, Digital Ocean has great tutorials.

Step 2: Create a user on the server which the remote machine will use to access the…


Originally posted on my blog of random tid-bits and Android APK breakdowns — Which Android Libraries?

I recently learned Java Exceptions have three different get methods. Throughout my coding practices and learning, I have used e.printStackTrace();.

I also could not find a clear example of the different outputs, this short article will outline those outputs.

File Read Exceptions

This example is a simple file reader in a try-catch block.

printStackTrace

java.io.FileNotFoundException: <file path> (No such file or directory)at java.io.FileInputStream.open0(Native Method)at java.io.FileInputStream.open(FileInputStream.java:195)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at java.io.FileReader.<init>(FileReader.java:58)at FileReadException.main(FileReadException.java:11)

toString

java.io.FileNotFoundException: <file path> (No such file or directory)

getMessage

<file path> (No such file or directory)

Logic Exceptions

This example simulates a run-time error, I tried to divide by zero in try-catch block.

printStackTrace

java.lang.ArithmeticException: / by zero at ExceptionTest.main(ExceptionTest.java:5)

toString

java.lang.ArithmeticException: / by zero

getMessage

/ by zero

Gavin Wiener

I'm a coder and freelancer from South Africa with 5+ years experience in automations, integrations and API's using Python and Django.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store