Skip to content
Snippets Groups Projects
Commit 87cd085a authored by Andrey's avatar Andrey
Browse files

added ~clowns~ clonus

parent e407b25e
Branches
No related merge requests found
......@@ -37,6 +37,10 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'clonus',
'crispy_forms',
'crispy_bootstrap5',
'bootstrap5',
]
MIDDLEWARE = [
......@@ -117,6 +121,10 @@ USE_TZ = True
STATIC_URL = 'static/'
STATICFILES_DIRS = [
BASE_DIR / 'static'
]
# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
......
......@@ -14,9 +14,16 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from clonus import views
urlpatterns = [
path('admin/', admin.site.urls),
]
path('', views.index, name='index'),
path('f2f/', views.f2f, name='f2f'),
path('f2db/', views.f2db, name='f2db'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
......@@ -3,7 +3,7 @@ from method_configurator import MethodConfigurator
def main():
filenames = ['./Tests/Python/test6.py', './Tests/Python/test7.py']
filenames = ['./clonus/Tests/Python/test6.py', './clonus/Tests/Python/test7.py']
fp_builder = FingerprintMethodBuilder(filenames)
config = MethodConfigurator(fp_builder)
res = config.make_method()
......
{% load static %}
<!DOCTYPE html>
<html lang="ru-RU">
<head>
<title>
{% block title %}
{% endblock title %}
</title>
{% load bootstrap5 %}
{% bootstrap_css %} {% bootstrap_javascript %}
{% block style %}
{% endblock style %}
<link rel="shortcut icon"
type="image/png"
href="{% static 'favicon.ico' %}" />
<meta name="description"
content="Clonus is a webservice for source code clone detection.">
<meta name="keywords"
content="clone_detection, plagiarism, document_fingerprinting">
</head>
<body>
{% block content %}
{% endblock content %}
</body>
{% block footer %}
{% endblock footer %}
</html>
\ No newline at end of file
{% extends "base.html" %}
{% load static %}
{% block title %}
clonus
{% endblock title %}
{% block style %}
<link rel="stylesheet" type="text/css" href="{% static 'css/index.css' %}" />
{% endblock style %}
{% block content %}
<div class="h-100 d-flex align-items-center justify-content-center">
<div class="container text-center">
<div class="landing text-danger">
<p class="title">Clonus</p>
</div>
<p class="text-white h4 landing">
Веб-сервис для поиска заимствований в решениях задач по программированию
</p>
<a role="button" class="btn btn-success btn-xl" href={% url 'f2f' %}>Сравнить два файла</a>
<a role="button" class="btn btn-success btn-xl" href={% url 'f2db' %}>Сравнить файл с базой данных</a>
</div>
</div>
{% endblock content %}
{% block footer %}
<footer class="text-white text-center">
<p>© Copyright Clowns & Co.</p>
</footer>
{% endblock footer %}
\ No newline at end of file
from django.shortcuts import render
from django.http import HttpRequest
# Create your views here.
def index(request: HttpRequest):
return render(request, 'index.html')
def f2f(request: HttpRequest):
pass
def f2db(request: HttpRequest):
pass
\ No newline at end of file
html,
body {
height: 100%;
background-color: white;
background-image: url("../images/bg.jpg");
/* background-size: 30%; */
background-position-x: center;
background-position-y: top;
background-repeat: repeat;
}
body {
padding-left: 10%;
padding-right: 10%;
}
.landing {
margin-top: 2%;
}
.title {
font-size: 72pt;
font-weight: bold;
}
.btn-xl {
margin-top: 2%;
margin-left: 1%;
margin-right: 1%;
padding: 10px 20px;
font-size: x-large;
}
.footer {
width: 15%;
height: 15%;
}
\ No newline at end of file
static/favicon.ico

84 KiB

static/images/bg.jpg

584 KiB

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