Generating a Django booking site locally

I used Q5_K_M Qwen3.5-122B-A10B to generate a Django 5 travel booking site without cloud APIs. An MCP agent handled files; I applied manual fixes and two feature-expansion requests. The test examines local LLM use for web and business application development.

The question was whether a quantized local MoE model could generate aligned models, views, templates, and admin configuration.

Local Inference Environment

ItemDetails
ModelQwen3.5-122B-A10B (MoE, 10B active / 122B total parameters)
QuantizationQ5_K_M (GGUF, 3-shard split)
Inference Engineik_llama.cpp (OpenAI-compatible API server)
MCP Tools (custom)ctree (code symbol analysis), pathfinder (path resolution)
MCP Tools (OSS)serena (semantic code operations), filesystem (file read/write), ripgrep (search)
Context Usage~77K prompt tokens

All inference ran locally, without external APIs or token billing. The agent used serena for symbols, filesystem for I/O, ripgrep for search, ctree for structure, and pathfinder for paths.

Motivation

Why Test Locally Instead of Using Cloud APIs

Using cloud models such as Claude Sonnet or GPT-4o involves:

  • Token costs over repeated development
  • Sending code to external servers
  • API availability and rate limits

I tested a 122B MoE model in Q5_K_M on ik_llama.cpp as a coding agent. This does not establish cloud-equivalent quality.

One-Shot Generation Approach

I provided the complete specification to generate all files together, aiming to align models, views, templates, forms, seed data, and admin fields.

Specification Design

Technology Stack

ComponentChoiceRationale
BackendDjango 5.xPython 3.13 compatible, full ORM, auto-generated admin
Frontend JSAlpine.js v3 (CDN)Works within Django templates, no build step
CSSTailwind CSSMaterial Design 3 inspired utility-first approach
Package ManageruvFast Python package manager
DatabaseSQLiteDevelopment only, zero configuration

Initial Domain Models

The initial three models were:

  TravelPackage  1 ──── N  Tour
Tour           1 ──── N  Reservation
  

TravelPackage (travel product):

  • Title, slug, region, duration, image URL
  • is_published flag for visibility control
  • min_price property for dynamic lowest tour price retrieval

Tour (scheduled departure):

  • Specific departure/return dates, price, remaining seats
  • Status management (available / soldout / cancelled)
  • is_reservable property for reservation eligibility

Reservation (booking):

  • Customer information (name, email, phone, guests, notes)
  • FK relationship to Tour
  • No payment processing (DB persistence only)

Business Rules

Publication and reservation rules:

  1. Only packages with is_published=True appear on the frontend
  2. Only tours with status="available" can be reserved
  3. Price display shows the lowest tour price within a package (Min aggregation)
  4. Reservation flow follows a 3-step pattern: form → confirmation preview → completion
  5. Database write occurs only on the confirmation POST (via session storage)

UI Wireframes

ASCII wireframes and explicit Tailwind classes defined the layout.

  ┌─────────────────────────────────────────────────┐
│  HERO SECTION: bg-gradient-to-r from-blue-600   │
│  [SVG airplane animation flying across]         │
│  "Discover Your Next Adventure"                 │
│  [ Browse All Packages → ]                      │
├─────────────────────────────────────────────────┤
│  FEATURED PACKAGES (card grid)                  │
│  ┌──────┐  ┌──────┐  ┌──────┐                  │
│  │Card 1│  │Card 2│  │Card 3│                   │
│  └──────┘  └──────┘  └──────┘                  │
└─────────────────────────────────────────────────┘
  

Material Design 3 Specifications

RoleTailwind ClassUsage
Primarybg-blue-600Buttons, links, active states
Surfacebg-whiteCards, modals, form backgrounds
Elevation Level 2shadow-mdMain cards, header
Border Radiusrounded-2xlCards; rounded-xl for buttons

Hover effects: hover:shadow-lg hover:-translate-y-1 transition-all duration-200

Code Generated by Local LLM

Alpine.js Filtering

The generated Alpine.js client-side filter:

  x-data="{
    region: '',
    maxPrice: ''
}"
  
  x-show="(region === '' || $el.dataset.region === region) &&
        (maxPrice === '' || parseInt($el.dataset.minPrice) <= parseInt(maxPrice))"
  

It works without a server-side API.

Session-Based Reservation Flow

The generated three-step reservation flow:

  1. Form input (/reserve/<tour_id>/): After validation, data is saved to session
  2. Confirmation preview (/reserve/<tour_id>/confirm/): Read from session, display summary
  3. Completion (/reserve/success/): Confirmation POST saves to DB, clears session
  # ReservationCreateView: POST saves to session
request.session['reservation_data'] = form.cleaned_data
return redirect('reservation_confirm', tour_id=tour.id)

# ReservationConfirmView: POST saves to DB
data = request.session.pop('reservation_data')
Reservation.objects.create(tour=tour, **data)
return redirect('reservation_success')
  

Django Admin Configuration

Admin configuration includes inline editing aligned with the models.

  class TourInline(admin.TabularInline):
    model = Tour
    extra = 1

@admin.register(TravelPackage)
class TravelPackageAdmin(admin.ModelAdmin):
    list_display = ["title", "region", "duration_days", "is_published"]
    list_editable = ["is_published"]
    prepopulated_fields = {"slug": ("title",)}
    inlines = [TourInline]
  

Seed Data

seed_demo generates five packages and 14 tours for regional filter checks.

Agent-Driven Incremental Expansion

After fixing the initial output, I requested two expansions. The agent read existing code and added models and apps, with manual corrections at each stage.

Added AppKey ModelsAgent’s Work
shopShop (store locations)Added Shop model to models.py, registered admin, created templates
reviewsReview, Rating, ReviewPhotoFull review system with approval workflow
searchSearchIndex, TrendingKeywordSearch index and trending keyword management
accountsUser, UserProfile, UserActivityUser authentication and profile management

It checked FK relations in tours/models.py. I fixed quote escaping, missing imports, and cross-template inconsistencies. The work felt roughly 80% generated and 20% manual correction.

Generation Results

Screenshots

Homepage: Hero section and Featured Products card grid
Homepage — Hero Section + Featured Products (generated by local inference)
Homepage lower section: Shop Locations and Available Tours
Shop Locations + Available Tours — added by agent during incremental expansion
Package detail page: Takayama & Japanese Alps with tour listing and price sorting
Package Detail Page — Tour Listing, Pricing, and Sort Functionality
Django admin panel showing all 6 app model groups
Django Admin — All models across Tours + Shop + Reviews + Search + Accounts

Initial Generated File Structure

FileContent
tours/models.py3 models + properties + validation
tours/admin.pyAdmin configuration for 3 models + inline
tours/forms.pyReservationForm (ModelForm)
tours/views.py6 views (Home, List, Detail, Form, Confirm, Success)
tours/urls.pyURL pattern definitions
tours/management/commands/seed_demo.pySeed data
tours/templatetags/tour_filters.pyCustom filter (multiply)
tours/templates/tours/*.html7 templates
static/css/custom.cssSVG animations
config/settings.pyINSTALLED_APPS additions

Verification

After manual fixes, I confirmed:

  • Server startup after migrations
  • Frontend packages from seed data
  • Alpine.js filtering and sorting
  • The input → confirmation → completion reservation flow
  • Admin inline editing

Key areas requiring manual fixes:

  • Django template tag quote escaping on the package detail page ({{ tour.end_date|date:"M j, Y" }} rendered as raw strings)
  • Some missing imports and type inconsistencies
  • Cross-template consistency during feature expansion

SVG Animation

SVG and CSS created an eight-second airplane loop and a 15-second cloud loop.

What generation and fixes showed

1. Local MoE Model Coding Capability

Qwen3.5-122B-A10B (Q5_K_M) generated Django models, views, templates, and admin configuration and extended them with 77K tokens of context. Manual fixes remained necessary; cloud-equivalent quality was not established.

2. Specification Detail Determines Local LLM Accuracy

Useful specification details in this test:

  • Field types, constraints, and defaults
  • URL-to-view mapping
  • ASCII UI wireframes
  • Explicit Tailwind classes

Ambiguous specifications seemed to increase inconsistent output. I did not quantitatively compare this with cloud models.

3. Multi-MCP Server Coordination

ctree, pathfinder, serena, filesystem, and ripgrep supplied symbol analysis, path resolution, semantic operations, I/O, and search. The agent coordinated symbol lookup, file changes, and structure checks.

4. Template Escaping Issues

Quoted filter arguments such as {{ value|date:"M j, Y" }} had escaping errors. Cloud models can also make these errors; they were prominent manual fixes here.