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.
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!
Django 2.0 is in beta now. It's expected to be released in December 2017. The question remains, is the rest of the world going to be ready? Let's take a look at the history of Django versions and see why this might not be as tough of an upgrade as you might expect.
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.
In this article, we will see how to:
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:
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.
In this post, we will be setting up an automated local build environment with the following goals in mind:
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.
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.
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.
This was actually a couple weeks ago, but it is still fresh enough in my memory that I find it interesting and therefore worth sharing.
I had a Django Model that looked something like this:
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.