Fedora Hubs widget tutorial

Navigation

  • 1. Install and run Hubs
  • 2. Create a very simple widget
  • 3. Register it and add it to your hub
  • 4. Add parameters
  • 5. Get more interesting data
  • 6. Cache the data
  • 7. Invalidate the cache
  • 8. Wrap-up

Related Topics

  • Documentation overview
    • Next: 1. Install and run Hubs

Quick search

Fedora Hubs widget tutorial¶

In this workshop, you will learn how to write a widget for Fedora Hubs, and how to take advantage of the automatic caching and reloading features that the Hubs framework provides.

Overall, the workshop takes around an hour to do, depending on your experience and your willingness to explore alternative ways of implementing some exercises.

Contents of the workshop¶

  • 1. Install and run Hubs
    • 1.1. Repositories
    • 1.2. Development VM
    • 1.3. Running Hubs
  • 2. Create a very simple widget
    • 2.1. Description of widgets
    • 2.2. Basic code structure
  • 3. Register it and add it to your hub
    • 3.1. Register the widget
    • 3.2. Add the widget to your hub
  • 4. Add parameters
    • 4.1. Add the parameter
    • 4.2. Update the view
    • 4.3. Update the template
    • 4.4. Restart the server
  • 5. Get more interesting data
    • 5.1. Updating the widget class
    • 5.2. Updating the view
    • 5.3. Updating the template
    • 5.4. Updating and restarting the server
    • 5.5. Trying it out
    • 5.6. If you have an error
  • 6. Cache the data
    • 6.1. Integrated caching
    • 6.2. Writing a cached function
  • 7. Invalidate the cache
    • 7.1. How the cache invalidation works
    • 7.2. Adding automatic reloading
  • 8. Wrap-up

Indices and tables¶

  • Index
  • Search Page

Next: 1. Install and run Hubs

©2017, Aurelien Bompard . | Powered by Sphinx 1.5.2 & Alabaster 0.7.9 | Page source