diff --git a/dmoj/settings.py b/dmoj/settings.py
index 1035969..e136a4d 100644
--- a/dmoj/settings.py
+++ b/dmoj/settings.py
@@ -9,6 +9,7 @@ https://docs.djangoproject.com/en/1.11/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import datetime
import os
import tempfile
diff --git a/dmoj/urls.py b/dmoj/urls.py
index 8ac0a29..889de20 100644
--- a/dmoj/urls.py
+++ b/dmoj/urls.py
@@ -7,6 +7,7 @@ from django.contrib.auth import views as auth_views
from django.contrib.sitemaps.views import sitemap
from django.http import Http404, HttpResponsePermanentRedirect, HttpResponseRedirect
from django.templatetags.static import static
+from django.utils.functional import lazy
from django.urls import reverse
from django.utils.functional import lazystr
from django.utils.translation import ugettext_lazy as _
@@ -1197,10 +1198,10 @@ favicon_paths = [
"mstile-310x310.png",
"reload.png",
]
-
+static_lazy = lazy(static, str)
for favicon in favicon_paths:
urlpatterns.append(
- url(r"^%s$" % favicon, RedirectView.as_view(url=static("icons/" + favicon)))
+ url(r"^%s$" % favicon, RedirectView.as_view(url=static_lazy('icons/' + favicon)))
)
handler404 = "judge.views.error.error404"
diff --git a/judge/widgets/martor.py b/judge/widgets/martor.py
new file mode 100644
index 0000000..a21dac3
--- /dev/null
+++ b/judge/widgets/martor.py
@@ -0,0 +1,17 @@
+from martor.widgets import AdminMartorWidget as OldAdminMartorWidget, MartorWidget as OldMartorWidget
+
+__all__ = ['MartorWidget', 'AdminMartorWidget']
+
+
+class MartorWidget(OldMartorWidget):
+ class Media:
+ css = {
+ 'all': ['martor-description.css'],
+ }
+ js = ['martor-mathjax.js']
+
+
+class AdminMartorWidget(OldAdminMartorWidget):
+ class Media:
+ css = MartorWidget.Media.css
+ js = ['admin/js/jquery.init.js', 'martor-mathjax.js']
\ No newline at end of file
diff --git a/resources/fonts/glyphicons-halflings-regular.eot b/resources/fonts/glyphicons-halflings-regular.eot
new file mode 100755
index 0000000..b93a495
Binary files /dev/null and b/resources/fonts/glyphicons-halflings-regular.eot differ
diff --git a/resources/fonts/glyphicons-halflings-regular.svg b/resources/fonts/glyphicons-halflings-regular.svg
new file mode 100755
index 0000000..94fb549
--- /dev/null
+++ b/resources/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,288 @@
+
+
+
\ No newline at end of file
diff --git a/resources/fonts/glyphicons-halflings-regular.ttf b/resources/fonts/glyphicons-halflings-regular.ttf
new file mode 100755
index 0000000..1f85312
Binary files /dev/null and b/resources/fonts/glyphicons-halflings-regular.ttf differ
diff --git a/resources/fonts/glyphicons-halflings-regular.woff b/resources/fonts/glyphicons-halflings-regular.woff
new file mode 100755
index 0000000..9e61285
Binary files /dev/null and b/resources/fonts/glyphicons-halflings-regular.woff differ
diff --git a/resources/fonts/glyphicons-halflings-regular.woff2 b/resources/fonts/glyphicons-halflings-regular.woff2
new file mode 100755
index 0000000..64539b5
Binary files /dev/null and b/resources/fonts/glyphicons-halflings-regular.woff2 differ
diff --git a/resources/fonts/icofont.eot b/resources/fonts/icofont.eot
new file mode 100755
index 0000000..865043d
Binary files /dev/null and b/resources/fonts/icofont.eot differ
diff --git a/resources/fonts/icofont.svg b/resources/fonts/icofont.svg
new file mode 100755
index 0000000..8535ec6
--- /dev/null
+++ b/resources/fonts/icofont.svg
@@ -0,0 +1,2105 @@
+
+
+
\ No newline at end of file
diff --git a/resources/fonts/icofont.ttf b/resources/fonts/icofont.ttf
new file mode 100755
index 0000000..3593eac
Binary files /dev/null and b/resources/fonts/icofont.ttf differ
diff --git a/resources/fonts/icofont.woff b/resources/fonts/icofont.woff
new file mode 100755
index 0000000..d1fdac4
Binary files /dev/null and b/resources/fonts/icofont.woff differ
diff --git a/resources/fonts/icofont.woff2 b/resources/fonts/icofont.woff2
new file mode 100755
index 0000000..37d8ae5
Binary files /dev/null and b/resources/fonts/icofont.woff2 differ
diff --git a/templates/problem/related_problems.html b/templates/problem/related_problems.html
index a92a75b..11a957f 100644
--- a/templates/problem/related_problems.html
+++ b/templates/problem/related_problems.html
@@ -3,6 +3,7 @@
{{_('Recommended problems')}}:
{% for problem in related_problems %}
+
-
{% if problem.id in completed_problem_ids %}
diff --git a/uwsgi.ini b/uwsgi.ini
new file mode 100644
index 0000000..32d5757
--- /dev/null
+++ b/uwsgi.ini
@@ -0,0 +1,26 @@
+[uwsgi]
+# Socket and pid file location/permission.
+socket = :8000
+pidfile = /tmp/dmoj-site.pid
+chmod-pidfile = 666
+
+# Paths.
+chdir = .
+
+# Details regarding DMOJ application.
+protocol = uwsgi
+master = true
+plugins = python
+env = DJANGO_SETTINGS_MODULE=dmoj.settings
+module = dmoj.wsgi:application
+optimize = 2
+
+# Logging
+disable-logging = true
+log-4xx = true
+log-5xx = true
+
+# Scaling settings. Tune as you like.
+memory-report = true
+reload-on-rss = 512M
+workers = 8
diff --git a/websocket/config.js b/websocket/config.js
index 0e9f360..a63a62a 100644
--- a/websocket/config.js
+++ b/websocket/config.js
@@ -1,9 +1,10 @@
module.exports = {
- get_host: '127.0.0.1',
+ get_host: 'wsevent',
get_port: 15100,
- post_host: '127.0.0.1',
+ post_host: 'wsevent',
post_port: 15101,
- http_host: '127.0.0.1',
+ http_host: 'wsevent',
http_port: 15102,
long_poll_timeout: 29000,
};
+