Skip to content

Commit

Permalink
Demo site improvements (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas authored Jun 8, 2020
1 parent 6c6593c commit 44edf47
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,6 @@ ENV/

# Rope project settings
.ropeproject

# SQLite database
*.sqlite3
Empty file modified manage.py
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions wagtailmedia/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
DATABASES = {
'default': {
'ENGINE': os.environ.get('DATABASE_ENGINE', 'django.db.backends.sqlite3'),
'NAME': os.environ.get('DATABASE_NAME', 'wagtailmedia'),
'NAME': os.environ.get('DATABASE_NAME', 'db.sqlite3'),
'USER': os.environ.get('DATABASE_USER', None),
'PASSWORD': os.environ.get('DATABASE_PASS', None),
'HOST': os.environ.get('DATABASE_HOST', None),
Expand Down Expand Up @@ -135,6 +135,6 @@

# must be set for interactive demo, copied per
# https://github.com/django/django/commit/adb96617897690b3a01e39e8297ae7d67825d2bc
ALLOWED_HOSTS = ['.localhost', '127.0.0.1', '[::1]']
ALLOWED_HOSTS = '*'

WAGTAIL_SITE_NAME = "Test Site"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% load wagtailcore_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }}</title>
</head>
<body>
<header>
</header>
<main>
<h1>{{ page.title }}</h1>
<p>From <time>{{ page.date_from }}</time> to <time>{{ page.date_to }}</time>, in {{ page.location }}.</p>
{{ page.body|richtext }}
</main>
</body>
</html>
2 changes: 2 additions & 0 deletions wagtailmedia/tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls

urlpatterns = [
url(r'^admin/', include(wagtailadmin_urls)),
url(r'^documents/', include(wagtaildocs_urls)),
url(r'', include(wagtail_urls)),
] + [
url(r'^%s(?P<path>.*)$' % re.escape(prefix.lstrip('/')), serve, kwargs={'document_root': document_root})
Expand Down

0 comments on commit 44edf47

Please sign in to comment.