Package: wagtail-waggylabs
Wagtail-Waggylabs 1.0.3WaggyLabs is aDjangoandWagtail CMSapp for scientific blogs and research group websites. Check thedemo pageto see most of the features.FeaturesComplex complex pages for publishing scientific article-like posts and beyond. The pages include various comonents such as with different elements including figures, tables, code, image carousels, etc. Check the demo page atLaTeX equations are supported out of the box. The Markdown editor is extended with LaTeX equation and autocomplete.Referencing figures, tables, code listings, etc. made easy! Just use the standard LaTeX syntax \ref{...} in the Markdown text fields. Autocomplete lists available identifiers.Adding literature is simplified. Add the literature block enywhere and reference it in the text with LaTeX \cite{...} command. Autocomplete helps to track the available literature identifiers.Custom Bootstrap themes can be used with or without the dark/bright modes.All the Bootsrap component are supported including e.g. image carousels, accordions, collapses, etc.Lots of custom page components such as sidebar, sidebar tabs, page visuals, page content, tag cloud, categories list, post archive, menus, footer, etc.Finally, WaggyLabs comes with all the Wagtail features for administering puslishing process. Check Wagtail'sUser Guide!InstallationWaggyLabs should be installed as a typical Django app into the existing Django project. An example of such project can be found on theWaggyLabs GitHubpage. It is good to have basic understanting ofWagtail CMSand its configuration. Tested with latest Wagtail version.Installation steps:pip install wagtail-waggylabsMake sure that theINSALLED_APPSvariable in thesettings.base.pycontains the following appsINSTALLED_APPS=["waggylabs","wagtail.contrib.forms","wagtail.contrib.modeladmin","wagtail.contrib.redirects","wagtail.contrib.routable_page","wagtail.contrib.settings","wagtail.contrib.styleguide","wagtail.contrib.table_block","wagtail.embeds","wagtail.sites","wagtail.users","wagtail.snippets","wagtail.documents","wagtail.images","wagtail.search","wagtail.admin","wagtail","modelcluster","taggit",# "taggit_templatetags","el_pagination","wagtailmenus","wagtailmarkdown","wagtailmetadata","hitcount","captcha","django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages","django.contrib.staticfiles","django.contrib.sitemaps",# Other apps for the project]If needed, addwaggylabs.middleware.DjangoAdminAccessMiddlewareto theMIDDLEWARE. This middleware prevents opening/django-admin/if a user has not logged in throughWagtaillogin page.Addwagtail.contrib.settings.context_processors.settingsandwagtailmenus.context_processors.wagtailmenusto thecontext_processorslist ofTEMPLATES.ConfigurewagtailmarkdownWAGTAILMARKDOWN = {
    # ...
    "allowed_tags": ["s"],
    "extensions": [
        "waggylabs.extensions.markdown",
        ],
    "extension_configs": {
        "codehilite": {
            "linenums": True,
            }
        },
    "extensions_settings_mode": "extend",
}Configuredjango-simple-captchaif you intend to use it. For example,CAPTCHA_CHALLENGE_FUNCT='captcha.helpers.math_challenge'# CAPTCHA_IMAGE_SIZE = (120, 60)CAPTCHA_FONT_SIZE=30Include the WaggyLabs URLconf into your Django projectfromwagtailimporturlsaswagtail_urlsfromwaggylabsimporturlsaswaggylabs_urlsurlpatterns=[path("",include(waggylabs_urls)),]ifsettings.DEBUG:fromdjango.conf.urls.staticimportstaticfromdjango.contrib.staticfiles.urlsimportstaticfiles_urlpatterns# Serve static and media files from development serverurlpatterns+=staticfiles_urlpatterns()urlpatterns+=static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)urlpatterns=urlpatterns+[# For anything not caught by a more specific rule above, hand over to# Wagtail's page serving mechanism. This should be the last pattern in# the list:path("",include(wagtail_urls)),# Alternatively, if you want Wagtail pages to be served from a subpath# of your site, rather than the site root:#    path("pages/", include(wagtail_urls)),]In order to properly initiazlie the django-hitcount with the demo homepage, the following set of commands in this orderpythonmanage.pymigratepythonmanage.pymakemigrationspythonmanage.pymigrateRunpython manage.py createsuperuserto be able to login to Wagtail admin.Start the development serverpython manage.py runserverand navigate tohttp://127.0.0.1:8000/or similar shown url in your browser to see the demo page. If you have configuredWAGGYLABS_BASE_URL, then the demo page will appear at thehttp://127.0.0.1:8000/WAGGYLABS_BASE_URL/url. To login to Wagtail admin, go to thehttp://127.0.0.1:8000/WAGGYLABS_BASE_URL/WAGGYLABS_WAGTAIL_ADMIN_BASE_URL/url.SettingsThere are few additional setting for the WaggyLabs in addition to the settings of the different packages used.Settings related to the url configuration# WAGGYLABS_BASE_URL sets the base url for the whole WaggyLabs site# i.e. the total url will be WAGGYLABS_BASE_URL + all other parts# (For example, Django admin base url will be WAGGYLABS_BASE_URL +# WAGGYLABS_DJANGO_ADMIN_BASE_URL). This is needed when a WaggyLabs# site is added to an existing Django project.WAGGYLABS_BASE_URL=''WAGGYLABS_DJANGO_ADMIN_BASE_URL='django-admin/'WAGGYLABS_WAGTAIL_ADMIN_BASE_URL='admin/'WAGGYLABS_WAGTAIL_DOCUMENTS_BASE_URL='documents/'WAGGYLABS_CAPTCHA_BASE_URL='super-captcha/'WAGGYLABS_SEARCH_URL='search/'Settings to control menu generated bywagtailmenusin addition towagtailmenussettings# Sets the default value for the main menu sublevels in the WaggyLabs site settings admin page. The value can be changed in the admin page.WAGGYLABS_MENU_MAX_LEVELS=1# Controls the appearance of the menu item when its submenu opens. Again, this is the default value for the WaggyLabs site settings admin page and can be changed thereWAGGYLABS_MENU_ALLOW_REPEATING_PARENTS=TrueSettings for various blocks# Maximum number of columns in the card grid blockWAGGYLABS_CARD_GRID_COLUMNS=3# Codemirror modes for the code block# The dictionary entry has the following structure# 'CodeMirror MIME type': ('CodeMirror mode folder', 'Pygments short name', 'Human readable name')WAGGYLABS_CODEBLOCK_LANGS={# 'CodeMirror MIME type': ('CodeMirror mode folder', 'Pygments short name', 'Human readable name')# https://codemirror.net/5/mode/index.html# https://pygments.org/languages/'text/x-python':('python','python','Python'),'text/x-csrc':('clike','c','C'),'text/x-c++src':('clike','cpp','C++'),'text/x-java':('clike','java','Java/Kotlin'),'text/x-csharp':('clike','csharp','C#'),'text/x-objectivec':('clike','objectivec','Objective C'),'text/x-scala':('clike','scala','Scala'),# 'text/x-django': ('django', 'django', 'Django template markup'), # Not working# 'text/x-dockerfile': ('dockerfile', 'dockerfile', 'Dockerfile'),  # Not working'application/xml':('xml','xml','XML'),# Needs to be before HTML mode'text/html':('htmlmixed','html','HTML'),'text/javascript':('javascript','javascript','Javascipt'),'text/json':('javascript','json','JSON'),'text/typescript':('javascript','typescript','TypeScript'),'text/x-mathematica':('mathematica','mathematica','Mathematica'),'text/x-octave':('octave','matlab','Matlab'),'application/x-powershell':('powershell','powershell','Powershell'),# 'text/x-rsrc': ('r', 'r', 'R'),# 'text/x-rustsrc': ('rust', 'rust', 'Rust'),  # Not working'text/x-sh':('shell','bach','Bach/Shell'),'text/x-swift':('swift','swift','Swift'),'text/x-sql':('sql','sql','SQL'),}# Maximum number of columns in the columns blockWAGGYLABS_COLUMNS_MAX=3Important settings of the packagesThe following list shows the important settings of different packages used in WaggyLabs.django-hitcountsettings# after this time the hit from the same user will be counted againHITCOUNT_KEEP_HIT_ACTIVE={"days":30}django-el-paginationsettings# Function to generate page labels for widget renderingEL_PAGINATION_PAGE_LIST_CALLABLE='el_pagination.utils.get_elastic_page_numbers'# get_page_numbersdjango-taggitsettingsTAGGIT_CASE_INSENSITIVE=TrueTAG_SPACES_ALLOWED=TruewagtailmenussettingsWAGTAILMENUS_ACTIVE_ANCESTOR_CLASS="active"WAGTAILMENUS_SECTION_ROOT_DEPTH=3wagtailsettings# Wagtail settingsWAGTAIL_APPEND_SLASH=TrueWAGTAIL_SITE_NAME="WaggyLabs"# Search# https://docs.wagtail.org/en/stable/topics/search/backends.htmlWAGTAILSEARCH_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 slashWAGTAILADMIN_BASE_URL="http://example.com"# Search backed for developmentWAGTAILSEARCH_BACKENDS={'default':{'BACKEND':'wagtail.search.backends.database',}}# Disable password reset since it is personal site and the user is created using command lineWAGTAIL_PASSWORD_RESET_ENABLED=True# Passwords can be changedWAGTAIL_PASSWORD_MANAGEMENT_ENABLED=True# Users do have passwords to log inWAGTAILUSERS_PASSWORD_ENABLED=True# Users must have paswordsWAGTAILUSERS_PASSWORD_REQUIRED=True# See also embeds configuration at https://docs.wagtail.org/en/stable/reference/settings.html#wagtailembeds-responsive-htmlWAGTAILEMBEDS_RESPONSIVE_HTML=True# Custom admin login form based on email# To have default login form, comment the lineWAGTAILADMIN_USER_LOGIN_FORM='waggylabs.forms.CaptchaLoginForm'# Changes whether the Submit for Moderation button is displayed in the action menuWAGTAIL_MODERATION_ENABLED=True# To count usage of images and documentsWAGTAIL_USAGE_COUNT_ENABLED=True# Date and time formats for admin# WAGTAIL_DATE_FORMAT = '%d.%m.%Y.'# WAGTAIL_DATETIME_FORMAT = '%d.%m.%Y. %H:%M'# WAGTAIL_TIME_FORMAT = '%H:%M'ChangelogVersion 1.0.3Updated Django and Wagtail to 5.0.1 and 5.2.2 versions. Dependent packages has been also updated.Version 1.0.2Changed the migrations in order to show well-composed demo page after migraitions applied for the first time.Added badges to the README.mdVersion 1.0.1Minor bugfixes in Link blocks to correctly display buttons and links.Version 1.0WaggyLabs package and WaggyLabs site are ready and can be launched on a DigitalOcean droplet via Docker containers.Version 1.0b1Initial release with the main features presented in the "Features" section on top of the page.Future plansStimulusfor the frontend.Comments for posts.Improve the editor's markdown editor further. Now autocomplete function is not working properly in all the cases.