From 6d8d12aa2965f0a9b8ae7b4dd1962d34724c8e7a Mon Sep 17 00:00:00 2001
From: J08nY
Date: Fri, 11 Aug 2017 00:19:16 +0200
Subject: Setup base Django project structure.
---
src/django-pgpmailman/__init__.py | 0
src/django_pgpmailman/__init__.py | 0
src/django_pgpmailman/apps.py | 25 +++++
.../static/django-pgpmailman/img/favicon.ico | Bin 0 -> 5558 bytes
.../static/django-pgpmailman/img/mailman_logo.png | Bin 0 -> 11742 bytes
.../img/mailman_logo_small_trans.png | Bin 0 -> 1369 bytes
.../django-pgpmailman/img/mailman_logo_trans.png | Bin 0 -> 8027 bytes
src/django_pgpmailman/templates/account/base.html | 1 +
.../templates/django_mailman3/base.html | 1 +
.../templates/django_pgpmailman/base.html | 124 +++++++++++++++++++++
.../templates/django_pgpmailman/index.html | 49 ++++++++
src/django_pgpmailman/urls.py | 26 +++++
src/django_pgpmailman/views/__init__.py | 0
src/django_pgpmailman/views/list.py | 26 +++++
14 files changed, 252 insertions(+)
delete mode 100644 src/django-pgpmailman/__init__.py
create mode 100644 src/django_pgpmailman/__init__.py
create mode 100644 src/django_pgpmailman/apps.py
create mode 100644 src/django_pgpmailman/static/django-pgpmailman/img/favicon.ico
create mode 100644 src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo.png
create mode 100644 src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_small_trans.png
create mode 100644 src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_trans.png
create mode 100644 src/django_pgpmailman/templates/account/base.html
create mode 100644 src/django_pgpmailman/templates/django_mailman3/base.html
create mode 100644 src/django_pgpmailman/templates/django_pgpmailman/base.html
create mode 100644 src/django_pgpmailman/templates/django_pgpmailman/index.html
create mode 100644 src/django_pgpmailman/urls.py
create mode 100644 src/django_pgpmailman/views/__init__.py
create mode 100644 src/django_pgpmailman/views/list.py
(limited to 'src')
diff --git a/src/django-pgpmailman/__init__.py b/src/django-pgpmailman/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/src/django_pgpmailman/__init__.py b/src/django_pgpmailman/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/src/django_pgpmailman/apps.py b/src/django_pgpmailman/apps.py
new file mode 100644
index 0000000..47cfbc3
--- /dev/null
+++ b/src/django_pgpmailman/apps.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2017 Jan Jancar
+#
+# This file is a part of the Django Mailman PGP plugin.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see .
+from __future__ import absolute_import, unicode_literals
+
+from django.apps import AppConfig
+
+
+class PGPMailmanConfig(AppConfig):
+ name = 'pgp'
+ verbose_name = 'PGPMailman'
diff --git a/src/django_pgpmailman/static/django-pgpmailman/img/favicon.ico b/src/django_pgpmailman/static/django-pgpmailman/img/favicon.ico
new file mode 100644
index 0000000..e7df10b
Binary files /dev/null and b/src/django_pgpmailman/static/django-pgpmailman/img/favicon.ico differ
diff --git a/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo.png b/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo.png
new file mode 100644
index 0000000..eada26e
Binary files /dev/null and b/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo.png differ
diff --git a/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_small_trans.png b/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_small_trans.png
new file mode 100644
index 0000000..66ab32c
Binary files /dev/null and b/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_small_trans.png differ
diff --git a/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_trans.png b/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_trans.png
new file mode 100644
index 0000000..4c4f824
Binary files /dev/null and b/src/django_pgpmailman/static/django-pgpmailman/img/mailman_logo_trans.png differ
diff --git a/src/django_pgpmailman/templates/account/base.html b/src/django_pgpmailman/templates/account/base.html
new file mode 100644
index 0000000..6db00ba
--- /dev/null
+++ b/src/django_pgpmailman/templates/account/base.html
@@ -0,0 +1 @@
+{% extends "django_pgpmailman/base.html" %}
\ No newline at end of file
diff --git a/src/django_pgpmailman/templates/django_mailman3/base.html b/src/django_pgpmailman/templates/django_mailman3/base.html
new file mode 100644
index 0000000..6db00ba
--- /dev/null
+++ b/src/django_pgpmailman/templates/django_mailman3/base.html
@@ -0,0 +1 @@
+{% extends "django_pgpmailman/base.html" %}
\ No newline at end of file
diff --git a/src/django_pgpmailman/templates/django_pgpmailman/base.html b/src/django_pgpmailman/templates/django_pgpmailman/base.html
new file mode 100644
index 0000000..3472cd9
--- /dev/null
+++ b/src/django_pgpmailman/templates/django_pgpmailman/base.html
@@ -0,0 +1,124 @@
+{% load i18n %}
+{% load staticfiles %}
+{% load gravatar %}
+
+
+
+
+
+ {% for pgp_list in lists %}
+ {% with pgp_list.mlist as mlist %}
+
+
+ {{ mlist.display_name }}
+ {% if user.is_superuser and not mlist.settings.advertised %} ({% trans 'unadvertised' %}*){% endif %}
+
+
{{ mlist.fqdn_listname }}
+
{{ pgp_list.key.fingerprint }}
+
{{ mlist.settings.description }}
+
+ {% endfor %}
+
+
+
+ {% if user.is_superuser %}
+ * {% trans 'Only admins see unadvertised lists in the list index.' %}
+ {% endif %}
+ {% paginator lists %}
+ {% else %}
+
{% trans 'There are currently no PGP enabled mailing lists.' %}
+ {% endif %}
+
+{% endblock content %}
diff --git a/src/django_pgpmailman/urls.py b/src/django_pgpmailman/urls.py
new file mode 100644
index 0000000..8c63141
--- /dev/null
+++ b/src/django_pgpmailman/urls.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2017 Jan Jancar
+#
+# This file is a part of the Django Mailman PGP plugin.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see .
+from __future__ import absolute_import, unicode_literals
+
+from django.conf.urls import url
+
+from django_pgpmailman.views.list import pgp_list_index
+
+urlpatterns = [
+ url(r'^$', pgp_list_index)
+]
diff --git a/src/django_pgpmailman/views/__init__.py b/src/django_pgpmailman/views/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/src/django_pgpmailman/views/list.py b/src/django_pgpmailman/views/list.py
new file mode 100644
index 0000000..4bdfdff
--- /dev/null
+++ b/src/django_pgpmailman/views/list.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2017 Jan Jancar
+#
+# This file is a part of the Django Mailman PGP plugin.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see .
+
+from __future__ import absolute_import, unicode_literals
+
+from django.shortcuts import render
+
+
+def pgp_list_index(request):
+ return render(request, 'django_pgpmailman/index.html',
+ {'lists': []})
--
cgit v1.2.3-70-g09d2