Interactive Dental Chart in HTML/JavaScript
Jan. 17, 2021 0 comments
One of my side-projects that I do on my free time is is a patient management system for my wife's dental clinic. It's written in Python/Django and it's a closed source project for now, but one thing I'd like to share is an interactive dental chart that allows to record the state of patient's teeth. Of course, the actual implementation is a bit more complex than this an it interacts with the Django back-end via Ajax requests but you can use this code as a basis for your own projects. Here's a link to JSFiddle: https://jsfiddle.net/romanvm/bpx8zc76/3/ with the code. Feel free to use this code as you see fit.
Vertical Stretching of HTML Content to Browser Viewport Height
June 28, 2018 0 comments
This is more of a note to myself but maybe other web developers, especially beginners, will find this information useful. In common situations when your webpage has a header, a main content area and a footer (like this blog), you want your main content area to stretch to the available browser viewport height if your page contains only small amount of content. Unfortunately, by default your block elements are vertically aligned to the top so your footer will be displayed somewhere in the middle of the viewport instead of the bottom. And this is where the new Flexbox layout comes to the rescue. (...)
Bootstrap4-based Pagination Buttons for Django ListView
May 11, 2018 0 comments
Often, when displaying multi-page lists in html pages rendered from Django templates, we need to include a pagination control, usually a set of navigation buttons, that is both functional and good looking. In this post I'll describe the solution used in this blog to paginate the list of search results. (...)
My Blog's New Look
May 6, 2018 0 comments
As you can see I have completely re-worked this blog's design. The new skin is based on Bootstrap 4 and hopefully is more pleasant looking than the old one.
Comparison of HTML5 Parsers: Gumbo vs html5lib
July 29, 2016 0 comments
When developing content plugin for Kodi mediacenter the most important part is where to get the content from. One of the possible ways is to scrap websites that host multimedia content. Yes, legality of that content is another question, but legal matters are beyond the scope of this post.
In Python world BeautifulSoup library (BS for short) in combination with html5lib parser is a popular choice. However, according to the BeautifulSoup documentation the html5lib
parser is the slowest, albeit the most reliable, of all html parsers. So I googled for alternatives and found Gumbo parser made by Google itself. According to the description it's fully HTML5-compliant and written in pure C99 with no external dependencies. And it has Python bindings compatible with popular Python HTML parsing libraries, including BeautifulSoup
. The BeautifulSoup
binding was written for BS 3 of but making it compatible with BS 4 was relatively easy, which I did and submitted a pull request on GitHub (which seems to be ignored by the repo maintainers). (...)
Featured Posts
-
Running Multiple Celery Beat Instances in One Python Project
Feb. 1, 2021 -
Setting Up MySQL in LibreELEC on Raspberry Pi
Nov. 17, 2017 -
Autodocumenting your Python code with Sphinx - part 2
Feb. 24, 2016