Date range search fields in Django: Take your rant to your blog, mister!

This is something I figured out but it was horribly difficult and took me a week and 10 cups of coffee to figure out.  I posted a soluion on StackExchange. Because I noted the #cups of coffee I got two immediate downvotes and angry messages from some gurus who spend all their time on StackExchange:

This is not the right place to post your rants. Please consider posting this in your blog or somewhere.


This really isn’t the place for a rant disguised as a question. If you want to request this specific feature, you can open a ticket. If you just want to put this out there for future reference, you can ask a question on how to do it, and add your own answer. Either way, please use a more constructive tone.

I edited out the snark and now their comments look overheated, because the post is now entirely dry and technical.  I hope they leave their castigations up so I can have some exciting controversy at the bottom of the post, which is as stimulating without the color as a description of how to install a replacement toilet handle.

Privatizing the 4th of July


My family and I went to see 4th of July fireworks in a Southern town north of Charlotte. The only available fireworks were at a country club.  Members of the club had their own roped-off area and the hoi polloi were invited to park on a nearby main road and hike onto the rest of the golf course.  About 5,000 cars were parked on the main road, a mile up and down, and the walk with small children was a challenge.  We chose to park near the main entrance to the club.  There was a community of over $1MM brick houses associated with the club.  Not all residents are members.  Membership in the club starts with a down payment of around $50,000 and then monthly payments around $700.  I saw a non-member resident ask to sit in the club members area, something she had done in previous years, and she was turned away.  This community thus comprises both haves and have-nots, first class and business class.  The rest of us were in coach.  Parking my car I was close to but not blocking one resident’s driveway.  He came out and asked us to move, pretexting visitors soon to come.  After the fireworks were over, we returned and found his house unlit and unoccupied.

Growing up in New England I have a memory, perhaps false, that there were always town-sponsored fireworks in some area big enough to accommodate all of the town. North of Charlotte, where there is a large lake, there is almost no public space other than shopping malls.  The opening of a small beach was a big deal, with nearby residents loudly hand-wringing over the accompanying parking problems.  The beach had about 70 parking spaces. Consistently 700 come to bathe.  Even the highway, route 77, has been privatized, with a fast lane under construction for those that can afford to pay per use.

North Carolina is a state which is notable for the thorough inadequacy of its public transportation, its low teacher pay and disdain for public education, and the refusal Federal Medicaid funds.  The state, which just elected a Democratic governor by a narrow margin, has seen its Republican-dominated legislature systematically strip the governor of his powers and cut funds to his employees.  It’s quite something.

As a state on the losing side of what has been called, down here (not so sure if by the current generation, but surely the prior one), the War Between The States, I wonder if the lack of municipal attention paid to the 4th of July has strong historical roots in that conflict.  There is some evidence in favor of this interpretation.  So despite the otherwise rah-rah nature of Southern conservatives regarding the US of A and all of that, I wonder if institutionally the state is still driven by those older grievances, in a completely unconscious but still persistent way.

Python software spaghetti stack for web apps


When you want to solve a problem, the easiest thing is to follow in the tracks of someone else.  This can lead to a fairly complicated software stack to combine solutions to different issues.  My stack is going in this direction:

SQL/Sqlite: Database.  Simple and light but apparently more than good enough for most web apps.

Python: main application glue.  For those of us who need to get stuff done in the scientific visualization space, and have no patience for Java or random obscure newish languages like Scala and Lua.

CSS: Stylesheet language of all websites.  Hard to avoid knowing about.  A bit unlovely.

Javascript: Popular browser-side programming language implemented in all major browsers, equivalent to Python, loosely Java-like but without all the mind-numbing type checking and package hierarchies (at first glance).

Ajax: Method of communicating between client-side Javascript and server-side application (in Python in my case), to update an element of a webpage without having to redraw and reload the entire webpage

Bootstrap: A library of widgets and good stuff, originally programmed for Twitter, which is public domain and has things like stars for Like buttons.

Node.js: Server-side implementation of Javascript, moving some of the rendering load for complicated pages back to server.  (But initial intention was for browser-side Javascript to make things faster

Django: Python-based web application development package.  Features use of SQLAlchemy to make it easy to bind classes to database tables and incorporate changes in class structure during dvelopment.

React.js: A way of getting much fancier widgets than vanilla Django, in particular the Editable Table.  Requires some tedious and tricky integration to make it play with Django.

Amazon Elastic Compute: Web server in the cloud without compromising my home computer, for modest cost.