Skip to main content

Posts

Deploy Django app online for free!

So after a number of lines of code, brilliance and dreaming. Your next dream is for the world to see. Of course you can walk around with your computer and doing a 'manage.py runserver' But cumon guys, lets embrace the cloud. Not like this guy though! I choose to deploy on  PythonAnywhere . So you ask why? 1) Free amazing support - You actually talk to a live human ! 2) Easy - Very easy 3) Affordable - As you scale up, it gets way better! So by now I assume you are already on a version control system (So I will not waste much energy on that one). Maybe Ill someday write on my two favs  Github  and  Bitbucket . STEP 1: Create an account on pythonanywhere. Kindly note that your username will be included in your apps url. So it will be like : " yourUsername .pythonanywhere.com" STEP 2: Select other and set a bash console. STEP 3: Push your code from version control This will push from (in my example) github to your pythonanywhere. You...

Django & Firebase - A marriage of awesomeness

Requirements 1) Django (obviously) 2) Pyrebase (pip install pyrebase, you know the drill) So to give a better appreciation- I will first show you the HTML way then I'll proceed to show you how its done in Python. METHOD 1 : The HTML way Then you need to go to the firebase console. To setup a new project. After that you will see a web setup and you select that. Once selected you will see the config. It should be similar to this : Now that you have configured firebase, we now need to select the components which will be needed. depending on what you want for your app- you can now select the modules that you need. For us today, we will do the login authentication. Make sure you include firebase app first, so this is my screen: METHOD 2: Enter Python Open your dev environment and create a file named  pyrebase_settings within your django app folder. In it, you will have the following: Now, lets go to views.py!

Django Hosting - Bluehost

Python Version: 3.6.1 Django Version : 1.10.2 So recently I migrated to the Bluehost VPS. Why Bluehost you may ask ? The price and they are django friendly.  They don't provide up to date versions of Python though so you have to install it yourself in your home directory.  Apart from that they are about as "Django Friendly" as any other shared host. One thing I can say is you really get good value for money with them and a huge amount of storage. Excellent decision but what made it a little hectic was now configuring so I decided to write this post  to help out on setting up django. One friendly reminder- make sure you have your versions on lockdown. I am compiling the current latest version 1. SSH Although the whole world seems to support PUTTY. I feel Teraterm does the job for me (Maybe its me but PUTTY doesn't support SSH2?) Anyways, if you are to use windows. Linux and Mac are straight forward.  So without further ado, login into your VPS server. 2....

Trump wins ! So what next? (For Africa)

Expect a few deportations This was a great divider between Hillary and Trump. When the guy started his bid for the white house- his ‘signature policy’ was against immigrants who have entered illegally. So if there some of us who are in the states under dodgy circumstances- we gotta get our act up together. The sooner, the better, like seriously guys- it was featured prominently on his campaign website. Critics, of course blasted him for this.  Trump conceded and was now advocating temporarily banning immigration “from regions that export terrorism and where safe vetting cannot presently be ensured.” That being said.. he did say he planned to set up a ‘deportation force’. So he might have softened, but he hasn’t ruled out mass deportation. Any country that refuses to accept its aliens – would risk losing the US Visa altogether. Expect tougher immigration laws. Libya might get some peace.. Or not The Republican billionaire has said he would recruit NATO to invade strong...

Why I think the fiat money system is useless – PART 2 (Aurum potestas est)

Hey guys. So as promised – I will give a brief breakdown of the gold standard. The gold standard was based on valuing money based on the quantity of gold. The standard was largely dropped in 1976- spearheaded by US President Nixon favouring neo-classical economics.  It is worthy of note though, that most countries still hold large gold reserves. Here’s a somewhat random quote that will hold much more meaning as we delve more and more into the fall of the gold standard. “All paper money returns to its intrinsic value.” – Voltaire. When gold was found at Sutter's Ranch in 1848, it inspired the Gold Rush to California and the unification of western America. In 1861,  U.S. Treasury Secretary  Salmon Chase printed the first U.S. paper currency. In fact, by the mid-1800s, most countries wanted to standardize transactions in the booming world trade market. They adopted the gold standard . It guaranteed that the government would redeem any amount of pape...

Why I think the fiat money system is useless – PART 1 (How it all began)

The fiat money system came as a solution to the so called ‘problems’ of the gold standard.  We, at the time, thought we are now too cool for neo classical economics and started to vouch for classical economics (smh as if it raised us). But wait whoa! What am I talking about? I’m talking about money. Let me start off with a brief history of money. So we get on the same page. Let’s get into our imaginary time travel pod and let’s take a sneak peak of the past. By definition, money is a generally accepted medium of exchange. We started this medium of exchange by bartering. Bartering is a direct trade of goods and services - I'll give you a stone axe if you help me kill a mammoth - but such arrangements take time. You have to find someone who thinks an axe is a fair trade for having to face the 12-foot tusks on a beast that doesn't take kindly to being hunted. If that didn't work, you would have to alter the deal until someone agreed to the terms. O...

Making money with the falling rand: Lessons from Zimbabwe

It is no secret that the rand is falling like there is no tomorrow. This year alone it has fallen by over 18%. And if you look closely, at the last 3 years- it has fallen by 35%! This is not neglecting the economic setup where the slightest thing leads to ‘ toi toi. ' This trend of continuous striking and pay rate increase bargains has created such a vicious cycle. Prices rise, people strike, economy starts going through stuff. And we back at square one. We all know for sure that this cycle is bad. Zimbabwe and South Africa might not be different soon, only difference being that Zimbabwe chased the farmers, South Africa is chasing stabilisation. (Maybe the paradox of thrift  (prompted by the large population) will save them! Hope so.) In Zimbabwe 2008, a lot of people made a lot of money from ‘burning money’. This was whereby people took advantage of the bank rate versus the ‘streets’ rate of forex. The streets rate for forex was lower than the bank rate. Problem wa...