feat: integrated lesson markup
- added PageExtension plugin to inject custom styles scripts in a page - removed the livecode integration and enabled PageExtension plugins for learn page - also merged the profile_tab.py with plugins.py - added a utility to find the macros from given text - updated the before_save of lesson to find exercises using the macros and update the exercises as before Issue #115
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
"""
|
||||
The profile_tab module provides a pluggable way to add tabs to user
|
||||
profiles.
|
||||
|
||||
This is achieved by specifying the profile_tabs in the hooks.
|
||||
|
||||
profile_tabs = [
|
||||
'myapp.myapp.profile_tabs.SketchesTab'
|
||||
]
|
||||
|
||||
When a profile page is rendered, these classes specified in the
|
||||
profile_hooks are instanciated with the user as argument and used to
|
||||
render the tabs.
|
||||
"""
|
||||
|
||||
class ProfileTab:
|
||||
"""Base class for profile tabs.
|
||||
|
||||
Every subclass of ProfileTab must implement two methods:
|
||||
- get_title()
|
||||
- render()
|
||||
"""
|
||||
def __init__(self, user):
|
||||
self.user = user
|
||||
|
||||
def get_title(self):
|
||||
"""Returns the title of the tab.
|
||||
|
||||
Every subclass must implement this.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def render(self):
|
||||
"""Renders the contents of the tab as HTML.
|
||||
|
||||
Every subclass must implement this.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
Reference in New Issue
Block a user