# ahmed111hatem/django-tours-web-app architecture

> Architecture diagram of the GitHub repository ahmed111hatem/django-tours-web-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmed111hatem/django-tours-web-app
- Repository: https://github.com/ahmed111hatem/django-tours-web-app

## Overview

Django Tours Web App serves a tour listing and contact-inquiry flow, with account registration, login, logout, and a protected page as additional capabilities. Requests enter through the project and agency URL configurations, then views query tour data, validate forms, invoke Django authentication, and render templates. Contact submission currently prints inquiry details rather than sending email. The sampled settings show SQLite configuration. The graph follows explicit routes and calls; templates and database configuration are connected where source shows their use.

Main entry points: [`asiatoursagency/views.py`](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/views.py) (Page views), [`worldtour/urls.py`](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/worldtour/urls.py) (Project routes), [`asiatoursagency/urls.py`](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/urls.py) (Agency routes), [`asiatoursagency/form.py`](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/form.py) (Contact and register forms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web routing and pages"]
  node_project_routes["Project routes<br/>[urls.py]"]
  node_agency_routes["Agency routes<br/>[urls.py]"]
  node_page_views["Page views<br/>[views.py]"]
  node_tour_page["Tour listing page<br/>[index.html]"]
  node_contact_page["Contact page<br/>[contact.html]"]
  node_success_page["Contact success page"]
  node_login_page["Login page<br/>[login.html]"]
  node_register_page["Registration page<br/>[register.html]"]
  node_protected_page["Protected page<br/>[protected.html]"]
end

subgraph group_domain["Tours and inquiries"]
  node_contact_form["Contact and register forms<br/>[form.py]"]
  node_tour_model["Tour model<br/>[models.py]"]
end

subgraph group_accounts["Accounts and access"]
  node_auth_framework["Django authentication"]
  node_account_pages["Account templates"]
  node_registration_page["Registration template<br/>[register.html]"]
end

subgraph group_runtime["Django runtime and state"]
  node_settings["Project settings<br/>[settings.py]"]
  node_sqlite[("SQLite database<br/>[db.sqlite3]")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_project_routes
node_project_routes -->|"includes routes"| node_agency_routes
node_agency_routes -->|"dispatches requests"| node_page_views
node_page_views -->|"queries tours"| node_tour_model
node_page_views -->|"validates inquiries"| node_contact_form
node_page_views -->|"validates registration"| node_contact_form
node_page_views -->|"authenticates users"| node_auth_framework
node_page_views -->|"renders listing"| node_tour_page
node_page_views -->|"renders contact form"| node_contact_page
node_page_views -->|"renders success"| node_success_page
node_page_views -->|"renders login"| node_login_page
node_page_views -->|"renders registration"| node_register_page
node_page_views -->|"renders protected page"| node_protected_page
node_settings -->|"configures database"| node_sqlite

click node_project_routes "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/worldtour/urls.py"
click node_agency_routes "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/urls.py"
click node_page_views "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/views.py"
click node_tour_page "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/index.html"
click node_contact_page "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/contact.html"
click node_success_page "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/contact-success.html"
click node_login_page "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/accounts/login.html"
click node_register_page "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/register.html"
click node_protected_page "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/registration/protected.html"
click node_contact_form "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/form.py"
click node_tour_model "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/models.py"
click node_account_pages "https://github.com/ahmed111hatem/django-tours-web-app/tree/main/asiatoursagency/templates/accounts"
click node_registration_page "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/register.html"
click node_settings "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/worldtour/settings.py"
click node_sqlite "https://github.com/ahmed111hatem/django-tours-web-app/blob/main/db.sqlite3"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_project_routes,node_agency_routes,node_page_views,node_tour_page,node_contact_page,node_success_page,node_login_page,node_register_page,node_protected_page toneBlue
class node_contact_form,node_tour_model toneAmber
class node_auth_framework,node_account_pages,node_registration_page toneMint
class node_settings,node_sqlite toneRose
class node_visitor toneIndigo
```

## Components

### Web routing and pages

- [Project routes](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/worldtour/urls.py): `worldtour/urls.py`
- [Agency routes](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/urls.py): `asiatoursagency/urls.py`
- [Page views](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/views.py): `asiatoursagency/views.py`
- [Tour listing page](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/index.html): `asiatoursagency/templates/tours/index.html`
- [Contact page](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/contact.html): `asiatoursagency/templates/tours/contact.html`
- [Contact success page](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/contact-success.html): `asiatoursagency/templates/tours/contact-success.html`
- [Login page](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/accounts/login.html): `asiatoursagency/templates/accounts/login.html`
- [Registration page](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/register.html): `asiatoursagency/templates/tours/register.html`
- [Protected page](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/registration/protected.html): `asiatoursagency/templates/registration/protected.html`

### Tours and inquiries

- [Contact and register forms](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/form.py): `asiatoursagency/form.py`
- [Tour model](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/models.py): `asiatoursagency/models.py`

### Accounts and access

- **Django authentication**
- [Account templates](https://github.com/ahmed111hatem/django-tours-web-app/tree/main/asiatoursagency/templates/accounts): `asiatoursagency/templates/accounts`
- [Registration template](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/asiatoursagency/templates/tours/register.html): `asiatoursagency/templates/tours/register.html`

### Django runtime and state

- [Project settings](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/worldtour/settings.py): `worldtour/settings.py`
- [SQLite database](https://github.com/ahmed111hatem/django-tours-web-app/blob/main/db.sqlite3): `db.sqlite3`

### Other components

- **Visitor**

## Connections

- Visitor → Project routes: requests pages (evidence: `worldtour/urls.py`)
- Project routes → Agency routes: includes routes (evidence: `worldtour/urls.py`)
- Agency routes → Page views: dispatches requests (evidence: `asiatoursagency/urls.py`)
- Page views → Tour model: queries tours (evidence: `asiatoursagency/views.py`)
- Page views → Contact and register forms: validates inquiries (evidence: `asiatoursagency/views.py`)
- Page views → Contact and register forms: validates registration (evidence: `asiatoursagency/views.py`)
- Page views → Django authentication: authenticates users (evidence: `asiatoursagency/views.py`)
- Page views → Tour listing page: renders listing (evidence: `asiatoursagency/views.py`)
- Page views → Contact page: renders contact form (evidence: `asiatoursagency/views.py`)
- Page views → Contact success page: renders success (evidence: `asiatoursagency/views.py`)
- Page views → Login page: renders login (evidence: `asiatoursagency/views.py`)
- Page views → Registration page: renders registration (evidence: `asiatoursagency/views.py`)
- Page views → Protected page: renders protected page (evidence: `asiatoursagency/views.py`)
- Project settings → SQLite database: configures database (evidence: `worldtour/settings.py`)
