wagtail-waggylabs


Namewagtail-waggylabs JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryA Wagtail app for research group and scientific blog sites.
upload_time2024-04-07 18:49:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseThe MIT License (MIT) Copyright (c) 2023 Konstantin Tamarov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords wagtail research blog
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/badge/PyPI-v1.1.0-orange)](https://pypi.org/project/wagtail-waggylabs/)
[![License](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)

# Wagtail-Waggylabs 1.1.0

Waggylabs 1.1.0 was updated to use Wagtail 6 and it was not tested with Wagtail 5.2. For use with Wagtail 5.2, use Waggylabs 1.0.x.

WaggyLabs is a [Django](https://docs.djangoproject.com/) and [Wagtail CMS](https://wagtail.org/>) app for scientific blogs and research group websites. Check the [demo page](https://ktamarov.com/waggylabs-demo) to see most of the features.


## Features

1. Complex 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 at 

2. LaTeX equations are supported out of the box. The Markdown editor is extended with LaTeX equation and autocomplete.

3. Referencing figures, tables, code listings, etc. made easy! Just use the standard LaTeX syntax \\ref{...} in the Markdown text fields. Autocomplete lists available identifiers.

4. 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.

5. Custom Bootstrap themes can be used with or without the dark/bright modes.

6. All the Bootsrap component are supported including e.g. image carousels, accordions, collapses, etc.

7. Lots of custom page components such as sidebar, sidebar tabs, page visuals, page content, tag cloud, categories list, post archive, menus, footer, etc.

8. Finally, WaggyLabs comes with all the Wagtail features for administering puslishing process. Check Wagtail's [User Guide](https://guide.wagtail.org/en-latest/)!

## Installation

WaggyLabs should be installed as a typical Django app into the existing Django project. An example of such project can be found on the [WaggyLabs GitHub](https://github.com/naitsok/wagtail-waggylabs>) page. It is good to have basic understanting of [Wagtail CMS](https://wagtail.org/) and its configuration. Tested with latest Wagtail version.

Installation steps:

1. `pip install wagtail-waggylabs`

2. Make sure that the `INSALLED_APPS` variable in the `settings.base.py` contains the following apps

    ```python
    INSTALLED_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
    ]
    ```

3. If needed, add `waggylabs.middleware.DjangoAdminAccessMiddleware` to the `MIDDLEWARE`. This middleware prevents opening `/django-admin/` if a user has not logged in through `Wagtail` login page.

4. Add `wagtail.contrib.settings.context_processors.settings` and `wagtailmenus.context_processors.wagtailmenus` to the `context_processors` list of `TEMPLATES`.

5. Configure `wagtailmarkdown`
   
    ```pyhton
    WAGTAILMARKDOWN = {
        # ...
        "allowed_tags": ["s"],
        "extensions": [
            "waggylabs.extensions.markdown",
            ],
        "extension_configs": {
            "codehilite": {
                "linenums": True,
                }
            },
        "extensions_settings_mode": "extend",
    }
    ```

6. Configure [django-simple-captcha](https://guide.wagtail.org/en-latest/) if you intend to use it. For example,

    ```python
    CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.math_challenge'
    # CAPTCHA_IMAGE_SIZE = (120, 60)
    CAPTCHA_FONT_SIZE = 30
    ```

7. Include the WaggyLabs URLconf into your Django project

    ```python
    from wagtail import urls as wagtail_urls
    from waggylabs import urls as waggylabs_urls
    urlpatterns = [
        path("", include(waggylabs_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)
    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)),
    ]
    ```

8. In order to properly initiazlie the django-hitcount with the demo homepage, the following set of commands in this order

    ```python
    python manage.py migrate
    python manage.py makemigrations
    python manage.py migrate
    ```

9.  Run `python manage.py createsuperuser` to be able to login to Wagtail admin.

10.  Start the development server `python manage.py runserver` and navigate to http://127.0.0.1:8000/ or similar shown url in your browser to see the demo page. If you have configured `WAGGYLABS_BASE_URL`, then the demo page will appear at the http://127.0.0.1:8000/WAGGYLABS_BASE_URL/ url. To login to Wagtail admin, go to the http://127.0.0.1:8000/WAGGYLABS_BASE_URL/WAGGYLABS_WAGTAIL_ADMIN_BASE_URL/ url.

## Settings

There are few additional setting for the WaggyLabs in addition to the settings of the different packages used.

1. Settings related to the url configuration

    ```python
    # 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/'
    ```

2. Settings to control menu generated by [wagtailmenus](https://wagtailmenus.readthedocs.io/en/stable/) in addition to `wagtailmenus` settings

    ```python
    # 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 there
    WAGGYLABS_MENU_ALLOW_REPEATING_PARENTS = True
    ```

3. Settings for various blocks

    ```python
    # Maximum number of columns in the card grid block
    WAGGYLABS_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 block
    WAGGYLABS_COLUMNS_MAX = 3
    ```

### Important settings of the packages

The following list shows the important settings of different packages used in WaggyLabs.

1. `django-hitcount` settings

    ```python
    # after this time the hit from the same user will be counted again
    HITCOUNT_KEEP_HIT_ACTIVE  = { "days" : 30 }
    ```

2. `django-el-pagination` settings

    ```python
    # Function to generate page labels for widget rendering
    EL_PAGINATION_PAGE_LIST_CALLABLE = 'el_pagination.utils.get_elastic_page_numbers' # get_page_numbers
    ```

3. `django-taggit` settings

    ```python
    TAGGIT_CASE_INSENSITIVE = True
    TAG_SPACES_ALLOWED = True
    ```

4. `wagtailmenus` settings

    ```python
    WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS = "active"
    WAGTAILMENUS_SECTION_ROOT_DEPTH = 3
    ```

5. `wagtail` settings

    ```python
    # Wagtail settings
    WAGTAIL_APPEND_SLASH = True
    WAGTAIL_SITE_NAME = "WaggyLabs"

    # Search
    # https://docs.wagtail.org/en/stable/topics/search/backends.html
    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://example.com"
    # Search backed for development
    WAGTAILSEARCH_BACKENDS = {
        'default': {
            'BACKEND': 'wagtail.search.backends.database',
        }
    }

    # Disable password reset since it is personal site and the user is created using command line
    WAGTAIL_PASSWORD_RESET_ENABLED = True

    # Passwords can be changed
    WAGTAIL_PASSWORD_MANAGEMENT_ENABLED = True

    # Users do have passwords to log in
    WAGTAILUSERS_PASSWORD_ENABLED = True

    # Users must have paswords
    WAGTAILUSERS_PASSWORD_REQUIRED = True

    # See also embeds configuration at https://docs.wagtail.org/en/stable/reference/settings.html#wagtailembeds-responsive-html
    WAGTAILEMBEDS_RESPONSIVE_HTML = True

    # Custom admin login form based on email
    # To have default login form, comment the line
    WAGTAILADMIN_USER_LOGIN_FORM = 'waggylabs.forms.CaptchaLoginForm'

    # Changes whether the Submit for Moderation button is displayed in the action menu
    WAGTAIL_MODERATION_ENABLED = True

    # To count usage of images and documents
    WAGTAIL_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'
    ```

## Changelog

### Version 1.1.0

- Updated to Django 5.0.x and Wagtail 6.0.x. Not verified if Waggylabs 1.1.0 works with Wagtial 5.2.x.
- Redone Color widget and Icon chooser widget. New appearance and working with Stimulus.
- Updated Markdown widget to work with stimulus. Improved Markdown widget Javascript code for faster pwerformance (removed the need to trigger all the markdown widgets into preview mode for Mathjax to work correctly).
- Updated Table widget to be in line with Wagtail's Table block. Converting to work together is still pending as in Wagtail 6.
- Updated Wagtail admin login for for Django simple captcha to work with vanilla Javascript and Stimulus.

### Version 1.0.4

- Improved Autocomplete function on EasyMDE editors used in Wagtail admin. Improved MathJax typesetting when previewing Markdown in EasyMDE.

### Version 1.0.3

- Updated Django and Wagtail to 5.0.1 and 5.2.2 versions. Dependent packages has been also updated.

### Version 1.0.2

- Changed the migrations in order to show well-composed demo page after migraitions applied for the first time.
- Added badges to the README.md

### Version 1.0.1

- Minor bugfixes in Link blocks to correctly display buttons and links.

### Version 1.0

WaggyLabs package and WaggyLabs site are ready and can be launched on a DigitalOcean droplet via Docker containers.

### Version 1.0b1

Initial release with the main features presented in the "Features" section on top of the page.

## Future plans

1. [Stimulus](https://stimulus.hotwired.dev/) for the frontend.
2. Comments for posts.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wagtail-waggylabs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Konstantin Tamarov <ktamarov@gmail.com>",
    "keywords": "Wagtail, Research, Blog",
    "author": null,
    "author_email": "Konstantin Tamarov <ktamarov@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f0/3e/53657218d4aa404c0f59b3f3dc08d714c0ed5b3f7b9a5e238bbe9aeb63f0/wagtail-waggylabs-1.1.0.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/badge/PyPI-v1.1.0-orange)](https://pypi.org/project/wagtail-waggylabs/)\r\n[![License](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)\r\n\r\n# Wagtail-Waggylabs 1.1.0\r\n\r\nWaggylabs 1.1.0 was updated to use Wagtail 6 and it was not tested with Wagtail 5.2. For use with Wagtail 5.2, use Waggylabs 1.0.x.\r\n\r\nWaggyLabs is a [Django](https://docs.djangoproject.com/) and [Wagtail CMS](https://wagtail.org/>) app for scientific blogs and research group websites. Check the [demo page](https://ktamarov.com/waggylabs-demo) to see most of the features.\r\n\r\n\r\n## Features\r\n\r\n1. Complex 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 at \r\n\r\n2. LaTeX equations are supported out of the box. The Markdown editor is extended with LaTeX equation and autocomplete.\r\n\r\n3. Referencing figures, tables, code listings, etc. made easy! Just use the standard LaTeX syntax \\\\ref{...} in the Markdown text fields. Autocomplete lists available identifiers.\r\n\r\n4. 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.\r\n\r\n5. Custom Bootstrap themes can be used with or without the dark/bright modes.\r\n\r\n6. All the Bootsrap component are supported including e.g. image carousels, accordions, collapses, etc.\r\n\r\n7. Lots of custom page components such as sidebar, sidebar tabs, page visuals, page content, tag cloud, categories list, post archive, menus, footer, etc.\r\n\r\n8. Finally, WaggyLabs comes with all the Wagtail features for administering puslishing process. Check Wagtail's [User Guide](https://guide.wagtail.org/en-latest/)!\r\n\r\n## Installation\r\n\r\nWaggyLabs should be installed as a typical Django app into the existing Django project. An example of such project can be found on the [WaggyLabs GitHub](https://github.com/naitsok/wagtail-waggylabs>) page. It is good to have basic understanting of [Wagtail CMS](https://wagtail.org/) and its configuration. Tested with latest Wagtail version.\r\n\r\nInstallation steps:\r\n\r\n1. `pip install wagtail-waggylabs`\r\n\r\n2. Make sure that the `INSALLED_APPS` variable in the `settings.base.py` contains the following apps\r\n\r\n    ```python\r\n    INSTALLED_APPS = [\r\n        \"waggylabs\",\r\n        \r\n        \"wagtail.contrib.forms\",\r\n        # \"wagtail.contrib.modeladmin\",\r\n        \"wagtail.contrib.redirects\",\r\n        \"wagtail.contrib.routable_page\",\r\n        \"wagtail.contrib.settings\",\r\n        \"wagtail.contrib.styleguide\",\r\n        \"wagtail.contrib.table_block\",\r\n        \"wagtail.embeds\",\r\n        \"wagtail.sites\",\r\n        \"wagtail.users\",\r\n        \"wagtail.snippets\",\r\n        \"wagtail.documents\",\r\n        \"wagtail.images\",\r\n        \"wagtail.search\",\r\n        \"wagtail.admin\",\r\n        \"wagtail\",\r\n        \r\n        \"modelcluster\",\r\n        \"taggit\",\r\n        # \"taggit_templatetags\",\r\n        \"el_pagination\",\r\n        \"wagtailmenus\",\r\n        \"wagtailmarkdown\",\r\n        \"wagtailmetadata\",\r\n        \"hitcount\",\r\n        \"captcha\",\r\n        \r\n        \"django.contrib.admin\",\r\n        \"django.contrib.auth\",\r\n        \"django.contrib.contenttypes\",\r\n        \"django.contrib.sessions\",\r\n        \"django.contrib.messages\",\r\n        \"django.contrib.staticfiles\",\r\n        \"django.contrib.sitemaps\",\r\n        \r\n        # Other apps for the project\r\n    ]\r\n    ```\r\n\r\n3. If needed, add `waggylabs.middleware.DjangoAdminAccessMiddleware` to the `MIDDLEWARE`. This middleware prevents opening `/django-admin/` if a user has not logged in through `Wagtail` login page.\r\n\r\n4. Add `wagtail.contrib.settings.context_processors.settings` and `wagtailmenus.context_processors.wagtailmenus` to the `context_processors` list of `TEMPLATES`.\r\n\r\n5. Configure `wagtailmarkdown`\r\n   \r\n    ```pyhton\r\n    WAGTAILMARKDOWN = {\r\n        # ...\r\n        \"allowed_tags\": [\"s\"],\r\n        \"extensions\": [\r\n            \"waggylabs.extensions.markdown\",\r\n            ],\r\n        \"extension_configs\": {\r\n            \"codehilite\": {\r\n                \"linenums\": True,\r\n                }\r\n            },\r\n        \"extensions_settings_mode\": \"extend\",\r\n    }\r\n    ```\r\n\r\n6. Configure [django-simple-captcha](https://guide.wagtail.org/en-latest/) if you intend to use it. For example,\r\n\r\n    ```python\r\n    CAPTCHA_CHALLENGE_FUNCT = 'captcha.helpers.math_challenge'\r\n    # CAPTCHA_IMAGE_SIZE = (120, 60)\r\n    CAPTCHA_FONT_SIZE = 30\r\n    ```\r\n\r\n7. Include the WaggyLabs URLconf into your Django project\r\n\r\n    ```python\r\n    from wagtail import urls as wagtail_urls\r\n    from waggylabs import urls as waggylabs_urls\r\n    urlpatterns = [\r\n        path(\"\", include(waggylabs_urls)),\r\n    ]\r\n    if settings.DEBUG:\r\n        from django.conf.urls.static import static\r\n        from django.contrib.staticfiles.urls import staticfiles_urlpatterns\r\n\r\n        # Serve static and media files from development server\r\n        urlpatterns += staticfiles_urlpatterns()\r\n        urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\r\n    urlpatterns = urlpatterns + [\r\n        # For anything not caught by a more specific rule above, hand over to\r\n        # Wagtail's page serving mechanism. This should be the last pattern in\r\n        # the list:\r\n        path(\"\", include(wagtail_urls)),\r\n        # Alternatively, if you want Wagtail pages to be served from a subpath\r\n        # of your site, rather than the site root:\r\n        #    path(\"pages/\", include(wagtail_urls)),\r\n    ]\r\n    ```\r\n\r\n8. In order to properly initiazlie the django-hitcount with the demo homepage, the following set of commands in this order\r\n\r\n    ```python\r\n    python manage.py migrate\r\n    python manage.py makemigrations\r\n    python manage.py migrate\r\n    ```\r\n\r\n9.  Run `python manage.py createsuperuser` to be able to login to Wagtail admin.\r\n\r\n10.  Start the development server `python manage.py runserver` and navigate to http://127.0.0.1:8000/ or similar shown url in your browser to see the demo page. If you have configured `WAGGYLABS_BASE_URL`, then the demo page will appear at the http://127.0.0.1:8000/WAGGYLABS_BASE_URL/ url. To login to Wagtail admin, go to the http://127.0.0.1:8000/WAGGYLABS_BASE_URL/WAGGYLABS_WAGTAIL_ADMIN_BASE_URL/ url.\r\n\r\n## Settings\r\n\r\nThere are few additional setting for the WaggyLabs in addition to the settings of the different packages used.\r\n\r\n1. Settings related to the url configuration\r\n\r\n    ```python\r\n    # WAGGYLABS_BASE_URL sets the base url for the whole WaggyLabs site\r\n    # i.e. the total url will be WAGGYLABS_BASE_URL + all other parts\r\n    # (For example, Django admin base url will be WAGGYLABS_BASE_URL +\r\n    # WAGGYLABS_DJANGO_ADMIN_BASE_URL). This is needed when a WaggyLabs\r\n    # site is added to an existing Django project.\r\n    WAGGYLABS_BASE_URL = ''\r\n    WAGGYLABS_DJANGO_ADMIN_BASE_URL = 'django-admin/'\r\n    WAGGYLABS_WAGTAIL_ADMIN_BASE_URL = 'admin/'\r\n    WAGGYLABS_WAGTAIL_DOCUMENTS_BASE_URL = 'documents/'\r\n    WAGGYLABS_CAPTCHA_BASE_URL = 'super-captcha/'\r\n    WAGGYLABS_SEARCH_URL = 'search/'\r\n    ```\r\n\r\n2. Settings to control menu generated by [wagtailmenus](https://wagtailmenus.readthedocs.io/en/stable/) in addition to `wagtailmenus` settings\r\n\r\n    ```python\r\n    # 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.\r\n    WAGGYLABS_MENU_MAX_LEVELS = 1\r\n    # 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 there\r\n    WAGGYLABS_MENU_ALLOW_REPEATING_PARENTS = True\r\n    ```\r\n\r\n3. Settings for various blocks\r\n\r\n    ```python\r\n    # Maximum number of columns in the card grid block\r\n    WAGGYLABS_CARD_GRID_COLUMNS = 3\r\n    # Codemirror modes for the code block\r\n    # The dictionary entry has the following structure\r\n    # 'CodeMirror MIME type': ('CodeMirror mode folder', 'Pygments short name', 'Human readable name')\r\n    WAGGYLABS_CODEBLOCK_LANGS =  {\r\n        # 'CodeMirror MIME type': ('CodeMirror mode folder', 'Pygments short name', 'Human readable name')\r\n        # https://codemirror.net/5/mode/index.html\r\n        # https://pygments.org/languages/\r\n        'text/x-python': ('python', 'python', 'Python'),\r\n        'text/x-csrc': ('clike', 'c', 'C'),\r\n        'text/x-c++src': ('clike', 'cpp', 'C++'),\r\n        'text/x-java': ('clike', 'java', 'Java/Kotlin'),\r\n        'text/x-csharp': ('clike', 'csharp', 'C#'),\r\n        'text/x-objectivec': ('clike', 'objectivec', 'Objective C'),\r\n        'text/x-scala': ('clike', 'scala', 'Scala'),\r\n        # 'text/x-django': ('django', 'django', 'Django template markup'), # Not working\r\n        # 'text/x-dockerfile': ('dockerfile', 'dockerfile', 'Dockerfile'),  # Not working\r\n        'application/xml': ('xml', 'xml', 'XML'), # Needs to be before HTML mode\r\n        'text/html': ('htmlmixed', 'html', 'HTML'),\r\n        'text/javascript': ('javascript', 'javascript', 'Javascipt'),\r\n        'text/json': ('javascript', 'json', 'JSON'),\r\n        'text/typescript': ('javascript', 'typescript', 'TypeScript'),\r\n        'text/x-mathematica': ('mathematica', 'mathematica', 'Mathematica'),\r\n        'text/x-octave': ('octave', 'matlab', 'Matlab'),\r\n        'application/x-powershell': ('powershell', 'powershell', 'Powershell'),\r\n        # 'text/x-rsrc': ('r', 'r', 'R'),\r\n        # 'text/x-rustsrc': ('rust', 'rust', 'Rust'),  # Not working\r\n        'text/x-sh': ('shell', 'bach', 'Bach/Shell'),\r\n        'text/x-swift': ('swift', 'swift', 'Swift'),\r\n        'text/x-sql': ('sql', 'sql', 'SQL'),\r\n    }\r\n    # Maximum number of columns in the columns block\r\n    WAGGYLABS_COLUMNS_MAX = 3\r\n    ```\r\n\r\n### Important settings of the packages\r\n\r\nThe following list shows the important settings of different packages used in WaggyLabs.\r\n\r\n1. `django-hitcount` settings\r\n\r\n    ```python\r\n    # after this time the hit from the same user will be counted again\r\n    HITCOUNT_KEEP_HIT_ACTIVE  = { \"days\" : 30 }\r\n    ```\r\n\r\n2. `django-el-pagination` settings\r\n\r\n    ```python\r\n    # Function to generate page labels for widget rendering\r\n    EL_PAGINATION_PAGE_LIST_CALLABLE = 'el_pagination.utils.get_elastic_page_numbers' # get_page_numbers\r\n    ```\r\n\r\n3. `django-taggit` settings\r\n\r\n    ```python\r\n    TAGGIT_CASE_INSENSITIVE = True\r\n    TAG_SPACES_ALLOWED = True\r\n    ```\r\n\r\n4. `wagtailmenus` settings\r\n\r\n    ```python\r\n    WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS = \"active\"\r\n    WAGTAILMENUS_SECTION_ROOT_DEPTH = 3\r\n    ```\r\n\r\n5. `wagtail` settings\r\n\r\n    ```python\r\n    # Wagtail settings\r\n    WAGTAIL_APPEND_SLASH = True\r\n    WAGTAIL_SITE_NAME = \"WaggyLabs\"\r\n\r\n    # Search\r\n    # https://docs.wagtail.org/en/stable/topics/search/backends.html\r\n    WAGTAILSEARCH_BACKENDS = {\r\n        \"default\": {\r\n            \"BACKEND\": \"wagtail.search.backends.database\",\r\n        }\r\n    }\r\n\r\n    # Base URL to use when referring to full URLs within the Wagtail admin backend -\r\n    # e.g. in notification emails. Don't include '/admin' or a trailing slash\r\n    WAGTAILADMIN_BASE_URL = \"http://example.com\"\r\n    # Search backed for development\r\n    WAGTAILSEARCH_BACKENDS = {\r\n        'default': {\r\n            'BACKEND': 'wagtail.search.backends.database',\r\n        }\r\n    }\r\n\r\n    # Disable password reset since it is personal site and the user is created using command line\r\n    WAGTAIL_PASSWORD_RESET_ENABLED = True\r\n\r\n    # Passwords can be changed\r\n    WAGTAIL_PASSWORD_MANAGEMENT_ENABLED = True\r\n\r\n    # Users do have passwords to log in\r\n    WAGTAILUSERS_PASSWORD_ENABLED = True\r\n\r\n    # Users must have paswords\r\n    WAGTAILUSERS_PASSWORD_REQUIRED = True\r\n\r\n    # See also embeds configuration at https://docs.wagtail.org/en/stable/reference/settings.html#wagtailembeds-responsive-html\r\n    WAGTAILEMBEDS_RESPONSIVE_HTML = True\r\n\r\n    # Custom admin login form based on email\r\n    # To have default login form, comment the line\r\n    WAGTAILADMIN_USER_LOGIN_FORM = 'waggylabs.forms.CaptchaLoginForm'\r\n\r\n    # Changes whether the Submit for Moderation button is displayed in the action menu\r\n    WAGTAIL_MODERATION_ENABLED = True\r\n\r\n    # To count usage of images and documents\r\n    WAGTAIL_USAGE_COUNT_ENABLED = True\r\n\r\n    # Date and time formats for admin\r\n    # WAGTAIL_DATE_FORMAT = '%d.%m.%Y.'\r\n    # WAGTAIL_DATETIME_FORMAT = '%d.%m.%Y. %H:%M'\r\n    # WAGTAIL_TIME_FORMAT = '%H:%M'\r\n    ```\r\n\r\n## Changelog\r\n\r\n### Version 1.1.0\r\n\r\n- Updated to Django 5.0.x and Wagtail 6.0.x. Not verified if Waggylabs 1.1.0 works with Wagtial 5.2.x.\r\n- Redone Color widget and Icon chooser widget. New appearance and working with Stimulus.\r\n- Updated Markdown widget to work with stimulus. Improved Markdown widget Javascript code for faster pwerformance (removed the need to trigger all the markdown widgets into preview mode for Mathjax to work correctly).\r\n- Updated Table widget to be in line with Wagtail's Table block. Converting to work together is still pending as in Wagtail 6.\r\n- Updated Wagtail admin login for for Django simple captcha to work with vanilla Javascript and Stimulus.\r\n\r\n### Version 1.0.4\r\n\r\n- Improved Autocomplete function on EasyMDE editors used in Wagtail admin. Improved MathJax typesetting when previewing Markdown in EasyMDE.\r\n\r\n### Version 1.0.3\r\n\r\n- Updated Django and Wagtail to 5.0.1 and 5.2.2 versions. Dependent packages has been also updated.\r\n\r\n### Version 1.0.2\r\n\r\n- Changed the migrations in order to show well-composed demo page after migraitions applied for the first time.\r\n- Added badges to the README.md\r\n\r\n### Version 1.0.1\r\n\r\n- Minor bugfixes in Link blocks to correctly display buttons and links.\r\n\r\n### Version 1.0\r\n\r\nWaggyLabs package and WaggyLabs site are ready and can be launched on a DigitalOcean droplet via Docker containers.\r\n\r\n### Version 1.0b1\r\n\r\nInitial release with the main features presented in the \"Features\" section on top of the page.\r\n\r\n## Future plans\r\n\r\n1. [Stimulus](https://stimulus.hotwired.dev/) for the frontend.\r\n2. Comments for posts.\r\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2023 Konstantin Tamarov  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A Wagtail app for research group and scientific blog sites.",
    "version": "1.1.0",
    "project_urls": {
        "Bug Reports": "https://github.com/natisok/wagtail-waggylabs/issues",
        "Homepage": "https://ktamarov.com/demo-page",
        "Source": "https://github.com/natisok/wagtail-waggylabs/"
    },
    "split_keywords": [
        "wagtail",
        " research",
        " blog"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce36aae98de500d73e29bf649071984d6a83a9a0c63c10c40b7cb76e9d2f1058",
                "md5": "6828460e9aca54d68a636a3ac6590da1",
                "sha256": "8e7fe85ab9d2a699fa88bac2b0cd5e5e9372247871bee96216bff8633fd57311"
            },
            "downloads": -1,
            "filename": "wagtail_waggylabs-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6828460e9aca54d68a636a3ac6590da1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 1478475,
            "upload_time": "2024-04-07T18:49:45",
            "upload_time_iso_8601": "2024-04-07T18:49:45.501189Z",
            "url": "https://files.pythonhosted.org/packages/ce/36/aae98de500d73e29bf649071984d6a83a9a0c63c10c40b7cb76e9d2f1058/wagtail_waggylabs-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f03e53657218d4aa404c0f59b3f3dc08d714c0ed5b3f7b9a5e238bbe9aeb63f0",
                "md5": "3631b2b99a8326405e82fc5267b6b9ac",
                "sha256": "030de339d41ab6095ef5b11c89e4b4fa0c16de248c5e3b10f6aca59947a4db10"
            },
            "downloads": -1,
            "filename": "wagtail-waggylabs-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3631b2b99a8326405e82fc5267b6b9ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 1089888,
            "upload_time": "2024-04-07T18:49:52",
            "upload_time_iso_8601": "2024-04-07T18:49:52.947034Z",
            "url": "https://files.pythonhosted.org/packages/f0/3e/53657218d4aa404c0f59b3f3dc08d714c0ed5b3f7b9a5e238bbe9aeb63f0/wagtail-waggylabs-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-07 18:49:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "natisok",
    "github_project": "wagtail-waggylabs",
    "github_not_found": true,
    "lcname": "wagtail-waggylabs"
}
        
Elapsed time: 0.22590s