Suppose you want to access some JSON data from a mobile app using Cordova. You have to bypass CORS restrictions in the web view, and to do that you have to provide some HTTP headers in your Django views.
Recently I had some fun with Heroku, the well known PaaS provider. I had a small personal Django project I use for invoicing that I ran locally with ./manage.py runserver when needed. That was a perfect candidate for the Heroku free plan because I need to access the app only occasionally.
Sometimes you have to give your users a way to manage files on your server. A typical scenario is a web server where your users manage their websites by themselves.
The classical approach in this scenario was to use FTP to give file management capabilities to your users, but it has many drawbacks:
- You have to provision and maintain a new service on your server;
- FTP is an annoying protocol from a firewall configuration point of view;
- FTP is not encrypted by default, and you have to put some effort to configure an FTP server which is protected from sniffing.
If you are a lazy sysadmin like me you’ll prefer to use a service you already have, which is encrypted by default and do not require a special firewall configuration other than the port 22 you are already using.
ssh to the rescue!Read More »
During the development of a Django model on your local machine is it often necessary to refine the most recent migration to cope with updates to the model, without polluting the migrations of the app with a new migration for each local update.
So I put togheter a simple bash script to automate the process.
In few steps you’ll be able to automate the production of release signed apks of your app, ready to be published on the Google Play Store.
Recently I discovered a powerful tool from the awesome Google Developers Youtube channel: Google Apps Script.
I tried it writing a simple, but powerful example, experimenting with a use case that for sure will be useful to me in the future: geocoding a list of addresses taken from a spreadsheet.