django

Angular API Calls with Django, Part 2: Building the Micro-Blog App

This is the second part of a two-part series exploring the use of the Angular 6 HttpClient to make API calls against a Django back-end using Django Rest Framework. In the first part, we learned how to authenticate against Django using the Django Rest Framework JWT package. This post demonstrates how to set up the Django models and views for the micro-blogging app, as well as the Angular Service and templates.

Angular API Calls with Django: Authentication with JWT

Curious about how to make API calls with Angular 6 and the HttpClient service? This tutorial will show you some techniques for building a decoupled micro-blogging application using Angular 6 and the Django Rest Framework (DRF). Along the way, we will learn the following:

  • How to set up the back end of the app using Django and the Django Rest Framework API
  • Creating a simple Angular 6 single-page app which can query the API
  • Authenticating users with JSON Web Tokens (JWT)

Ready? Let's get started!

Hosting Django sites with Apache

Django is a fantastic, powerful web development framework. It's great for development, but hosting it can be a bit of a puzzle. WSGI? Daemon mode? What's going on here?

This article will show you the basics of getting your Django sites running on an Ubuntu server running Apache 2.4.x, using WSGI.

Objectives

In this article, we will see how to:

URL Routing for a Decoupled App, with Angular 2 and Django

Lately, I have worked on a few projects where a single-page Angular app is contained within a site built on a server-side framework like Django. One of the challenges is to get their URLs to play nicely together.

Say you have a project with an Angular 2 front end and an API back end using the Django Rest Framework. Further, imagine that your Angular 2 page is also served from within the Django app. Your URL structure might look like this:

Instant reload with Django, NPM, and Browsersync

Here at Metal Toad, we are starting to use NPM as a task runner to automate our development processes. This tutorial shows how to automate CSS compilation and instantly reload the browser when files change.

Objectives

In this post, we will be setting up an automated local build environment with the following goals in mind:

Creating a Custom Glossary Filter in Django

The Scenario

You have a project that has lists of data and you need to have a way for users to filter the list by the first letter of the title/name/etc. This is commonly referred to as Glossary Filtering and can be a bit trickier than you'd think to do well.

The Example


This post uses code that was done in the Django 1.5 Python framework but the concepts used could easily be transferred to other languages/frameworks.

Metal Toad and Kapow Launch Ken Burns America

Ken Burns America launched this week on the PBS.org website. In partnering with Kapow, Metal Toad took on the task of modifying and patching the NotreDAM Digital Asset Manager to meet the content repository and asset management goals of the project. From there, we created a lightweight client API to expose NotreDAM's data to the project's Django-based websites, built "NotreDAM Light", an asset browser for Django, integrataed Solr for search, and assisted with SEO and Django app development tasks.

The Framework is dead. Long live the CMS.

If you don't know already, the framework is dead. That is to say, unless you have money to burn, frameworks like Zend, CakePHP, Django, Struts, .NET, and even Rails should not be considered as a foundation for building anything but the most unique and game changing websites*. The age of the framework for building websites is gone and it has been replaced by the open-source CMS or Content Management System.

Ready for transformation?