https://github.com/gabeduke/django-gift-wiki
https://github.com/gabeduke/django-gift-wiki
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gabeduke/django-gift-wiki
- Owner: gabeduke
- License: mit
- Created: 2023-12-02T01:47:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-30T00:06:09.000Z (7 months ago)
- Last Synced: 2026-01-02T07:30:16.496Z (7 months ago)
- Language: Python
- Size: 7.16 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django Gift Wiki
A family-oriented gift wish list management application built with Django.
## Features
- ๐จโ๐ฉโ๐งโ๐ฆ Family-based organization
- ๐ Wish list creation and management
- ๐ Item tracking with purchase status
- ๐จ Family crest generation (optional, disabled by default)
- ๐ User authentication and profiles
## Quick Start
### Feature Flag Admin
**NEW:** Manage feature flags from the admin interface!
1. Visit http://localhost:8000/admin/
2. Login with superuser credentials
3. Look for **"Feature Flags"** in the Gift section
4. Toggle features on/off with checkboxes - no server restart needed!
See `FEATURE_FLAG_ADMIN_README.md` for detailed instructions.
## Quick Start (Standard)
### Prerequisites
- Python 3.10+
- pipenv (install via `pip install pipenv`)
### Setup
1. **Clone the repository**
```bash
cd django-gift-wiki
```
2. **Install dependencies**
```bash
pipenv install
```
3. **Configure environment**
```bash
cp env.example .env
# Edit .env with your settings
```
4. **Run migrations**
```bash
pipenv run python manage.py migrate
```
5. **Create superuser (optional)**
```bash
pipenv run python manage.py createsuperuser
```
6. **Start development server**
```bash
pipenv run python manage.py runserver
```
7. **Access the application**
- Home: http://localhost:8000/
- Admin: http://localhost:8000/admin/
8. **Run tests**
```bash
make test # Run all tests
make test-cov # Run with coverage
make test-api # Run API tests only
```
## Testing
This project uses **pytest**, **pytest-django**, and **pytest-bdd** for comprehensive testing.
### Test Commands
```bash
make test # Run all tests
make test-cov # Run with coverage report
make test-unit # Run unit tests only
make test-api # Run API tests only
make test-bdd # Run BDD tests only
make test-parallel # Run tests in parallel
```
### Test Structure
- `tests/api/` - API and view tests
- `tests/features/` - BDD feature definitions (.feature files)
- `tests/steps/` - BDD step implementations
- `tests/conftest.py` - Shared test fixtures
### Current Test Status
- โ
Comprehensive test suite covering:
- View tests (home, wishlist, item, authentication)
- Business rules (ownership, purchase behavior, soft delete)
- Managers functionality (multi-user wishlist management)
- Scraped page import functionality
- โ
BDD feature files for acceptance testing
- โ
Test fixtures for common test data
See `tests/README.md` for detailed testing documentation.
## PyCharm Setup
This project is configured for PyCharm:
1. Open project in PyCharm
2. PyCharm should detect the Pipenv virtual environment automatically
3. Use the "giftwiki" run configuration to start the server
4. Use "python manage.py shell" run configuration for Django shell
## Project Structure
```
django-gift-wiki/
โโโ gift/ # Main gift management app
โ โโโ models.py # Database models
โ โโโ views.py # View functions
โ โโโ forms.py # Form classes
โ โโโ templates/ # HTML templates
โโโ crest_generator/ # Crest generation app (optional)
โโโ giftwiki/ # Django project settings
โ โโโ settings.py # Configuration
โ โโโ urls.py # URL routing
โโโ deploy/ # Kubernetes deployment configs
โโโ requirements.txt # Python dependencies
```
## Database Models
- **WikiUser**: Custom user model with family associations
- **Family**: Family groups for organizing users
- **WishList**: Gift lists belonging to users
- **Item**: Individual items on wish lists
- **Suggestion**: Suggested variations for items
- **Crest**: Family crest information (if enabled)
## Feature Flags
Enable optional features via environment variables in `.env`:
```bash
# Enable crest generator (optional)
CREST_GENERATOR_ENABLED=TRUE
OPENAI_API_KEY=your-openai-key
# Enable steward/proxy functionality (optional, confusing UI)
STEWARD_PROXY_ENABLED=TRUE
```
See `FEATURE_FLAGS.md` for detailed documentation on all feature flags.
## Development Notes
- Uses SQLite for local development
- PostgreSQL configured for production deployment
- AWS S3 support for media file storage
- Kubernetes-ready with deployment manifests
## Recent Changes
- Crest generator shelved behind feature flag
- Core gift workflow fixed and tested
- All redirect URLs corrected
- Simplified wishlist creation workflow
## License
MIT