Skip to content

TACC/Core-CMS-Plugin-Remote-Content

Repository files navigation

Texas Advanced Computing Center

Django CMS Plugin: Remote Content

This plugin fetches and displays content from remote TACC URLs. It was converted from the Core-CMS remote_content app into a Django CMS plugin.

  • Distribution Name: djangocms-tacc-remote-content
  • Package Name: djangocms_tacc_remote_content
  • Class Name: RemoteContent
  • Plugin Name: "Remote Content"

Quick Start

  1. Install the package:

    pip install djangocms-tacc-remote-content
  2. Add to INSTALLED_APPS in your Django project's settings:

    INSTALLED_APPS = [
       ...
       'djangocms_tacc_remote_content',
       ...
    ]
  3. Run migrations:

    python manage.py migrate djangocms_tacc_remote_content
  4. Configure the base URL for remote content in your settings (optional):

    PORTAL_PLUGIN_CONTENT_NETLOC = 'https://tacc.utexas.edu/'

    Learn about settings.

Usage

  1. In the Django CMS admin interface:

    1. Edit a page.
    2. Add a "Remote Content" plugin to a placeholder.
    3. Enter the path to the remote content (e.g. "/about/about-tacc").
  2. The plugin will:

    1. Fetch content from the remote source.
    2. Transform URLs to work in the local context.
    3. Display the content or show "No content found" if unavailable.

Warning

It is client application responsibility to:

  • support CORS for assets from other domains
  • load extra assets specific to client context

Tip

Loading news from TACC websites may require client application to add specific extra assets.

Screenshots

1. Plugin chosen 2. Path set 3. Arranged in structure 4. Content rendered
plugin choice plugin form plugin instance plugin rendered

Note

This demo set PORTAL_PLUGIN_CONTENT_NETLOC to https://localhost:8000. Default is https://tacc.utexas.edu.

Features

  • Simple interface to input a path to remote content
  • Automatic fetching and rendering of remote content
  • URL transformation to handle:
    • relative paths
    • resource URLs
    • query parameters
  • Error handling for failed requests

Testing

Follow TESTING.md.

About

A DjangoCMS plugin (for TACC Core CMS) to render remote content.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Generated from TACC/Django-App