Django Calculate Latitude Longitude Distance with Native (Pure) Python Library

  • Posted on: 15 November 2017
  • By: oon
Django Calculate Latitude Longitude Distance with Native (Pure) Python Library

If you try to find library on Google about how python (or Django, Flask) can easily calculate latitude longitude points distance, you probably got geopy or pyproj.

Yes, previously I used pyproj [1], because years ago I have quite alot experience with Proj4 library [2]. And it's quite hard to use pyproj in windows, you have to install SDK an so on.

What a great project (pyproj) because of the precision of its calculation.

don't belive me? it's ok, you can visit this geodesic calculation [3] to prove it. Or follow this discussion [6].

Kelas Teknologi

  • Posted on: 17 October 2017
  • By: oon
Kelas Python

Kelas Teknologi belajar pemrograman diadakan lagi di Makassar,, untuk memudahkan mendaftar sekarang pakai situs meetup [1].

Masih pakai materi awal pengantar pemrograman dengan bahasa pemrograman Python [2], akan diadakan beberapa seri untuk bisa mempelajari hingga materi sampai ke pengenalan pemrograman web dengan Python.

Sebagian materi sedang ditambahkan contoh dari web framework Flask dan WebApp2, dengan penggunaan web framework Django.

Kunjungi situs meetup [1] untuk ikut pertemuan kelas teknologi berikutnya!

Even though you use Django, use Jinja2 as the template engine

  • Posted on: 8 September 2017
  • By: oon
Use Jinja2 with Django

just because of this [1]:

For nearly all cases, Django’s built-in template language is perfectly adequate. However, if the bottlenecks in your Django project seem to lie in the template system and you have exhausted other opportunities to remedy this, a third-party alternative may be the answer.

Jinja2 can offer performance improvements, particularly when it comes to speed.

Process Encrypted SQLite with SQLChipher and Peewee ORM

  • Posted on: 7 July 2017
  • By: oon
Peewee ORM sample of access encrypted SQLite

From the creator of Peewee's blog, we can easily access encrypted SQLite using Peewee ORM.

import datetime
import getpass

from playhouse.sqlcipher_ext import *

db = SqlCipherDatabase(None)  # Defer initialization of the database.

class Note(Model):
    content = TextField()
    timestamp = DateTimeField(

    class Meta:
        database = db

passphrase = getpass.getpass('Enter the diary password: ')
db.init('cipher.db', passphrase=passphrase)

great sample!

Kelas Python di Jurusan Teknik Informatika UIN Alauddin Makassar

  • Posted on: 3 June 2017
  • By: oon
Kelas Python

Hari ini berkesempatan berbagi pengetahuan dengan teman-teman dari Himpunan Mahasiswa Jurusan Teknik Informatika UIN (Universitas Islam Negeri) Alauddin Makassar.

Kebetulan sedang bulan Ramadhan, jadi mengisi siang sampai sore hari menunggu buka puasa sambil belajar bahasa pemrograman Python.

Setelah sekian lama tidak mengadakan kelas python, beberapa hal sudah berubah, misalnya mengenai Google App Engine SDK, sekarang secara default dipersyaratkan menggunakan perintah gcloud, sehingga mulai meninggalkan perintah lama appcfg.

Hosting Django on Google App Engine with djangae for FREE

  • Posted on: 29 May 2017
  • By: oon
Django Free Hosting on Google App Engine

note: this post based on my experience hosting Django on Google App Engine. FREE on this article means I didn't have any billing every month, it's only personal site with not-too-much load or traffic. BUT, I set this with "activated billing setting" on my Google Cloud account, still have no time to try without activate billing.

This article written in Bahasa Indonesia.