diff --git a/tasks/django.yml b/tasks/django.yml index e02059ef..fd45abf1 100644 --- a/tasks/django.yml +++ b/tasks/django.yml @@ -48,6 +48,16 @@ dest: "{{ openwisp2_path }}/openwisp2/celery.py" group: "{{ www_group }}" mode: 0640 + tags: [django_init] + +- name: Template version.py + notify: Reload application + template: + src: openwisp2/version.py + dest: "{{ openwisp2_path }}/openwisp2/version.py" + group: "{{ www_group }}" + mode: 0640 + tags: [django_init] - name: Template __init__.py notify: Reload application diff --git a/templates/openwisp2/__init__.py b/templates/openwisp2/__init__.py index 1b269fb8..37555a7a 100644 --- a/templates/openwisp2/__init__.py +++ b/templates/openwisp2/__init__.py @@ -1,7 +1,8 @@ from .celery import app as celery_app +from .version import __openwisp_version__, __openwisp_installation_method__ -__all__ = ['celery_app'] -__openwisp_version__ = '24.11.1' -__openwisp_installation_method__ = ( - '{{ openwisp2_installation_method | default("ansible-openwisp2") }}' -) +__all__ = [ + 'celery_app', + '__openwisp_version__', + '__openwisp_installation_method__' +] diff --git a/templates/openwisp2/version.py b/templates/openwisp2/version.py new file mode 100644 index 00000000..d6534f24 --- /dev/null +++ b/templates/openwisp2/version.py @@ -0,0 +1,4 @@ +__openwisp_version__ = '24.11.1' +__openwisp_installation_method__ = ( + '{{ openwisp2_installation_method | default("ansible-openwisp2") }}' +)