From 795221ce0cbd9daf23af9f3099e29c947bcad306 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Wed, 29 Nov 2017 16:18:13 +0800 Subject: Deprecate qtip/web in favor of AWX We decided to develop it at the time AWX is not open sourced. Now AWX seems to be a more promising solution then create the service from scratch. Change-Id: I586ac7e582b2db57ad81f0ece7585ca2bf0dd416 JIRA: QTIP-287 Signed-off-by: Yujun Zhang --- qtip/web/bench/__init__.py | 0 qtip/web/bench/admin.py | 22 - qtip/web/bench/apps.py | 8 - qtip/web/bench/forms.py | 19 - qtip/web/bench/management/__init__.py | 0 qtip/web/bench/management/commands/__init__.py | 0 qtip/web/bench/management/commands/_private.py | 0 qtip/web/bench/management/commands/importstatic.py | 10 - qtip/web/bench/migrations/0001_initial.py | 36 -- .../bench/migrations/0002_auto_20170713_0210.py | 20 - .../bench/migrations/0003_auto_20170713_0225.py | 20 - .../bench/migrations/0004_auto_20170715_0325.py | 20 - .../bench/migrations/0005_auto_20170720_2115.py | 35 -- .../bench/migrations/0006_auto_20170722_0135.py | 25 - qtip/web/bench/migrations/__init__.py | 0 qtip/web/bench/models.py | 50 -- qtip/web/bench/tests.py | 6 - qtip/web/bench/urls.py | 25 - qtip/web/bench/utils.py | 27 -- qtip/web/bench/views.py | 101 ---- qtip/web/manage.py | 22 - qtip/web/templates/bench/base.html | 527 --------------------- qtip/web/templates/bench/index.html | 3 - qtip/web/templates/bench/repo_form.html | 43 -- qtip/web/templates/bench/run.html | 14 - qtip/web/templates/bench/task_detail.html | 34 -- qtip/web/templates/bench/task_list.html | 77 --- qtip/web/templates/registration/login.html | 90 ---- qtip/web/web/__init__.py | 0 qtip/web/web/settings.py | 126 ----- qtip/web/web/urls.py | 22 - qtip/web/web/wsgi.py | 16 - 32 files changed, 1398 deletions(-) delete mode 100644 qtip/web/bench/__init__.py delete mode 100644 qtip/web/bench/admin.py delete mode 100644 qtip/web/bench/apps.py delete mode 100644 qtip/web/bench/forms.py delete mode 100644 qtip/web/bench/management/__init__.py delete mode 100644 qtip/web/bench/management/commands/__init__.py delete mode 100644 qtip/web/bench/management/commands/_private.py delete mode 100644 qtip/web/bench/management/commands/importstatic.py delete mode 100644 qtip/web/bench/migrations/0001_initial.py delete mode 100644 qtip/web/bench/migrations/0002_auto_20170713_0210.py delete mode 100644 qtip/web/bench/migrations/0003_auto_20170713_0225.py delete mode 100644 qtip/web/bench/migrations/0004_auto_20170715_0325.py delete mode 100644 qtip/web/bench/migrations/0005_auto_20170720_2115.py delete mode 100644 qtip/web/bench/migrations/0006_auto_20170722_0135.py delete mode 100644 qtip/web/bench/migrations/__init__.py delete mode 100644 qtip/web/bench/models.py delete mode 100644 qtip/web/bench/tests.py delete mode 100644 qtip/web/bench/urls.py delete mode 100644 qtip/web/bench/utils.py delete mode 100644 qtip/web/bench/views.py delete mode 100755 qtip/web/manage.py delete mode 100644 qtip/web/templates/bench/base.html delete mode 100644 qtip/web/templates/bench/index.html delete mode 100644 qtip/web/templates/bench/repo_form.html delete mode 100644 qtip/web/templates/bench/run.html delete mode 100644 qtip/web/templates/bench/task_detail.html delete mode 100644 qtip/web/templates/bench/task_list.html delete mode 100644 qtip/web/templates/registration/login.html delete mode 100644 qtip/web/web/__init__.py delete mode 100644 qtip/web/web/settings.py delete mode 100644 qtip/web/web/urls.py delete mode 100644 qtip/web/web/wsgi.py (limited to 'qtip') diff --git a/qtip/web/bench/__init__.py b/qtip/web/bench/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/qtip/web/bench/admin.py b/qtip/web/bench/admin.py deleted file mode 100644 index 1e678ad5..00000000 --- a/qtip/web/bench/admin.py +++ /dev/null @@ -1,22 +0,0 @@ -############################################################################## -# Copyright (c) 2017 akhil.batra@research.iiit.ac.in and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - -from django.contrib import admin - -import models - -# Register your models here. - - -admin.site.register(models.Repo) -admin.site.register(models.Task) diff --git a/qtip/web/bench/apps.py b/qtip/web/bench/apps.py deleted file mode 100644 index db50dfe0..00000000 --- a/qtip/web/bench/apps.py +++ /dev/null @@ -1,8 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.apps import AppConfig - - -class BenchConfig(AppConfig): - name = 'bench' diff --git a/qtip/web/bench/forms.py b/qtip/web/bench/forms.py deleted file mode 100644 index d897aca7..00000000 --- a/qtip/web/bench/forms.py +++ /dev/null @@ -1,19 +0,0 @@ -############################################################################## -# Copyright (c) 2017 akhil.batra@research.iiit.ac.in and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - - -from django import forms - -import models - - -class TaskForm(forms.ModelForm): - class Meta: - model = models.Task - fields = ['repo'] diff --git a/qtip/web/bench/management/__init__.py b/qtip/web/bench/management/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/qtip/web/bench/management/commands/__init__.py b/qtip/web/bench/management/commands/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/qtip/web/bench/management/commands/_private.py b/qtip/web/bench/management/commands/_private.py deleted file mode 100644 index e69de29b..00000000 diff --git a/qtip/web/bench/management/commands/importstatic.py b/qtip/web/bench/management/commands/importstatic.py deleted file mode 100644 index 471faf8b..00000000 --- a/qtip/web/bench/management/commands/importstatic.py +++ /dev/null @@ -1,10 +0,0 @@ -import os - -from django.core.management.base import BaseCommand - - -class Command(BaseCommand): - help = 'Import frontend dependencies for serving as static files' - - def handle(self, *args, **options): - os.system("git clone https://github.com/gurayyarar/AdminBSBMaterialDesign.git bench/static/") diff --git a/qtip/web/bench/migrations/0001_initial.py b/qtip/web/bench/migrations/0001_initial.py deleted file mode 100644 index 04736679..00000000 --- a/qtip/web/bench/migrations/0001_initial.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.3 on 2017-07-13 01:36 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Repo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('github_link', models.URLField()), - ], - ), - migrations.CreateModel( - name='Task', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('start_time', models.DateTimeField(auto_now_add=True)), - ('end_time', models.DateTimeField()), - ('run_time', models.DurationField()), - ('log', models.TextField()), - ('repo', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='bench.Repo')), - ], - ), - ] diff --git a/qtip/web/bench/migrations/0002_auto_20170713_0210.py b/qtip/web/bench/migrations/0002_auto_20170713_0210.py deleted file mode 100644 index 30c0cd63..00000000 --- a/qtip/web/bench/migrations/0002_auto_20170713_0210.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.3 on 2017-07-13 02:10 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('bench', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='repo', - name='github_link', - field=models.URLField(unique=True), - ), - ] diff --git a/qtip/web/bench/migrations/0003_auto_20170713_0225.py b/qtip/web/bench/migrations/0003_auto_20170713_0225.py deleted file mode 100644 index fec4234a..00000000 --- a/qtip/web/bench/migrations/0003_auto_20170713_0225.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.3 on 2017-07-13 02:25 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('bench', '0002_auto_20170713_0210'), - ] - - operations = [ - migrations.AlterField( - model_name='repo', - name='name', - field=models.CharField(max_length=20), - ), - ] diff --git a/qtip/web/bench/migrations/0004_auto_20170715_0325.py b/qtip/web/bench/migrations/0004_auto_20170715_0325.py deleted file mode 100644 index 74296cce..00000000 --- a/qtip/web/bench/migrations/0004_auto_20170715_0325.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.3 on 2017-07-15 03:25 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('bench', '0003_auto_20170713_0225'), - ] - - operations = [ - migrations.AlterField( - model_name='repo', - name='name', - field=models.CharField(max_length=200), - ), - ] diff --git a/qtip/web/bench/migrations/0005_auto_20170720_2115.py b/qtip/web/bench/migrations/0005_auto_20170720_2115.py deleted file mode 100644 index 5bd81a2c..00000000 --- a/qtip/web/bench/migrations/0005_auto_20170720_2115.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.3 on 2017-07-20 21:15 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('bench', '0004_auto_20170715_0325'), - ] - - operations = [ - migrations.RenameField( - model_name='repo', - old_name='github_link', - new_name='git_link', - ), - migrations.AlterField( - model_name='task', - name='end_time', - field=models.DateTimeField(null=True), - ), - migrations.AlterField( - model_name='task', - name='log', - field=models.FilePathField(), - ), - migrations.AlterField( - model_name='task', - name='run_time', - field=models.DurationField(null=True), - ), - ] diff --git a/qtip/web/bench/migrations/0006_auto_20170722_0135.py b/qtip/web/bench/migrations/0006_auto_20170722_0135.py deleted file mode 100644 index 5d066702..00000000 --- a/qtip/web/bench/migrations/0006_auto_20170722_0135.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.3 on 2017-07-22 01:35 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('bench', '0005_auto_20170720_2115'), - ] - - operations = [ - migrations.AddField( - model_name='task', - name='status', - field=models.CharField(choices=[('P', 'Pending'), ('IP', 'In progress'), ('F', 'Finished')], default='P', max_length=20), - ), - migrations.AlterField( - model_name='task', - name='log', - field=models.FileField(upload_to='logs'), - ), - ] diff --git a/qtip/web/bench/migrations/__init__.py b/qtip/web/bench/migrations/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/qtip/web/bench/models.py b/qtip/web/bench/models.py deleted file mode 100644 index 3f0439d9..00000000 --- a/qtip/web/bench/models.py +++ /dev/null @@ -1,50 +0,0 @@ -############################################################################## -# Copyright (c) 2017 akhil.batra@research.iiit.ac.in and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models -from django.urls import reverse - -# Create your models here. - - -class Repo(models.Model): - name = models.CharField(max_length=200, blank=False) - git_link = models.URLField(unique=True) - - def get_absolute_url(self): - return reverse('repo_update', args=[self.pk]) - - def __str__(self): - return "%s, %s" % (self.name, self.git_link) - - -class Task(models.Model): - TASK_STATUS_CHOICES = ( - ('P', 'Pending'), - ('IP', 'In progress'), - ('F', 'Finished') - ) - - start_time = models.DateTimeField(auto_now_add=True) - status = models.CharField(choices=TASK_STATUS_CHOICES, default='P', max_length=20) - end_time = models.DateTimeField(null=True) - run_time = models.DurationField(null=True) - repo = models.ForeignKey('Repo', on_delete=models.DO_NOTHING) - log = models.FileField(upload_to='logs') - - def save(self, **kwargs): - if self.end_time: - self.run_time = self.end_time - self.start_time - super(Task, self).save(kwargs) - - def get_absolute_url(self): - return reverse('task_view', args=[self.pk]) diff --git a/qtip/web/bench/tests.py b/qtip/web/bench/tests.py deleted file mode 100644 index c2de5b3a..00000000 --- a/qtip/web/bench/tests.py +++ /dev/null @@ -1,6 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -# from django.test import TestCase - -# Create your tests here. diff --git a/qtip/web/bench/urls.py b/qtip/web/bench/urls.py deleted file mode 100644 index a6decbc5..00000000 --- a/qtip/web/bench/urls.py +++ /dev/null @@ -1,25 +0,0 @@ -############################################################################## -# Copyright (c) 2017 akhil.batra@research.iiit.ac.in and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.conf.urls import include, url - -import views - -urlpatterns = [ - url('^', include('django.contrib.auth.urls')), - url('^dashboard/$', views.Dashboard.as_view(), name="index"), - url('^repos/$', views.ReposView.as_view(), name='repos'), - url('^repos/(?P\d+)$', views.RepoUpdate.as_view(), name='repo_update'), - url('^run/$', views.Run.as_view(), name='run'), - url('^tasks/$', views.Logs.as_view(), name='tasks'), - url('^tasks/(?P\d+)$', views.TaskView.as_view(), name='task_view'), -] diff --git a/qtip/web/bench/utils.py b/qtip/web/bench/utils.py deleted file mode 100644 index aac388e0..00000000 --- a/qtip/web/bench/utils.py +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################## -# Copyright (c) 2017 akhil.batra@research.iiit.ac.in and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -import os -from subprocess import Popen, PIPE, STDOUT -import shutil - - -def run(repo): - if os.path.exists(repo.name): - shutil.rmtree(repo.name) - os.mkdir(repo.name) - os.chdir(repo.name) - output = Popen(("git clone %s ." % repo.git_link).split(), stdout=PIPE, stderr=STDOUT) - for line in output.stdout: - yield line - output.wait() - output = Popen("ansible-playbook run.yml".split(), stdout=PIPE, stderr=STDOUT) - for line in output.stdout: - yield line - os.chdir("../") diff --git a/qtip/web/bench/views.py b/qtip/web/bench/views.py deleted file mode 100644 index 56f100cb..00000000 --- a/qtip/web/bench/views.py +++ /dev/null @@ -1,101 +0,0 @@ -############################################################################## -# Copyright (c) 2017 akhil.batra@research.iiit.ac.in and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# -*- coding: utf-8 -*- -from __future__ import unicode_literals -from multiprocessing import Process - -from django.contrib.auth.mixins import LoginRequiredMixin -from django.views.generic.edit import CreateView, UpdateView -from django.views.generic.list import ListView -from django.views.generic.detail import DetailView -from django.views.generic import TemplateView -from django.views import View -from django.shortcuts import render, redirect -from django.core.files.base import ContentFile -from django.utils import timezone - -import forms -import models -import utils - - -class Dashboard(TemplateView): - template_name = "bench/index.html" - - -class ReposView(LoginRequiredMixin, CreateView): - model = models.Repo - fields = '__all__' - - def get_context_data(self, **kwargs): - context = super(ReposView, self).get_context_data(**kwargs) - context["repos"] = self.model.objects.all() - context["template_role"] = "add" - return context - - -class RepoUpdate(LoginRequiredMixin, UpdateView): - model = models.Repo - fields = '__all__' - - def get_context_data(self, **kwargs): - context = super(RepoUpdate, self).get_context_data(**kwargs) - context["repos"] = self.model.objects.all() - context["template_role"] = "edit" - return context - - -class Run(LoginRequiredMixin, View): - template_name = 'bench/run.html' - form_class = forms.TaskForm - - def get(self, request): - task_form = self.form_class() - return render(request, self.template_name, {'form': task_form}) - - def post(self, request): - task_form = self.form_class(request.POST) - if task_form.is_valid(): - new_task = task_form.save() - new_task.log.save("run_%s.log" % new_task.pk, ContentFile('')) - p = Process(target=self.start_task, args=(new_task,)) - p.start() - return redirect('tasks') - p.join() - - def start_task(self, task): - task = models.Task.objects.get(pk=task.pk) - task.status = 'IP' - task.save() - with open(task.log.path, "a") as logfile: - for line in utils.run(task.repo): - logfile.write(line) - now = timezone.now() - task = models.Task.objects.get(pk=task.pk) - task.end_time = now - task.status = 'F' - task.save() - - -class Logs(LoginRequiredMixin, ListView): - model = models.Task - - -class TaskView(LoginRequiredMixin, DetailView): - model = models.Task - - def get_context_data(self, **kwargs): - context = super(TaskView, self).get_context_data(**kwargs) - try: - with open(context['object'].log.path, "r") as log_file: - context['log'] = log_file.read() - except ValueError: - context['log'] = "No log to show" - return context diff --git a/qtip/web/manage.py b/qtip/web/manage.py deleted file mode 100755 index f33e87a0..00000000 --- a/qtip/web/manage.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings") - try: - from django.core.management import execute_from_command_line - except ImportError: - # The above import may fail for some other reason. Ensure that the - # issue is really that Django is missing to avoid masking other - # exceptions on Python 2. - try: - import django # noqa - except ImportError: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) - raise - execute_from_command_line(sys.argv) diff --git a/qtip/web/templates/bench/base.html b/qtip/web/templates/bench/base.html deleted file mode 100644 index 4eaf56f5..00000000 --- a/qtip/web/templates/bench/base.html +++ /dev/null @@ -1,527 +0,0 @@ - - - - - - QTIP Benchmarking Services - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-

Please wait...

-
-
- - -
- - - - - - - -
- - - - - - -
- -
-
- {% block content %} - {% endblock %} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/qtip/web/templates/bench/index.html b/qtip/web/templates/bench/index.html deleted file mode 100644 index b3625a33..00000000 --- a/qtip/web/templates/bench/index.html +++ /dev/null @@ -1,3 +0,0 @@ -{% extends 'bench/base.html' %} -{% block content %} -{% endblock %} \ No newline at end of file diff --git a/qtip/web/templates/bench/repo_form.html b/qtip/web/templates/bench/repo_form.html deleted file mode 100644 index 158b8481..00000000 --- a/qtip/web/templates/bench/repo_form.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends 'bench/base.html' %} -{% block content %} -
-
-

Repos

-
    -
  • - -
  • -
-
-
- {% for repo in repos %} - - {% endfor %} -
-
- - -{% endblock %} diff --git a/qtip/web/templates/bench/run.html b/qtip/web/templates/bench/run.html deleted file mode 100644 index eabd2ea6..00000000 --- a/qtip/web/templates/bench/run.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends 'bench/base.html' %} -{% block content %} -
-
-

Run

-
-
{% csrf_token %} - {{ form }} -
- -
-
-
-{% endblock %} \ No newline at end of file diff --git a/qtip/web/templates/bench/task_detail.html b/qtip/web/templates/bench/task_detail.html deleted file mode 100644 index 3f42c10a..00000000 --- a/qtip/web/templates/bench/task_detail.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends 'bench/base.html' %} -{% block content %} -
-
-

Task

-
-
- - - - - - - - - - - - - - - - -
RepoStatusStart TimeEnd TimeRun time
{{ object.repo}}{{ object.get_status_display }}{{ object.start_time }}{{ object.end_time }}{{ object.duration }}{{ object.log }}
-
-
-
-

- {{ log | linebreaks }} -

-
-
-
-{% endblock %} \ No newline at end of file diff --git a/qtip/web/templates/bench/task_list.html b/qtip/web/templates/bench/task_list.html deleted file mode 100644 index 074483ab..00000000 --- a/qtip/web/templates/bench/task_list.html +++ /dev/null @@ -1,77 +0,0 @@ -{% extends 'bench/base.html' %} -{% block content %} - - - -
-
-

- Tasks Log -

- -
-
-
-
- - - - - - - - - - - - {% for task in object_list %} - - - - - - - - {% endfor %} - - - - - - - - - - -
RepoStatusStart TimeEnd TimeRun time
{{ task.repo }}{{ task.get_status_display }}{{ task.start_time }}{{ task.end_time }}{{ task.run_time }}
RepoStatusStart TimeEnd TimeRun time
-
-
-
- - - - - - - - - - - - - - - - -{% endblock %} \ No newline at end of file diff --git a/qtip/web/templates/registration/login.html b/qtip/web/templates/registration/login.html deleted file mode 100644 index 1e15b90b..00000000 --- a/qtip/web/templates/registration/login.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - Sign In | Bootstrap Based Admin Template - Material Design - - - - - - - - - - - - - - - - - - - - - - - {% endblock %} - - - - - - - - - - - - - - - - - - diff --git a/qtip/web/web/__init__.py b/qtip/web/web/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/qtip/web/web/settings.py b/qtip/web/web/settings.py deleted file mode 100644 index 8963ea89..00000000 --- a/qtip/web/web/settings.py +++ /dev/null @@ -1,126 +0,0 @@ -""" -Django settings for web project. - -Generated by 'django-admin startproject' using Django 1.11.3. - -For more information on this file, see -https://docs.djangoproject.com/en/1.11/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/1.11/ref/settings/ -""" - -import os - -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -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/1.11/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '9=rwv)cv6&sao=xnl%b)-jrl(tnid$l(4n7i96@44+3-cog$)$' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -ALLOWED_HOSTS = [] - - -# Application definition - -INSTALLED_APPS = [ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'bench.apps.BenchConfig', -] - -MIDDLEWARE = [ - 'django.middleware.security.SecurityMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -] - -ROOT_URLCONF = 'web.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': ['templates'], - 'APP_DIRS': True, - 'OPTIONS': { - 'context_processors': [ - 'django.template.context_processors.debug', - 'django.template.context_processors.request', - 'django.contrib.auth.context_processors.auth', - 'django.contrib.messages.context_processors.messages', - ], - }, - }, -] - -WSGI_APPLICATION = 'web.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/1.11/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} - - -# Password validation -# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators - -AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, -] - - -# Internationalization -# https://docs.djangoproject.com/en/1.11/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'UTC' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/1.11/howto/static-files/ - -STATIC_URL = '/static/' - -# Auth Settings -LOGIN_URL = '/bench/login/' -LOGIN_REDIRECT_URL = '/bench/dashboard/' -LOGOUT_REDIRECT_URL = LOGIN_URL diff --git a/qtip/web/web/urls.py b/qtip/web/web/urls.py deleted file mode 100644 index 49aaeb98..00000000 --- a/qtip/web/web/urls.py +++ /dev/null @@ -1,22 +0,0 @@ -"""web URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/1.11/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.conf.urls import url, include - 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) -""" -from django.conf.urls import include, url -from django.contrib import admin - -urlpatterns = [ - url(r'^bench/', include('bench.urls')), - url(r'^admin/', admin.site.urls), -] diff --git a/qtip/web/web/wsgi.py b/qtip/web/web/wsgi.py deleted file mode 100644 index 23d62e95..00000000 --- a/qtip/web/web/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for web project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings") - -application = get_wsgi_application() -- cgit 1.2.3-korg