Ultimate guide to using Django and Angular for your API


It actually makes no sense to call it the ‘djangular’ stack since both Django (API Backend) and Angular (Client) are two different components and are entirely independent from each other. This post describes the different areas and concepts we need to know when using the stack. There’s a lot of how’s or what’s going on, and this post aims to thoroughly describe the components we are going to need when implementing a Django API backend and a single page application built with AngularJS.

Note: This post assumes that you are familiar with both stack and is looking forward to seeing how the two frameworks could fit into each other’s arms. I also do this as a sort of documentation just to get everything in my head written down. And to also throw in a few helpful tips i’ve learned. This is also a work still in-progress. 

Here’s the github link to a sample implementation or skeleton: Github

Continue reading “Ultimate guide to using Django and Angular for your API”

Blog Discovery – Adventure

So, i discovered two awesome blogs today as I was on the verge of coding a solution for my problem (You see, I code for a living).

I was going through Hapinas by Ms. Paula and I stumbled through her Life List and I thought to myself, this is a pretty awesome list. Then when I knew that the story behind the said Life List was actually derived from John Goddar, I was even more impressed. His Life List is a collection I wouldn’t even dare to write (Milk a poisonous snake – wth).

Most people dream of travelling but a year ago, the thought of riding a bus already nauseated me. Travelling is a pretty exhausing thought for me. Turned out I got used to the life I never wanted to live in the first place. But how utterly satisfying and soul soothing it is to travel. To go out, and breathe in a new environment where you know no one. I’ll be building my Life List (Although i’ve already been making lists for a long time now). And it would be kick-ass.

Relative Weirdness

We are often tagged as weird whenever we are misunderstood. Sometimes, people don’t understand and when people don’t understand, it’s often frustrating. People do things, and walk paths that most people couldn’t grasp.

Let me give you a clear example. When a person studies too much, and becomes too worried about passing a test, you, as his classmate would probably find him in a corner studying closely his notes while you and the rest of the class are carefree. You are on two different ends of the spectrum, and you find him weird – the weird guy who studies a lot. But when you dig deeper into his reasons, you’ll see that he is struggling with the subject. And that instead of brushing it off his shoulders and leave his test scores to the hands of the almighty, he studies – eagerly, and passionately.

2 sides of the same coin

We are all fighing a war. When you see through the perspective of one side, you’ll see that the beliefs are conflicting with the other side. But does that necessarily mean the other side is wrong? Take for example the internal war with the Philippine’s rebels. As a citizen you will clearly see that they are killing thousands of innocent people and that they are vile for disturbing the peace. But how many do you think of their kin were killed decades or years ago? How else would their mentality be formed out of the blue if they weren’t able to experience a series of events that molded their perspectives – leading to today. You can never say that neither side is wrong. You can never decide which ones are the heroes or villians in the story.

Exploring Cebu: The Queen City of the South

I’ve already been through some local places in Philippines. Some of which are: Camiguin, Ozamiz, Pagadian, Dipolog, and I did my internship in Makati City. But i never really got to document what I did. I never took a lot of pictures because i’d rather see the view with my own eyes.

I guess that will have to change now.

This will be the first to many memories i’d like to read over and over again.

Who needs this article?

Through my words (and photos), i’ll take you to one of the most popular places in Philippines – Cebu City. If you are on a budget, i’ll give you some helpful tips along the way. And i’d really would just like to share where i’ve been and what i did during my stay here in ubec.

Why Cebu?

I’m currently in Cebu for the most geekiest reason – i figured that the tech community is awesome out here. It’s just been a month, but i’ve only been to the mall, and a beach resort in Lapu Lapu City. I have 8 days left before i’m gonna have to leave for Davao City (I got an awesome opportunity out there). So i’m going to build an 8-day plan.

The 8-Day Plan

I’m not really from Cebu, and i don’t intend to buy a tour – it would be costly, and i wouldn’t want to be constrained. So i’ve done my research on the things to do in Cebu. We should explore as much as we can, right?

The goal would be to accomplish as much as we can in Cebu in a matter of 8 days, while juggling development work. Weekends would definitely be the craziest.

The Trails

As soon as i accomplish a milestone in the plan, i will be posting it here as soon as i can. So better watch out. 😉

I dropped out to defy the norms

While my best friends took biology or chemistry electives during high school, i proceeded with database or visual basic electives instead. During elementary years, i consistently topped our typing tutor tests in our Computer class with an average words per minute of at least 50wpa and 98-100% accuracy. I was definitely hooked to technology, to code, to computers. When i reached college, I was faced with two choices – an Electronics or Computer Science course. I never really got to decide. When I arrived in the university for enrolment period, I was led to the Computer Science / School of Computer Studies Building instead of the Engineering Building. Fate (whatever you call it) probably led my hand and pushed my feet.

The irony is that although I never really learned a lot in college, I actually learned a lot in college. I freelanced and took a lot of jobs for the past 4 years – sometimes giving me at least only 2-3 hours of sleep. But i was able to explore a lot of things. I started out randomly accepting any job related to graphics, or development – i once found one where they asked me to design a packaging for their honey bee wax product. It was very frustrating because, although i knew well how to use photoshop, i’m not very fond of graphics designing. I never got paid for the work i rendered, so i kind of stayed away from graphics job.

I found my first official web developer job during my first year in college – and i guess it was the start. It was a NodeJS project, and the learning curve was very steep. I actually had to go through a lot of courses in Codeschool. But nevertheless, the project finished and i had to move on. Then my path as a Python dev was found when i was hired as a Python developer.

Anyway, i was burnt out. Together with the freelancing gigs, i was also part of our university’s student councils even though I never really wanted the positions. I have a theory, and no matter where i go, it always hold true (believe me or not) – that i tend to receive leadership roles even if i don’t really want them in the first place. As a proof, my classmates in elementary years elect me as a group leader in activities for reasons i don’t know (i was kind of an achiever). During high school, in the classroom, i tend to take responsibility for whatever is needed and sometimes, it makes me overworked because sometimes, i don’t get any help. Now, onwards to college. You can already guess.

It’s very flattering that’s why i do my best whenever i receive such responsibilities.

Anyway, i was burnt out. Let me get to my point. So i stopped for the semester. And might probably resume school somewhere in the future. The dream of most parents is to see their child graduate. And it’s kind of hard to see my parents being deprived of such dream (But i still got a brother). But i need to follow what i want. I don’t intend to work as an employee throughout my life. I will and always will be a businessman. I don’t need the government’s benefits as i’m currently taking care of my finances. And sometimes, i think of not raising a family at all, if it will hinder to the achievement of the dream. I will be wealthy, so that i could build the dream. I dropped out to defy the norms – because usually, when someone graduates, your path is already written down by the very people who wants you to graduate. You find a job, get a promotion, raise a family, die (in debt or no debt). It’s nowhere near exciting.

I will be a billionaire

Most people, when you ask them why they want to or need to be rich, you’d be amazed at the variety of answers you’ll get. I’m pretty sure you have your own reasons, too, and we all live different lives, so it’s pretty much useless to state other people’s reasons, in a condescending tone that seems to convey that the reasons aren’t important – so, no, i won’t be doing that.

I will be a billionaire (and take note the word ‘will’ – as if it’s already the path that’s set for me – because it is!) and the reasons go deeper than the marianas trench.

You see, when you have a dream, you need money to achieve that dream. For example, if you dream to travel the world – no matter how many travel bloggers claim that they travelled for free, or on a specific budget, you will need money. Another one – if you dream to own a big house or a sports car – guess what, you need money!

My dream – is to build a company that would efficiently and conveniently transport Filipinos – a modern transportation company! I dream to build (of course with the help of the brightest minds in the country) a replacement for the loud jeepneys (which they claim to represent our history and culture, but no, it only represent the poverty that our country thrives in).

The transportation cube shall be solar powered, thereby reducing costs and shall embody modern and elegant transportation style at a cost similar or even lower to that of those clanky metals. Refreshments, wi-fi connection and even television shall be made available.

Not only do i envision seeing it in the streets of cities, but i also see it as the most plausible way to travel by land from any point in the country.

You see, the most uncomfortable means of transportation that my brother and I always always dreaded ever since we were tiny nuggets are buses! We were always nauseated and taking the pill that claims to prevent you from being drowsy is disgusting. I had enough when one day, my best friends and I travelled to Ozamis (supposedly 2 hours away from our hometown in Iligan) for a thanksgiving party.

So here’s the story – we waited in the bus terminal, like most people obviously do. And the older sisters who accompanied us warned us that it would be bloody. And how awfully bloody it was! When the bus (which seems to be on the verge of breaking down) came, all people rushed towards it, struggling to get in and find a space – but no, the bus was already full, and when another one came – my friends and I just had no other choice but to sprint and get in no matter what happens. My jaw was wide open when i saw the situation, by the way. And my best friend was definitely amused. The trip lasted twice as long as it’s supposed to be because the roads were being fixed.

In fact, there will be a lot of designs for the cube – a small one where it’s meant for only two or so people – the same way pedicabs or tricycles service people whose homes are far from the highways. Or big ones – meant for the streets.

You know who will benefit the most? Drivers. When i look at drivers especially when i ride the jeep, i feel pity. Because they’ve been doing the same job for years, and they receive no benefits! If they, just for one day, decide to take a sick leave, they’d be missing the earnings for the day. I am very impressed at how they’ve been putting up with the heat, the nasty passengers, the dangers and threats. Some, doesn’t even own yet the vehicles they’ve been riding for years.

With technology, proper scheduling of rides will be designed such that rides will be distributed according to the need in the area. Traffic would be greatly reduced – as traffic really results whenever vehicles stop whenever and wherever they want to just to get some passengers. They won’t need to fit in as much as passengers they can. In fact, they should strictly follow schedule, and leave as mandated by the algorithms. Government says that traffic will be resolved in yet another 10+ years. Maybe never. But the goal is to start today, by gathering as much resources and networks as I possibly could, and start building in 5 years. It’s going to be 5 years or never.

I figured the total amount i’m going to need would be at least a billion. And I wouldn’t mind throwing out the money I will earn for the dream. How else would I live my life? I dropped out to defy the norms. So there is definitely no going back, only forward.

The Ideas Channel

I am writing a blog post that should have been somewhere else (like twitter) – but no, I love the exclusiveness of writing in my own territory, with no worries of finding out what other people thinks.

Today, marks the start of a new category of posts that I shall call – The Ideas Channel. Sounds very cheesy (I know), but I think, that it’s only rightful for my notes to be given their rightful and organized place.

You see, I started out writing in notebooks. And year after year, I always bought a new one and wrote down the goals that I had for the year. Sometimes, when I stumble upon my old notebooks, I sense a feeling of awe. Because it reminds me that i’ve been doing my thing for a long time now (8+ years). This year, I decided to purchase a premium in todoist and evernote – and keep my short-term and long-term goals out there.

So, how do goals even relate to ideas? Well, my ideas and goals go hand-in-hand in my notes (I would love to let you glimpse on my old ones – soon!). For instance, the goal is to build a Software Company. Then, I write down ideas on products that I will be building, or services that i will be offering. Another one – The goal is to be a Billionaire – Then, I will be creating multiple streams of income, and that I will be reading  a lot of books from successful entrepreneurs, and those books reside in another list. (These are my current goals, by the way)

So, it pretty much explains what this channel is. Does it?