This appears to be covered here: http://docs.wagtail.io/en/v2.0.1/advanced_topics/settings.html - cross check all settings
Refer to Django settings - https://docs.djangoproject.com/en/2.0/ref/settings/
<div | |
data-controller="budget" | |
data-action="change->budget#updateTotals focusout->budget#updateTotals" | |
data-budget-per-price-value="PP" | |
> | |
{% include "wagtailadmin/panels/multi_field_panel.html" %} | |
<output for="{{ field_ids|join:' ' }}"> | |
<h3>Budget summary</h3> | |
<dl> | |
<dt>Total price per</dt> |
diff --git a/products/edit_handlers.py b/products/edit_handlers.py | |
new file mode 100644 | |
index 0000000000000000000000000000000000000000..44c5faabbb435ca9962b92985115543e60924f2e | |
--- /dev/null | |
+++ b/products/edit_handlers.py | |
@@ -0,0 +1,29 @@ | |
+from wagtail.images.edit_handlers import ImageChooserPanel | |
+from wagtail.images.widgets import AdminImageChooser | |
+ | |
+ |
This appears to be covered here: http://docs.wagtail.io/en/v2.0.1/advanced_topics/settings.html - cross check all settings
Refer to Django settings - https://docs.djangoproject.com/en/2.0/ref/settings/
"""Node model and Node admin interaction.""" | |
from django import forms | |
from django.conf.urls import url | |
from django.contrib.admin.utils import quote, unquote | |
from django.core.exceptions import PermissionDenied | |
from django.core.validators import MinLengthValidator, RegexValidator | |
from django.db import models | |
from django.shortcuts import get_object_or_404 | |
from django.template.loader import render_to_string |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
from wagtail.wagtailforms.models import AbstractFormField, FORM_FIELD_CHOICES | |
from wagtail.wagtailforms.forms import FormBuilder | |
from wagtail.wagtailimages.fields import WagtailImageField | |
def filename_to_title(filename): | |
from os.path import splitext | |
if filename: | |
result = splitext(filename)[0] | |
result = result.replace('-', ' ').replace('_', ' ') |
from wagtail.wagtailimages import get_image_model | |
class FormPage(AbstractEmailForm): | |
form_builder = ExtendedFormBuilder # as per step 3 | |
def serve(self, request, *args, **kwargs): | |
# ... as per step 4 | |
def process_form_submission(self, form): | |
cleaned_data = form.cleaned_data |
{% extends "base.html" %} | |
{% load wagtailcore_tags %} | |
{% block content %} | |
{{ self.intro }} | |
<form action="{% pageurl self %}" method="POST" enctype="multipart/form-data"> | |
{% csrf_token %} | |
{{ form.as_p }} | |
<input type="submit"> | |
</form> |
class FormPage(AbstractEmailForm): | |
form_builder = ExtendedFormBuilder # see the step above | |
def serve(self, request, *args, **kwargs): | |
if request.method == 'POST': | |
# form = self.get_form(request.POST, page=self, user=request.user) # Original line | |
form = self.get_form(request.POST, request.FILES, page=self, user=request.user) | |
if form.is_valid(): | |
self.process_form_submission(form) |
# definition of ExtendedFormBuilder or import from another file above the Formpage class | |
class FormPage(AbstractEmailForm): | |
form_builder = ExtendedFormBuilder | |
# the rest of the form page definition ... |