Benign python Download

django-cotton-gallery 1.0.0

“Drop-in playground for Django Cotton component libraries — annotated, copy-and-pasteable, themable.”

Highlight.js public API markerCode editor preview fetch workflow

Evidence

imports os apps.py · lines 14–33
⋯4 lines
18from __future__ import annotations
19
20import os
21import sys
22import warnings
23
24from django.apps import AppConfig
25
26
27def _build_dev_only_warning() -> str:
28 use_color = sys.stderr.isatty() and "NO_COLOR" not in os.environ
29 if use_color:
30 bold = "\033[1m"
31 red = "\033[91m"
32 yellow = "\033[93m"
33 …
Django runserver command apps.py · lines 66–71
66:30… MAIN=true`; the parent does not.
67 is_runserver_parent = "runserver" in sys.argv and os.environ.get("RUN_MAIN") != "true"
68 if is_runserver_parent:
69 return
70
71 # Only warn when the gallery URLs are actuall …
Django framework import apps.py · lines 73–78
73:2… # raises NoReverseMatch and we stay silent.
74 from django.urls import NoReverseMatch, reverse
75
76 try:
77 reverse("django_cotton_gallery:index")
78 except NoReverseMatch:
imports PackageNotFoundError from importlib.metadata __init__.py · lines 1–9
1"""Django Cotton Gallery — component gallery and @prop annotation system for django-cotton."""
2
3from importlib.metadata import PackageNotFoundError, version
4
5try:
6 # pyproject.toml is the single source of truth — a literal here drifts.
7 __version__ = version("django-cotton-gallery")
8except PackageNotFoundError: # running from a source tree, not installed
9 __version__ = "0.0.0.dev0"
Queries multiple DOM elements preview.js · lines 46–52
46:74…
47export const initPreviewBgSwitcher = () => {
48 const buttons = document.querySelectorAll('.cg-bg-btn[data-cg-bg]');
49 if (!buttons.length) return;
50
51 // Edit controls live on the detail page only; the compare view reuses the
52 // sam …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.