Skip to content

Commit

Permalink
Merge pull request #24 from johncronan/dev
Browse files Browse the repository at this point in the history
fixes; reviewpanel 0.8.1
  • Loading branch information
johncronan authored Apr 27, 2022
2 parents cbf4567 + 6325f96 commit e4d5058
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ COPY . /opt/services/djangoapp/src
RUN poetry install --no-dev

COPY resources/s6-rc.d /etc/s6-overlay/s6-rc.d
COPY resources/run /opt/services/djangoapp/run

ARG S6_VERSION=3.1.0.1
ARG S6_URL=https://github.com/just-containers/s6-overlay/releases/download
RUN arch="$(dpkg --print-architecture)"; \
Expand All @@ -36,3 +38,4 @@ EXPOSE 8000
ENTRYPOINT ["/init"]

# TODO: change to an app user?
CMD ["/command/with-contenv", "../run"]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
- .env
environment:
DOCKER_ENV: 'on'
S6_KILL_GRACETIME: 1
volumes:
- requirements_volume:/opt/services/djangoapp/requirements
- static_volume:/opt/services/djangoapp/static
Expand Down
8 changes: 6 additions & 2 deletions formative/admin/formative.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from ..filetype import FileType
from ..plugins import get_matching_plugin
from ..signals import register_program_settings, register_form_settings, \
register_user_actions, form_published_changed
register_user_actions, form_published_changed, form_settings_changed
from ..tasks import timed_complete_form
from ..utils import submission_link
from .actions import UserActionsMixin, FormActionsMixin,FormBlockActionsMixin, \
Expand Down Expand Up @@ -193,7 +193,11 @@ def save_form(self, request, form, change):
timed_complete_form.apply_async(args=(obj.id, val), eta=val)

return obj


def save_model(self, request, obj, form, change):
super().save_model(request, obj, form, change)
form_settings_changed.send(obj, changed_data=form.changed_data)

def response_post_save_change(self, request, obj):
app_label = self.model._meta.app_label
url = reverse('admin:%s_formblock_formlist' % (app_label,),
Expand Down
2 changes: 2 additions & 0 deletions formative/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ def send(self, sender, **kwargs):

register_form_settings = FormPluginSignal()

form_settings_changed = FormPluginSignal()

submission_review_pre = FormPluginSignal()

submission_review_post = FormPluginSignal()
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ django-better-admin-arrayfield = "^1.4.2"
django-admin-inline-paginator = "*"
whitenoise = "^6.0.0"
reportlab = "*"
reviewpanel = { version = "^0.8.0", optional = true }
reviewpanel = { version = "^0.8.1", optional = true }

[tool.poetry.dev-dependencies]
pytest = "*"
Expand Down
File renamed without changes.
Empty file.
Empty file.
3 changes: 0 additions & 3 deletions resources/s6-rc.d/djangoapp/finish

This file was deleted.

1 change: 0 additions & 1 deletion resources/s6-rc.d/djangoapp/type

This file was deleted.

2 changes: 1 addition & 1 deletion resources/s6-rc.d/setup1/up
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/command/execlineb -P
# execline

cd /opt/services/djangoapp/requirements
foreground { touch requirements.txt }
Expand Down
2 changes: 1 addition & 1 deletion resources/s6-rc.d/setup2/up
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/command/execlineb -P
# execline

cd /opt/services/djangoapp/src
with-contenv
Expand Down
8 changes: 6 additions & 2 deletions resources/s6-rc.d/setup3/up
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/command/execlineb -P
# execline

cd /opt/services/djangoapp/src
# if { test -n $AUTO_MIGRATE } i don't know how
with-contenv
if -t
{
importas -D "" AUTO_MIGRATE AUTO_MIGRATE
test -n ${AUTO_MIGRATE}
}
python3 manage.py migrate --noinput
Empty file.
2 changes: 1 addition & 1 deletion templates/admin/formative/formblock/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% else %}
{% if form_id %}
<a href="{% url 'admin:formative_formblock_formlist' form_id %}">
{% else %}
{% elif original.form %}
<a href="{% url 'admin:formative_formblock_formlist' original.form.id %}">
{% endif %}
{% endif %}
Expand Down

0 comments on commit e4d5058

Please sign in to comment.