From 814a8b62cb8167c6004ee52658e339723b924329 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Tue, 28 Feb 2017 19:44:15 +0100 Subject: [PATCH] Noot --- README | 4 + templates/whoisdb/contact_detail.html | 15 ++ templates/whoisdb/handle_table_row.html | 13 ++ templates/whoisdb/maintainer_detail.html | 15 ++ templates/whoisdb/maintainer_edit.html | 21 +++ templates/whoisdb/obj_create.html | 21 +++ templates/whoisdb/obj_delete.html | 32 ++++ templates/whoisdb/obj_edit.html | 21 +++ templates/whoisdb/overview.html | 30 ++-- whoisdb/forms.py | 64 +++++++- whoisdb/generic.py | 26 ++++ whoisdb/migrations/0004_auto_20170228_1041.py | 52 +++++++ whoisdb/migrations/0005_auto_20170228_1435.py | 26 ++++ whoisdb/migrations/0006_auto_20170228_1440.py | 30 ++++ whoisdb/migrations/0007_asblock_mnt_lower.py | 20 +++ whoisdb/models.py | 67 ++++++-- whoisdb/urls.py | 15 ++ whoisdb/views.py | 144 ++++++++++++++++-- 18 files changed, 576 insertions(+), 40 deletions(-) create mode 100644 templates/whoisdb/contact_detail.html create mode 100644 templates/whoisdb/handle_table_row.html create mode 100644 templates/whoisdb/maintainer_detail.html create mode 100644 templates/whoisdb/maintainer_edit.html create mode 100644 templates/whoisdb/obj_create.html create mode 100644 templates/whoisdb/obj_delete.html create mode 100644 templates/whoisdb/obj_edit.html create mode 100644 whoisdb/generic.py create mode 100644 whoisdb/migrations/0004_auto_20170228_1041.py create mode 100644 whoisdb/migrations/0005_auto_20170228_1435.py create mode 100644 whoisdb/migrations/0006_auto_20170228_1440.py create mode 100644 whoisdb/migrations/0007_asblock_mnt_lower.py diff --git a/README b/README index ca8bfcb..3075aa3 100644 --- a/README +++ b/README @@ -2,3 +2,7 @@ whoisdb see own objects list of all ASses? + +FIXME + contact soll nur einen mnt_by haben + mnt_by ==> mnt_by_in in filter statements diff --git a/templates/whoisdb/contact_detail.html b/templates/whoisdb/contact_detail.html new file mode 100644 index 0000000..ac2c415 --- /dev/null +++ b/templates/whoisdb/contact_detail.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block content %} +
+
+
+
Header
+
+ {{ contact }} +
+
+
+
+{% endblock %} + diff --git a/templates/whoisdb/handle_table_row.html b/templates/whoisdb/handle_table_row.html new file mode 100644 index 0000000..a1ffbbe --- /dev/null +++ b/templates/whoisdb/handle_table_row.html @@ -0,0 +1,13 @@ +{% with "whoisdb:"|add:prefix|add:"-detail" as detailView %} + {% with "whoisdb:"|add:prefix|add:"-delete" as deleteView %} + {% with "whoisdb:"|add:prefix|add:"-edit" as editView %} + + {{ obj.handle }} + {{ objType }} + {{obj.name }}{{ obj.description }} + {% for contact in obj.admin_c.all %}{{ contact }} {% endfor %} + Edit Delete + + {% endwith %} + {% endwith %} +{% endwith %} diff --git a/templates/whoisdb/maintainer_detail.html b/templates/whoisdb/maintainer_detail.html new file mode 100644 index 0000000..5dbfd9e --- /dev/null +++ b/templates/whoisdb/maintainer_detail.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block content %} +
+
+
+
Header
+
+ {{ mnt }} +
+
+
+
+{% endblock %} + diff --git a/templates/whoisdb/maintainer_edit.html b/templates/whoisdb/maintainer_edit.html new file mode 100644 index 0000000..691f4df --- /dev/null +++ b/templates/whoisdb/maintainer_edit.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% load crispy_forms_tags %} + +{% block content %} +
+
+
+
Header
+
+
+ {% csrf_token %} + {{ form | crispy }} + +
+
+
+
+
+{% endblock %} + diff --git a/templates/whoisdb/obj_create.html b/templates/whoisdb/obj_create.html new file mode 100644 index 0000000..691f4df --- /dev/null +++ b/templates/whoisdb/obj_create.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% load crispy_forms_tags %} + +{% block content %} +
+
+
+
Header
+
+
+ {% csrf_token %} + {{ form | crispy }} + +
+
+
+
+
+{% endblock %} + diff --git a/templates/whoisdb/obj_delete.html b/templates/whoisdb/obj_delete.html new file mode 100644 index 0000000..a13b114 --- /dev/null +++ b/templates/whoisdb/obj_delete.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} + +{% load crispy_forms_tags %} + +{% block content %} +
+
+
+
Header
+
+ {% if reasons %} +

+ You cannot delete this object, as other objects in the database depend on it! +

+

+

    + {% for reason in reasons %} +
  • {{ reason }}
  • + {% endfor %} +
+ {% else %} +
+ {% csrf_token %} + +
+ {% endif %} +
+
+
+
+{% endblock %} + diff --git a/templates/whoisdb/obj_edit.html b/templates/whoisdb/obj_edit.html new file mode 100644 index 0000000..046e9df --- /dev/null +++ b/templates/whoisdb/obj_edit.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% load crispy_forms_tags %} + +{% block content %} +
+
+
+
Header
+
+
+ {% csrf_token %} + {{ form | crispy }} + +
+
+
+
+
+{% endblock %} + diff --git a/templates/whoisdb/overview.html b/templates/whoisdb/overview.html index 93be762..8893b4f 100644 --- a/templates/whoisdb/overview.html +++ b/templates/whoisdb/overview.html @@ -10,13 +10,13 @@
{% if mnts %}