diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bc2bcea5..9943ab73 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,19 +4,27 @@ stages:
test:
stage: test
script:
+ - env
- apt-get update
- apt-get install -y gettext python3-xapian libgraphviz-dev
- pushd /usr/lib/python3/dist-packages/xapian && ln -s _xapian* _xapian.so && popd
- export PYTHONPATH="/usr/lib/python3/dist-packages:$PYTHONPATH"
- python -c 'import xapian' # Fail immediately if there is a problem with xapian
- - pip install -r requirements.txt
- - pip install coverage
+ - pip install -U -r requirements.txt
+ - pip install -U coverage
+ - mkdir -p /dev/shm/search_indexes
+ - ln -s /dev/shm/search_indexes sith/search_indexes
- ./manage.py compilemessages
- coverage run ./manage.py test
- coverage html
- coverage report
- cd doc
- make html # Make documentation
+ variables:
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip_tests"
+ cache:
+ paths:
+ - .cache/pip_tests
artifacts:
paths:
- coverage_report/
@@ -24,5 +32,10 @@ test:
black:
stage: test
script:
- - pip install black
+ - pip install -U black
- black --check .
+ variables:
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip_black"
+ cache:
+ paths:
+ - .cache/pip_black
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 00000000..30fe2218
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,18 @@
+Code {% trans %}You need an up to date subscription to access this content{% endtrans %} {% trans %}You need an up to date subscription to access this content{% endtrans %} {% trans %}Are you sure you want to send this weekmail?{% endtrans %} {% trans %}Warning: you are sending the weekmail in another language than the default one!{% endtrans %}
+
+ {% trans %}The following recipients were refused by the SMTP:{% endtrans %}
+
+
- {% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %}
-
- {% endcache %}
- {% else %}
-
- {% for u in birthdays.filter(date_of_birth__year=d.year) %}
-
- {{ news.title }}
- {{ news.title }}
+ {{ news.title }}
- {{ news.title }}
+ {% trans %}Events today and the next few days{% endtrans %}
- {% if events_dates %}
- {% for d in events_dates %}
- {{ news.title }}
-
- {% trans %}Events today and the next few days{% endtrans %}
+ {% if events_dates %}
+ {% for d in events_dates %}
+ {{ news.title }}
+
+ {% trans %}Coming soon... don't miss!{% endtrans %}
- {% for news in coming_soon %}
- {% trans %}Coming soon... don't miss!{% endtrans %}
+ {% for news in coming_soon %}
+
+ {% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %}
+
+ {% endcache %}
+ {% else %}
+
+ {% for u in birthdays.filter(date_of_birth__year=d.year) %}
+
+
+ {% for r in bad_recipients.keys() %}
+
+
{% trans %}Are you sure you want to send this weekmail?{% endtrans %}
+ {% if request.LANGUAGE_CODE != settings.LANGUAGE_CODE[:2] %} +{% trans %}Warning: you are sending the weekmail in another language than the default one!{% endtrans %}
+ {% endif %} + + {% endif %} {% endif %}Caaaataaaapuuuulte!!!!
""" - in str(r.content) + self.assertContains( + r, + """Caaaataaaapuuuulte!!!!
""", ) def test_info_msg(self): @@ -95,9 +97,10 @@ class ComTest(TestCase): ) r = self.client.get(reverse("core:index")) self.assertTrue(r.status_code == 200) - self.assertTrue( - """u?Y(e,r,s,!0,!1,p):N(t,n,o,r,s,i,l,c,p)},U=(e,t,n,o,r,s,i,l,c)=>{let a=0;const u=t.length;let p=e.length-1,f=u-1;for(;a<=p&&a<=f;){const o=e[a],u=t[a]=c?er(t[a]):Xo(t[a]);if(!Wo(o,u))break;m(o,u,n,null,r,s,i,l,c),a++}for(;a<=p&&a<=f;){const o=e[p],a=t[f]=c?er(t[f]):Xo(t[f]);if(!Wo(o,a))break;m(o,a,n,null,r,s,i,l,c),p--,f--}if(a>p){if(a<=f){const e=f+1,p=ef)for(;a<=p;)W(e[a],r,s,!0),a++;else{const d=a,h=a,g=new Map;for(a=h;a<=f;a++){const e=t[a]=c?er(t[a]):Xo(t[a]);null!=e.key&&g.set(e.key,a)}let y,b=0;const _=f-h+1;let S=!1,x=0;const C=new Array(_);for(a=0;a<_;a++)C[a]=0;for(a=d;a<=p;a++){const o=e[a];if(b>=_){W(o,r,s,!0);continue}let u;if(null!=o.key)u=g.get(o.key);else for(y=h;y<=f;y++)if(0===C[y-h]&&Wo(o,t[y])){u=y;break}void 0===u?W(o,r,s,!0):(C[u-h]=a+1,u>=x?x=u:S=!0,m(o,t[u],n,null,r,s,i,l,c),b++)}const w=S?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o
- {% cache 100 counters_activity %}
+ {% cache 100 "counters_activity" %}
{% for bar in Counter.objects.filter(type="BAR").all() %}
{% for n in user.notifications.filter(viewed=False).order_by('-date') %}
{% trans %}Delete confirmation{% endtrans %}