My blog : Brain dump

50 tips to maintain a Django reusable app

Published Jan. 2, 2018 in Deployment, Development, Tests and quality, Documentation, Web - Last update on Jan. 2, 2018.

I love Django, not just because it on top of Python, but more because it keeps its philosophy: All Zen of Python is respected with batteries included. The Ponies' framework has basically most tools and mechanisms a WebDev would want to have as such authentication, ORM multi-DB or template engine. But where Django becomes definitively ...

Continue reading

Idea of the day: dj-cache-url

Published Sept. 1, 2016 in Development - Last update on Sept. 1, 2016.

I was working in a Django project, more precisely its settings, I stopped in front of CACHES parameter, I love when code use an agnostic way and in Django settings I love to use dj-database-url to configure DATABASES, so I made the same for CACHES: At this time dj-cache-url was born.

dj-database-url ?

I won't ...

Continue reading

Dynamic documentation of Django commands

Published Aug. 7, 2016 in Development, Documentation, Web - Last update on Aug. 7, 2016.

I'm updating Django-DBBackup's documentation and don't want to copy/paste piece of code in docs, especialy commands' usages text. Fortunately optparse and argparse have the helpful parser.print_usage() method. Unfortunately there's no Sphinx plugin to simply get these outputs and include in docs. It's time to get on the job.

Continue reading

Compatibility optparse argparse Django

Published Aug. 5, 2016 in Development, Tests and quality - Last update on Aug. 5, 2016.

Django 1.10 is here ! Above its new features there are some deleted code and I came up against optparse removing. To be honest, this module is deprecated since Python 2.7 (still here in 3.6), deprecated in Django since 1.7 and removed in 1.10.

Don't blame me too fast, I ...

Continue reading

subprocess.Popen aped

Published July 30, 2016 in Development, Tests and quality - Last update on July 30, 2016.

Lately, I worked on Django DBBackup, I was remaking the database command system: classes allowing launching of backup or restore commands through subprocess.Popen. There was no unit tests and major part of them are based on command line but contrary to what I though mock out Popen took me a some time.

Continue reading

Photo section is officialy here

Published July 24, 2016 in Development, Photography, Web - Last update on July 24, 2016.

It's been several months now I release Flickr-Pony and implement a photo gallery on my website. I choosed Unite Gallery for displaying my photos, a nice JS library for create a wall of pics (or slider, or other). I firstly implement it fastly and all works perfectly, but, as usual, some improvements could be ...

Continue reading

According robots my website rocks

Published May 11, 2016 in Development, Web - Last update on May 11, 2016.

In the past week, I received a lot of positive comments on my blog, more than 1000 in 5 days. Naturally they explain what I see in mirror every morning, for example:

Have you ever thought about creating an e-book or guest authoring on other websites?
I have a blog centered on the same ideas ...

Continue reading

Favicon with Django on iPhone, Android, Desktop, Windows and all the family

Published April 28, 2016 in Development, Web - Last update on April 28, 2016.

Every web developer has already play with favicon.ico, the simple tag for add an icon on browser tabs or starred page. For noobies it's:

<link rel="icon" href="/favicon.ico">

But nowadays with all the existing client platforms just this tag isn't sufficient. There are Apple devices, Android, Windows (huch) for ...

Continue reading

Django do analytics

Published April 17, 2016 in Development, Web - Last update on April 17, 2016.

There are now few months I want to install A Piwik and see who's coming in my website. My blog isn't a wordpress one and I always have the same problem: I do not want to install PHP on my webserver. I had Piwik in head because I want to self-host my analytic ...

Continue reading

Flickr as Django Storage

Published April 1, 2016 in Cloud, Development, Web - Last update on April 8, 2016.

As explained in previous article, I decided to store my photos on Flickr. It isn't written on the paper but's it's a quite cheap cloud solution. And like all object storage, it has a public HTTP API for automate actions. Open source communities purpose a lot of client implementation in many languages ...

Continue reading

Yearly archives