From 5b977cf6fdd0e59cec45968e9895bc015c1e28ee Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Mon, 12 Sep 2022 08:41:04 +0200 Subject: [PATCH] Fix: get_render_template --- runtests.py | 0 src/automations/cms_automations/cms_plugins.py | 5 +++-- src/django_automations.egg-info/PKG-INFO | 14 ++++++-------- src/django_automations.egg-info/SOURCES.txt | 2 ++ 4 files changed, 11 insertions(+), 10 deletions(-) mode change 100644 => 100755 runtests.py diff --git a/runtests.py b/runtests.py old mode 100644 new mode 100755 diff --git a/src/automations/cms_automations/cms_plugins.py b/src/automations/cms_automations/cms_plugins.py index 878e235..8c24009 100644 --- a/src/automations/cms_automations/cms_plugins.py +++ b/src/automations/cms_automations/cms_plugins.py @@ -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): diff --git a/src/django_automations.egg-info/PKG-INFO b/src/django_automations.egg-info/PKG-INFO index 3b71450..41b8d3b 100644 --- a/src/django_automations.egg-info/PKG-INFO +++ b/src/django_automations.egg-info/PKG-INFO @@ -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: fsbraun@gmx.de -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 @@ -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 = ( ..., @@ -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 @@ -131,4 +130,3 @@ carried out. # Documentation See the [documentation on readthedocs.io](https://django-automations.readthedocs.io/). - diff --git a/src/django_automations.egg-info/SOURCES.txt b/src/django_automations.egg-info/SOURCES.txt index 4b1c99e..0251a9e 100644 --- a/src/django_automations.egg-info/SOURCES.txt +++ b/src/django_automations.egg-info/SOURCES.txt @@ -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 @@ -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