Posts in "Django" category

Featured Image

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. (...)

Read post

 DjangoHTMLPython

Featured Image

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.

Read post

 DjangoHTML

Featured Image

Blog Environment Upgrade

 April 21, 2017    0 comments 

Previously, this blog run on Django 1.8 and Python 3.4, but after a new Django LTS release — 1.11 — I decided that it's time to upgrade this blog to the new Django version and to bump Python version as well. The upgrade process was simple: I created a new virtual environment, installed all the dependencies and pointed Pythonanywhere to this new environment. The blog itself required only one minor change of the sitemap view because URL patterns no longer accept view names as strings, e.g. 'django.contrib.sitemaps.views.sitemap', but require proper callable view objects (previously, both variants were supported).

Now this blog runs on Django 1.11 and Python 3.5 (Pythonanywhere does not provide Python 3.6 yet).

Read post

 DjangoPython

Featured Image

Django/Jinja2 Language Definition for Prism.js

 Oct. 26, 2016    0 comments 

Recently I made some improvements to this blog CMS in order to better handle code samples in various programming languages. One of the improvements is a brand-new language definition for Prism syntax highlighter. Prism is an easy to use JavaScript library for in-browser code syntax highlighting that supports many languages (programming, markup, configuration etc.). Unfortunately, Django template languages was not among them so I decided to fill-in this gap. And because Jinga2 template syntax is very similar, I decided to make one language definition for both. (...)

Read post

 DjangoJavaScript

Featured Image

django-tinymce4-lite

 March 9, 2016    0 comments 

As I mentioned in my previous post, I did a major rework of django-tinymce4 package. At first, I intended to fix a few features and then submit a pull request to the original package, but I couldn't stop myself and re-wrote almost everything.smile (...)

Read post

 DjangoPythonTinyMCE