10 |
11 | {% if stores_number > 0 %}
12 | {% trans "There is no such page" %}
13 | {% else %}
14 | {% trans "There is nothing at all!" %}
15 | {% endif %}
16 |
17 |
18 | {% if store %}
19 | {% blocktrans with url=store.get_absolute_url %}
20 | Are you looking for
this store?
21 | {% endblocktrans %}
22 | {% else %}
23 | {% if stores_number > 0 %}
24 | {% trans "Have you typed the correct URL?" %}
25 | {% else %}
26 | {% blocktrans with url=admin_url %}
27 | Use the
admin interface to add stores
28 | {% endblocktrans %}
29 | {% endif %}
30 | {% endif %}
31 |
32 |
33 | {% endblock %}
34 |
--------------------------------------------------------------------------------
/fileshack/templates/fileshack/500.html:
--------------------------------------------------------------------------------
1 | {% extends "fileshack/base.html" %}
2 | {% load staticfiles %}
3 | {% load i18n %}
4 | {% block extrahead %}
5 |
10 |
{% trans "Request could not be served" %}
11 |
12 | {% trans "An error occurred in the application" %}
13 |
14 |
15 | {% endblock %}
16 |
--------------------------------------------------------------------------------
/fileshack/templates/fileshack/accesscode.html:
--------------------------------------------------------------------------------
1 | {% extends "fileshack/base.html" %}
2 | {% load staticfiles %}
3 | {% load i18n %}
4 | {% block extrahead %}
5 |
14 | {% block controls %}{% endblock %}
15 | {% block header %}
16 |
{% trans "Welcome to fileshack" %}, {% trans "drop your items" %}
17 | {% endblock %}
18 | {% block content %}{% endblock %}
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/fileshack/templates/fileshack/iframe.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
Welcome to fileshack, drop your items
14 | {% if result == "success" %}
15 |
16 |
{% trans "Subscription removed" %}
17 |
18 | {% trans "You will not receive any more messages" %}
19 |
20 |
21 | {% else %}
22 |
23 |
24 | {% if result == "doesnotexist" %}
25 | {% trans "Actually," %}
26 | {% else %}
27 | {% trans "Request rejected" %}
28 | {% endif %}
29 |
30 |
31 | {% if result == "doesnotexist" %}
32 | {% trans "The e-mail address is not in our database" %}
33 | {% else %}
34 | {% trans "The verification code in the URL is invalid" %}
35 | {% endif %}
36 |
37 |
38 | {% endif %}
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/fileshack/templatetags/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/peterkuma/fileshackproject/3676f17f48a219aa31ca564ab8747093586fb8a1/fileshack/templatetags/__init__.py
--------------------------------------------------------------------------------
/fileshack/templatetags/staticfiles.py:
--------------------------------------------------------------------------------
1 | from urllib.parse import urljoin
2 | from django import template
3 | from django.conf import settings
4 |
5 | register = template.Library()
6 |
7 | @register.simple_tag
8 | def static(path):
9 | return urljoin(settings.STATIC_URL, path)
10 |
--------------------------------------------------------------------------------
/fileshack/urls.py:
--------------------------------------------------------------------------------
1 | from django.conf.urls import include
2 | from django.urls import re_path
3 | from fileshack.views import *
4 |
5 | app_name = 'fileshack'
6 |
7 | urlpatterns = [
8 | re_path(r'^cron/$', cron, name='cron'),
9 | re_path(r'^unsubscribe/$', unsubscribe, name='unsubscribe'),
10 | re_path(r'^(?P