Luna Part 4 : First Views

Once models are created, you can make migrations and database tables from them.

An empty database isn't very interesting, so the next step is to populate it. We used Celery Tasks for that.

Django 2.0 changed how URLs are defined. I ignored that and used the old style re_path because I wasn't really interested in learning the ins and outs of the new `path` function yet.

Here's my first four views

urlpatterns = [
    path('api/v1 ...

read more...


Luna Part 3 : Populate the Database

Empty databases are boring. In part 2 we made an empty database.

Now we fill the database.

We are going to use a couple of celery functions outlined in tasks.py

Here are the benefits of building this as celery tasks:

  • The jobs can be easily distributed among several processes, even on one machine
  • The jobs can be triggered from changes on the operating system (future watchdog daemon)
  • The jobs can be triggered from CLI or web tasks

Here's the basic function layout:

  • Find all the files in a given path and index them.
    • Process each individual file in its ...

read more...


Luna Part 2 : Repository and Django Models

Luna is what I'm calling my project to take back my photos.

You can follow along with the code here: https://github.com/issackelly/luna

The repository and the data models are the first step in any code base.

I'm not yet going to cover many of the choices that I made in the project (pipenv, dj-database-url, celery, etc). In this installment, I'll be describing the folder structure and the basic model setup at backend/backend/models.py .

The project is a pair of small applications. A "backend" application built on Python 3 and Django 2 ...

read more...


Luna: Taking My Photos Back - Part 1 : Motivation & Description

Digital Photos are probably the most personal digital-relics from my life.

Tech companies want this foothold, and I'm going to try to opt-out with as few compromises as possible.

From a data perspective, my photo and video collection is the most complex and interesting of data sets that I interact with regularly.

This is an opportunity to explore and to use the data in interesting ways. I can build interesting things on top of it, and use the data to experiment with different approaches, UI patterns, or technologies in a way that is meaningful to me.

The fact that ...

read more...



Issac Kelly