Added body field to Homepage. Switched to python-slim image

master
androiddrew 6 years ago
parent 87b123f1d3
commit fd505fa144

3
.gitignore vendored

@ -63,3 +63,6 @@ target/
# MacOS # MacOS
*.DS_Store *.DS_Store
# A scratch pad file you will not want to upload to the repo
NOTES.md

@ -16,7 +16,7 @@ echo "mysecret" | docker secret create <secret_name> -
To test the build locally on your laptop: To test the build locally on your laptop:
`docker run -it --name datasketch_cms -e DB_HOST="host.docker.internal" -p 8888:8000 androiddrew/datasketch:latest` `docker run -it --name datasketch_cms -e DB_HOST="host.docker.internal" -e DB_PORT=5432 -p 8888:5000 androiddrew/datasketch:<tag> gunicorn cms.wsgi:application --bind 0.0.0.0:5000 --workers 3`
If using the postgres.app on Mac OS you will need to update both the postgresql.conf and pg_hba.conf files If using the postgres.app on Mac OS you will need to update both the postgresql.conf and pg_hba.conf files

@ -3,7 +3,7 @@ version: '3.6'
services: services:
cms: cms:
image: androiddrew/datasketch:0.1.3 image: androiddrew/datasketch:0.1.4
command: gunicorn cms.wsgi:application --bind 0.0.0.0:5000 --workers 3 command: gunicorn cms.wsgi:application --bind 0.0.0.0:5000 --workers 3
deploy: deploy:
replicas: 1 replicas: 1

@ -0,0 +1,2 @@
env/
README.md

@ -1,5 +1,5 @@
#FROM python:3.7-alpine #FROM python:3.7-alpine
FROM python:3.7 FROM python:3.7-slim
LABEL maintainer="drew@androiddrew.comw" LABEL maintainer="drew@androiddrew.comw"
# Set environmental variables # Set environmental variables

@ -0,0 +1,17 @@
# Generated by Django 2.1.2 on 2018-11-10 21:18
from django.db import migrations
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [("home", "0002_create_homepage")]
operations = [
migrations.AddField(
model_name="homepage",
name="body",
field=wagtail.core.fields.RichTextField(blank=True),
)
]

@ -1,7 +1,11 @@
from django.db import models from django.db import models
from wagtail.core.models import Page from wagtail.core.models import Page
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel
class HomePage(Page): class HomePage(Page):
pass body = RichTextField(blank=True)
content_panels = Page.content_panels + [FieldPanel("body", classname="full")]

@ -1,7 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load wagtailcore_tags %}
{% block body_class %}helvetica{% endblock %} {% block body_class %}helvetica{% endblock %}
{% block content %} {% block content %}
<h1>Welcome to Datasketch.io!</h1> <h1>Welcome to Datasketch.io!</h1>
{{ page.body|richtext }}
{% endblock %} {% endblock %}

Loading…
Cancel
Save