Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django and iOS - Filip Němeček
Personal siteBlog MastodonDjango FeedsDjango BlogsImpressKitSwitch Buddy Gaming Buddy Support the ShowLearnDjango.comButtonDjango News newsletter -
Django Fixtures Tutorial: How to use dumpdata and loaddata
A [fixture](https://docs.djangoproject.com/en/4.2/topics/db/fixtures/) is a collection of data that can be dumped or loaded into a Django database. It is serialized into a text-based format such as JSON or XML and … -
Weeknotes (2023 week 40)
Weeknotes (2023 week 40)More work on hosting several websites from a single Django application server using feincms3-sites I have mentioned feincms3-sites last week in my last weeknotes entry; I have again given this package a lot of attention in the last days, so another update is in order. It is now possible to override the list of languages available on each site. That’s especially useful for an upcoming campaign site where the umbrella group’s site is available in three languages, but (most?) individual group sites (hosted on subdomains) will only have a subset of languages. Since I live in a country with four national languages (english isn’t one of them, but is spoken by many!) supporting more than one language, or even many languages is totally commonplace. It’s great that Django has good support for internationalization. For the sake of an example, I have the following sites: example.com: The default. The host has to match exactly. subdomain.example.com: One individual group’s site. The host has to match the regex ^subdomain\. (sorry, I actually do like regexes). Overriding configured hosts for local development One thing which always annoyed me when using django.contrib.sites was that “just” pulling the database from production to the … -
Django Best Practices: Docker
[Docker](https://www.docker.com/) is a very popular tool for managing Django projects. Many professional developers use it but I find it is still confusing to many newcomers. In this post I'll attempt … -
Django Best Practices: Imports
Imports are an inevitable part of Python and Django development. [Pep8](https://pep8.org/#imports), which is the official style guide for Python, recommends imports be placed at the top of the file, on … -
Django Best Practices: Models
Properly defining database models is arguably __the__ most important part of a new project, however Django provides us with tremendous flexibility around *how* we structure our models. There _is_ an … -
Django Best Practices: Security
Django is a mature, battle-tested web framework with a well deserved reputation for security over the past 15+ years.However the internet remains a dangerous place and web security is an … -
Django Best Practices: User permissions
Setting user permissions is a common part of most Django projects and can become quite complex quickly. We'll use the Blog example from my [Django for Beginners](http://djangoforbeginners.com) book as an … -
Database Design Tutorial for Beginners
Databases are at the heart of every web application. Their design, or schema, is literally the blueprint for how all information is stored, updated, and accessed. However learning about databases … -
Django Search Tutorial
__Note__: I gave a version of this tutorial at DjangoCon US 2019. You can see the video here: <iframe width="738" height="417" src="https://www.youtube.com/embed/is3R8d420D4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" … -
Django Rest Framework Tutorial: Todo API
[Django Rest Framework](http://www.django-rest-framework.org/) is a powerful library that sits on top of existing Django projects to add robust web APIs. If you have an existing Django project with only models … -
Is Django a Full Stack Framework?
The title of this post, "Is Django a Full Stack Framework?" is a question I receive often from new web developers. It's a very valid question so I wanted to … -
Django Markdown Tutorial
[Markdown](https://daringfireball.net/projects/markdown/) is a popular text-to-HTML conversion tool for web writers. It is far easier to use than plain old HTML. Many/most static site generators provide a built-in way to write … -
Trailing URL Slashes in Django
Among Django's many built-in features is [APPEND_SLASH](https://docs.djangoproject.com/en/4.0/ref/settings/#append-slash), which by default is set to `True` and automatically appends a slash `/` to URLs that would otherwise [404](https://en.wikipedia.org/wiki/HTTP_404). **Note**: The Chrome web … -
What is Django (Python)?
[Django](https://djangoproject.com) is an open-source web framework written in the [Python](https://www.python.org) programming language. Named after the jazz guitarist [Django Reinhardt](https://en.wikipedia.org/wiki/Django_Reinhardt), it is used by some of the largest websites in the … -
How to Get Hired as a Django Developer
Hiring developers is a famously non-linear problem. Once you have a job at a notable company, it seems recruiters constantly beat down your door. But how do you get started? … -
NameError: name 'os' is not defined
If you've started a new Django 3.1+ project and are using older tutorials or guides, it's likely to come across the following error on your command line: ``` NameError: name … -
Django Polls Tutorial API
The [polls tutorial](https://docs.djangoproject.com/en/dev/intro/tutorial01/) is the official guide to Django. As a fun exercise, I wanted to show how little code it takes to transform it into a robust API using … -
Django Testing Tutorial
Testing is an important but often neglected part of any Django project. In this tutorial we'll review testing best practices and example code that can be applied to any Django … -
What's New in Django 3.1
Django 3.1 will be released in early August 2020 and comes a number of major new features and many minor improvements including asynchronous views and middleware support, asynchronous tests, JSONField … -
The 10 Most-Used Django Packages
Inspired by a past article on [The 22 Most-Used Python Packages in the World](https://medium.com/better-programming/the-22-most-used-python-packages-in-the-world-7020a904b2e), I teamed up with [Jeff Triplett](https://jefftriplett.com/about/) to investigate the top 10 Django packages based on [PyPI](https://pypi.org/) … -
Django Best Practices: Function-Based Views vs Class-Based Views
Django's use of both function-based views (FBVs) and class-based views (CBVs) causes a lot of confusion for newcomers. Why have multiple ways to do the same thing? And which one … -
Django Best Practices: Referencing the User Model
Django has a powerful, built-in [user authentication system](https://docs.djangoproject.com/en/4.0/topics/auth/default/) that makes it quick and easy to add [login, logout, and signup functionality](https://learndjango.com/tutorials/django-login-and-logout-tutorial) to a website. But how should a Django developer … -
Command Line for Beginners
The _command line_ is a powerful text-only interface for computers. If you have ever seen a show where hackers are furiously typing into a black window, that's the command line. … -
Django Email/Contact Form Tutorial
Let's build a simple contact form that sends email for a Django 4.1 website. We can take advantage of Django's built-in [email support](https://docs.djangoproject.com/en/dev/topics/email/) to make this relatively painless and then …