Skip to content

Commit e2986da

Browse files
committed
Added support for Django 6
1 parent e211ba4 commit e2986da

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 0.4.2 (unreleased)
22

3+
- Added support for Django 6
34
- Added support for `str` objects for `bit` type with SQLAlchemy
45

56
## 0.4.1 (2025-04-26)

pgvector/django/extensions.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
from django import VERSION
12
from django.contrib.postgres.operations import CreateExtension
23

34

45
class VectorExtension(CreateExtension):
5-
def __init__(self):
6-
self.name = 'vector'
6+
if VERSION[0] >= 6:
7+
def __init__(self, hints=None):
8+
super().__init__('vector', hints=hints)
9+
else:
10+
def __init__(self):
11+
self.name = 'vector'

0 commit comments

Comments
 (0)