Browse Source

Merge pull request #1 from r4sas/master

Add README, api "status" function, fixed tabulation
pull/1/head
i2phosts 8 years ago committed by GitHub
parent
commit
bf7e237e5c
  1. 71
      README.md
  2. 1
      pyi2phosts/api/urls.py
  3. 46
      pyi2phosts/api/views.py
  4. 2
      pyi2phosts/templates/404.html
  5. 2
      pyi2phosts/templates/500.html
  6. 109
      pyi2phosts/templates/base.html
  7. 30
      pyi2phosts/templates/browse.html
  8. 10
      pyi2phosts/templates/contacts.html
  9. 24
      pyi2phosts/templates/faq.html
  10. 88
      pyi2phosts/templates/index.html
  11. 2
      pyi2phosts/templates/latest.html
  12. 50
      pyi2phosts/templates/paginator.html
  13. 20
      pyi2phosts/templates/policy.html
  14. 12
      pyi2phosts/templates/postkey.html
  15. 10
      pyi2phosts/templates/subdomain_http_verify.html

71
README.md

@ -0,0 +1,71 @@
py-i2phosts
=====
Overview
-----
**py-i2phosts** is a hostnames registration application for I2P. It is open source (licensed under GPL). Web interface and database structure are made using django web framework. Other scripts are plain python programs, however, they are intergated with django app. Current status: all of base features are implemented and project is ready for production use. Tested with python 2.7 and django 1.8.x. There are working instances of py-i2phosts: http://inr.i2p/ and http://no.i2p/
Features
-----
* Web interface is made using django (a set of templates included)
* Hosts submission page with local policy and form with fields Hostname, Destination and Description
* Page for verification of upper-level domain when addind a subdomain
* Index page
* Navigation menu
* Language switcher, multi-language interface (currently available in english and russian)
* Browsing alive and recently added hosts (URLs are provided with addresshelpers)
* RSS feeds for all active hosts and freshly added hosts
* Searching by hostname
* Admin interface (via django admin) features:
* browsing all hosts with various filtering and ordering options
* manual hosts editing and approving recently added hosts
* preview b32 links for all hosts
* managing external sources from which hosts.txt should be fetched
* Validation of hostname and destination as described in I2P naming rules both in web interface and in admin interface. Also some additional validation (see http://zzz.i2p/topics/739 for details) is present in web interface.
* Injector program: it parses hosts.txt files and adds hosts from them into database
* hosts.txt fetcher: it fetches hosts.txt from another services and runs injector on them. Fetcher uses Last-Modified and ETag http headers for safe bandwith.
* Hosts checker: it does availability check of each host using SAM python interface and updates "last seen" timestamp in database
* hosts.txt builder: it queries database and builds a hosts.txt file
* Hosts maintainer: it implements logic for all host-maintainance operations (activating, deactivating, deleting, setting expiration date)
* Master daemon: it runs as unix daemon and periodically launches all other py-i2phosts programs.
* All scripts (except injector and builder) can write all activity to log files. Web interface can log all submission attempts and all validation errors.
* All scripts are supports command-line options and config files
* Built-in jump service
* Install script (using distutils)
Source code
-----
Sources available in 2 places:
* github: https://github.com/i2phosts/py-i2phosts
* git.repo.i2p: http://git.repo.i2p/w/py-i2phosts.git
Documentation
-----
See the [Documentation page](http://py-i2phosts.i2p/docs/).
Discussion area
----
Here: http://zzz.i2p/topics/733
TODO and ideas
-----
**Web interface**
* Add hostname reservation feature into admin interface
* Improve design
* Add categorisation by tags
* Add news
* Lookup tool b32->b64 in web-interface
* Add option "share subdomains" to add form: everyone will be permitted to add subdomains in this domain
* Register multiple subdomains in the same time with primary domain registration
* Search: show b32 also
* Implement flexible API for exchanging between registrators
* Show meaningfull error pages instead of redirects to /
**Internals**
* Parallel lookups in checker
* Add "last probe" timestamp for hosts. It will help to reduce lookups frequency for inactive hosts.
* Display "key conflict" errors in admin interface or send email to admin
* Probe alive hosts for http service, and provide http:// links at browse page only for them
* Implement json-rpc API for inter-registration services communications.
**Other**
* Write some documentation ("how it works" for each component, INSTALL, README and so on)

1
pyi2phosts/api/urls.py

@ -2,4 +2,5 @@ from django.conf.urls import *
urlpatterns = patterns('pyi2phosts.api.views', urlpatterns = patterns('pyi2phosts.api.views',
url(r'^all/$', 'all'), url(r'^all/$', 'all'),
url(r'^status/$', 'status'),
) )

46
pyi2phosts/api/views.py

@ -14,3 +14,49 @@ def all(request):
# pass last_seen to json in unixtime # pass last_seen to json in unixtime
json_dict[get_b32(host.b64hash)] = host.last_seen.strftime("%s") json_dict[get_b32(host.b64hash)] = host.last_seen.strftime("%s")
return HttpResponse(json.dumps(json_dict), content_type="application/json") return HttpResponse(json.dumps(json_dict), content_type="application/json")
def status(request):
"""
Return all hosts in {
"hostname": hostname,
"b64": b64,
"b32": b32,
"last-seen": timestamp
} form.
Implemented by MXPLRS|Kirill request.
"""
# host status
if 'q' in request.GET and request.GET['q'] is not None and request.GET['q'] != '':
hostname = request.GET['q']
else:
json_dict = {
'error': 'Bad request',
}
return HttpResponse(json.dumps(json_dict), content_type="application/json")
try:
host = i2phost.objects.get(name=hostname)
except:
host = None
if host and host.last_seen:
json_dict = {
'hostname': host.name,
'b64': host.b64hash,
'b32': get_b32(host.b64hash),
'last-seen': host.last_seen.strftime("%s"),
}
elif host and not host.last_seen:
json_dict = {
'hostname': host.name,
'b64': host.b64hash,
'b32': get_b32(host.b64hash),
'error': 'Never seen',
}
else:
json_dict = {
'hostname': hostname,
'error': 'Not found',
}
return HttpResponse(json.dumps(json_dict), content_type="application/json")

2
pyi2phosts/templates/404.html

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<center><h1>404 Not Found</h1></center> <center><h1>404 Not Found</h1></center>
{% endblock %} {% endblock %}

2
pyi2phosts/templates/500.html

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<center><h1>500 Internal server error</h1></center> <center><h1>500 Internal server error</h1></center>
{% endblock %} {% endblock %}

109
pyi2phosts/templates/base.html

@ -1,65 +1,64 @@
{% load i18n %} {% load i18n %}
<html> <html>
<head> <head>
<title> <title>
{% block title %} {% block title %}
{{ title }} {{ title }}
{% endblock %} {% endblock %}
</title> </title>
{% block head %} {% block head %}
{% endblock %} {% endblock %}
<link rel="stylesheet" type="text/css" href="/static/base.css" /> <link rel="stylesheet" type="text/css" href="/static/base.css" />
</head> </head>
<body> <body>
<div class="search_host"> <div class="search_host">
<form action="/search/"> <form action="/search/">
<input class="input" name="q" maxlength="67" type="text" value="{% trans "Search host" %}" <input class="input" name="q" maxlength="67" type="text" value="{% trans "Search host" %}"
onblur="if (value == '') {value = '{% trans "Search host" %}'}" onfocus="if (value == '{% trans "Search host" %}') onblur="if (value == '') {value = '{% trans "Search host" %}'}" onfocus="if (value == '{% trans "Search host" %}')
{value =''}" /> {value =''}" />
<input type="submit" value="{% trans "Search" %}" /> <input type="submit" value="{% trans "Search" %}" />
</form> </form>
</div> </div>
{% block navigation %} {% block navigation %}
<div class="menu"> <div class="menu">
<ul> <ul>
<li><a href=/>{% trans "Home" %}</a></li> <li><a href=/>{% trans "Home" %}</a></li>
<li><a href={% url 'faq' %}>FAQ</a></li> <li><a href={% url 'faq' %}>FAQ</a></li>
<li><a href={% url 'latest' %}>{% trans "Browse latest hosts" %}</a></li> <li><a href={% url 'latest' %}>{% trans "Browse latest hosts" %}</a></li>
<li><a href={% url 'browse' %}>{% trans "Browse alive hosts" %}</a></li> <li><a href={% url 'browse' %}>{% trans "Browse alive hosts" %}</a></li>
<li><a href={% url 'pyi2phosts.postkey.views.addkey' %}>{% trans "Register a domain" %}</a></li> <li><a href={% url 'pyi2phosts.postkey.views.addkey' %}>{% trans "Register a domain" %}</a></li>
<li><a href={% url 'contacts' %}>{% trans "Contacts" %}</a></li> <li><a href={% url 'contacts' %}>{% trans "Contacts" %}</a></li>
</ul> </ul>
</div> </div>
<form action="/i18n/setlang/" method="post"> <form action="/i18n/setlang/" method="post">
{% csrf_token %} {% csrf_token %}
{% for lang in LANGUAGES %} {% for lang in LANGUAGES %}
<input type="radio" value="{{ lang.0 }}" name="language" /> <input type="radio" value="{{ lang.0 }}" name="language" />
<img src="/static/{{ lang.0 }}.png" width="16" height="11" alt="{{ lang.0 }}"/> <img src="/static/{{ lang.0 }}.png" width="16" height="11" alt="{{ lang.0 }}"/>
{% endfor %} {% endfor %}
<input type="submit" value="Set" /> <input type="submit" value="Set" />
</form> </form>
{% endblock %} {% endblock %}
<div class="main"> <div class="main">
{% block header %} {% block header %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</div> </div>
{% block footer %} {% block footer %}
<hr> <hr>
<div class="footer"> <div class="footer">
{% block footer-addon %} {% block footer-addon %}
{% endblock %} {% endblock %}
{% trans "powered-by" %}: <a href=http://py-i2phosts.i2p/>py-i2phosts</a> {% trans "powered-by" %}: <a href=http://py-i2phosts.i2p/>py-i2phosts</a>
</div> </div>
{% endblock %} {% endblock %}
</body> </body>
</html> </html>

30
pyi2phosts/templates/browse.html

@ -9,28 +9,28 @@
{% block content %} {% block content %}
{% block table_header %} {% block table_header %}
<table> <table>
<tr><td><a href="?order=name">{% trans "Host" %}</a></td><td><a href="?order=last_seen">{% trans "Last seen" %}</a></td><td><a href="?order=date_added">{% trans "Date added" %}</a></td><td>{% trans "Description" %}</td></tr> <tr><td><a href="?order=name">{% trans "Host" %}</a></td><td><a href="?order=last_seen">{% trans "Last seen" %}</a></td><td><a href="?order=date_added">{% trans "Date added" %}</a></td><td>{% trans "Description" %}</td></tr>
{% endblock table_header %} {% endblock table_header %}
{% for host in host_list %} {% for host in host_list %}
<tr><td><a href="http://{{ host.name }}/?i2paddresshelper={{host.b64hash}}">{{ host.name }}</a></td><td>{{ host.last_seen }}</td> <tr><td><a href="http://{{ host.name }}/?i2paddresshelper={{host.b64hash}}">{{ host.name }}</a></td><td>{{ host.last_seen }}</td>
<td>{{ host.date_added }}</td><td>{{ host.description }}</td></tr> <td>{{ host.date_added }}</td><td>{{ host.description }}</td></tr>
{% endfor %} {% endfor %}
</table> </table>
{% if is_paginated %} {% if is_paginated %}
<div class="pager"> <div class="pager">
{% if page_obj.has_previous %} {% if page_obj.has_previous %}
<span class="page"> <span class="page">
<a href="?page={{ page_obj.previous_page_number }}&order={{ order }}">&lt; Prev</a> <a href="?page={{ page_obj.previous_page_number }}&order={{ order }}">&lt; Prev</a>
</span> </span>
{% endif %} {% endif %}
<span class="current">Page {{ page_obj.number }} of {{ paginator.num_pages }}</span> <span class="current">Page {{ page_obj.number }} of {{ paginator.num_pages }}</span>
{% if page_obj.has_next %} {% if page_obj.has_next %}
<span class="page"><a href="?page={{ page_obj.next_page_number }}&order={{ order }}">Next &gt;</a></span> <span class="page"><a href="?page={{ page_obj.next_page_number }}&order={{ order }}">Next &gt;</a></span>
{% endif %} {% endif %}
{{ paginator.count }} {% trans "hosts total" %} {{ paginator.count }} {% trans "hosts total" %}
{% endif %} {% endif %}

10
pyi2phosts/templates/contacts.html

@ -5,17 +5,17 @@
{% blocktrans %} {% blocktrans %}
<h3>Direct contact methods:</h3> <h3>Direct contact methods:</h3>
<ul> <ul>
<li>IRC: #i2p-dev, nick "slow". This is the fastest contact method and should be used first.</li> <li>IRC: #i2p-dev, nick "slow". This is the fastest contact method and should be used first.</li>
<li>Email: hiddenz@mail.i2p. You can send your message here, but don't expect a fast reply.</li> <li>Email: hiddenz@mail.i2p. You can send your message here, but don't expect a fast reply.</li>
</ul> </ul>
{% endblocktrans %} {% endblocktrans %}
{% blocktrans %} {% blocktrans %}
<h3>Public discussions about service, feedback, proposals and feature requests</h3> <h3>Public discussions about service, feedback, proposals and feature requests</h3>
<ul> <ul>
<li><a href="http://hiddenchan.i2p/d/res/4222.html">Thread at hiddenchan.i2p</a>: the best place for discussion (russian and english are allowed)</li> <li><a href="http://hiddenchan.i2p/d/res/4222.html">Thread at hiddenchan.i2p</a>: the best place for discussion (russian and english are allowed)</li>
<li><a href="http://forum.i2p/viewtopic.php?t=5083">Thread at forum.i2p</a>: very rarely readable (english)</li> <li><a href="http://forum.i2p/viewtopic.php?t=5083">Thread at forum.i2p</a>: very rarely readable (english)</li>
<li><a href="http://zzz.i2p/topics/733">py-i2phosts thread at zzz.i2p</a>: thread about py-i2phosts development, rarely readable (english)</li> <li><a href="http://zzz.i2p/topics/733">py-i2phosts thread at zzz.i2p</a>: thread about py-i2phosts development, rarely readable (english)</li>
</ul> </ul>
{% endblocktrans %} {% endblocktrans %}
{% endblock %} {% endblock %}

24
pyi2phosts/templates/faq.html

@ -4,24 +4,24 @@
{% block content %} {% block content %}
<h3>{% trans "How we are learning about new hosts" %}</h3> <h3>{% trans "How we are learning about new hosts" %}</h3>
<ol> <ol>
<li>{% trans "Pulling from external sources:" %} <li>{% trans "Pulling from external sources:" %}
<ul> <ul>
{% for source in sources_list %} {% for source in sources_list %}
<li>{{ source.url }}</li> <li>{{ source.url }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li>
<li>{% trans "Adding through our service." %} <li>{% trans "Adding through our service." %}
</li> </li>
</ol> </ol>
{% blocktrans %} {% blocktrans %}
<h3>Publishing requirements</h3> <h3>Publishing requirements</h3>
To get published a host must meet the following criteria: To get published a host must meet the following criteria:
<ul> <ul>
<li>Must have been added at least 3 days ago</li> <li>Must have been added at least 3 days ago</li>
<li>Must be up</li> <li>Must be up</li>
<li>Must be approved by admin</li> <li>Must be approved by admin</li>
</ul> </ul>
<p style="notice">Admin's approval isn't really necessary, it is only needed in <p style="notice">Admin's approval isn't really necessary, it is only needed in
order to eliminate possible hijacking and mass registration attempts. order to eliminate possible hijacking and mass registration attempts.

88
pyi2phosts/templates/index.html

@ -2,55 +2,55 @@
{% load i18n %} {% load i18n %}
{% block content %} {% block content %}
{% url 'faq' as faq_url %} {% url 'faq' as faq_url %}
{% blocktrans %} {% blocktrans %}
<h2>About</h2> <h2>About</h2>
<p>{{ title }} is a domain name registration service for I2P. Hostnames in I2P aren't <p>{{ title }} is a domain name registration service for I2P. Hostnames in I2P aren't
globally unique. {{ title }} doesn't act as "central authority", it only provides a globally unique. {{ title }} doesn't act as "central authority", it only provides a
way to publish hosts as an easy means of access to them. You can read more about how way to publish hosts as an easy means of access to them. You can read more about how
I2P naming works in the <a href=http://www.i2p2.i2p/naming.html>official I2P naming works in the <a href=http://www.i2p2.i2p/naming.html>official
docs</a>. docs</a>.
</p> </p>
<p>To find out how we're registering and publishing hosts, look at <p>To find out how we're registering and publishing hosts, look at
<a href={{ faq_url }}>FAQ</a> page. <a href={{ faq_url }}>FAQ</a> page.
</p> </p>
{% endblocktrans %} {% endblocktrans %}
{% blocktrans %} {% blocktrans %}
<h2>Addressbook service</h2> <h2>Addressbook service</h2>
<p> <p>
To start getting new hostnames from {{ title }}, add this To start getting new hostnames from {{ title }}, add this
<a href=/export/alive-hosts.txt>subscription link</a> into your <a <a href=/export/alive-hosts.txt>subscription link</a> into your <a
href=http://localhost:7657/susidns/subscriptions.jsp>router's href=http://localhost:7657/susidns/subscriptions.jsp>router's
addressbook</a>. Of course, you should <a addressbook</a>. Of course, you should <a
href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>add INR</a>'s destination before. href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>add INR</a>'s destination before.
</p> </p>
{% endblocktrans %} {% endblocktrans %}
{% url 'pyi2phosts.jump.views.jumper' 'example.i2p' as jump_url %} {% url 'pyi2phosts.jump.views.jumper' 'example.i2p' as jump_url %}
{% url 'pyi2phosts.jump.views.index' as jump_index %} {% url 'pyi2phosts.jump.views.index' as jump_index %}
{% blocktrans %} {% blocktrans %}
<h2>Jump service</h2><p> <h2>Jump service</h2><p>
{{ title }} also provides a jump service. For accessing hosts through it, {{ title }} also provides a jump service. For accessing hosts through it,
use urls like use urls like
<a href="{{ jump_url }}"> <a href="{{ jump_url }}">
http://{{ domain }}{{ jump_url }}</a>. http://{{ domain }}{{ jump_url }}</a>.
I2P since 0.8.3 gives possibility to add a custom jump-servers. Go to the i2ptunnel I2P since 0.8.3 gives possibility to add a custom jump-servers. Go to the i2ptunnel
<a href="http://localhost:7657/i2ptunnel/edit?tunnel=0">eeproxy configuration page <a href="http://localhost:7657/i2ptunnel/edit?tunnel=0">eeproxy configuration page
</a> and add <em>http://{{ domain }}{{ jump_index }}</em> to "Jump URL List" section. </a> and add <em>http://{{ domain }}{{ jump_index }}</em> to "Jump URL List" section.
</p> </p>
{% endblocktrans %} {% endblocktrans %}
{% url 'pyi2phosts.postkey.views.addkey' as addkey_url %} {% url 'pyi2phosts.postkey.views.addkey' as addkey_url %}
{% blocktrans %} {% blocktrans %}
<h2>Registration service</h2> <h2>Registration service</h2>
<p>If you are running an eepsite or another service and want a human-readable domain name <p>If you are running an eepsite or another service and want a human-readable domain name
for them, consider <a href={{ addkey_url }}>registering it</a>. for them, consider <a href={{ addkey_url }}>registering it</a>.
</p> </p>
{% endblocktrans %} {% endblocktrans %}
{% endblock %} {% endblock %}
{% block footer-addon %} {% block footer-addon %}
<a href=http://{{ b32 }}>b32</a> | <a href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>{% trans "add" %}</a> | <a href=http://{{ b32 }}>b32</a> | <a href=http://localhost:7657/susidns/addressbook.jsp?book=private&hostname={{ domain }}&destination={{ b64 }}>{% trans "add" %}</a> |
{% endblock %} {% endblock %}

2
pyi2phosts/templates/latest.html

@ -9,5 +9,5 @@
{% endblock %} {% endblock %}
{% block table_header %} {% block table_header %}
<table> <table>
<tr><td>{% trans "Host" %}</td><td>{% trans "Last seen" %}</td><td>{% trans "Date added" %}</td><td>{% trans "Description" %}</td></tr> <tr><td>{% trans "Host" %}</td><td>{% trans "Last seen" %}</td><td>{% trans "Date added" %}</td><td>{% trans "Description" %}</td></tr>
{% endblock table_header %} {% endblock table_header %}

50
pyi2phosts/templates/paginator.html

@ -1,28 +1,28 @@
<div class="pager"> <div class="pager">
{% if has_previous %} {% if has_previous %}
<span class="page"> <span class="page">
<a href="?page={{ previous }}">&lt; Prev</a> <a href="?page={{ previous }}">&lt; Prev</a>
</span> </span>
{% endif %} {% endif %}
{% if show_first %} {% if show_first %}
<span class="page"><a href="?page=1">1</a></span> <span class="page"><a href="?page=1">1</a></span>
<span class="ellipsis">...</span> <span class="ellipsis">...</span>
{% endif %} {% endif %}
{% for linkpage in page_numbers %} {% for linkpage in page_numbers %}
{% ifequal linkpage page %} {% ifequal linkpage page %}
<span class="current">{{ page }}</span> <span class="current">{{ page }}</span>
{% else %} {% else %}
<span class="page"><a href="?page={{ linkpage }}" <span class="page"><a href="?page={{ linkpage }}"
>{{ linkpage }}</a></span> >{{ linkpage }}</a></span>
{% endifequal %} {% endifequal %}
{% endfor %} {% endfor %}
{% if show_last %} {% if show_last %}
<span class="ellipsis">...</span> <span class="ellipsis">...</span>
<span class="page"><a href="?page=last">{{ pages }}</a></span> <span class="page"><a href="?page=last">{{ pages }}</a></span>
{% endif %} {% endif %}
{% if has_next %} {% if has_next %}
<span class="page"><a href="?page={{ next }}">Next &gt;</a></span> <span class="page"><a href="?page={{ next }}">Next &gt;</a></span>
{% endif %} {% endif %}
{{ paginator.count }} total {{ paginator.count }} total
</div> </div>

20
pyi2phosts/templates/policy.html

@ -2,14 +2,14 @@
<h2>{% trans "Domain name registration policy" %}</h2> <h2>{% trans "Domain name registration policy" %}</h2>
<ul> <ul>
<li>{% trans "Domain name registration is free." %}</li> <li>{% trans "Domain name registration is free." %}</li>
<li>{% trans "Anyone can register a domain name." %}</li> <li>{% trans "Anyone can register a domain name." %}</li>
<li>{% trans "Domain names are available on a 'first come, first serve' basis." %}</li> <li>{% trans "Domain names are available on a 'first come, first serve' basis." %}</li>
<li>{% trans "A domain name's destination must be active." %} <li>{% trans "A domain name's destination must be active." %}
{% trans "Inactive destinations cannot be published." %}</li> {% trans "Inactive destinations cannot be published." %}</li>
<li>{% trans "Domain name hoarding through mass registration (cybersquatting) is not allowed." %}</li> <li>{% trans "Domain name hoarding through mass registration (cybersquatting) is not allowed." %}</li>
<li>{% trans "Domain name registrations will not be rejected based on content." %}</li> <li>{% trans "Domain name registrations will not be rejected based on content." %}</li>
<li>{% trans "Domain name registrations will stop propagating after some period of inactivity." %}</li> <li>{% trans "Domain name registrations will stop propagating after some period of inactivity." %}</li>
<li>{% trans "Temporary or test sites should not be registered. Use b32 address instead." %}</li> <li>{% trans "Temporary or test sites should not be registered. Use b32 address instead." %}</li>
<li>{% trans "Changing key for existing domains is prohibited." %}</li> <li>{% trans "Changing key for existing domains is prohibited." %}</li>
</ul> </ul>

12
pyi2phosts/templates/postkey.html

@ -3,10 +3,10 @@
{% block content %} {% block content %}
{% include "policy.html" %} {% include "policy.html" %}
<form action="/postkey/" method="post"> <form action="/postkey/" method="post">
{% csrf_token %} {% csrf_token %}
<h3>{% trans "Enter your domain details" %}</h3> <h3>{% trans "Enter your domain details" %}</h3>
{{ form.as_p }} {{ form.as_p }}
<input type="submit" value="{% trans "Submit" %}" /> <input type="submit" value="{% trans "Submit" %}" />
</form> </form>
{% endblock %} {% endblock %}

10
pyi2phosts/templates/subdomain_http_verify.html

@ -15,10 +15,10 @@ This file should be accessible via http://{{ topdomain }}/&laquo;filename&raquo;
</p> </p>
{% endblocktrans %} {% endblocktrans %}
<form action="/postkey/subdomain/" method="post"> <form action="/postkey/subdomain/" method="post">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<input type="submit" value="OK" /> <input type="submit" value="OK" />
</form> </form>
{% endblock %} {% endblock %}

Loading…
Cancel
Save