Implement surjectiv URL
parent
6a8f1e1032
commit
a143c40b20
@ -1,4 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from .models import Slug
|
||||
from .models import Slug, Destination
|
||||
|
||||
admin.site.register(Slug)
|
||||
admin.site.register(Destination)
|
||||
|
@ -0,0 +1,21 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container text-center">
|
||||
<h2>Redirecting...</h2>
|
||||
|
||||
If nothing happens, verify that Javascript is enabled in your browser and authorise it to open links and popups.
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
{% for destination in destinations %}
|
||||
window.open("{{destination.destination}}",'');
|
||||
{% endfor %}
|
||||
window.open('','_parent','');
|
||||
window.close();
|
||||
})()
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue