Lädt...

🔧 Django notes #2 (ORM)


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Model Managers

QuerySets

Advanced QuerySet Methods (annotate(), aggregate(), only(), defer())

Efficient Querying (select_related(), prefetch_related(), values(), values_list())

Subqueries and Expressions (Subquery, Exists, Case, When, F(), Q())

Transactions and Atomic Operations (transaction.atomic(), select_for_update())

Raw SQL Execution (.raw(), connection.cursor())

Field Lookups and Filtering (__contains, __icontains, __gte, __lte, __in)

Model Signals (pre_save, post_save, pre_delete, post_delete)

Complex Joins and Aggregations (OuterRef, Prefetch, Count, Sum, Avg, Max, Min)

Custom Fields and Methods in Models

Efficient Bulk Operations (bulk_create(), bulk_update())

ORM Performance Optimization (Indexing, Caching, N+1 Problem)

Constraints and Validation (unique_together, CheckConstraint)

Soft Deletes and Custom QuerySets

Window Functions and Analytics (Window, RowNumber, Rank, DenseRank).

Recursive Queries (Using CTE with Django’s With clause).

JSONField and PostgreSQL-Specific Features (JSON queries, ArrayField).

Database Functions in ORM (Coalesce, Concat, Length, Trunc).

QuerySet Optimization Techniques (iterator(), chunked(), avoiding .count()).

Deferred Constraints (Deferring unique constraints or FKs).

Custom Database Routers (Multiple databases management).

Advanced Lookups (regex, unaccent, full-text search in PostgreSQL).

Partial Indexes and Unique Constraints (index_together, unique_together).

Materialized Views Integration (Using views as models).

Dynamic QuerySet Filtering (filter() chaining and dynamic filters).

Audit Trails and History Tracking (Tracking changes to models).

Project Level VSC Settings, Linting, and Formatting Configuration

Automatically Populate Fields Based on Other Fields

Django Automatic Model Generation

String Representation of Any Object

Creating Custom Field Subclass

Creating a Custom Order Field

Custom Fields: Converting Values to and From a Database

A Bad Attempt to Explain How to Choose the Right Table Relationship

Performing Raw SQL Queries Without the ORM (only briefly mentioned .raw())

Django Debug Toolbar for SQL Optimization

Inheritance Optimization Exercises

Django Multiple Database Setup

Django Import CSV into Model

Create Django Fixtures from Excel/CSV File

Saving Pandas DataFrame to Django Model

Django Search (Search functionality within QuerySets)

Model Level Constraint (Beyond unique_together and CheckConstraint)

Foreign Key Deletion Constraints (CASCADE, PROTECT, etc.)

Custom Migration Actions (Custom operations in migrations)

Django Cron Job for Database User Management

Get vs. Filter in QuerySets (Detailed comparison)

Model Field Validators and Writing Custom Validators

Django Query Optimization with django-debug-toolbar (deep dive)

ManyToManyFields and Through-Models (Detailed usage)

COALESCE Function and Handling NULL Values

Content Types Framework and GenericForeignKey (Deep dive)

GeneratedField in Django 5 (New feature)

Graph Models Command for ER Diagrams

inspectdb Command for Multiple Databases

Database Routers for Multiple Databases (Advanced usage)

...

🔧 Django notes #2 (ORM)


📈 34.09 Punkte
🔧 Programmierung

🔧 Django notes #2 (ORM)


📈 34.09 Punkte
🔧 Programmierung

🔧 ORM vs No ORM: Which to Choose?


📈 32.07 Punkte
🔧 Programmierung

🔧 Type-safe ORM for Atlassian Forge SQL: forge-sql-orm with Drizzle support


📈 32.07 Punkte
🔧 Programmierung

🔧 ORM vs No ORM: ¿Cuál Elegir?


📈 32.07 Punkte
🔧 Programmierung

🔧 Announcing my new Django package: django-admin-export! #packaging #python #django


📈 28.28 Punkte
🔧 Programmierung

🔧 Django ORM vs. Raw SQL: Which One Should You Use?


📈 25.46 Punkte
🔧 Programmierung

🔧 Common Django ORM Mistakes to fix


📈 25.46 Punkte
🔧 Programmierung

🔧 Django + Firebase ORM


📈 25.46 Punkte
🔧 Programmierung

🔧 Unlocking Django: Insights on ORM, Development, and Community Innovations


📈 25.46 Punkte
🔧 Programmierung

🔧 Introdução ao ORM do Django: Exercícios Práticos


📈 25.46 Punkte
🔧 Programmierung

🔧 SQL AND THE DJANGO ORM


📈 25.46 Punkte
🔧 Programmierung

🔧 Using Google Cloud Firestore with Django's ORM


📈 25.46 Punkte
🔧 Programmierung

🔧 Advanced Django ORM Features (Q-Objects, F-Expressions, Aggregations and Annotations)


📈 25.46 Punkte
🔧 Programmierung

🔧 Using Django ORM only without web server


📈 25.46 Punkte
🔧 Programmierung

🔧 Django ORM Kullanımı Üzerine Temel Bilgiler


📈 25.46 Punkte
🔧 Programmierung

🔧 django storage config for django version >= 4.2


📈 18.85 Punkte
🔧 Programmierung

🔧 Host a Django project documentation autogenerated with Sphinx on Read the Docs -- Django specifics


📈 18.85 Punkte
🔧 Programmierung

🕵️ Django bis 1.8.17/1.9.12/1.10.6 django.views.static.serve() erweiterte Rechte


📈 18.85 Punkte
🕵️ Sicherheitslücken

🕵️ CVE-2024-45230 | Django up to 4.2.15/5.0.8/5.1.0 django.utils.html.urlize denial of service


📈 18.85 Punkte
🕵️ Sicherheitslücken

🕵️ Django 1.4 up to 1.7 Redirect django.util.http.is_safe_url input validation


📈 18.85 Punkte
🕵️ Sicherheitslücken

🔧 How to Add Multilingual Support in Django with Django-parler


📈 18.85 Punkte
🔧 Programmierung

🔧 Django vs Django REST Framework: ¿Cuál es la diferencia? 🤔


📈 18.85 Punkte
🔧 Programmierung

🕵️ Django 1.8.1/1.8.2/1.8.6/1.9 django.utils.http.is_safe_url() Cross Site Scripting


📈 18.85 Punkte
🕵️ Sicherheitslücken

🔧 Master API Development with Django REST Framework – Learn Django REST Framework for Free!


📈 18.85 Punkte
🔧 Programmierung

🕵️ django-registration up to 3.1.1 on Django User Registration information exposure


📈 18.85 Punkte
🕵️ Sicherheitslücken

🔧 Django Structured JSON Field: Unleashing the Power of Validated JSON in Django


📈 18.85 Punkte
🔧 Programmierung

🔧 Using Django-Q to Schedule and Automate Tasks in Django


📈 18.85 Punkte
🔧 Programmierung

🕵️ Django 1.8.1/1.8.2/1.8.6/1.9 django.utils.http.is_safe_url() Cross Site Scripting


📈 18.85 Punkte
🕵️ Sicherheitslücken

🕵️ Low CVE-2021-21416: Django-registration project Django-registration


📈 18.85 Punkte
🕵️ Sicherheitslücken

🔧 Optimize your Django Application with Asynchronous tasks and Django-Q


📈 18.85 Punkte
🔧 Programmierung

🔧 Django AllAuth Chapter 5 - Extending Django AllAuth user model with custom fields


📈 18.85 Punkte
🔧 Programmierung

🕵️ Django up to 2.2.17/3.0.11/3.1.5 Archive django.utils.archive.extract path traversal


📈 18.85 Punkte
🕵️ Sicherheitslücken

matomo