refactor: rename Wizamart to Orion across entire codebase
Replace all ~1,086 occurrences of Wizamart/wizamart/WIZAMART/WizaMart with Orion/orion/ORION across 184 files. This includes database identifiers, email addresses, domain references, R2 bucket names, DNS prefixes, encryption salt, Celery app name, config defaults, Docker configs, CI configs, documentation, seed data, and templates. Renames homepage-wizamart.html template to homepage-orion.html. Fixes duplicate file_pattern key in api.yaml architecture rule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,11 +103,11 @@ INFO Response: 200 for GET /admin/dashboard (0.143s)
|
||||
|
||||
**Example**:
|
||||
```
|
||||
Request: https://wizamart.platform.com/shop/products
|
||||
Request: https://orion.platform.com/shop/products
|
||||
↓
|
||||
Middleware detects: store_code = "wizamart"
|
||||
Middleware detects: store_code = "orion"
|
||||
↓
|
||||
Queries database: SELECT * FROM stores WHERE code = 'wizamart'
|
||||
Queries database: SELECT * FROM stores WHERE code = 'orion'
|
||||
↓
|
||||
Injects: request.state.store = <Store object>
|
||||
request.state.store_id = 1
|
||||
@@ -141,7 +141,7 @@ Injects: request.state.store = <Store object>
|
||||
- /store/* or /api/v1/store/* → STORE
|
||||
- /storefront/*, /shop/*, /stores/* → STOREFRONT
|
||||
- /api/v1/platform/* → PLATFORM
|
||||
3. Store subdomain (wizamart.oms.lu) → STOREFRONT
|
||||
3. Store subdomain (orion.oms.lu) → STOREFRONT
|
||||
4. Store context set by middleware → STOREFRONT
|
||||
5. Default → PLATFORM
|
||||
```
|
||||
@@ -165,8 +165,8 @@ Injects: request.state.store = <Store object>
|
||||
{
|
||||
"primary_color": "#3B82F6",
|
||||
"secondary_color": "#10B981",
|
||||
"logo_url": "/static/stores/wizamart/logo.png",
|
||||
"favicon_url": "/static/stores/wizamart/favicon.ico",
|
||||
"logo_url": "/static/stores/orion/logo.png",
|
||||
"favicon_url": "/static/stores/orion/favicon.ico",
|
||||
"custom_css": "/* store-specific styles */"
|
||||
}
|
||||
```
|
||||
@@ -376,7 +376,7 @@ async def get_products(request: Request):
|
||||
|
||||
### Example: Shop Product Page Request
|
||||
|
||||
**URL**: `https://wizamart.myplatform.com/shop/products`
|
||||
**URL**: `https://orion.myplatform.com/shop/products`
|
||||
|
||||
**Middleware Processing**:
|
||||
|
||||
@@ -386,9 +386,9 @@ async def get_products(request: Request):
|
||||
↓ Logs: "Request: GET /shop/products from 192.168.1.100"
|
||||
|
||||
2. StoreContextMiddleware
|
||||
↓ Detects subdomain: "wizamart"
|
||||
↓ Queries DB: store = get_store_by_code("wizamart")
|
||||
↓ Sets: request.state.store = <Store: Wizamart>
|
||||
↓ Detects subdomain: "orion"
|
||||
↓ Queries DB: store = get_store_by_code("orion")
|
||||
↓ Sets: request.state.store = <Store: Orion>
|
||||
↓ Sets: request.state.store_id = 1
|
||||
↓ Sets: request.state.clean_path = "/shop/products"
|
||||
|
||||
@@ -496,13 +496,13 @@ from middleware.store_context import StoreContextManager
|
||||
|
||||
def test_store_detection_subdomain():
|
||||
# Mock request
|
||||
request = create_mock_request(host="wizamart.platform.com")
|
||||
request = create_mock_request(host="orion.platform.com")
|
||||
|
||||
# Test detection
|
||||
manager = StoreContextManager()
|
||||
store = manager.detect_store_from_subdomain(request)
|
||||
|
||||
assert store.code == "wizamart"
|
||||
assert store.code == "orion"
|
||||
```
|
||||
|
||||
### Integration Testing
|
||||
@@ -513,11 +513,11 @@ Test the full middleware stack:
|
||||
def test_shop_request_flow(client):
|
||||
response = client.get(
|
||||
"/shop/products",
|
||||
headers={"Host": "wizamart.platform.com"}
|
||||
headers={"Host": "orion.platform.com"}
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Wizamart" in response.text
|
||||
assert "Orion" in response.text
|
||||
```
|
||||
|
||||
**See**: [Testing Guide](../testing/testing-guide.md)
|
||||
|
||||
Reference in New Issue
Block a user