File: base.py

package info (click to toggle)
python-django-postgres-extra 2.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,096 kB
  • sloc: python: 9,057; makefile: 17; sh: 7; sql: 1
file content (16 lines) | stat: -rw-r--r-- 381 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from typing import Any

from django.db import models
from django.db.models import Manager

from psqlextra.manager import PostgresManager


class PostgresModel(models.Model):
    """Base class for for taking advantage of PostgreSQL specific features."""

    class Meta:
        abstract = True
        base_manager_name = "objects"

    objects: "Manager[Any]" = PostgresManager()