Browse Source

Removed old tutorial site from repo

Vince Salvino 9 months ago
parent
commit
c0b8ef5e04
28 changed files with 8 additions and 1614 deletions
  1. 8 13
      docs/getting_started/about_tutorial.rst
  2. 0 9
      tutorial/mysite/.gitattributes
  3. 0 399
      tutorial/mysite/.gitignore
  4. 0 38
      tutorial/mysite/README.md
  5. 0 10
      tutorial/mysite/manage.py
  6. 0 0
      tutorial/mysite/mysite/__init__.py
  7. 0 0
      tutorial/mysite/mysite/settings/__init__.py
  8. 0 188
      tutorial/mysite/mysite/settings/base.py
  9. 0 18
      tutorial/mysite/mysite/settings/dev.py
  10. 0 82
      tutorial/mysite/mysite/settings/prod.py
  11. 0 33
      tutorial/mysite/mysite/urls.py
  12. 0 16
      tutorial/mysite/mysite/wsgi.py
  13. 0 10
      tutorial/mysite/requirements.txt
  14. 0 0
      tutorial/mysite/website/__init__.py
  15. 0 6
      tutorial/mysite/website/apps.py
  16. 0 318
      tutorial/mysite/website/fixtures/database.json
  17. 0 30
      tutorial/mysite/website/migrations/0001_initial.py
  18. 0 58
      tutorial/mysite/website/migrations/0002_initial_data.py
  19. 0 28
      tutorial/mysite/website/migrations/0003_auto_20200909_1259.py
  20. 0 18
      tutorial/mysite/website/migrations/0004_auto_20200909_1428.py
  21. 0 0
      tutorial/mysite/website/migrations/__init__.py
  22. 0 152
      tutorial/mysite/website/models.py
  23. 0 33
      tutorial/mysite/website/static/website/css/custom.css
  24. 0 0
      tutorial/mysite/website/static/website/js/custom.js
  25. 0 12
      tutorial/mysite/website/templates/coderedcms/pages/base.html
  26. 0 79
      tutorial/mysite/website/templates/coderedcms/snippets/navbar.html
  27. 0 27
      tutorial/mysite/website/templates/website/pages/cupcakes_index_page.html
  28. 0 37
      tutorial/mysite/website/templates/website/pages/cupcakes_page.html

+ 8 - 13
docs/getting_started/about_tutorial.rst

@@ -4,29 +4,23 @@ About The Tutorial
 It is recommended that you follow the tutorial as closely as possible. This allows you to troubleshoot most issues on your own.
 If you find an errors, typos, or discrepancies, please let us know.
 
-`Preview the demo project here <https://crxpharma.codered.cloud/>`_
-
-`Code for the demo project here <https://github.com/Zsvoboda87/wagtail-crx-demo>`_
-
-
 Screenshots
 -----------
-Visual Studio Code is used as the code editor for coding specific screenshots.  There are many extensions and themes available for Visual Studio Code.
-It is likely that your code editor will look slightly different.
+Visual Studio Code is used as the code editor for coding specific screenshots. It is likely that your code editor will look slightly different.
 
 Sass support
 ------------
 
-This tutorial uses sass support.  This allows us to easily override the default bootstrap colors.
+This tutorial uses sass. This allows us to easily override the default bootstrap colors.
 The few extra steps at the beginning saves us from writing more CSS to accomplish the same goal.
 See:  :ref:`sass_install`
 
 After following the installation guide and compiling the sass (step 7), your site should look like this:
 
 .. figure:: images/about_tutorial/about_tut_start.jpeg
-    :alt: Starting Page
+   :alt: Starting Page
 
-    The Starting Page.
+   The Starting Page.
 
 If it does not look like that:
 
@@ -35,12 +29,13 @@ If it does not look like that:
 * Hard refresh your browser to reload the CSS stylesheet.
 
 .. figure:: images/about_tutorial/base_html.jpg
-    :alt: Linked Style Sheet
+   :alt: Linked Style Sheet
 
-    The Style sheet is linked on line 14
+   The Style sheet is linked on line 14
 
 .. note::
-    Every time a change is made to the sass files we have to compile it and hard refresh the browser.
+
+   Every time a change is made to the sass files we have to compile it and hard refresh the browser.
 
 
 Follow the tutorial: :doc:`tutorial01`.

+ 0 - 9
tutorial/mysite/.gitattributes

@@ -1,9 +0,0 @@
-# Explicitly declare text files that should always be normalized and converted
-# to unix line endings, to reduce cross-platform development issues.
-*.py text eol=lf
-*.html text eol=lf
-*.js text eol=lf
-*.css text eol=lf
-*.json text eol=lf
-*.md text eol=lf
-*.rst text eol=lf

+ 0 - 399
tutorial/mysite/.gitignore

@@ -1,399 +0,0 @@
-# Created by https://www.gitignore.io, modified for use with CodeRed CMS.
-
-#######################################
-### Editors
-#######################################
-
-
-### Emacs ###
-
-# -*- mode: gitignore; -*-
-*~
-\#*\#
-/.emacs.desktop
-/.emacs.desktop.lock
-*.elc
-auto-save-list
-tramp
-.\#*
-
-# Org-mode
-.org-id-locations
-*_archive
-
-# flymake-mode
-*_flymake.*
-
-# eshell files
-/eshell/history
-/eshell/lastdir
-
-# elpa packages
-/elpa/
-
-# reftex files
-*.rel
-
-# Flycheck
-flycheck_*.el
-
-# server auth directory
-/server/
-
-# projectiles files
-.projectile
-
-# directory configuration
-.dir-locals.el
-
-# network security
-/network-security.data
-
-
-### KomodoEdit ###
-
-*.komodoproject
-.komodotools
-
-
-### PyCharm ###
-
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
-# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-
-# User-specific stuff
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-.idea/**/libraries
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Sonarlint plugin
-.idea/sonarlint
-
-
-### SublimeText ###
-
-# Cache files for Sublime Text
-*.tmlanguage.cache
-*.tmPreferences.cache
-*.stTheme.cache
-
-# Workspace files are user-specific
-*.sublime-workspace
-
-# Project files should be checked into the repository, unless a significant
-# proportion of contributors will probably not be using Sublime Text
-# *.sublime-project
-
-# SFTP configuration file
-sftp-config.json
-
-# Package control specific files
-Package Control.last-run
-Package Control.ca-list
-Package Control.ca-bundle
-Package Control.system-ca-bundle
-Package Control.cache/
-Package Control.ca-certs/
-Package Control.merged-ca-bundle
-Package Control.user-ca-bundle
-oscrypto-ca-bundle.crt
-bh_unicode_properties.cache
-
-# Sublime-github package stores a github token in this file
-# https://packagecontrol.io/packages/sublime-github
-GitHub.sublime-settings
-
-
-### TextMate ###
-
-*.tmproj
-*.tmproject
-tmtags
-
-
-### Vim ###
-
-# Swap
-[._]*.s[a-v][a-z]
-[._]*.sw[a-p]
-[._]s[a-rt-v][a-z]
-[._]ss[a-gi-z]
-[._]sw[a-p]
-
-# Session
-Session.vim
-
-# Temporary
-.netrwhist
-# Auto-generated tag files
-tags
-# Persistent undo
-[._]*.un~
-
-
-### VisualStudioCode ###
-.vscode/
-
-### VisualStudioCode Patch ###
-# Ignore all local history of files
-.history
-
-
-
-#######################################
-### Django/Python Stack
-#######################################
-
-
-### Django ###
-
-*.log
-*.pot
-*.pyc
-__pycache__/
-local_settings.py
-db.sqlite3
-
-# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
-# in your Git repository. Update and uncomment the following line accordingly.
-# <django-project-name>/staticfiles/
-
-
-### Django.Python Stack ###
-
-# Byte-compiled / optimized / DLL files
-*.py[cod]
-*$py.class
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-wheels/
-share/python-wheels/
-*.egg-info/
-.installed.cfg
-*.egg
-MANIFEST
-
-# PyInstaller
-#  Usually these files are written by a python script from a template
-#  before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.nox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*.cover
-.hypothesis/
-.pytest_cache/
-
-# Translations
-*.mo
-
-# Flask stuff:
-instance/
-.webassets-cache
-
-# Scrapy stuff:
-.scrapy
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-# Jupyter Notebook
-.ipynb_checkpoints
-
-# IPython
-profile_default/
-ipython_config.py
-
-# pyenv
-.python-version
-
-# celery beat schedule file
-celerybeat-schedule
-
-# SageMath parsed files
-*.sage.py
-
-# Environments
-.env
-.venv
-env/
-venv/
-ENV/
-env.bak/
-venv.bak/
-
-# Spyder project settings
-.spyderproject
-.spyproject
-
-# Rope project settings
-.ropeproject
-
-# mkdocs documentation
-/site
-
-# mypy
-.mypy_cache/
-.dmypy.json
-dmypy.json
-
-# Pyre type checker
-.pyre/
-
-
-### OSX ###
-
-# General
-.DS_Store
-.AppleDouble
-.LSOverride
-
-# Icon must end with two \r
-Icon
-
-# Thumbnails
-._*
-
-# Files that might appear in the root of a volume
-.DocumentRevisions-V100
-.fseventsd
-.Spotlight-V100
-.TemporaryItems
-.Trashes
-.VolumeIcon.icns
-.com.apple.timemachine.donotpresent
-
-# Directories potentially created on remote AFP share
-.AppleDB
-.AppleDesktop
-Network Trash Folder
-Temporary Items
-.apdisk
-
-
-
-#######################################
-### Operating Systems
-#######################################
-
-
-### Windows ###
-
-# Windows thumbnail cache files
-Thumbs.db
-ehthumbs.db
-ehthumbs_vista.db
-
-# Dump file
-*.stackdump
-
-# Folder config file
-[Dd]esktop.ini
-
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
-
-# Windows Installer files
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
-
-# Windows shortcuts
-*.lnk
-
-
-
-#######################################
-### CodeRed CMS
-#######################################
-
-
-#### CodeRed CMS defaults ###
-
-# Cache
-cache/
-
-# File uploads from forms
-protected/
-
-# if you want to store original uploaded media files in version control,
-# replace "media/" with "media/images/"
-media/
-#media/images/

+ 0 - 38
tutorial/mysite/README.md

@@ -1,38 +0,0 @@
-# My Company Inc. website
-
-Code for site at: http://localhost
-
-
-## Getting started
-
-Make sure a recent version of Python is installed on your system.
-Open this directory in a command prompt, then:
-
-1. Install the software:
-   ```
-   pip install -r requirements.txt
-   ```
-
-2. Run the development server:
-   ```
-   python manage.py runserver
-   ```
-
-3. Go to http://localhost:8000/ in your browser, or http://localhost:8000/admin/
-   to log in and get to work!
-
-## Documentation links
-
-* To customize the content, design, and features of the site see
-  [Wagtail CRX](https://docs.coderedcorp.com/wagtail-crx/).
-
-* For deeper customization of backend code see
-  [Wagtail](http://docs.wagtail.io/) and
-  [Django](https://docs.djangoproject.com/).
-
-* For HTML template design see [Bootstrap](https://getbootstrap.com/).
-
----
-
-Made with ♥ using [Wagtail](https://wagtail.io/) +
-[CodeRed Extensions](https://www.coderedcorp.com/cms/)

+ 0 - 10
tutorial/mysite/manage.py

@@ -1,10 +0,0 @@
-#!/usr/bin/env python
-import os
-import sys
-
-if __name__ == "__main__":
-    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings.dev")
-
-    from django.core.management import execute_from_command_line
-
-    execute_from_command_line(sys.argv)

+ 0 - 0
tutorial/mysite/mysite/__init__.py


+ 0 - 0
tutorial/mysite/mysite/settings/__init__.py


+ 0 - 188
tutorial/mysite/mysite/settings/base.py

@@ -1,188 +0,0 @@
-"""
-Django settings for mysite project.
-
-Generated by 'django-admin startproject' using Django 3.0.10.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/3.0/topics/settings/
-
-For the full list of settings and their values, see
-https://docs.djangoproject.com/en/3.0/ref/settings/
-"""
-
-# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
-import os
-from django.utils.translation import gettext_lazy as _
-
-PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-BASE_DIR = os.path.dirname(PROJECT_DIR)
-
-
-# Quick-start development settings - unsuitable for production
-# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
-
-
-# Application definition
-
-INSTALLED_APPS = [
-    # This project
-    "website",
-    # Wagtail CRX (CodeRed Extensions)
-    "coderedcms",
-    "django_bootstrap5",
-    "modelcluster",
-    "taggit",
-    "wagtailcache",
-    "wagtailseo",
-    # Wagtail
-    "wagtail.contrib.forms",
-    "wagtail.contrib.redirects",
-    "wagtail.embeds",
-    "wagtail.sites",
-    "wagtail.users",
-    "wagtail.snippets",
-    "wagtail.documents",
-    "wagtail.images",
-    "wagtail.search",
-    "wagtail.core",
-    "wagtail.contrib.settings",
-    "wagtail.contrib.table_block",
-    "wagtail.admin",
-    # Django
-    "django.contrib.admin",
-    "django.contrib.auth",
-    "django.contrib.contenttypes",
-    "django.contrib.sessions",
-    "django.contrib.messages",
-    "django.contrib.staticfiles",
-    "django.contrib.sitemaps",
-]
-
-MIDDLEWARE = [
-    # Save pages to cache. Must be FIRST.
-    "wagtailcache.cache.UpdateCacheMiddleware",
-    # Common functionality
-    "django.contrib.sessions.middleware.SessionMiddleware",
-    "django.contrib.messages.middleware.MessageMiddleware",
-    "django.middleware.common.CommonMiddleware",
-    # Security
-    "django.middleware.csrf.CsrfViewMiddleware",
-    "django.contrib.auth.middleware.AuthenticationMiddleware",
-    "django.middleware.clickjacking.XFrameOptionsMiddleware",
-    "django.middleware.security.SecurityMiddleware",
-    #  Error reporting. Uncomment this to recieve emails when a 404 is triggered.
-    # 'django.middleware.common.BrokenLinkEmailsMiddleware',
-    # CMS functionality
-    "wagtail.contrib.redirects.middleware.RedirectMiddleware",
-    # Fetch from cache. Must be LAST.
-    "wagtailcache.cache.FetchFromCacheMiddleware",
-]
-
-ROOT_URLCONF = "mysite.urls"
-
-TEMPLATES = [
-    {
-        "BACKEND": "django.template.backends.django.DjangoTemplates",
-        "APP_DIRS": True,
-        "OPTIONS": {
-            "context_processors": [
-                "django.template.context_processors.debug",
-                "django.template.context_processors.request",
-                "django.contrib.auth.context_processors.auth",
-                "django.contrib.messages.context_processors.messages",
-                "wagtail.contrib.settings.context_processors.settings",
-            ],
-        },
-    },
-]
-
-WSGI_APPLICATION = "mysite.wsgi.application"
-
-
-# Database
-# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
-
-DATABASES = {
-    "default": {
-        "ENGINE": "django.db.backends.sqlite3",
-        "NAME": os.path.join(BASE_DIR, "db.sqlite3"),
-    }
-}
-
-# Password validation
-# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
-
-AUTH_PASSWORD_VALIDATORS = [
-    {
-        "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
-    },
-    {
-        "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
-    },
-    {
-        "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
-    },
-    {
-        "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
-    },
-]
-
-# Internationalization
-# https://docs.djangoproject.com/en/3.0/topics/i18n/
-
-# To add or change language of the project, modify the list below.
-LANGUAGE_CODE = "en-us"
-
-LANGUAGES = [("en-us", _("English"))]
-
-TIME_ZONE = "America/New_York"
-
-USE_I18N = True
-
-USE_TZ = True
-
-
-# Static files (CSS, JavaScript, Images)
-# https://docs.djangoproject.com/en/3.0/howto/static-files/
-
-STATICFILES_FINDERS = [
-    "django.contrib.staticfiles.finders.FileSystemFinder",
-    "django.contrib.staticfiles.finders.AppDirectoriesFinder",
-]
-
-STATIC_ROOT = os.path.join(BASE_DIR, "static")
-STATIC_URL = "/static/"
-
-MEDIA_ROOT = os.path.join(BASE_DIR, "media")
-MEDIA_URL = "/media/"
-
-
-# Login
-
-LOGIN_URL = "wagtailadmin_login"
-LOGIN_REDIRECT_URL = "wagtailadmin_home"
-
-
-# Wagtail settings
-
-WAGTAIL_SITE_NAME = "Simple Sweet Desserts Ltd."
-
-WAGTAIL_ENABLE_UPDATE_CHECK = False
-
-WAGTAILSEARCH_BACKENDS = {
-    "default": {
-        "BACKEND": "wagtail.search.backends.database",
-    }
-}
-
-# Base URL to use when referring to full URLs within the Wagtail admin backend -
-# e.g. in notification emails. Don't include '/admin' or a trailing slash
-WAGTAILADMIN_BASE_URL = "http://localhost"
-
-
-# Tags
-
-TAGGIT_CASE_INSENSITIVE = True
-
-
-DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

+ 0 - 18
tutorial/mysite/mysite/settings/dev.py

@@ -1,18 +0,0 @@
-from .base import *  # noqa
-
-# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
-
-# SECURITY WARNING: keep the secret key used in production secret!
-SECRET_KEY = "abn^vwh^_m31u=sxw)+7ztc^ov&rpi2zc=1o54&m0r+(0m5s*i"
-
-ALLOWED_HOSTS = ["*"]
-
-EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
-
-WAGTAIL_CACHE = False
-
-try:
-    from .local_settings import *  # noqa
-except ImportError:
-    pass

+ 0 - 82
tutorial/mysite/mysite/settings/prod.py

@@ -1,82 +0,0 @@
-from .base import *  # noqa
-
-# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = False
-
-# SECURITY WARNING: keep the secret key used in production secret!
-SECRET_KEY = "abn^vwh^_m31u=sxw)+7ztc^ov&rpi2zc=1o54&m0r+(0m5s*i"
-
-# Add your site's domain name(s) here.
-ALLOWED_HOSTS = ["localhost"]
-
-# To send email from the server, we recommend django_sendmail_backend
-# Or specify your own email backend such as an SMTP server.
-# https://docs.djangoproject.com/en/3.0/ref/settings/#email-backend
-EMAIL_BACKEND = "django_sendmail_backend.backends.EmailBackend"
-
-# Default email address used to send messages from the website.
-DEFAULT_FROM_EMAIL = "My Company Inc. <info@localhost>"
-
-# A list of people who get error notifications.
-ADMINS = [
-    ("Administrator", "admin@localhost"),
-]
-
-# A list in the same format as ADMINS that specifies who should get broken link
-# (404) notifications when BrokenLinkEmailsMiddleware is enabled.
-MANAGERS = ADMINS
-
-# Email address used to send error messages to ADMINS.
-SERVER_EMAIL = DEFAULT_FROM_EMAIL
-
-# DATABASES = {
-#     'default': {
-#         'ENGINE': 'django.db.backends.mysql',
-#         'HOST': 'localhost',
-#         'NAME': 'mysite',
-#         'USER': 'mysite',
-#         'PASSWORD': '',
-#         # If using SSL to connect to a cloud mysql database, spedify the CA as so.
-#         'OPTIONS': { 'ssl': { 'ca': '/path/to/certificate-authority.pem' } },
-#     }
-# }
-
-# Use template caching to speed up wagtail admin and front-end.
-# Requires reloading web server to pick up template changes.
-TEMPLATES = [
-    {
-        "BACKEND": "django.template.backends.django.DjangoTemplates",
-        "OPTIONS": {
-            "context_processors": [
-                "django.template.context_processors.debug",
-                "django.template.context_processors.request",
-                "django.contrib.auth.context_processors.auth",
-                "django.contrib.messages.context_processors.messages",
-                "wagtail.contrib.settings.context_processors.settings",
-            ],
-            "loaders": [
-                (
-                    "django.template.loaders.cached.Loader",
-                    [
-                        "django.template.loaders.filesystem.Loader",
-                        "django.template.loaders.app_directories.Loader",
-                    ],
-                ),
-            ],
-        },
-    },
-]
-
-CACHES = {
-    "default": {
-        "BACKEND": "django.core.cache.backends.filebased.FileBasedCache",
-        "LOCATION": os.path.join(BASE_DIR, "cache"),  # noqa
-        "KEY_PREFIX": "coderedcms",
-        "TIMEOUT": 14400,  # in seconds
-    }
-}
-
-try:
-    from .local_settings import *  # noqa
-except ImportError:
-    pass

+ 0 - 33
tutorial/mysite/mysite/urls.py

@@ -1,33 +0,0 @@
-from django.conf import settings
-from django.urls import include, path, re_path
-from django.contrib import admin
-from wagtail.documents import urls as wagtaildocs_urls
-from coderedcms import admin_urls as crx_admin_urls
-from coderedcms import search_urls as crx_search_urls
-from coderedcms import urls as crx_urls
-
-urlpatterns = [
-    # Admin
-    path("django-admin/", admin.site.urls),
-    path("admin/", include(crx_admin_urls)),
-    # Documents
-    path("docs/", include(wagtaildocs_urls)),
-    # Search
-    path("search/", include(crx_search_urls)),
-    # For anything not caught by a more specific rule above, hand over to
-    # the page serving mechanism. This should be the last pattern in
-    # the list:
-    re_path(r"", include(crx_urls)),
-    # Alternatively, if you want pages to be served from a subpath
-    # of your site, rather than the site root:
-    #    re_path(r"^pages/", include(crx_urls)),
-]
-
-
-if settings.DEBUG:
-    from django.conf.urls.static import static
-    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
-
-    # Serve static and media files from development server
-    urlpatterns += staticfiles_urlpatterns()
-    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

+ 0 - 16
tutorial/mysite/mysite/wsgi.py

@@ -1,16 +0,0 @@
-"""
-WSGI config for mysite project.
-
-It exposes the WSGI callable as a module-level variable named ``application``.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
-"""
-
-import os
-
-from django.core.wsgi import get_wsgi_application
-
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings.dev")
-
-application = get_wsgi_application()

+ 0 - 10
tutorial/mysite/requirements.txt

@@ -1,10 +0,0 @@
-coderedcms==0.23.*
-
-# django_sendmail_backend enables sending email from your web host server.
-# Remove this if using a different email backend.
-django_sendmail_backend
-
-# To use with MariaDB or MySQL, uncomment the line below:
-#mysqlclient
-# To use with PostgreSQL, uncomment the line below:
-#psycopg2

+ 0 - 0
tutorial/mysite/website/__init__.py


+ 0 - 6
tutorial/mysite/website/apps.py

@@ -1,6 +0,0 @@
-from django.apps import AppConfig
-
-
-class WebsiteConfig(AppConfig):
-    default_auto_field = "django.db.models.AutoField"
-    name = "website"

File diff suppressed because it is too large
+ 0 - 318
tutorial/mysite/website/fixtures/database.json


File diff suppressed because it is too large
+ 0 - 30
tutorial/mysite/website/migrations/0001_initial.py


+ 0 - 58
tutorial/mysite/website/migrations/0002_initial_data.py

@@ -1,58 +0,0 @@
-
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from django import VERSION as DJANGO_VERSION
-from django.db import migrations
-
-from wagtail.core.models import Locale
-
-
-def initial_data(apps, schema_editor):
-    ContentType = apps.get_model('contenttypes.ContentType')
-    Page = apps.get_model('wagtailcore.Page')
-    Site = apps.get_model('wagtailcore.Site')
-    WebPage = apps.get_model('website.WebPage')
-
-    # Create page content type
-    webpage_content_type, created = ContentType.objects.get_or_create(
-        model='webpage',
-        app_label='website',
-    )
-
-    # Delete the default home page generated by wagtail,
-    # and replace it with a more useful page type.
-    curr_homepage = Page.objects.filter(slug='home').delete()
-
-    homepage = WebPage.objects.create(
-        title = "Home",
-        slug='home',
-        custom_template='coderedcms/pages/home_page.html',
-        content_type=webpage_content_type,
-        path='00010001',
-        depth=2,
-        numchild=0,
-        url_path='/home/',
-        locale_id=Locale.get_default().id,
-    )
-
-    # Create a new default site
-    Site.objects.create(
-        hostname='localhost',
-        site_name='My Company Inc.',
-        root_page_id=homepage.id,
-        is_default_site=True
-    )
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('coderedcms', '0001_initial'),
-        ('wagtailcore', '0057_page_locale_fields_notnull'),
-        ('website', '0001_initial'),
-    ]
-
-    operations = [
-        migrations.RunPython(initial_data),
-    ]

File diff suppressed because it is too large
+ 0 - 28
tutorial/mysite/website/migrations/0003_auto_20200909_1259.py


+ 0 - 18
tutorial/mysite/website/migrations/0004_auto_20200909_1428.py

@@ -1,18 +0,0 @@
-# Generated by Django 3.0.10 on 2020-09-09 18:28
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('website', '0003_auto_20200909_1259'),
-    ]
-
-    operations = [
-        migrations.AlterField(
-            model_name='cupcakespage',
-            name='days_available',
-            field=models.CharField(choices=[('Weekends Only', 'Weekends Only'), ('Monday-Friday', 'Monday-Friday'), ('Tuesday/Thursday', 'Tuesday/Thursday'), ('Seasonal', 'Seasonal')], default='', max_length=20),
-        ),
-    ]

+ 0 - 0
tutorial/mysite/website/migrations/__init__.py


+ 0 - 152
tutorial/mysite/website/models.py

@@ -1,152 +0,0 @@
-"""
-Create or customize your page models here.
-"""
-
-from modelcluster.fields import ParentalKey
-from coderedcms.forms import CoderedFormField
-from coderedcms.models import (
-    CoderedArticlePage,
-    CoderedArticleIndexPage,
-    CoderedEmail,
-    CoderedFormPage,
-    CoderedWebPage,
-)
-from django.db import models
-from wagtail.admin.edit_handlers import FieldPanel
-from wagtail.core.fields import RichTextField
-from wagtail.images import get_image_model_string
-
-
-class ArticlePage(CoderedArticlePage):
-    """
-    Article, suitable for news or blog content.
-    """
-
-    class Meta:
-        verbose_name = "Article"
-        ordering = ["-first_published_at"]
-
-    # Only allow this page to be created beneath an ArticleIndexPage.
-    parent_page_types = ["website.ArticleIndexPage"]
-
-    template = "coderedcms/pages/article_page.html"
-    search_template = "coderedcms/pages/article_page.search.html"
-
-
-class ArticleIndexPage(CoderedArticleIndexPage):
-    """
-    Shows a list of article sub-pages.
-    """
-
-    class Meta:
-        verbose_name = "Article Landing Page"
-
-    # Override to specify custom index ordering choice/default.
-    index_query_pagemodel = "website.ArticlePage"
-
-    # Only allow ArticlePages beneath this page.
-    subpage_types = ["website.ArticlePage"]
-
-    template = "coderedcms/pages/article_index_page.html"
-
-
-class FormPage(CoderedFormPage):
-    """
-    A page with an html <form>.
-    """
-
-    class Meta:
-        verbose_name = "Form"
-
-    template = "coderedcms/pages/form_page.html"
-
-
-class FormPageField(CoderedFormField):
-    """
-    A field that links to a FormPage.
-    """
-
-    class Meta:
-        ordering = ["sort_order"]
-
-    page = ParentalKey("FormPage", related_name="form_fields")
-
-
-class FormConfirmEmail(CoderedEmail):
-    """
-    Sends a confirmation email after submitting a FormPage.
-    """
-
-    page = ParentalKey("FormPage", related_name="confirmation_emails")
-
-
-class WebPage(CoderedWebPage):
-    """
-    General use page with featureful streamfield and SEO attributes.
-    Template renders all Navbar and Footer snippets in existence.
-    """
-
-    class Meta:
-        verbose_name = "Web Page"
-
-    template = "coderedcms/pages/web_page.html"
-
-
-class CupcakesIndexPage(CoderedWebPage):
-    """
-    Landing page for Cupcakes
-    """
-
-    class Meta:
-        verbose_name = "Cupcakes Landing Page"
-
-    # Override to specify custom index ordering choice/default.
-    index_query_pagemodel = "website.CupcakesPage"
-
-    # Only allow CupcakesPages beneath this page.
-    subpage_types = ["website.CupcakesPage"]
-
-    template = "website/pages/cupcakes_index_page.html"
-
-
-class CupcakesPage(CoderedWebPage):
-    """
-    Custom page for individual cupcakes
-    """
-
-    class Meta:
-        verbose_name = "Cupcakes Page"
-
-    # Only allow this page to be created beneath an CupcakesIndexPage.
-    parent_page_types = ["website.CupcakesIndexPage"]
-
-    template = "website/pages/cupcakes_page.html"
-
-    # The name of the cucpake will be in the page title
-    description = RichTextField(
-        verbose_name="Cupcake Description", null=True, blank=True, default=""
-    )
-    photo = models.ForeignKey(
-        get_image_model_string(),
-        null=True,
-        blank=True,
-        on_delete=models.SET_NULL,
-        related_name="+",
-        verbose_name="Cupcake Photo",
-    )
-    DAYS_CHOICES = (
-        ("Weekends Only", "Weekends Only"),
-        ("Monday-Friday", "Monday-Friday"),
-        ("Tuesday/Thursday", "Tuesday/Thursday"),
-        ("Seasonal", "Seasonal"),
-    )
-    days_available = models.CharField(
-        choices=DAYS_CHOICES, max_length=20, default=""
-    )
-
-    # Add custom fields to the body
-    body_content_panels = CoderedWebPage.body_content_panels + [
-        FieldPanel("description"),
-        FieldPanel("photo"),
-        FieldPanel("days_available"),
-    ]

+ 0 - 33
tutorial/mysite/website/static/website/css/custom.css

@@ -1,33 +0,0 @@
-/*Navbar */
-.navbar .nav-link {
-    font-family: 16px;
-    text-transform: uppercase;
-}
-
-/* Custom CSS classes */
-.cherry-links a {
-    color: #f75990;
-}
-
-.text-cherry {
-    color: #f75990;
-}
-
-.cherry-headers h1, 
-.cherry-headers h2,
-.cherry-headers h3,
-.cherry-headers h4 {
-    color: #f75990;
-}
-
-.border-cherry {
-    border: 10px solid #f75990;
-}
-
-.bg-lightyellow {
-    background-color: #fff685;
-}
-
-.bg-cherry {
-    background-color: #f75990;
-}

+ 0 - 0
tutorial/mysite/website/static/website/js/custom.js


+ 0 - 12
tutorial/mysite/website/templates/coderedcms/pages/base.html

@@ -1,12 +0,0 @@
-{% extends "coderedcms/pages/base.html" %}
-{% load static %}
-
-{% block custom_assets %}
-{# Add your custom CSS here #}
-<link rel="stylesheet" type="text/css" href="{% static 'website/css/custom.css' %}">
-{% endblock %}
-
-{% block custom_scripts %}
-{# Add your custom JavaScript here, or delete the line below if you don't need any #}
-<script type="text/javascript" src="{% static 'website/js/custom.js' %}"></script>
-{% endblock %}

+ 0 - 79
tutorial/mysite/website/templates/coderedcms/snippets/navbar.html

@@ -1,79 +0,0 @@
-{% load wagtailcore_tags wagtailsettings_tags wagtailimages_tags coderedcms_tags i18n %}
-
-{% load wagtailcore_tags wagtailsettings_tags wagtailimages_tags coderedcms_tags i18n %}
-
-
-{% if not settings.coderedcms.LayoutSettings.navbar_wrapper_fluid %}
-<div class="container">
-{% endif %}
-<nav class="navbar navbar-header bg-cherry">
-
-  {% if not settings.coderedcms.LayoutSettings.navbar_content_fluid %}
-  <div class="container">
-  {% endif %}
-    <div>
-      <a class="navbar-brand" href="/">
-        {% if settings.coderedcms.LayoutSettings.logo %}
-          {% image settings.coderedcms.LayoutSettings.logo original as logo %}
-          <img class="img-fluid" src="{{logo.url}}" alt="{{site.site_name}}" />
-        {% else %}
-          {{site.site_name}}
-        {% endif %}
-      </a>
-    </div>
-  {% if not settings.coderedcms.LayoutSettings.navbar_content_fluid %}
-  </div><!-- /.container -->
-  {% endif %}
-
-</nav>
-
-<nav class="navbar {% get_navbar_css %}">
-
-  {% if not settings.coderedcms.LayoutSettings.navbar_content_fluid %}
-  <div class="container">
-  {% endif %}
-    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
-        <span class="navbar-toggler-icon"></span>
-    </button>
-
-    <div class="collapse navbar-collapse" id="navbar">
-      {% get_navbars as navbars %}
-      {% for navbar in navbars %}
-      <ul class="navbar-nav {{navbar.custom_css_class}}"
-        {% if navbar.custom_id %}id="{{navbar.custom_id}}"{% endif %} >
-        {% for item in navbar.menu_items %}
-            {% include_block item with liclass="nav-item" aclass="nav-link" ga_event_category="Navbar" %}
-        {% endfor %}
-      </ul>
-      {% endfor %}
-      {% if settings.coderedcms.LayoutSettings.navbar_search %}
-      <form class="d-flex ms-auto" action="{% url 'crx_search' %}" method="GET">
-          {% load django_bootstrap5 %}
-          {% get_searchform request as form %}
-          {% bootstrap_form form layout='inline' %}
-          <div class="form-group">
-            <button class="btn btn-outline-primary ms-2" type="submit">{% trans 'Search' %}</button>
-          </div>
-      </form>
-      {% endif %}
-
-    </div>
-
-  {% if not settings.coderedcms.LayoutSettings.navbar_content_fluid %}
-  </div><!-- /.container -->
-  {% endif %}
-
-</nav>
-
-{% if not settings.coderedcms.LayoutSettings.navbar_wrapper_fluid %}
-</div><!-- /.container -->
-{% endif %}
-
-{# Navbar offset #}
-{% if settings.coderedcms.LayoutSettings.navbar_fixed %}
-    {% if settings.coderedcms.LayoutSettings.logo %}
-      <div class="{{settings.coderedcms.LayoutSettings.navbar_format}}-fixed-img-offset {{settings.coderedcms.LayoutSettings.navbar_collapse_mode}}"></div>
-    {% else %}
-      <div class="{{settings.coderedcms.LayoutSettings.navbar_format}}-fixed-offset {{settings.coderedcms.LayoutSettings.navbar_collapse_mode}}"></div>
-    {% endif %}
-{% endif %}

+ 0 - 27
tutorial/mysite/website/templates/website/pages/cupcakes_index_page.html

@@ -1,27 +0,0 @@
-{% extends "coderedcms/pages/web_page.html" %}
-{% load wagtailcore_tags wagtailimages_tags coderedcms_tags %}
-
-{% block index_content %}
-<div class="container">
-    <div class="row d-flex">
-        {% for cupcake in page.get_children.specific %}
-        <div class="col m-3">
-            <div class="card border-cherry" style="width: 18rem;">
-                {% if cupcake.photo %}
-                {% image cupcake.photo fill-300x300 as cupcake_photo %}
-                <a href="{{cupcake.url}}">
-                    <img class="card-img-top w-100" src="{{cupcake_photo.url}}" alt="{{cupcake.title}}">
-                </a>
-                {% endif %}
-                <div class="card-body">
-                <div class="card-text">
-                    <h3><a class="text-cherry" href="{{cupcake.url}}">{{cupcake.title}}</a></h3>
-                    <p class="lead">{{cupcake.days_available}}</p>
-                </div>
-                </div>
-            </div>
-        </div>
-        {% endfor %}   
-    </div>
-</div>
-{% endblock %}

+ 0 - 37
tutorial/mysite/website/templates/website/pages/cupcakes_page.html

@@ -1,37 +0,0 @@
-{% extends "coderedcms/pages/web_page.html" %}
-{% load wagtailcore_tags wagtailimages_tags coderedcms_tags %}
-
-{% block content_pre_body %}
-    {% if self.cover_image %}
-    {% image page.cover_image fill-2000x1000 as cover_image %}
-    <div class="jumbotron jumotron-fluid" style="height:400px;background-image:url({{cover_image.url}});background-repeat:no-repeat; background-size:cover; background-position:center center;">
-    </div>
-    {% endif %}
-{% endblock %}
-
-
-{% block content_body %}
-<div class="block-row">
-    <div class="container-fluid">
-        <div class="row m-4">
-            <div class="col-lg-6">
-                {% if page.photo %}
-                {% image page.photo fill-300x300 as cupcake %}
-                <div class="text-center">
-                    <img class="border-cherry" src="{{cupcake.url}}" alt="photo of {{page.title}}">
-                </div>
-                {% endif %}
-            </div>
-            <div class="col-lg-6">
-                <div class="py-lg-5">
-                    <h2>{{page.title}}</h2>
-                    <lead class="text-cherry">{{page.days_available}}</lead>
-                    {% if page.description %}
-                    <p>{{page.description|richtext}}</p>
-                    {% endif %}
-                </div>
-            </div>
-        </div>
-    </div>
-</div>
-{% endblock %}

Some files were not shown because too many files changed in this diff