In this article, we'll look at how to prevent a Celery task dependent on a Django database transaction from executing before the database commits the transaction. This is a fairly common issue.
For more than a decade after Django was first released in 2005, pages were mostly static, AJAX was used only in limited use cases, and things were relatively uncomplicated. Over the past five years, real-time web applications have evolved, trending toward more client-server and peer-to-peer interaction. This type of communication is achievable with WebSockets, a new protocol that provides full-duplex communication and maintains a persistent, open connection between client and server.
Building a REST API in Django is so super easy. In this tutorial, we’ll walk through the steps to get your first API up and running.
If, like me, you've done any research to answer this question, you've found that you can build a chat app. There are 100 if not more guides out there to help you build your next Slack. There aren't many tutorials, blogs, documentation, or other resources to help you do much more with Django Channels.
Once you get through the pain of setting up a Python environment for a single "hello world"-esque application, you'll need to go through an even more difficult process of figuring out how to manage multiple environments for multiple Python projects. Some of the projects could be new while others are stale piles of code from ten years ago. Fortunately, there a number of tools available to help make dependency and workspace management easier.
In this tutorial you will learn the concepts behind Django file upload and how to handle file upload using model forms. In the end of this post you will find the source code of the examples I used so you can try and explore.
Most online forms fit on a single page. Think of a "join our forum" or "contact us" form into which the user enters a name, email address, and maybe a few other pieces of information. If you're building this kind of functionality into a Django site, you will probably want to take advantage of Django's built-in form classes. These are especially handy when dealing with model forms, where the form fields correspond to the fields on a model that will be saved in your database.
In this tutorial we are going to explore some of the Django Crispy Forms features to handle advanced/custom forms rendering.
Let's say you have so many pages (thousands) that you can't just create one /sitemap.xml file that lists all the URLs (aka <loc>). So you need to create /sitemaps.xml which points to other sitemap files. And if there are thousands of addresses in each, then you need to compress these files.
In this tutorial you will learn how to use the Amazon S3 service to handle static assets and the user uploaded files, that is, the media assets.
In this tutorial, you'll learn how to easily add a complete authentication system to your django 3 application with login, logout and password change and reset functionalities.
In this tutorial we are going to explore three date/datetime pickers options that you can easily use in a Django project. We are going to explore how to do it manually first, then how to set up a custom widget and finally how to use a third-party Django app with support to datetime pickers.
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.
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).
There's an anti-pattern in the development world, and it's for using executable code as a means to store configuration values.
Django comes with a variety of command line utilities that can be either invoked using django-admin.py or the convenient manage.py script. A nice thing about it is that you can also add your own commands.
This is a quick tutorial to get you start with django-crispy-forms and never look back. Crispy-forms is a great application that gives you control over how you render Django forms, without breaking the default behavior.
In this article I will guide you through the steps I had to take to migrate Django projects from MySQL to PostgreSQL.
Django Rest Framework (DRF) is a library which works with standard Django models to build a flexible and powerful API for your project.
We will make it easy for our users to manage their account.