Kaydet (Commit) 7640bc0d authored tarafından Batuhan Taşkaya's avatar Batuhan Taşkaya

bump evality

üst 1e8bd49f
......@@ -14,7 +14,7 @@ django-simple-captcha = "*"
gunicorn = "*"
whitenoise = "*"
docker = "*"
evality = "*"
evality = "==0.1.2"
[scripts]
start = "gunicorn aspava.wsgi:application --bind localhost:8000"
......
{
"_meta": {
"hash": {
"sha256": "9307ed3d11b645b880db4b0e5e180197dad37fd639af18f6f5c48d0ef32c7552"
"sha256": "f81289205e0d2d872d2676bf4620fafa2a85458a7ab4e456b3d92d0775bc2f2b"
},
"pipfile-spec": 6,
"requires": {
......@@ -83,10 +83,10 @@
},
"evality": {
"hashes": [
"sha256:72cebb40889c2385d7ab8ee91d3718beef71fa56a167df7c804f2403a0f80302"
"sha256:bc01b97d1b31c78225dd9019f4ccc1b5cca591dad6a5b384eb24ef8f50777d9b"
],
"index": "pypi",
"version": "==0.1"
"version": "==0.1.2"
},
"gunicorn": {
"hashes": [
......
......@@ -11,7 +11,7 @@
<div class="container-fluid __{{ item | get_class }}">
<fieldset class="border p-2">
<legend class="w-auto"><a href="{% url 'profile' item.author %}">{{ item.author }}</a></legend>
{% as_html item request.user %}
{% as_html item %}
<small class="text-muted">{{ item.pub_date }}</small>
{% if item.author == request.user %}
<small class="text-muted"><a href="{% get_opt 'delete' item %}">delete</a></small>
......
......@@ -19,9 +19,9 @@ def get_class(item):
@register.simple_tag
def as_html(item, user):
def as_html(item):
result = render_to_string(
f"repr/{item.__class__.__name__.lower()}.html", {"item": item, "user": user}
f"repr/{item.__class__.__name__.lower()}.html", {"item": item}
)
return result
......
......@@ -26,10 +26,10 @@ class Home(ExtendedListView):
@csrf_exempt
def run_snippet(request):
snippet = get_object_or_404(Snippet, pk = request.POST.get('pk', None))
global evality
try:
result = evality.run_cmd(snippet.text, snippet.author.id)
except docker.DockerException:
global evality
evality.quit()
result['id'] = snippet.id
......
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