Posts
Fatalement
Cancel

How to easily import data from CSV file in Django

I need to import a lot of data but I do not want to do that manually. How can I take a CSV file and import it in my Django table? I will show you how I use the django-import-export library to do t...

Git stash part 2

If you had by mistake pop a stash in a wrong branch and you now have conflicts, just do 1 2 3 git reset HEAD --hard git checkout my_correct_branch git stash pop

Json in command line

When I am debugging a part of a code which does not work, I print quite often some dictionary of a json object in my shell. Most of the time it happens in one line quite difficult to read, so I ope...

Poetry instead of Pipenv?

One month ago I wrote about Pipenv because I appreciate how it is easy to set up a virtual env and because I have to use at work. Today, I have discovered Poetry, and decide to play a bit with Fi...

NamedTuple

Thanks to an amazing tweet of Sam & Max, I have read an article about how to start with Python in 2019 which give me the opportunity to watch the video Beyond PEP8 from Raymond Hettinger. This...

Guard file

Guardfile to run : 1 2 3 4 pylint pep8 through flake8 mypy tests associated to the file you just saved. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33...

Automatic renewal of SSL certificates for several websites

During the last past years, I have developed several websites and still have to maintain them. I have done those sites in Django and, I host them in PythonAnywhere. I use OpenSSL certificates but, ...

Git Stash

When you have made some modifications and want to achieve another tasks, I could be possible to save your modification by using stash. git stash Give a name to your stash by using the keyword sav...