A Django-based digital humanities project for researching and cataloging textile trade data, with integrated museum collection crawling and comprehensive data management capabilities.
Tech Stack: Python 3.12 / Django 5.0 / PostgreSQL 17 / Tailwind CSS / Wagtail CMS
Connecting Threads is a digital scholarship project that combines:
- Textile record management with comprehensive metadata and relationships
- Museum collection integration through automated crawling of V&A and Cooper-Hewitt APIs
- Research workflow tools for reviewing, publishing, and exporting data
- Public-facing interface built with Wagtail CMS
- Modern admin interface powered by Django Unfold
- Automated data fetching from Victoria & Albert Museum and Cooper-Hewitt APIs
- Image downloading with thumbnail generation and IIIF support
- Review workflow for quality control before publishing
- Batch operations for efficient data processing
- Comprehensive metadata including dates, locations, subjects, and textile types
- Relationship mapping between places, areas, subjects, and named actors
- Image management with public/private visibility controls
- Tag-based organization with keyword support
- Modern UI with Django Unfold theme integration
- Thumbnail previews in list views for quick visual identification
- Advanced filtering and search capabilities
- Bulk actions for efficient data management
- Export functionality with customizable field mappings
- Multiple export formats (CSV, Excel, JSON) via django-import-export
- Custom field mappings with human-readable column names
- Comprehensive data including relationships, images, and metadata
- Research-ready datasets for analysis and sharing
- Python 3.12+
- PostgreSQL 17+
- Node.js (for Tailwind CSS compilation)
The project uses uv for fast Python package management:
cd ct-django
# Install dependencies
uv sync
# Install pre-commit hooks for code formatting
uv run pre-commit install
uv run pre-commit autoupdateCreate a .env file with required configuration:
# Generate a secure secret key
echo "DJANGO_SECRET_KEY=$(uv run python -c 'import secrets; print(secrets.token_urlsafe())')" >> .env
# Basic Django settings
echo "DEBUG=True" >> .env
echo "DJANGO_ALLOWED_HOSTS=localhost" >> .env
echo "DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost" >> .env
# Database configuration
echo "DB_HOST=localhost" >> .env
echo "DB_PORT=5432" >> .env
echo "DB_NAME=connectingthreads" >> .env
echo "DB_USER=connectingthreads" >> .env
echo "DB_PASS=your_password" >> .env
# Museum API keys
echo "COOPER_HEWITT_API_KEY=your_cooper_hewitt_key" >> .env# Create PostgreSQL database
createdb connectingthreads
# Run migrations
uv run python manage.py migrate
# Create superuser
uv run python manage.py createsuperuser# Start the Django development server
uv run python manage.py runserver
# In a separate terminal, compile Tailwind CSS
uv run python manage.py tailwind startCommon development tasks are available via Makefile:
make preview: Start the development server (uv run python manage.py runserver)make tailwind: Start Tailwind CSS compilation in watch modemake mm: Create Django migrations (uv run python manage.py makemigrations)make migrate: Apply Django migrations (uv run python manage.py migrate)make test: Run the test suitemake lint: Run code linting and formatting
ct-django/
βββ config/ # Django settings and configuration
βββ material/ # Core textile record models and admin
βββ crawler/ # Museum API crawling functionality
βββ exhibits/ # Exhibition and display models
βββ theme/ # Tailwind CSS theme and styling
βββ templates/ # Django templates
βββ static/ # Static assets
βββ media/ # Uploaded files and images
βββ requirements/ # Dependency specifications
- Access the admin interface at
/admin/ - Navigate to Crawler β Staged Museum Items
- Use the fetch buttons to download data:
- "Fetch All Data" - Downloads from both museums
- "Fetch Cooper-Hewitt" - Downloads from Cooper-Hewitt API
- "Fetch V&A" - Downloads from Victoria & Albert Museum API
- Review fetched items in the Staged Museum Items list
- Add review notes and mark items as reviewed
- Publish approved items to create TextileRecord entries
- Manage published records in the Textile Records admin
Both Staged Museum Items and Textile Records support comprehensive data export:
- Select records to export (or export all)
- Choose export format (CSV, Excel, JSON)
- Download research-ready datasets with proper column names
We use pre-commit hooks to maintain code quality:
# Install hooks
uv run pre-commit install
# Run hooks manually
uv run pre-commit run --all-filesCode formatting is handled by:
- Black for Python code formatting
- djhtml for Django template formatting
- Ruff for Python linting
[Add license information here]
This project is developed by the Roy Rosenzweig Center for History and New Media at George Mason University. Museum data is provided through the generous APIs of:
- Victoria & Albert Museum, London
- Cooper-Hewitt, Smithsonian Design Museum