Package: dicoweb
Version: 2.3-2
Tags: patch
Followup-For: Bug #907657

Dear Maintainer,

This should fix it.
Change line 20 in base.html to

      <h1><a href="{% url 'index' %}" accesskey="1">GNU Dico</a></h1>

Can you test this and see if it works?
Thanks.

My patch for solving this problem I send as an attachment.


-- System Information:
Debian Release: 9.5
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-042stab129.1 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), 
LANGUAGE=C (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dicoweb depends on:
ii  libapache2-mod-passenger  5.0.30-1+b1
ii  libapache2-mod-wsgi       4.5.11-1
ii  python                    2.7.13-2
ii  python-dicoclient         2.3-2
ii  python-django             1:1.10.7-2+deb9u1
ii  python-memcache           1.57-2
ii  python-wit                2.3-2

dicoweb recommends no packages.

dicoweb suggests no packages.

-- Configuration Files:
/etc/dicoweb/settings.py changed:
import os
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
BASE_DIR = SITE_ROOT
DEBUG = True
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [
    'localhost',
    '127.0.0.1',
    'dict.bible.ru'
]
ADMINS = (
    ('Dico Admin', 'root@localhost'),
)
MANAGERS = ADMINS
SITE_ID = 1
USE_I18N = True
LOCALE_PATHS = (
    os.path.join(SITE_ROOT, 'locale'),
)
TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_NAME = 'dicoweb_lang'
SESSION_COOKIE_NAME = 'dicoweb_sid'
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
        'KEY_PREFIX': 'dicoweb',
    },
}
MEDIA_ROOT = os.path.join(SITE_ROOT, 'static')
MEDIA_URL = '/static/'
SECRET_KEY = 'SET THIS TO A RANDOM STRING'
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = (
    'django.middleware.cache.UpdateCacheMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.gzip.GZipMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.cache.FetchFromCacheMiddleware',
)
ROOT_URLCONF = 'dicoweb.urls'
WSGI_APPLICATION = 'dicoweb.wsgi.application'
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'APP_DIRS': True,
        'DIRS': [
            os.path.join(SITE_ROOT, 'templates'),
        ],
    },    
]
INSTALLED_APPS = (
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'dicoweb',
)
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse'
        }
    },
    'handlers': {
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}
DICT_SERVERS = ('localhost',)
DICT_TIMEOUT = 10

/etc/dicoweb/templates/base.html changed:
{% load media %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title>{{ page.title|striptags }}GNU Dico Web</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, 
maximum-scale=1, user-scalable=no" />
<meta name="keywords" content="gnu dico web search interface, dicoweb, 
dictionaries, dict protocol" />
<meta name="description" content="GNU Dico WebSearch Interface" />
<meta name="robots" content="{{ page.robots }}" />
<link rel="stylesheet" type="text/css" href="{% media_prefix %}dicoweb.css" />
<link rel="search" type="application/opensearchdescription+xml" title="GNU Dico 
WebSearch" href="{% url 'opensearch' %}" />
<script type="text/javascript" src="{% media_prefix %}dicoweb.js"></script>
</head>
<body>
  <div id="wrap">
    <div id="logo">
      <h1><a href="{% url 'index' %}" accesskey="1">GNU Dico</a></h1>
      <img src="{% media_prefix %}gnu-head-sm.jpg" width="129" height="122" 
alt="GNU" />
    </div>
    <div id="main">
      {% block search %}{% endblock %}
    </div>
  </div><!-- /wrap -->
  <div class="clear"></div>
{% block results %}{% endblock %}
  <div id="footer">
    <a href="http://www.gnu.org/software/dico/";>GNU Dico</a>
    Web interface. Copyright &copy; 2008-{% now "Y" %} GNU Dico Team.
  </div>
</body>
</html>

/etc/dicoweb/templates/index.html changed:
{% extends 'base.html' %}
{% load i18n %}
{% load dictlookup %}
{% block search %}
<div id="searchform">
  <form id="form" method="get" action="">
    <table>
      <tbody>
        <tr>
          <td align="right" class="label">{% trans "Search term:" %}</td>
          <td>
            <input type="text" id="q" name="q" size="35" value="{{ q|escape }}" 
/>
            <a href="./#" id="toggle_options">{% trans "more options" %}</a>
          </td>
        </tr>
      </tbody>
      <tbody id="options" class="hidden">
        {% if selects.sv %}
        <tr>
          <td align="right">{% trans "DICT server:" %}</td>
          <td>
            <select name="server">
              {{ selects.sv.html|safe }}
            </select>
          </td>
        </tr>
        {% endif %}
        <tr>
          <td align="right">{% trans "Database:" %}</td>
          <td>
            <select name="db" style="width:350px">
              {{ selects.db.html|safe }}
            </select>
          </td>
        </tr>
        <tr>
          <td align="right">{% trans "Match strategy:" %}</td>
          <td>
            <select name="strategy" style="width:350px">
              {{ selects.st.html|safe }}
            </select>
          </td>
        </tr>
      </tbody>
      <tbody>
        <tr>
          <td id="action-pad"></td>
          <td id="action" colspan="2">
            <input type="submit" name="search" value="{% trans "Search" %}" />
            <input type="submit" name="define" value="{% trans "Define (I'm 
feeling lucky)" %}" />
          </td>
        </tr>
      </tbody>
    </table>
  </form>
</div>
{% endblock %}
{% block results %}
{% if result.error %}
<div class="derror">
  {{ result.msg }}
</div>
{% else %}
{% if result.definitions %}
  <div class="definition results">
    {% if mtc.matches %}
    <a href="#match-results" class="link-lmr">{% trans "last match results" 
%}</a>
    {% endif %}
    <h3>
      {% blocktrans count result.count as rc %}Found one definition{% plural 
%}Found {{ rc }} definitions{% endblocktrans %}
    </h3>
    {% for df in result.definitions %}
    <pre>
      {% trans "From" %} <a href="?q={{ df.db|urlencode }}&amp;db=dbinfo">{% 
firstof df.db_fullname df.db %}</a>:
      <br /><br />
      {% if df.format_html %}
{{ df.desc|safe }}
      {% else %}
{{ df.desc|safe|linebreaksbr }}
      {% endif %}
    </pre>
    {% endfor %}
  </div>
{% else %}
{% if result.desc %}
  <div class="results">
    <pre>
{{ result.desc|linebreaksbr }}
    </pre>
  </div>
{% endif %}
{% endif %}
{% if mtc.matches %}
  <div class="match results">
    <h3><a name="match-results"></a>{% trans "Last match results" %}</h3>
    <ul>
      {% for mt in mtc.matches.items %}
      <li>
        <span class="dbname-short" title="{{ mtc.dbnames|dictlookup:mt.0 }}">{{ 
mt.0 }}</span>:
        {% for term in mt.1 %}
        <a href="?q={{ term|urlencode }}&amp;db={{ mt.0|urlencode 
}}&amp;define=1" title="{% blocktrans %}Define {{ term }}{% endblocktrans 
%}">{{ term }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
      </li>
      {% endfor %}
    </ul>
  </div>
{% endif %}
{% endif %}
<script type="text/javascript">
var gettext_msg = {
  'more options': '{% trans "more options" %}',
  'less options': '{% trans "less options" %}'
};
</script>
{% endblock %}


-- no debconf information
diff -BbdiNru dico-2.3.orig/dicoweb/templates/base.html 
dico-2.3/dicoweb/templates/base.html
--- dico-2.3.orig/dicoweb/templates/base.html   2013-12-18 11:13:11.000000000 
+0000
+++ dico-2.3/dicoweb/templates/base.html        2018-08-30 22:16:58.578679743 
+0000
@@ -17,7 +17,7 @@
 <body>
   <div id="wrap">
     <div id="logo">
-      <h1><a href="{% url 'views.index' %}" accesskey="1">GNU Dico</a></h1>
+      <h1><a href="{% url 'index' %}" accesskey="1">GNU Dico</a></h1>
       <img src="{% media_prefix %}gnu-head-sm.jpg" width="129" height="122" 
alt="GNU" />
     </div>
     <div id="main">

Reply via email to