moved app dictionary to root

parent 1792f631
from .secrets import SECRET_KEY, DEBUG
from .secrets import RELEASE_KEY, DEBUG
"""
Django settings for conlangdict project.
......@@ -21,6 +21,10 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
SECRET_KEY = 'udbex%6hseo5tys7ovemjy&cu5x@r*qc9=2gqufh$md%#(ofx*'
if not DEBUG:
SECRET_KEY = RELEASE_KEY
ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'phundrak.fr', 'langue.phundrak.fr']
......
......@@ -17,6 +17,6 @@ from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('dictionary/', include('dictionary.urls')),
path('', include('dictionary.urls')),
path('admin/', admin.site.urls),
]
......@@ -5,8 +5,8 @@
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="https://langue.phundrak.fr/css/dictionary/style.css" type="text/css" media="screen" />
<link rel="shortcut icon" href="https://langue.phundrak.fr/css/dictionary/mahakala-128x128.png" type="image/png" media="screen" />
<link rel="stylesheet" href="{% static 'dictionary/style.css' %}" type="text/css" media="screen" />
<link rel="shortcut icon" href="{% static 'dictionary/mahakala-128x128.png' %}" type="image/png" media="screen" />
{% block addhead %}{% endblock %}
</head>
......
......@@ -13,7 +13,7 @@
<!-- HEADER ------------------------------------------------------------------>
{% block addhead %}
<link rel="stylesheet" href="https://langue.phundrak.fr/css/dictionary/details.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{% static 'dictionary/details.css' %}" type="text/css" media="screen" />
{% endblock %}
<!-- SIDEBAR ----------------------------------------------------------------->
......
......@@ -8,7 +8,7 @@
{% block title %}Language selection{% endblock %}
{% block addhead %}
<link rel="stylesheet" href="https://langue.phundrak.fr/css/dictionary/index.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{% static 'dictionary/index.css' %}" type="text/css" media="screen" />
{% endblock %}
{% block sidebarcontent %}
......@@ -22,7 +22,7 @@
{% block body %}
<message class="h1">Please select the languages you want to translate from and to</message>
<form method="post" id="langselect" action="/dictionary/" enctype="multipart/form-data">
<form method="post" id="langselect" action="/" enctype="multipart/form-data">
{% csrf_token %}
<sourcelang>
<label for="source" class="p">Translate from</label>
......
......@@ -6,7 +6,7 @@
<!-- HEADERS ----------------------------------------------------------------->
{% block addhead %}
<link rel="stylesheet" href="https://langue.phundrak.fr/css/dictionary/language.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{% static 'dictionary/language.css' %}" type="text/css" media="screen" />
{% endblock %}
<!-- SIDEBAR ----------------------------------------------------------------->
......
......@@ -24,7 +24,7 @@ def index(request):
to_lang = form.cleaned_data['to_lang']
print(from_lang.code + " and " + to_lang.code)
if from_lang.conlang != to_lang.conlang:
return HttpResponseRedirect('/dictionary/from=' +
return HttpResponseRedirect('/from=' +
from_lang.code + '/to=' +
to_lang.code + '/')
error_message = "You cannot select two natural languages or two conlangs."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment