repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
ageitgey/face_recognition | https://github.com/ageitgey/face_recognition/blob/2e2dccea9dd0ce730c8d464d0f67c6eebb40c9d1/examples/facerec_from_video_file.py | examples/facerec_from_video_file.py | import face_recognition
import cv2
# This is a demo of running face recognition on a video file and saving the results to a new video file.
#
# PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam.
# OpenCV is *not* required to use the face_recognition library. It... | python | MIT | 2e2dccea9dd0ce730c8d464d0f67c6eebb40c9d1 | 2026-01-04T14:39:09.099486Z | false |
ageitgey/face_recognition | https://github.com/ageitgey/face_recognition/blob/2e2dccea9dd0ce730c8d464d0f67c6eebb40c9d1/examples/facerec_ipcamera_knn.py | examples/facerec_ipcamera_knn.py | """
This is an example of using the k-nearest-neighbors (KNN) algorithm for face recognition.
When should I use this example?
This example is useful when you wish to recognize a large set of known people,
and make a prediction for an unknown person in a feasible computation time.
Algorithm Description:
The knn classi... | python | MIT | 2e2dccea9dd0ce730c8d464d0f67c6eebb40c9d1 | 2026-01-04T14:39:09.099486Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/run.py | run.py | #!/usr/bin/env python3
"""
🚀 N8N Workflows Search Engine Launcher
Start the advanced search system with optimized performance.
"""
import sys
import os
import argparse
def print_banner():
"""Print application banner."""
print("🚀 n8n-workflows Advanced Search Engine")
print("=" * 50)
def check_require... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/test_workflows.py | test_workflows.py | #!/usr/bin/env python3
"""
Test Sample Workflows
Validate that our upgraded workflows are working properly
"""
import json
from pathlib import Path
def test_sample_workflows():
"""Test sample workflows to ensure they're working"""
print("🔍 Testing sample workflows...")
samples = []
categories = ["M... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/workflow_db.py | workflow_db.py | #!/usr/bin/env python3
"""
Fast N8N Workflow Database
SQLite-based workflow indexer and search engine for instant performance.
"""
import sqlite3
import json
import os
import datetime
import hashlib
from typing import Dict, List, Any, Optional, Tuple
from pathlib import Path
class WorkflowDatabase:
"""High-perfo... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/api_server.py | api_server.py | #!/usr/bin/env python3
"""
FastAPI Server for N8N Workflow Documentation
High-performance API with sub-100ms response times.
"""
from fastapi import FastAPI, HTTPException, Query, BackgroundTasks, Request
from fastapi.staticfiles import StaticFiles
from fastapi.responses import HTMLResponse, FileResponse, JSONResponse... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/scripts/update_github_pages.py | scripts/update_github_pages.py | #!/usr/bin/env python3
"""
Update GitHub Pages Files
Fixes the hardcoded timestamp and ensures proper deployment.
Addresses Issues #115 and #129.
"""
import json
from datetime import datetime
from pathlib import Path
import re
def update_html_timestamp(html_file: str):
"""Update the timestamp in the HTML file to... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/scripts/generate_search_index.py | scripts/generate_search_index.py | #!/usr/bin/env python3
"""
Generate Static Search Index for GitHub Pages
Creates a lightweight JSON index for client-side search functionality.
"""
import json
import os
import sys
from pathlib import Path
from typing import Dict, List, Any
# Add the parent directory to path for imports
sys.path.append(str(Path(__fil... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/scripts/update_readme_stats.py | scripts/update_readme_stats.py | #!/usr/bin/env python3
"""
Update README.md with current workflow statistics
Replaces hardcoded numbers with live data from the database.
"""
import os
import re
import sys
from pathlib import Path
from datetime import datetime
# Add the parent directory to path for imports
sys.path.append(str(Path(__file__).parent.p... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/src/user_management.py | src/user_management.py | #!/usr/bin/env python3
"""
User Management System for N8N Workflows
Multi-user access control and authentication.
"""
from fastapi import FastAPI, HTTPException, Depends, status
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
from fastapi.responses import HTMLResponse
from pydantic import BaseMod... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/src/ai_assistant.py | src/ai_assistant.py | #!/usr/bin/env python3
"""
AI Assistant for N8N Workflow Discovery
Intelligent chat interface for finding and understanding workflows.
"""
from fastapi import FastAPI, HTTPException
from fastapi.responses import HTMLResponse
from pydantic import BaseModel
from typing import List, Dict, Optional
import json
import sqli... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/src/performance_monitor.py | src/performance_monitor.py | #!/usr/bin/env python3
"""
Performance Monitoring System for N8N Workflows
Real-time metrics, monitoring, and alerting.
"""
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
from fastapi.responses import HTMLResponse
from pydantic import BaseModel
from typing import List, Dict, Any
import asyncio
import time... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/src/integration_hub.py | src/integration_hub.py | #!/usr/bin/env python3
"""
Integration Hub for N8N Workflows
Connect with external platforms and services.
"""
from fastapi import FastAPI, HTTPException
from fastapi.responses import HTMLResponse
from pydantic import BaseModel, Field
from typing import List, Dict, Any
import httpx
from datetime import datetime
clas... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/src/analytics_engine.py | src/analytics_engine.py | #!/usr/bin/env python3
"""
Advanced Analytics Engine for N8N Workflows
Provides insights, patterns, and usage analytics.
"""
from fastapi import FastAPI, HTTPException, Query
from fastapi.responses import HTMLResponse
from pydantic import BaseModel
from typing import List, Dict, Any
import sqlite3
import json
from dat... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/src/community_features.py | src/community_features.py | #!/usr/bin/env python3
"""
Community Features Module for n8n Workflows Repository
Implements rating, review, and social features
"""
import sqlite3
import json
from datetime import datetime
from typing import Dict, List, Optional
from dataclasses import dataclass
@dataclass
class WorkflowRating:
"""Workflow rati... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
Zie619/n8n-workflows | https://github.com/Zie619/n8n-workflows/blob/61bc7a4455c49d47b0e288848e72ccd5778a7470/src/enhanced_api.py | src/enhanced_api.py | #!/usr/bin/env python3
"""
Enhanced API Module for n8n Workflows Repository
Advanced features, analytics, and performance optimizations
"""
import sqlite3
import time
from datetime import datetime
from typing import Dict, List, Optional
from fastapi import FastAPI, HTTPException, Query
from fastapi.middleware.cors imp... | python | MIT | 61bc7a4455c49d47b0e288848e72ccd5778a7470 | 2026-01-04T14:39:30.370607Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/scripts/do_django_release.py | scripts/do_django_release.py | #! /usr/bin/env python
"""Helper to build and publish Django artifacts.
Original author: Tim Graham.
Other authors: Mariusz Felisiak, Natalia Bidart.
"""
import hashlib
import os
import re
import subprocess
from datetime import date
PGP_KEY_ID = os.getenv("PGP_KEY_ID")
PGP_KEY_URL = os.getenv("PGP_KEY_URL")
PGP_EM... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/scripts/manage_translations.py | scripts/manage_translations.py | #!/usr/bin/env python
#
# This Python file contains utility scripts to manage Django translations.
# It has to be run inside the django git root directory.
#
# The following commands are available:
#
# * update_catalogs: check for new strings in core and contrib catalogs, and
# output how much string... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/scripts/archive_eol_stable_branches.py | scripts/archive_eol_stable_branches.py | #! /usr/bin/env python3
import argparse
import os
import subprocess
import sys
def run(cmd, *, cwd=None, env=None, dry_run=True):
"""Run a command with optional dry-run behavior."""
environ = os.environ.copy()
if env:
environ.update(env)
if dry_run:
print("[DRY RUN]", " ".join(cmd))
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/shortcuts.py | django/shortcuts.py | """
This module collects helper functions and classes that "span" multiple levels
of MVC. In other words, these functions/classes introduce controlled coupling
for convenience's sake.
"""
from django.http import (
Http404,
HttpResponse,
HttpResponsePermanentRedirect,
HttpResponseRedirect,
)
from django... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/__main__.py | django/__main__.py | """
Invokes django-admin when the django module is run as a script.
Example: python -m django check
"""
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/__init__.py | django/__init__.py | from django.utils.version import get_version
VERSION = (6, 1, 0, "alpha", 0)
__version__ = get_version(VERSION)
def setup(set_prefix=True):
"""
Configure the settings (this happens as a side effect of accessing the
first setting), configure logging and populate the app registry.
Set the thread-local... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/checks.py | django/tasks/checks.py | from django.core import checks
@checks.register
def check_tasks(app_configs=None, **kwargs):
"""Checks all registered Task backends."""
from . import task_backends
for backend in task_backends.all():
yield from backend.check()
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/signals.py | django/tasks/signals.py | import logging
import sys
from asgiref.local import Local
from django.core.signals import setting_changed
from django.dispatch import Signal, receiver
from .base import TaskResultStatus
logger = logging.getLogger("django.tasks")
task_enqueued = Signal()
task_finished = Signal()
task_started = Signal()
@receiver(... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/exceptions.py | django/tasks/exceptions.py | from django.core.exceptions import ImproperlyConfigured
class TaskException(Exception):
"""Base class for task-related exceptions. Do not raise directly."""
class InvalidTask(TaskException):
"""The provided Task is invalid."""
class InvalidTaskBackend(ImproperlyConfigured):
"""The provided Task backen... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/__init__.py | django/tasks/__init__.py | from django.utils.connection import BaseConnectionHandler, ConnectionProxy
from django.utils.module_loading import import_string
from . import checks, signals # NOQA
from .base import (
DEFAULT_TASK_BACKEND_ALIAS,
DEFAULT_TASK_QUEUE_NAME,
Task,
TaskContext,
TaskResult,
TaskResultStatus,
ta... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/base.py | django/tasks/base.py | from dataclasses import dataclass, field, replace
from datetime import datetime
from inspect import isclass, iscoroutinefunction
from typing import Any, Callable, Dict, Optional
from asgiref.sync import async_to_sync, sync_to_async
from django.db.models.enums import TextChoices
from django.utils.json import normalize... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/backends/dummy.py | django/tasks/backends/dummy.py | from copy import deepcopy
from django.tasks.base import TaskResult, TaskResultStatus
from django.tasks.exceptions import TaskResultDoesNotExist
from django.tasks.signals import task_enqueued
from django.utils import timezone
from django.utils.crypto import get_random_string
from .base import BaseTaskBackend
class D... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/backends/immediate.py | django/tasks/backends/immediate.py | import logging
from traceback import format_exception
from django.tasks.base import TaskContext, TaskError, TaskResult, TaskResultStatus
from django.tasks.signals import task_enqueued, task_finished, task_started
from django.utils import timezone
from django.utils.crypto import get_random_string
from django.utils.json... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/backends/__init__.py | django/tasks/backends/__init__.py | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false | |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/tasks/backends/base.py | django/tasks/backends/base.py | from abc import ABCMeta, abstractmethod
from inspect import iscoroutinefunction
from asgiref.sync import sync_to_async
from django.conf import settings
from django.tasks import DEFAULT_TASK_QUEUE_NAME
from django.tasks.base import (
DEFAULT_TASK_PRIORITY,
TASK_MAX_PRIORITY,
TASK_MIN_PRIORITY,
Task,
)
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/templatetags/tz.py | django/templatetags/tz.py | import zoneinfo
from datetime import UTC, datetime, tzinfo
from django.template import Library, Node, TemplateSyntaxError
from django.utils import timezone
register = Library()
# HACK: datetime instances cannot be assigned new attributes. Define a subclass
# in order to define new attributes in do_timezone().
class... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/templatetags/i18n.py | django/templatetags/i18n.py | from decimal import Decimal
from django.conf import settings
from django.template import Library, Node, TemplateSyntaxError, Variable
from django.template.base import TokenType, render_value_in_context
from django.template.defaulttags import token_kwargs
from django.utils import translation
from django.utils.safestrin... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/templatetags/l10n.py | django/templatetags/l10n.py | from django.template import Library, Node, TemplateSyntaxError
from django.utils import formats
register = Library()
@register.filter(is_safe=False)
def localize(value):
"""
Force a value to be rendered as a localized value.
"""
return str(formats.localize(value, use_l10n=True))
@register.filter(is... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/templatetags/__init__.py | django/templatetags/__init__.py | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false | |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/templatetags/static.py | django/templatetags/static.py | from urllib.parse import quote, urljoin
from django import template
from django.apps import apps
from django.utils.encoding import iri_to_uri
from django.utils.html import conditional_escape
register = template.Library()
class PrefixNode(template.Node):
def __repr__(self):
return "<PrefixNode for %r>" %... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/templatetags/cache.py | django/templatetags/cache.py | from django.core.cache import InvalidCacheBackendError, caches
from django.core.cache.utils import make_template_fragment_key
from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist
register = Library()
class CacheNode(Node):
def __init__(self, nodelist, expire_time_var, fragment_nam... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/apps/registry.py | django/apps/registry.py | import functools
import sys
import threading
import warnings
from collections import Counter, defaultdict
from functools import partial
from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
from .config import AppConfig
class Apps:
"""
A registry that stores the configuration of insta... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/apps/config.py | django/apps/config.py | import inspect
import os
from importlib import import_module
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import cached_property
from django.utils.module_loading import import_string, module_has_submodule
APPS_MODULE_NAME = "apps"
MODELS_MODULE_NAME = "models"
class AppConfig... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/apps/__init__.py | django/apps/__init__.py | from .config import AppConfig
from .registry import apps
__all__ = ["AppConfig", "apps"]
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/__init__.py | django/contrib/__init__.py | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false | |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/search.py | django/contrib/postgres/search.py | from django.db.backends.postgresql.psycopg_any import is_psycopg3
from django.db.models import (
CharField,
Expression,
Field,
FloatField,
Func,
Lookup,
TextField,
Value,
)
from django.db.models.expressions import CombinedExpression, register_combinable_fields
from django.db.models.funct... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/lookups.py | django/contrib/postgres/lookups.py | from django.db.models import Transform
from django.db.models.lookups import PostgresOperatorLookup
from django.db.models.sql.query import Query
from .search import SearchVector, SearchVectorExact, SearchVectorField
class DataContains(PostgresOperatorLookup):
lookup_name = "contains"
postgres_operator = "@>"
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/operations.py | django/contrib/postgres/operations.py | from django.contrib.postgres.signals import (
get_citext_oids,
get_hstore_oids,
register_type_handlers,
)
from django.db import NotSupportedError, router
from django.db.migrations import AddConstraint, AddIndex, RemoveIndex
from django.db.migrations.operations.base import Operation, OperationCategory
from d... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/constraints.py | django/contrib/postgres/constraints.py | from types import NoneType
from django.core.exceptions import ValidationError
from django.db import DEFAULT_DB_ALIAS
from django.db.backends.ddl_references import Expressions, Statement, Table
from django.db.models import BaseConstraint, Deferrable, F, Q
from django.db.models.expressions import Exists, ExpressionList
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/signals.py | django/contrib/postgres/signals.py | import functools
from django.db import connections
from django.db.backends.base.base import NO_DB_ALIAS
from django.db.backends.postgresql.psycopg_any import is_psycopg3
def get_type_oids(connection_alias, type_name):
with connections[connection_alias].cursor() as cursor:
cursor.execute(
"SEL... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/serializers.py | django/contrib/postgres/serializers.py | from django.db.migrations.serializer import BaseSerializer
class RangeSerializer(BaseSerializer):
def serialize(self):
module = self.value.__class__.__module__
# Ranges are implemented in psycopg2._range but the public import
# location is psycopg2.extras.
module = "psycopg2.extras... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/validators.py | django/contrib/postgres/validators.py | from django.core.exceptions import ValidationError
from django.core.validators import (
MaxLengthValidator,
MaxValueValidator,
MinLengthValidator,
MinValueValidator,
)
from django.utils.deconstruct import deconstructible
from django.utils.translation import gettext_lazy as _
from django.utils.translatio... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/expressions.py | django/contrib/postgres/expressions.py | from django.contrib.postgres.fields import ArrayField
from django.db.models import Subquery
from django.utils.functional import cached_property
class ArraySubquery(Subquery):
template = "ARRAY(%(subquery)s)"
def __init__(self, queryset, **kwargs):
super().__init__(queryset, **kwargs)
@cached_pro... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/utils.py | django/contrib/postgres/utils.py | from django.apps import apps
from django.core import checks
from django.core.exceptions import ValidationError
from django.utils.functional import SimpleLazyObject
from django.utils.text import format_lazy
def prefix_validation_error(error, prefix, code, params):
"""
Prefix a validation error message while ma... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/__init__.py | django/contrib/postgres/__init__.py | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false | |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/apps.py | django/contrib/postgres/apps.py | from django.apps import AppConfig
from django.core.signals import setting_changed
from django.db import connections
from django.db.backends.postgresql.psycopg_any import RANGE_TYPES
from django.db.backends.signals import connection_created
from django.db.migrations.writer import MigrationWriter
from django.db.models im... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/functions.py | django/contrib/postgres/functions.py | from django.db.models import DateTimeField, Func, UUIDField
class RandomUUID(Func):
template = "GEN_RANDOM_UUID()"
output_field = UUIDField()
class TransactionNow(Func):
template = "CURRENT_TIMESTAMP"
output_field = DateTimeField()
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/indexes.py | django/contrib/postgres/indexes.py | from django.db.models import Func, Index
from django.utils.functional import cached_property
from .utils import CheckPostgresInstalledMixin
__all__ = [
"BloomIndex",
"BrinIndex",
"BTreeIndex",
"GinIndex",
"GistIndex",
"HashIndex",
"SpGistIndex",
]
class PostgresIndex(CheckPostgresInstall... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/aggregates/mixins.py | django/contrib/postgres/aggregates/mixins.py | # RemovedInDjango70Warning: When the deprecation ends, remove completely.
import warnings
from django.utils.deprecation import RemovedInDjango70Warning
# RemovedInDjango70Warning.
class OrderableAggMixin:
allow_order_by = True
def __init_subclass__(cls, /, *args, **kwargs):
warnings.warn(
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/aggregates/general.py | django/contrib/postgres/aggregates/general.py | import warnings
from django.contrib.postgres.fields import ArrayField
from django.db.models import Aggregate, BooleanField, JSONField
from django.db.models import StringAgg as _StringAgg
from django.db.models import Value
from django.utils.deprecation import RemovedInDjango70Warning
__all__ = [
"ArrayAgg",
"B... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/aggregates/statistics.py | django/contrib/postgres/aggregates/statistics.py | from django.db.models import Aggregate, FloatField, IntegerField
__all__ = [
"CovarPop",
"Corr",
"RegrAvgX",
"RegrAvgY",
"RegrCount",
"RegrIntercept",
"RegrR2",
"RegrSlope",
"RegrSXX",
"RegrSXY",
"RegrSYY",
"StatAggregate",
]
class StatAggregate(Aggregate):
output_... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/aggregates/__init__.py | django/contrib/postgres/aggregates/__init__.py | from .general import * # NOQA
from .statistics import * # NOQA
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/forms/array.py | django/contrib/postgres/forms/array.py | import copy
from itertools import chain
from django import forms
from django.contrib.postgres.utils import prefix_validation_error
from django.contrib.postgres.validators import (
ArrayMaxLengthValidator,
ArrayMinLengthValidator,
)
from django.core.exceptions import ValidationError
from django.utils.translatio... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/forms/__init__.py | django/contrib/postgres/forms/__init__.py | from .array import * # NOQA
from .hstore import * # NOQA
from .ranges import * # NOQA
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/forms/hstore.py | django/contrib/postgres/forms/hstore.py | import json
from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _
__all__ = ["HStoreField"]
class HStoreField(forms.CharField):
"""
A field for HStore data which accepts dictionary JSON input.
"""
widget = forms.Textarea
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/forms/ranges.py | django/contrib/postgres/forms/ranges.py | from django import forms
from django.core import exceptions
from django.db.backends.postgresql.psycopg_any import (
DateRange,
DateTimeTZRange,
NumericRange,
)
from django.forms.widgets import HiddenInput, MultiWidget
from django.utils.translation import gettext_lazy as _
__all__ = [
"BaseRangeField",
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/fields/jsonb.py | django/contrib/postgres/fields/jsonb.py | from django.db.models import JSONField as BuiltinJSONField
__all__ = ["JSONField"]
class JSONField(BuiltinJSONField):
system_check_removed_details = {
"msg": (
"django.contrib.postgres.fields.JSONField is removed except for "
"support in historical migrations."
),
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/fields/citext.py | django/contrib/postgres/fields/citext.py | from django.db.models import CharField, EmailField, TextField
__all__ = ["CICharField", "CIEmailField", "CITextField"]
class CICharField(CharField):
system_check_removed_details = {
"msg": (
"django.contrib.postgres.fields.CICharField is removed except for support "
"in historical... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/fields/utils.py | django/contrib/postgres/fields/utils.py | class AttributeSetter:
def __init__(self, name, value):
setattr(self, name, value)
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/fields/array.py | django/contrib/postgres/fields/array.py | import json
from django.contrib.postgres import lookups
from django.contrib.postgres.forms import SimpleArrayField
from django.contrib.postgres.utils import (
CheckPostgresInstalledMixin,
prefix_validation_error,
)
from django.contrib.postgres.validators import ArrayMaxLengthValidator
from django.core import c... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/fields/__init__.py | django/contrib/postgres/fields/__init__.py | from .array import * # NOQA
from .citext import * # NOQA
from .hstore import * # NOQA
from .jsonb import * # NOQA
from .ranges import * # NOQA
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/fields/hstore.py | django/contrib/postgres/fields/hstore.py | import json
from django.contrib.postgres import forms, lookups
from django.contrib.postgres.fields.array import ArrayField
from django.contrib.postgres.utils import CheckPostgresInstalledMixin
from django.core import exceptions
from django.db.models import Field, TextField, Transform
from django.db.models.fields.mixin... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/postgres/fields/ranges.py | django/contrib/postgres/fields/ranges.py | import datetime
import json
from django.contrib.postgres import forms, lookups
from django.contrib.postgres.utils import CheckPostgresInstalledMixin
from django.db import models
from django.db.backends.postgresql.psycopg_any import (
DateRange,
DateTimeTZRange,
NumericRange,
Range,
)
from django.db.mod... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/backends.py | django/contrib/auth/backends.py | from asgiref.sync import sync_to_async
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.db.models import Exists, OuterRef, Q
UserModel = get_user_model()
class BaseBackend:
def authenticate(self, request, **kwargs):
return None
async def a... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/views.py | django/contrib/auth/views.py | from urllib.parse import urlsplit, urlunsplit
from django.conf import settings
# Avoid shadowing the login() and logout() views below.
from django.contrib.auth import REDIRECT_FIELD_NAME, get_user_model
from django.contrib.auth import login as auth_login
from django.contrib.auth import logout as auth_logout
from djan... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/admin.py | django/contrib/auth/admin.py | from django.conf import settings
from django.contrib import admin, messages
from django.contrib.admin.options import IS_POPUP_VAR
from django.contrib.admin.utils import unquote
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import (
AdminPasswordChangeForm,
AdminUserCrea... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/middleware.py | django/contrib/auth/middleware.py | from functools import partial
from urllib.parse import urlsplit
from asgiref.sync import iscoroutinefunction, markcoroutinefunction
from django.conf import settings
from django.contrib import auth
from django.contrib.auth import REDIRECT_FIELD_NAME, load_backend
from django.contrib.auth.backends import RemoteUserBack... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/mixins.py | django/contrib/auth/mixins.py | from urllib.parse import urlsplit
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.shortcuts import resolve_url
class AccessMixin:
"""
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/checks.py | django/contrib/auth/checks.py | from itertools import chain
from django.apps import apps
from django.conf import settings
from django.core import checks
from django.utils.module_loading import import_string
from .management import _get_builtin_permissions
def _subclass_index(class_path, candidate_paths):
"""
Return the index of dotted cla... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/models.py | django/contrib/auth/models.py | from collections.abc import Iterable
from django.apps import apps
from django.contrib import auth
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
from django.contrib.auth.hashers import make_password
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions impo... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/signals.py | django/contrib/auth/signals.py | from django.dispatch import Signal
user_logged_in = Signal()
user_login_failed = Signal()
user_logged_out = Signal()
| python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/decorators.py | django/contrib/auth/decorators.py | from functools import wraps
from urllib.parse import urlsplit
from asgiref.sync import async_to_sync, iscoroutinefunction, sync_to_async
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.exceptions import PermissionDenied
from django.shortcuts import resolve_url
d... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/validators.py | django/contrib/auth/validators.py | import re
from django.core import validators
from django.utils.deconstruct import deconstructible
from django.utils.translation import gettext_lazy as _
@deconstructible
class ASCIIUsernameValidator(validators.RegexValidator):
regex = r"^[\w.@+-]+\Z"
message = _(
"Enter a valid username. This value m... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/context_processors.py | django/contrib/auth/context_processors.py | # PermWrapper and PermLookupDict proxy the permissions system into objects that
# the template system can understand.
class PermLookupDict:
def __init__(self, user, app_label):
self.user, self.app_label = user, app_label
def __repr__(self):
return str(self.user.get_all_permissions())
def... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/__init__.py | django/contrib/auth/__init__.py | import inspect
import re
from django.apps import apps as django_apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.middleware.csrf import rotate_token
from django.utils.crypto import constant_time_compare
from django.utils.module_loading import i... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/password_validation.py | django/contrib/auth/password_validation.py | import functools
import gzip
import re
from difflib import SequenceMatcher
from pathlib import Path
from django.conf import settings
from django.core.exceptions import (
FieldDoesNotExist,
ImproperlyConfigured,
ValidationError,
)
from django.utils.functional import cached_property, lazy
from django.utils.h... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/apps.py | django/contrib/auth/apps.py | from django.apps import AppConfig
from django.core import checks
from django.db.models.query_utils import DeferredAttribute
from django.db.models.signals import post_migrate, pre_migrate
from django.utils.translation import gettext_lazy as _
from . import get_user_model
from .checks import check_middleware, check_mode... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/hashers.py | django/contrib/auth/hashers.py | import base64
import binascii
import functools
import hashlib
import importlib
import math
import warnings
from asgiref.sync import sync_to_async
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.signals import setting_changed
from django.dispatch import receive... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/base_user.py | django/contrib/auth/base_user.py | """
This module allows importing AbstractBaseUser even when django.contrib.auth is
not in INSTALLED_APPS.
"""
import unicodedata
from django.conf import settings
from django.contrib.auth import password_validation
from django.contrib.auth.hashers import (
acheck_password,
check_password,
is_password_usabl... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/forms.py | django/contrib/auth/forms.py | import logging
import unicodedata
from django import forms
from django.contrib.auth import authenticate, get_user_model, password_validation
from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX
from django.contrib.auth.models import User
from django.contrib.auth.tokens import default_token_generator
from d... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/tokens.py | django/contrib/auth/tokens.py | from datetime import datetime
from django.conf import settings
from django.utils.crypto import constant_time_compare, salted_hmac
from django.utils.http import base36_to_int, int_to_base36
class PasswordResetTokenGenerator:
"""
Strategy object used to generate and check tokens for the password
reset mech... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/urls.py | django/contrib/auth/urls.py | # The views used below are normally mapped in the AdminSite instance.
# This URLs file is used to provide a reliable view deployment for test
# purposes. It is also provided as a convenience to those who want to deploy
# these URLs elsewhere.
from django.contrib.auth import views
from django.urls import path
urlpatte... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/templatetags/__init__.py | django/contrib/auth/templatetags/__init__.py | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false | |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/templatetags/auth.py | django/contrib/auth/templatetags/auth.py | from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX, identify_hasher
from django.template import Library
from django.utils.html import format_html, format_html_join
from django.utils.translation import gettext
register = Library()
@register.simple_tag
def render_password_as_hash(value):
if not value... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/management/__init__.py | django/contrib/auth/management/__init__.py | """
Creates permissions for all installed apps that need permissions.
"""
import getpass
import unicodedata
from django.apps import apps as global_apps
from django.contrib.auth import get_permission_codename
from django.contrib.contenttypes.management import create_contenttypes
from django.core import exceptions
from... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/management/commands/changepassword.py | django/contrib/auth/management/commands/changepassword.py | import getpass
from django.contrib.auth import get_user_model
from django.contrib.auth.password_validation import validate_password
from django.core.exceptions import ValidationError
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections
UserModel = get_u... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/management/commands/createsuperuser.py | django/contrib/auth/management/commands/createsuperuser.py | """
Management utility to create superusers.
"""
import getpass
import os
import sys
from django.contrib.auth import get_user_model
from django.contrib.auth.management import get_default_username
from django.contrib.auth.password_validation import validate_password
from django.core import exceptions
from django.core.... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/management/commands/__init__.py | django/contrib/auth/management/commands/__init__.py | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false | |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/migrations/0006_require_contenttypes_0002.py | django/contrib/auth/migrations/0006_require_contenttypes_0002.py | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("auth", "0005_alter_user_last_login_null"),
("contenttypes", "0002_remove_content_type_name"),
]
operations = [
# Ensure the contenttypes migration is applied before sending
# post_mi... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/migrations/0002_alter_permission_name_max_length.py | django/contrib/auth/migrations/0002_alter_permission_name_max_length.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("auth", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="permission",
name="name",
field=models.CharField(max_length=255, verbose_name=... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/migrations/0008_alter_user_username_max_length.py | django/contrib/auth/migrations/0008_alter_user_username_max_length.py | from django.contrib.auth import validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("auth", "0007_alter_validators_add_error_messages"),
]
operations = [
migrations.AlterField(
model_name="user",
name="userna... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/migrations/0001_initial.py | django/contrib/auth/migrations/0001_initial.py | import django.contrib.auth.models
from django.contrib.auth import validators
from django.db import migrations, models
from django.utils import timezone
class Migration(migrations.Migration):
dependencies = [
("contenttypes", "__first__"),
]
operations = [
migrations.CreateModel(
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/migrations/0003_alter_user_email_max_length.py | django/contrib/auth/migrations/0003_alter_user_email_max_length.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("auth", "0002_alter_permission_name_max_length"),
]
operations = [
migrations.AlterField(
model_name="user",
name="email",
field=models.EmailField(
... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
django/django | https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/django/contrib/auth/migrations/0010_alter_group_name_max_length.py | django/contrib/auth/migrations/0010_alter_group_name_max_length.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("auth", "0009_alter_user_last_name_max_length"),
]
operations = [
migrations.AlterField(
model_name="group",
name="name",
field=models.CharField(max_length... | python | BSD-3-Clause | 3201a895cba335000827b28768a7b7105c81b415 | 2026-01-04T14:38:15.489092Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.