What's new in Django community blogs?

Grouping in Django templates

April 28, 2019 » The Big Log » [Archived Version]

I've recently deployed a tiny changelog app in one of my Django projects. The models.py file looks like this: # changelog/models.py (truncated) class ChangeLog(models.Model): IMPROVEMENT = ('improvement', 'improvement') FEATURE = ('feature', 'feature') BUG = ('bugfix', 'bug fix') CHOICES = (IMPROVEMENT, FEATURE, BUG,) title = models.CharField(max_length=560) description = models.TextField(null=True, blank=True) category = models.CharField(choices=CHOICES, max_leng…

Read More

Django Custom Month and Year Lookup

April 27, 2019 » Clivern » [Archived Version]

Everyone want to keep Django timezone support but sometimes you need to keep your SQL queries a way from timezone conversion especially if by default your application timezone is UTC. Django will do something like this CONVERT_TZ(`app_incident`.`datetime`, 'UTC', 'UTC')) and it will return Null if the timezone table is empty. Even that conversion is not […] The post Django Custom Month and Year Lookup first appeared on Clivern.

Read More

Wagtail CMS - Tom Dyson

April 24, 2019 » Django Chat » [Archived Version]

An interview with Tom Dyson on Wagtail, the leading Django-based CMS used by tens of thousands of organizations including Google, NASA, and the British NHS.

Read More

Django Custom Lookups

April 23, 2019 » Clivern » [Archived Version]

By default Django has a date lookup that support timezones. It actually will wrap your field with CONVERT_TZ in case USE_TZ is True. This is pretty awesome unless you have timezones table empty because this call will return Null. But even the following will work, It is not safe with Daylight saving timing. You can […] The post Django Custom Lookups first appeared on Clivern.

Read More

Completing Account Deactivation on Building SaaS with Python and Django

April 18, 2019 » Django on Matt Layman » [Archived Version]

In the latest episode of Building SaaS with Python and Django, we completed the account deactivation workflow of the Django app. This included: Canceling the subscription with Stripe. Marking the user as inactive. Sending the user to a friendly page to indicate that their account is deactivated. The recording is available on YouTube and the full transcript is below.

Read More

Contributing to Django

April 17, 2019 » Django Chat » [Archived Version]

How to get started contributing to Django and why it's so helpful to the community and your own career.

Read More

DjangoCon Europe 2019

April 11, 2019 » Paolo Melchiorre » [Archived Version]

DjangoCon Europe is an international conference for the community by the community about the Django web framework, held each year in Europe.

Read More

Django Fellow - Tim Graham

April 10, 2019 » Django Chat » [Archived Version]

An interview with Tim Graham, the inaugural Django Fellow, who has played the largest single role in Django's advancement over the past 4+ years.

Read More

Django: Keeping logic out of templates (and views)

April 8, 2019 » The Big Log » [Archived Version]

When I first started dabbling with Django and web-development, a good friend with a little more experience advised that I should keep logic away from my templates. "Templates should be dumb". I didn't really understand what that meant until I started suffering the consequences of having logic in my .html files. After 3 years with Django, I now try to keep business-logic away not only from templates, but also from views. In this post I'll gradually go over from the least to the most recommended …

Read More

Django Versions

April 3, 2019 » Django Chat » [Archived Version]

A discussion of Django versions including the recent 2.2 release, LTS's, and what's in store for Django 3.0 and onwards.

Read More