My History with Circle Pines Photos and My Plans for the Future


Blog Post Published on:   30th October 2022
Title:   My History with Circle Pines Photos and My Plans for the Future
Lead Author:   Fred M. Beshears
Type of Blog Post:   mycirclepines_website


Introduction

Back in 2007, I bought CPC its first brand new computer, a printer, and a flat bed scanner. Then I setup a place in the CPC office where I could scan in all the old photos I could find in the farm house. Many of these old photos were starting to fall apart from being thumb-tacked to the wall at every reunion.

In 2008, with the advent of Facebook, I started putting up photo albums and indexing the people who appear in those albums.

Some folks liked what I was doing and sent me batches of photos to upload as albums to the CPC FB Group site. I continue doing this to this day. Recently, I uploaded a batch of photos taken by Leo Tanenbaum that were sent to me by his daughter, Laurie Tanenbaum.

Also, I’m working on a photo database project where I can load all the CPC photo metadata into an real relational database with a webserver front end.

Initially, this system will just exist on my desktop PC, but eventually I might move it to some cloud service like AWS or PythonAnywhere. That way, I could setup logins for Circle Piners who want to look for photos of old friends.

Also, with a real database, one could get into the business of archiving the photos. For example, one could record: who took the photo, who’s in the photo, who submitted the photo, where the photo was taken, when the photo was taken, and so on.

But, first I need to create the database.


Learning Django and My Plans for the Future

As some of you know, I’ve been looking into ways to manage the CPC photo archive. This is something I’ve been working on for a number of years.

Starting around 1 February 2022, I’ve started taking a series of online courses that serve as an introduction to Django, which is one of the most popular frameworks for putting up Web Applications written in the programming language Python. One reason for taking these courses is that an old friend of mine, Dr. Charles Severance, is teaching the series.

Mostly, I’m looking into Django because I want to create something for myself. As for CPC, I do not think it would be wise for CPC to rely on code developed on a volunteer basis by just one person, especially if there’s no plan to maintain the system long-term. For example, what happens if the volunteer gets hit by a truck.

Moreover, I think it would be better if CPC could find some relatively cheap online “Photo Gallery” system, ideally one that’s implemented in open source code.

Toward that end, I’m also looking at self-hosted photo management systems (e.g. Google Photos) to see if there’s a way to use free (or very low cost) that entails the use of open source code and cheap storage.

Also, I’ve found a reasonably good article by Daniel Diaz for creating a community photo-sharing web-app. I might use the Daniel Diaz article as a starting point for my own Django photo project.

However, it would be nice to find a company that’s working on developing a photo sharing app for organizations like CPC, Olney Friends Boarding School, Scattergood Friends School, the Highlander Folk School, and Heathcote School of Living. This list could go on and on. It sure seems like these small, non-profit organizations could use help with web-apps in a number of other areas, too. Web-apps for these small organizations might include:


Update on Learning Django

To learn how to create and manage a web application with a database back-end, I’m in the process of learning Django. Toward that end, I’ve taken a series of online courses called the Django for Everybody Specialization.

Also, I’m working my way through the MyClub Events Calendar application, which is explained in detail in Part I of Nigel George’s book: Mastering Django. In addition, I finished reading both Part I and II of his book (all 599 pages) this morning (at 8:30AM, 5/4/2022).

Further, I’ve implemented the demonstration photo-sharing application discussed in an article by Daniel Diaz. BTW: there is more I’d like to add to this application before I’d expose it to my CPC friends. For starters, it needs a more complete authentication system so people can create accounts for themselves and login.

And, I’d like to make it so people can login with accounts they’ve created on social media platforms such as Google, Facebook, and GitHub. (For more, see django-allauth. And, for contrast, also see social-auth-app-django.) GitHub should be easy, but platforms like Google and Facebook want more documentation to prove you’re running a real business.

If you happen to be interested in learning Django, I can recommend both the Coursera specialization and the book by Nigel George.


Updates for Django for Everybody Specialization

Django for Everybody Specialization from Coursera
by Charles Severance
https://www.coursera.org/specializations/django

The four courses in this series are:


Other Updates

See references for links to articles/books by Daniel Dias, Nigel George, and William Vincent.


Update on Content Management Systems

Date: 6/14/2022

On June 13th, I finished implementing the code in Mastering Django by Nigel George. In the process of working my way through his book, I’ve learned that Django is not a Content Management System (CMS). However, one can use Django to build a CMS.

Here are three CMSes that have been developed with Django: MezzanieWagtail, and Django CMS. So, I’m now looking into these three CMS to see which one might be best for for my own personal use.

Also, in the process of checking out these CMSes, I’ll consider whether (and, if so, how) they could be used to set up a shared photo archive for members of CPC.


References for Handling Images in Django and Python

Quotes: Nigel George.
Source: Mastering Django (p. 592, 598)

“It’s a common misconception, but Django is not a Content Management System (CMS).”

“You can use Django to build CMSes. Mezzanie, Wagtail, and Django CMS are examples of CMSes that have been built on Django. … Showing tumbnails in the admin is a common requirement. You can find many solutions by typing ‘show images in django admin’ into your favorite browser.”

“The CKEditor rich-text editor we installed in Chapter 12 can be configured to insert images into your content, but you’re toing to have to dig into JavaScript plugins to make this work.”

“There are also many projects on Django Packages that provide solutions for image handling.”

“Remember too that Django is just Python, so you can use Pillow in your apps.”

“The next scaling option is to host your media (static files) on a separate server. Nginx is by far the most popular option here, but a CDN server is also a good option.” (p. 598)

CKEditor
– Modern JavaScript rich text editor with a modular architecture.
– https://github.com/django-ckeditor/django-ckeditor

Django CMS
– Django-based Content Management System
– https://www.django-cms.org/en/

Django Packages
– A directory of reusable apps, sites, tools, and more for your Django projects.
– https://djangopackages.org/

Mezzanie
– Django-based Content Management System
– http://mezzanine.jupo.org/
– forwards to: https://github.com/stephenmcd/mezzanine

Pillow
– A fork of the Python Imaging Library (PIL)
– https://python-pillow.org/

Wagtail
– Django-based Content Management System
– https://wagtail.io/

Nginx
– Nginx is open source software for web serving, media streaming, and more.
– https://www.nginx.com/

Content Delivery Network (CDN)
– A CDN is a geographically distributed network of proxy servers and data centers.
– https://en.wikipedia.org/wiki/Content_delivery_network


References for Handling Search in Django and Python

Quotes: Nigel George.
Source: Mastering Django (p. 594)

“While conceptually simple, search is one of the hardest things to do in any web application.”

List of Search Issues (p. 594):

List of search system options:

  1. The PostgreSQL Full-Text search engine
    • django.contrib.postgres.search module
  2. Django Haystack
  3. Whoosh
  4. ElasticSearch
  5. Solar
  6. Algolia
  7. Swiftype

References by Author


Anon, Anon

Welcome to Python Social Auth’s documentation!
Documentation for: social-auth-app-django
https://python-social-auth.readthedocs.io/en/latest/
https://python-social-auth.readthedocs.io/en/latest/installing.html

Python Social Auth aims to be an easy-to-setup social authentication and authorization mechanism for Python projects supporting protocols like OAuth (1 and 2), OpenID and others.

The initial codebase is derived from django-social-auth with the idea of generalizing the process to suit the different frameworks around, providing the needed tools to bring support to new frameworks.

django-social-auth itself was a product of modified code from django-twitter-oauth and django-openid-auth projects.

Install example:
$ pip install social-auth-app-django

Welcome to django-allauth!
Documentation for: django-allauth
https://django-allauth.readthedocs.io/en/latest/

Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.

Install example:
$pip install django-allauth

15 Best and Most Popular CMS Platforms in 2022 (Compared)
Anon Anon
1 January 2022
https://www.wpbeginner.com/showcase/best-cms-platforms-compared/

Table of Contents


Banks, Alex

Learning React (2nd Edition)
Modern Patterns for Developing React Apps
by Alex Banks & Eve Porcello
1 June 2020


Beshears, Fred

Notes on the Photo Albums in the CPC Facebook Group Site
https://memeinnovation.wordpress.com/2022/05/04/notes-on-the-photo-albums-in-the-cpc-facebook-group-site/

Over the years, I’ve posted a number of photo albums to the CP Facebook Group Site. Here are my notes on how these photos have been organized and indexed.


Bendoraitis, Aidas

Django 3 Web Development Cookbook (4th Edition)
Actionable solutions to common problems in Python web development
by Aidas Bendoraitis and Jake Kronika
1 January 2020


Diaz, Daniel

Build a Photo-sharing App with Django
Daniel Diaz
22 June 2021
https://www.sitepoint.com/django-photo-sharing-app/


Ester, Patrick

Advanced Django: Mastering Django and Django Rest Framework Specialization
by Patrick Ester
https://www.coursera.org/specializations/codio-advanced-django-and-django-rest-framework

“Mastering Django and the Django Rest Framework. Create a blog an an accompanying API using industry-standard tools and software packages without installing anything!”


George, Nigel

Mastering Django
by Nigel George
1 January 2022
covers Django 3.2
provides website notes for Django 4.0

See also: Mastering Django Tutorials
https://djangobook.com/mastering-django-tutorials/


Johnston, Mike

Django CMS Review
By Mike Johnston
26 January 2016
https://www.cmscritic.com/django-cms-review/


Kretzschmar, Alex

Google Photos — welcome to the world of self-hosted photo management
Google offers many desirable, easy-to-use, effective features.

Alex Kretzschmar
23 June 2021

https://arstechnica.com/gadgets/2021/06/the-big-alternatives-to-google-photos-showdown/


Marcus, Daniel

Facebook API JavaScript SDK get all Albums and Photos
Daniel Marcus
1 August 2018
https://websitebeaver.com/facebook-api-javascript-sdk-get-all-albums-and-photos

“””
Many apps use this nifty feature to get all of your Facebook photos, like Tinder for instance. It’s exceedingly useful, as it makes it easy for a user to add Facebook photos to your application. In reality, it really just adds a convenience factor, as anyone could easily just download Facebook photos to their library anyway.

We will be using the JavaScript SDK for the examples, but can be used with Cordova virtually identically with this plugin. The demo is combined with Framework7 for presentation purposes, but the main aspect is using the Facebook API correctly.
“””


Mungai, Geoffrey

User Registration in Django using Google OAuth
Geoffrey Mungai
18 December 2020
https://www.section.io/engineering-education/django-google-oauth/

Uses Django-Allauth in this example.


Percival, Harry J.W.

Test-Driven Development with Python (2nd Edition)
Obey the Testing Goat: Using Django, Selenium & JavaScript
by Harry J.W. Percival
2 March 2018


Ramalho, Luciano

Fluent Python (2nd Edition)
Clear, Concise, and Effective Programming
Luchiano Ramalho
covers Python 3.10


Severance, Charles

Django for Everybody Specialization from Coursera
https://www.coursera.org/specializations/django


Sirisha, Anon

Top 10 Python Django Courses to take up in 2022
Learning the Django framework for web development will only take Python developers a step ahead
Anon Sirisha
22 May 2022
https://www.analyticsinsight.net/top-10-python-django-courses-to-take-up-in-2022/


Spilka, Dmytro

How Django Development can help businesses go online quickly and efficiently
By Dmytro Spilka
2 May 2022
https://dazeinfo.com/2022/05/02/how-django-development-can-help-businesses-go-online-quickly-and-efficiently/


Triplett, Jeff

5 favorite open source Django packages
By Jeff Triplett
24 December 2015
https://opensource.com/business/15/12/5-favorite-open-source-django-packages

  1. Cookiecutter: the best way to start a new Django site.
    https://github.com/audreyr/cookiecutter
  2. Whitenoise: the best static asset server.
    http://whitenoise.evans.io/en/latest/base.html
  3. Django Rest Framework: the best way to write REST APIs with Django.
    http://www.django-rest-framework.org/
  4. Wagtail: the best Django-based content-management system.
    https://wagtail.io/
  5. django-allauth: the best way to provide a “social login” (e.g. Facebook, GitHub, etc).
    http://www.intenct.nl/projects/django-allauth/

Vincent, William S.

Django for Beginners:
Build websites with Python & Django
by William S. Vincent
1 January 2022
covers Django v.4.0.x
Note: excellent reference for setting up authentication and authorization

Django for Professionals:
Production websites with Python & Django
by William S. Vincent
1 January 2022
covers Django v.4.0.x

Django for APIs
Build web APIs with Python & Django
by William S. Vincent
1 January 2022
covers Django v. 4.0.x


Wikipedia

Self-hosting (web_services)
https://en.wikipedia.org/wiki/Self-hosting_(web_services)