Master Django Framework for Multi-Site City Directories
Built by Gregory Woodruff | Cloud and Secure Limited
Course: YouBetYourAzure.com
MissouriConstruction.com is the master Django framework that powers multiple city directory websites from a single codebase:
Total Scale: 228+ cities, 6+ sites, all managed from one admin interface.
Core Models:
Site - Each domain (seekingspringfield.com, etc.)City - 228 cities with demographics from Census APIArticle - AI-generated content (city guides, demographics, tourism)Business - Directory listings (free, premium, featured tiers)Event - Upcoming events and conventionsContentPerformance - Daily analytics trackingWhy This Design?
Census API Integration:
fetch_census_dataAI Content Engine:
generate_daily_contentExport Capabilities:
export_census_data# Navigate to project
cd "missouriconstruction.com"
# Install dependencies
pip install -r requirements.txt
# Create .env file
cp .env.example .env
Edit .env file:
SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
# Census Bureau API (free)
CENSUS_API_KEY=your-census-api-key
# OpenAI API (required for AI content)
OPENAI_API_KEY=sk-proj-your-key-here
# Google Analytics (optional)
GOOGLE_ANALYTICS_ID=G-XXXXXXXXXX
# Run migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser
# Username: admin
# Email: your-email@example.com
# Password: (choose secure password)
# Add all 24 Springfields
python manage.py populate_springfields
# Output:
# โ
Created site: seekingspringfield.com
# โ
Created: Springfield, IL
# โ
Created: Springfield, MO
# ... (22 more)
# Total: 24 cities
# Fetch demographics for all Springfields
python manage.py fetch_census_data --site seekingspringfield.com
# Output:
# [1/24] Processing: Springfield, Illinois
# โ
Population: 114,394 | Median Income: $62,000
# [2/24] Processing: Springfield, Missouri
# โ
Population: 168,122 | Median Income: $45,000
# ... (22 more)
#
# Updated: 24
# Skipped: 0
# Errors: 0
# Total Population: 1,234,567
Pro Tip: Get free Census API key at https://api.census.gov/data/key_signup.html
# Generate 3 articles for testing
python manage.py generate_daily_content \
--site seekingspringfield.com \
--type city_guide \
--count 3
# Output:
# [1/24] Processing: Springfield, Illinois
# ๐ค Generating city_guide article...
# โ
Generated 587 words (2,341 tokens, Quality: 89%)
# [2/24] Processing: Springfield, Missouri
# โ
Generated 612 words (2,453 tokens, Quality: 92%)
# [3/24] Processing: Springfield, Massachusetts
# โ
Generated 595 words (2,387 tokens, Quality: 88%)
#
# Articles Generated: 3
# Total Words: 1,794
# Total Tokens: 7,181
# Estimated Cost: $0.32
Important: Articles are created as UNPUBLISHED - review in admin before publishing!
# Start development server
python manage.py runserver 8002
# Open in browser:
# http://localhost:8002/admin/
#
# Login with superuser credentials
Admin Sections:
# Export Springfields for visualization
python manage.py export_census_data \
--site seekingspringfield.com \
--format powerbi \
--include-articles
# Output:
# ๐พ Saved 24 cities to Power BI CSV
#
# Output: seekingspringfield_20260226.csv
#
# Import to Power BI Desktop:
# 1. Get Data > Text/CSV
# 2. Select file
# 3. Create visualizations (maps, charts, tables)
Add all 24 Springfield cities to database and link to seekingspringfield.com.
# Create all cities
python manage.py populate_springfields
# Preview without creating
python manage.py populate_springfields --dry-run
Output:
Fetch demographic data from U.S. Census Bureau API.
# Fetch for all cities
python manage.py fetch_census_data
# Fetch for specific site
python manage.py fetch_census_data --site seekingspringfield.com
# Fetch for one city
python manage.py fetch_census_data --city "Springfield, IL"
# Overwrite existing data
python manage.py fetch_census_data --force
# Test without making changes
python manage.py fetch_census_data --dry-run
# Use specific API key
python manage.py fetch_census_data --api-key YOUR_KEY_HERE
Options:
--site - Filter by site domain--city - Specific city (โCity Name, STโ format)--force - Overwrite existing Census data--dry-run - Preview without database changes--api-key - Override environment variableData Fetched:
Generate AI-powered articles using GPT-4.
# Generate 1 article for all cities
python manage.py generate_daily_content
# Generate for specific site
python manage.py generate_daily_content --site seekingspringfield.com
# Generate specific article type
python manage.py generate_daily_content --type tourism
# Generate 10 articles (batch)
python manage.py generate_daily_content --count 10
# Test without spending money
python manage.py generate_daily_content --dry-run
# Use specific API key
python manage.py generate_daily_content --api-key sk-proj-...
Options:
--site - Filter by site domain--city - Specific city (โCity Name, STโ format)--count - Articles to generate per city (default: 1)--type - Article type: city_guide, demographics, tourism, living_here--dry-run - Preview without creating articles--force - Generate even if article exists--api-key - Override environment variableArticle Types:
Cost: ~$0.10-0.30 per article (GPT-4 pricing)
Export city data for visualization and analysis.
# Export to CSV
python manage.py export_census_data --format csv
# Export for Power BI
python manage.py export_census_data --format powerbi
# Export to Excel
python manage.py export_census_data --format excel
# Export to JSON
python manage.py export_census_data --format json
# Export specific site
python manage.py export_census_data \
--site seekingspringfield.com \
--format powerbi
# Include article counts
python manage.py export_census_data \
--format csv \
--include-articles
# Include business revenue
python manage.py export_census_data \
--format csv \
--include-businesses
# Custom output filename
python manage.py export_census_data \
--format csv \
--output my_data.csv
Options:
--format - csv, excel, json, powerbi (default: csv)--site - Filter by site domain--output - Custom filename (default: auto-generated)--include-articles - Add article count and performance--include-businesses - Add business count and revenueOutput Columns:
Model: Display ads on high-traffic city pages
Calculation:
Optimization:
Model: 3-tier directory pricing
Tiers:
Calculation:
Target Markets:
Model: Sell custom Power BI dashboards and CSV exports
Products:
Target Customers:
Calculation:
Model: Document everything we build as courses on YouBetYourAzure.com
Courses:
Revenue:
Strategy: โ30 minutes documentation per 8 hours codingโ = 3X revenue multiplier
Goal: Validate business model with one site before scaling to 6 sites.
Total: 228 cities across 6 domains
Content Generation:
Revenue: Premium business listings ($50-150/month ร 1,000+ businesses)
Principle: Every hour of coding = 7.5 minutes of documentation
ROI: 12.5% time overhead for 3X revenue multiplier (25X ROI!)
Implementation:
Result:
missouriconstruction.com/
โโโ mocon/ # Django project
โ โโโ settings.py # Configuration
โ โโโ urls.py # URL routing
โ โโโ wsgi.py # WSGI for deployment
โ
โโโ core/ # Shared models and logic
โ โโโ models.py # 6 core models
โ โโโ admin.py # Admin interface
โ โโโ census_api.py # Census API client
โ โโโ ai_content_engine.py # AI content generation
โ โโโ management/
โ โโโ commands/
โ โโโ fetch_census_data.py
โ โโโ generate_daily_content.py
โ โโโ export_census_data.py
โ โโโ populate_springfields.py
โ
โโโ sites/ # Site-specific logic (future)
โโโ ai_engine/ # AI engine (future expansion)
โ
โโโ templates/ # HTML templates (to be built)
โ โโโ base/
โ โ โโโ base.html # Shared layout
โ โ โโโ city_home.html # City landing page
โ โ โโโ article.html # Article display
โ โโโ ...
โ
โโโ static/ # CSS, JS, images (to be built)
โโโ media/ # User uploads (logos, photos)
โ
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment template
โโโ .gitignore # Git exclusions
โโโ manage.py # Django CLI
โ
โโโ Documentation/
โโโ README.md # This file
โโโ CENSUS_API_COURSE_MODULE.md
โโโ AI_CONTENT_ENGINE_COURSE_MODULE.md
Backend:
APIs:
Frontend (To Be Built):
Deployment:
Analytics:
Why? AI is good but not perfect. Always review before publishing:
How to Publish:
Census API: FREE (no limit)
OpenAI GPT-4:
Budget Example:
Pro Tip: Use --dry-run to preview before spending money!
Census Data:
AI-Generated Content:
Email: gregory.woodruff@cloudandsecurelimited.com
GitHub: github.com/cloudandsecurelimited/missouriconstruction
Course Forum: youbetyourazure.com/community
Office Hours: Wednesdays 2-4 PM CST
Custom Implementation: $5,000+
Consulting Retainer: $2,000/month
Partnership Program:
Contact: sales@cloudandsecurelimited.com
MIT License - Use commercially, modify freely, teach others.
Attribution: Link back to youbetyourazure.com
Support: Hire us for consulting or send students our way!
Built by: Gregory Woodruff
Company: Cloud and Secure Limited
Course: youbetyourazure.com
Updated: February 2026
Version: 1.0