Your message dated Mon, 30 Sep 2019 04:50:46 +0000
with message-id <[email protected]>
and subject line Bug#940982: Removed package(s) from unstable
has caused the Debian Bug report #893157,
regarding planet-venus: django.template.exceptions.TemplateDoesNotExist
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
893157: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893157
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: planet-venus
Version: 0~git9de2109-4
Tags: patch

Hi,

When processing a .dj template with planet-venus under Debian 9.4/Stretch, I 
got:
 DEBUG:planet.runner:Processing template 
/var/www/planet.gnu.org/git/debian/templates/index.html.dj using dj
Traceback (most recent call last):
  File "./code/venus/planet.py", line 158, in <module>
    splice.apply(doc.toxml('utf-8'))
  File "/usr/lib/python2.7/dist-packages/planet/splice.py", line 142, in apply
    output_file = shell.run(template_file, doc)
  File "/usr/lib/python2.7/dist-packages/planet/shell/__init__.py", line 66, in 
run
    module.run(template_resolved, doc, output_file, options)
  File "/usr/lib/python2.7/dist-packages/planet/shell/dj.py", line 41, in run
    t = get_template(script)
  File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 25, 
in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: 
/var/www/planet.gnu.org/git/debian/templates/index.html.dj

AFAICS this is related to:
https://docs.djangoproject.com/fr/1.10/ref/templates/upgrading/

The attached patch applies that documentation and fixes the issue:
--- dj.py~      2018-03-16 20:34:34.019196399 +0000
+++ dj.py       2018-03-16 22:37:35.015027892 +0000
@@ -23,7 +23,24 @@
     try:
         settings.configure(
             DEBUG=True, TEMPLATE_DEBUG=True, 
-            TEMPLATE_DIRS=(os.path.dirname(script),)
+            TEMPLATES = [
+                {
+                    'BACKEND': 
'django.template.backends.django.DjangoTemplates',
+                    'DIRS': (os.path.dirname(script),),
+                    'APP_DIRS': True,
+                    'OPTIONS': {
+                        'context_processors': [
+                            'django.contrib.auth.context_processors.auth',
+                            'django.template.context_processors.debug',
+                            'django.template.context_processors.i18n',
+                            'django.template.context_processors.media',
+                            'django.template.context_processors.static',
+                            'django.template.context_processors.tz',
+                            
'django.contrib.messages.context_processors.messages',
+                        ],
+                    },
+                },
+            ]
             )
     except RuntimeError:
         pass


Works for me.

Cheers!
Sylvain

--- dj.py~	2018-03-16 20:34:34.019196399 +0000
+++ dj.py	2018-03-16 22:37:35.015027892 +0000
@@ -23,7 +23,24 @@
     try:
         settings.configure(
             DEBUG=True, TEMPLATE_DEBUG=True, 
-            TEMPLATE_DIRS=(os.path.dirname(script),)
+            TEMPLATES = [
+                {
+                    'BACKEND': 'django.template.backends.django.DjangoTemplates',
+                    'DIRS': (os.path.dirname(script),),
+                    'APP_DIRS': True,
+                    'OPTIONS': {
+                        'context_processors': [
+                            'django.contrib.auth.context_processors.auth',
+                            'django.template.context_processors.debug',
+                            'django.template.context_processors.i18n',
+                            'django.template.context_processors.media',
+                            'django.template.context_processors.static',
+                            'django.template.context_processors.tz',
+                            'django.contrib.messages.context_processors.messages',
+                        ],
+                    },
+                },
+            ]
             )
     except RuntimeError:
         pass

--- End Message ---
--- Begin Message ---
Version: 0~git9de2109-4.2+rm

Dear submitter,

as the package planet-venus has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/940982

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to