Skip to content

Commit

Permalink
Fix: get_render_template
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 12, 2022
1 parent b7395f9 commit 5b977cf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
Empty file modified runtests.py
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions src/automations/cms_automations/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ class AutomationTaskList(CMSPluginBase):
model = cms_models.AutomationTasksPlugin
allow_children = False
require_parent = False
render_template = None

def render(self, context, instance, placeholder):
self.render_template = instance.template
qs = models.AutomationTaskModel.get_open_tasks(context["request"].user)
context.update(
dict(tasks=qs, count=len(qs), always_inform=instance.always_inform)
)
return context

def get_render_template(self, context, instance, placeholder):
return instance.template


@plugin_pool.register_plugin
class AutomationDashboard(CMSPluginBase):
Expand Down
14 changes: 6 additions & 8 deletions src/django_automations.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ Summary: Processes and automations for your Django project
Home-page: https://github.com/fsbraun/django-automations
Author: Fabian Braun
Author-email: [email protected]
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/fsbraun/django-automations/issues
Project-URL: Documentation, https://django-automations.readthedocs.io/en/latest/
Keywords: django_automations,workflow,automation
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Expand Down Expand Up @@ -73,12 +71,11 @@ This project is in a early stage. All feedback is welcome! Please mail me at fsb

# Installation

This project will be available on pypi after the first release. In the meantime, please install the master branch from
git using
Install the package from PyPI:

pip install https://github.com/fsbraun/django-automations/archive/master.zip
pip install django-automations

After installation add the `automations` to your installed apps in `settings.py`:
Add `automations` to your installed apps in `settings.py`:

INSTALLED_APPS = (
...,
Expand All @@ -102,7 +99,9 @@ in one place all business processes which in a Django app often are distributed
carried out.

from automations import flow
from automations.flow import this
from automations.flow import Automation
from automations.flow import this

# "this" can be used in a class definition as a replacement for "self"

from . import forms
Expand Down Expand Up @@ -131,4 +130,3 @@ carried out.
# Documentation

See the [documentation on readthedocs.io](https://django-automations.readthedocs.io/).

2 changes: 2 additions & 0 deletions src/django_automations.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ src/automations/cms_automations/migrations/0002_auto_20210506_1957.py
src/automations/cms_automations/migrations/0003_auto_20210511_0825.py
src/automations/cms_automations/migrations/0004_auto_20210511_1042.py
src/automations/cms_automations/migrations/0005_auto_20211121_1838.py
src/automations/cms_automations/migrations/0006_auto_20220125_1002.py
src/automations/cms_automations/migrations/__init__.py
src/automations/cms_automations/templates/automations/cms/empty_template.html
src/automations/locale/de_DE/LC_MESSAGES/django.mo
Expand All @@ -40,6 +41,7 @@ src/automations/migrations/0003_auto_20210511_0825.py
src/automations/migrations/0004_auto_20210511_1042.py
src/automations/migrations/0005_automationmodel_key.py
src/automations/migrations/0006_auto_20211121_1357.py
src/automations/migrations/0007_auto_20220125_1002.py
src/automations/migrations/__init__.py
src/automations/templates/base.html
src/automations/templates/automations/base.html
Expand Down

0 comments on commit 5b977cf

Please sign in to comment.