Compare commits
5 Commits
tests/e2e
...
71d0e71834
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71d0e71834
|
||
|
|
08e003e165
|
||
|
|
7b2ad4cfe5
|
||
|
|
56e53478ea
|
||
| 96f9eca19d |
@@ -116,20 +116,16 @@ class Command(BaseCommand):
|
||||
legal_index.add_child(instance=privacy)
|
||||
privacy.save_revision().publish()
|
||||
|
||||
site, _ = Site.objects.get_or_create(
|
||||
hostname="127.0.0.1",
|
||||
port=8000,
|
||||
defaults={
|
||||
"root_page": home,
|
||||
"is_default_site": True,
|
||||
"site_name": "No Hype AI",
|
||||
},
|
||||
)
|
||||
site.root_page = home
|
||||
# Point every existing Site at the real home page and mark exactly one
|
||||
# as the default. Wagtail's initial migration creates a localhost:80
|
||||
# site that matches incoming requests by hostname before the
|
||||
# is_default_site fallback is ever reached, so we must update *all*
|
||||
# sites, not just the is_default_site one.
|
||||
Site.objects.all().update(root_page=home, site_name="No Hype AI", is_default_site=False)
|
||||
site = Site.objects.first()
|
||||
if site is None:
|
||||
site = Site(hostname="localhost", port=80)
|
||||
site.is_default_site = True
|
||||
site.site_name = "No Hype AI"
|
||||
site.save()
|
||||
# Remove any other conflicting default-site entries left by test fixtures
|
||||
Site.objects.exclude(pk=site.pk).filter(is_default_site=True).update(is_default_site=False)
|
||||
|
||||
self.stdout.write(self.style.SUCCESS("Seeded E2E content."))
|
||||
|
||||
@@ -4,6 +4,11 @@ DEBUG = True
|
||||
|
||||
INTERNAL_IPS = ["127.0.0.1"]
|
||||
|
||||
# Use plain static file storage in dev — CompressedManifestStaticFilesStorage
|
||||
# (set in base.py) requires collectstatic to have been run and will 404 on
|
||||
# every asset otherwise.
|
||||
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
|
||||
|
||||
try:
|
||||
import debug_toolbar # noqa: F401
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ services:
|
||||
working_dir: /app
|
||||
command: >
|
||||
sh -c "python manage.py migrate --noinput &&
|
||||
python manage.py seed_e2e_content &&
|
||||
python manage.py runserver 0.0.0.0:8000"
|
||||
volumes:
|
||||
- .:/app
|
||||
- /opt/playwright-tools/browsers:/opt/playwright-tools/browsers:ro
|
||||
ports:
|
||||
- "8035:8000"
|
||||
environment:
|
||||
@@ -22,7 +22,6 @@ services:
|
||||
EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend
|
||||
DEFAULT_FROM_EMAIL: hello@nohypeai.com
|
||||
NEWSLETTER_PROVIDER: buttondown
|
||||
PLAYWRIGHT_BROWSERS_PATH: /opt/playwright-tools/browsers
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user