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 · 2/6

Project Structure

Per ora questo capitolo è disponibile solo in inglese.

Django projects follow a predictable layout and a handful of naming conventions. Once you know them, you can open almost any Django codebase and find your way around quickly. This chapter covers the files in a project and an app, the settings module, and the conventions most teams follow.

Project and app files

Running django-admin startproject mysite . and python manage.py startapp polls gives you this layout:

mysite-project/
    manage.py
    mysite/
        __init__.py
        settings.py
        urls.py
        asgi.py
        wsgi.py
    polls/
        __init__.py
        admin.py
        apps.py
        models.py
        tests.py
        views.py
        migrations/
            __init__.py
FilePurpose
manage.pyEntry point that loads your settings and runs management commands
mysite/settings.pyAll configuration: database, installed apps, middleware and more
mysite/urls.pyThe root URL configuration (URLconf)
mysite/wsgi.py, mysite/asgi.pyWSGI and ASGI entry points loaded by production servers
polls/models.pyData models
polls/views.pyViews that handle requests
polls/admin.pyRegisters models with the admin site
polls/apps.pyThe app's configuration class (AppConfig)
polls/migrations/Migration files that record model changes
polls/tests.pyTests

startapp does not create urls.py, forms.py, templates/ or static/; add them when you need them.

Where templates and static files live

By default Django looks for files in each app's templates/ and static/ folders. To avoid name clashes between apps, the convention is to nest them in one more folder named after the app.

polls/
    templates/
        polls/
            index.html
            detail.html
    static/
        polls/
            style.css

Views then refer to "polls/index.html", and templates load {% static 'polls/style.css' %}, both prefixed with the app name. Shared templates used across apps, such as , usually go in a project-level folder that you add to .

Domande su questo capitolo?
Capitolo precedenteGetting Started with DjangoCapitolo successivoCore Concepts
base.html
templates/
DIRS

A tour of settings.py

settings.py is an ordinary Python module. These are the settings you will touch most often:

# mysite/settings.py (excerpt)
from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent

SECRET_KEY = "dev-only-placeholder"
DEBUG = True
ALLOWED_HOSTS = []

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.sqlite3",
        "NAME": BASE_DIR / "db.sqlite3",
    }
}

TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": [BASE_DIR / "templates"],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                "django.template.context_processors.request",
                "django.contrib.auth.context_processors.auth",
                "django.contrib.messages.context_processors.messages",
            ],
        },
    },
]

LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
USE_TZ = True

STATIC_URL = "static/"
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

BASE_DIR is the folder that contains manage.py. With USE_TZ = True, datetimes are stored in UTC and converted to TIME_ZONE for display. DEFAULT_AUTO_FIELD sets the type of the auto-incrementing primary key added to models that do not declare one.

Separating settings per environment

Never hard-code SECRET_KEY or database passwords. The simplest fix is to read them from environment variables.

# mysite/settings.py
import os

SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", "dev-only-placeholder")
DEBUG = os.environ.get("DJANGO_DEBUG", "") == "1"
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "localhost,127.0.0.1").split(",")

As settings grow, many teams turn settings.py into a settings/ package with base.py, dev.py and prod.py, and pick one at runtime through the DJANGO_SETTINGS_MODULE environment variable. Packages such as django-environ can also load values from a .env file.

# Run a management command with the production settings
DJANGO_SETTINGS_MODULE=mysite.settings.prod python manage.py check --deploy

Commands you run through manage.py

CommandWhat it does
runserverStart the development server
startapp nameCreate a new app
makemigrationsGenerate migration files from model changes
migrateApply migrations to the database
createsuperuserCreate an admin account
shellPython shell with your project's settings loaded
testRun the test suite
collectstaticGather static files into one folder

You can add your own commands too: create a management/commands/ folder in an app and put a class that subclasses BaseCommand in it. It then runs through manage.py like any built-in command.

Summary

  • The project folder holds manage.py and the settings package; each app holds its models, views, admin and migrations.
  • Nest templates and static files in a folder named after the app to avoid clashes.
  • Pass secrets through environment variables and split settings per environment when needed.
  • Automate routine work with manage.py commands, including custom ones.

0 commenti

Commenti principaliPrima i più recenti

Accedi · Accedi per lasciare un commento.