我从 DjangoCon EU 2025 上的收获

tl;dr: 都柏林和 Django 社区都很棒。

Zach Bellay 发表于 2025 年 4 月 26 日

12 分钟,2212 字

以下是我在爱尔兰都柏林举行的 DjangoCon EU 2025 上学到的一些最有趣的东西,部分由 AI 辅助编写:演讲链接

我整理的最佳演讲列表在文章底部。

DjangoCon EU 2025 会议参与者的合影,我被圈了出来 我在 DjangoCon EU 2025!

数据库

# 部分索引示例
class Restaurant(models.Model):
  restaurant_chain = models.ForeignKey(..., db_index=False)
class Meta:
    indexes = [
      models.Index(
fields=["restaurant_chain"],
condition=~models.Q(restaurant_chain=None),
      ),
    ]

工具 & 库

最佳实践

Django & 社区

建模 & 架构

boat = Entity.objects.with_attributes(object="MaritimeBoat").first()
print(boat.size) # 32 meters

演讲链接

模板 & 杂项

一些使用 Django 的公司

平台 & 值得关注的事物

氛围

(作为一名美国人在欧洲的见闻)

最佳演讲

我带着较低的期望去的,因为演讲题目看起来不太好,但许多演讲的质量让我感到震惊。 一些最好的演讲(一旦它们在 YouTube 上发布,我将重新观看):

源材料: 我学到的东西:

# source https://ckrybus.com/snippets/django-foreign-key-partial-index/
class RestaurantChain(models.Model):
  name = models.CharField(max_length=512)
class Restaurant(models.Model):
  name = models.CharField(max_length=512)
  restaurant_chain = models.ForeignKey(
    RestaurantChain, on_delete=models.CASCADE, null=True, blank=True, db_index=False
  )
class Meta:
    indexes = [
      models.Index(
fields=["restaurant_chain"],
condition=~models.Q(restaurant_chain=None),
      ),
    ]

boat = Entity.objects.with_attributes(object="MaritimeBoat").first()
print(boat.size) # 32 meters

*   https://pretalx.evolutio.pt/djangocon-europe-2025/talk/DGQ9JD/

库: 平台:

值得关注的事物: