Vai al contenuto principale
ProdottiStrumenti desktopTASTECADVisualizzazione disegniTASTEFILESGestione fileTASTEFTPTrasferimento fileTASTESSHSpazio di lavoro remotoTASTEZIPCompressione ed estrazioneTASTEWINMGestione fileStrumenti per sviluppatoriTASTECODEAmbiente di sviluppo integrato per RustTASTESTUDIOAmbiente integrato di sviluppo e testTASTEETLIntegrazione dati (ETL)ServerTASTEREMOTEServer di desktop remotoTASTEGEOServer geospazialeTASTEMAILSpazio di lavoro emailInvestimentiTASTESTOCKApp desktop di trading automatico azionarioIniziaDownloadDocumentazioneAcquistaTutti i prodotti
Marketplace
Notizie
TecnologiaNotizieNotizie di sviluppo di oggiDocumentazioneLinguaggi di programmazioneRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFramework frontend webNext.jsReactVue.js · NuxtSvelteKitAngularFramework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFramework per app e desktopTauriFlutterReact NativeElectronAlgoritmiBasi degli algoritmiAlgoritmi fondamentaliAlgoritmi avanzatiAlgoritmi pratici
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrinaGuida alla community
CollaboraTrasferimento tecnicoRealizzazione del sito webRealizzazione di app desktopPipeline di rilascio e pagamentoPartner commercialeContatti
ServiziDesktop remotoPacchetti di installazione su misura
TASTEDEV
Prodotti

Strumenti desktop

TASTECADApri con leggerezza anche i disegni più complessiTASTEFILESSolo i file che servono, alla massima velocitàTASTEFTPLa via più ordinata per i tuoi fileTASTESSHUn legame più solido tra te e i tuoi serverTASTEZIPComprimi più veloce, estrai più sicuroTASTEWINMUn file manager a due pannelli pensato per la tastiera

Strumenti per sviluppatori

TASTECODEModifica, compila, esegui il debug e testa app Rust in un'unica finestraTASTESTUDIODalla modifica ai test remoti e alle correzioni IA approvateTASTEETLSposta i dati guardando i valori

Server

TASTEREMOTEUn desktop remoto che gira sul tuo serverTASTEGEOUn server geospaziale compatibile con GeoServer, ricostruito in RustTASTEMAILRiprendi il controllo della tua posta

Investimenti

TASTESTOCKTrading automatico azionario secondo le regole che decidi tu: quando e che cosa

Inizia

DownloadUltime versioni di ogni prodottoDocsCome usare ogni prodottoAcquistaAbbonamenti e licenze perpetueTutti i prodottiTutti i prodotti a colpo d’occhio
Tutti i prodotti
MarketplaceNotizie
Tecnologia

Notizie

Notizie di sviluppo di oggiAnnunci ufficiali su linguaggi, framework, GitHub e IADocumentazioneGuide a linguaggi, framework e algoritmi

Linguaggi di programmazione

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Framework

Framework frontend webNext.jsReactVue.js · NuxtSvelteKitAngular
Framework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Framework per app e desktopTauriFlutterReact NativeElectron

Algoritmi

Basi degli algoritmiAnalisi della complessità · Ordinamento · Ricerca · Strutture dati di base · Alberi e heapAlgoritmi fondamentaliVisita dei grafi · Cammini minimi e alberi ricoprenti · Programmazione dinamica · Algoritmi greedy · Divide et impera · BacktrackingAlgoritmi avanzatiAlgoritmi sulle stringhe · Matematica e teoria dei numeri · Manipolazione dei bit · Alberi di segmenti · Union-FindAlgoritmi praticiStrategia per colloqui di programmazione · Cache LRU · Rate limiting · Hashing consistente
Tutta la documentazione di sviluppo
Community
ProgettiScopri sviluppatori e lavoriLog di sviluppoDecisioni e lezioni appresePromptIstruzioni riutilizzabiliProblemi degli strumenti di IAProblemi e alternative di Claude, Codex, GeminiVetrinaRisultati completatiGuida alla communityCome sviluppiamo in modo aperto
Collabora
Trasferimento tecnicoApp native in Rust ed eguiRealizzazione del sito web10 lingue, account, documentazione e downloadRealizzazione di app desktopRust ed egui, senza WebViewPipeline di rilascio e pagamentoFirma, MSI, deb, rpm, AppImage, hashPartner commercialeConsigliaci e ricevi il 30%ContattiSviluppo, partnership e investimenti
Servizi
Desktop remotoRaggiungi il tuo computer dal browserPacchetti di installazione su misuraSolo il necessario, impostazioni precaricate
Acquista
IT
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Accedi
Accedi
TASTEDEV

Dai piccoli strumenti a uno sviluppo migliore.

support@tastedev.netSostieni TASTEDEV
ProdottiGamma di prodottiAcquistaDocsDownloadMarketplaceAssistenza
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrina
NormeChi siamoInformativa sulla privacyTermini di servizioCondizioni di abbonamentoRimborsiLinee guida della community
AccountAccediRegistrati
Visitatori
Oggi
Ieri
Visualizzazioni totali
Società
GXSOFT
Rappresentante
CHOI YOUNG GU
Numero di registrazione
853-44-00368
Indirizzo
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefono
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsabile privacy
CHOI YOUNG GU

© 2026 TASTEDEVLe informazioni sui prodotti si basano su fonti di sviluppo verificate.Rilasciato · in miglioramento

Documentazione di Django
Django
Getting Started with DjangoProject StructureCore ConceptsData and StateTestingDeployment
Discussioni

Guida a Django · 6/6

Deployment

Per ora questo capitolo è disponibile solo in inglese.

A project that runs happily under runserver still needs a few changes before it can go live: production settings, collected static files, a production application server and a reverse proxy in front of it. This chapter goes through those steps in order and shows a common setup.

Production settings

Check these settings before every deployment.

SettingProduction value
DEBUGFalse. When it is on, error pages expose your code and settings
SECRET_KEYA long random value injected from outside the code, e.g. an environment variable
ALLOWED_HOSTSThe domains you serve. It cannot be empty when DEBUG = False
DATABASESConnection details for the production database, often PostgreSQL
STATIC_ROOTThe folder where collectstatic gathers static files
# mysite/settings.py (production-relevant parts)
import os

DEBUG = False
SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
ALLOWED_HOSTS = ["example.com", "www.example.com"]
CSRF_TRUSTED_ORIGINS = ["https://example.com", "https://www.example.com"]

STATIC_ROOT = BASE_DIR / "staticfiles"

# HTTPS
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_HSTS_SECONDS = 3600

Only enable SECURE_PROXY_SSL_HEADER when your proxy always sets X-Forwarded-Proto and overwrites any value sent by the client. Start HSTS with a short duration and raise it once everything works. When you are done, let Django look for anything you missed:

DJANGO_SECRET_KEY=... python manage.py check --deploy

Static and media files

With DEBUG = False, Django stops serving static files itself. Run collectstatic to copy every app's static/ files into STATIC_ROOT, then let a web server such as Nginx, or a CDN, serve that folder.

python manage.py collectstatic --noinput
python manage.py migrate --noinput

If running a separate web server is inconvenient, add the WhiteNoise package as middleware so the Python process can serve static files efficiently. Keep user uploads (MEDIA_ROOT) separate from static files, and when you run several servers, point the STORAGES setting at an object store such as S3.

WSGI and ASGI servers

Domande su questo capitolo?
Capitolo precedenteTesting

The wsgi.py and asgi.py files created by startproject each expose an application object. For mostly synchronous views, use a WSGI server such as Gunicorn. If you need async views or WebSockets (Django Channels), use an ASGI server such as Uvicorn or Daphne.

python -m pip install gunicorn uvicorn

# WSGI with four worker processes
gunicorn mysite.wsgi --workers 4 --bind 127.0.0.1:8000

# ASGI with Uvicorn on its own
uvicorn mysite.asgi:application --host 127.0.0.1 --port 8000 --workers 4

Start with a worker count based on your CPU cores and tune it under real load. Run the server under a process manager such as systemd, Supervisor or a container orchestrator, so it restarts after a crash.

Reverse proxy

Put a reverse proxy such as Nginx in front of the application server. The proxy terminates TLS, serves static files and buffers slow clients, and forwards only dynamic requests to Gunicorn.

server {
    listen 443 ssl;
    server_name example.com;

    location /static/ {
        alias /srv/mysite/staticfiles/;
    }

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Deploying with containers

Containers give every server an identical environment. Keep secrets out of the image and pass them in as environment variables at run time.

FROM python:3-slim

ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .
RUN DJANGO_SECRET_KEY=build-only python manage.py collectstatic --noinput

CMD ["gunicorn", "mysite.wsgi", "--bind", "0.0.0.0:8000", "--workers", "4"]

Run migrations once as a deployment step, not while building the image. In production, collect errors through the LOGGING setting and get notified about exceptions via ADMINS or a service such as Sentry.

Summary

  • Set DEBUG = False, a secret SECRET_KEY and ALLOWED_HOSTS, then verify with check --deploy.
  • Gather static files with collectstatic and serve them from a web server or WhiteNoise.
  • Run the app with Gunicorn (WSGI) or Uvicorn (ASGI) behind a reverse proxy such as Nginx.
  • Run migrations as part of the deployment and set up logging and error reporting.

Official documentation

  • Deployment checklist: production settings to review
  • How to deploy Django: WSGI and ASGI deployment guides
  • How to manage static files: working with static files
  • Settings reference: every available setting
  • Django documentation: the documentation home page

0 commenti

Commenti principaliPrima i più recenti

Accedi · Accedi per lasciare un commento.