diff options
author | Magnus Granberg <zorry@gentoo.org> | 2021-05-31 01:16:54 +0200 |
---|---|---|
committer | Magnus Granberg <zorry@gentoo.org> | 2021-09-24 04:22:49 +0200 |
commit | 5e84cbca6ca8f525703c062f7e824f2c60ed4bc7 (patch) | |
tree | 0c3a689bde470120e19a2d6d25512d1974e4c741 | |
parent | Update code to use gosbs backend (diff) | |
download | tinderbox-cluster-www-5e84cbca6ca8f525703c062f7e824f2c60ed4bc7.tar.gz tinderbox-cluster-www-5e84cbca6ca8f525703c062f7e824f2c60ed4bc7.tar.bz2 tinderbox-cluster-www-5e84cbca6ca8f525703c062f7e824f2c60ed4bc7.zip |
Restart
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
64 files changed, 0 insertions, 1817 deletions
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7be3859..0000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Backup files -*~ -__pycache__ -# log dir -static/logs -# Python compiled files -*.pyc -python/gosbs/settings.py diff --git a/htdoc/index.html b/htdoc/index.html deleted file mode 100644 index c217ab3..0000000 --- a/htdoc/index.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <head> - <title></title> - <meta content=""> - <style></style> - </head> - <body></body> -</html>
\ No newline at end of file diff --git a/python/gosbs/__init__.py b/python/gosbs/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/gosbs/__init__.py +++ /dev/null diff --git a/python/gosbs/settings.py.conf b/python/gosbs/settings.py.conf deleted file mode 100644 index a2e4330..0000000 --- a/python/gosbs/settings.py.conf +++ /dev/null @@ -1,144 +0,0 @@ -""" -Django settings for gosbs_main project. - -Generated by 'django-admin startproject' using Django 2.2.2. - -For more information on this file, see -https://docs.djangoproject.com/en/2.2/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/2.2/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/2.2/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'r*^^p)w%5h+tc#87!4!d@e196lf$a_&rz)^!*pziw!&5#jjb$a' - -# 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', - 'www.apps.WwwConfig', - 'gosbs_auth.apps.AuthConfig', - 'packages.apps.PackagesConfig', - 'projects.apps.ProjectsConfig', -] - -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 = 'gosbs.urls' - -TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join(BASE_DIR, '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 = 'gosbs.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/2.2/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'gosbs-www', - 'USER': 'gosbs-www', - 'PASSWORD': 'X', - 'HOST': '192.168.1.X', - 'PORT': '', - 'OPTIONS' : { - 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", - 'isolation_level': "read committed", - }, - }, - 'gosbs': { - 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'gosbs', # Or path to database file if using sqlite3. - 'USER': 'gosbs', # Not used with sqlite3. - 'PASSWORD': 'X', # Not used with sqlite3. - 'HOST': '192.168.1.X', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. - 'OPTIONS' : { - 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", - 'isolation_level': "read committed", - }, - } -} -DATABASE_ROUTERS = ['www.router.GosbsRouter'] - -# Password validation -# https://docs.djangoproject.com/en/2.2/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/2.2/topics/i18n/ - -LANGUAGE_CODE = 'en-us' - -TIME_ZONE = 'Europe/Stockholm' - -USE_I18N = True - -USE_L10N = True - -USE_TZ = True - - -# Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/2.2/howto/static-files/ - -STATIC_URL = '/static/' diff --git a/python/gosbs/urls.py b/python/gosbs/urls.py deleted file mode 100644 index f87286f..0000000 --- a/python/gosbs/urls.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.contrib import admin -from django.urls import include, path - -urlpatterns = [ - path('www/', include('www.urls')), - path('auth/', include('gosbs_auth.urls')), - path('projects/', include('projects.urls', namespace="projects")), - path('admin/', admin.site.urls), -] diff --git a/python/gosbs/wsgi.py b/python/gosbs/wsgi.py deleted file mode 100644 index 4d2fab7..0000000 --- a/python/gosbs/wsgi.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -WSGI config for gosbs_main 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/2.2/howto/deployment/wsgi/ -""" - -import os - -from django.core.wsgi import get_wsgi_application - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gosbs.settings') - -application = get_wsgi_application() diff --git a/python/gosbs_auth/__init__.py b/python/gosbs_auth/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/gosbs_auth/__init__.py +++ /dev/null diff --git a/python/gosbs_auth/admin.py b/python/gosbs_auth/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/python/gosbs_auth/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/python/gosbs_auth/apps.py b/python/gosbs_auth/apps.py deleted file mode 100644 index d6b5700..0000000 --- a/python/gosbs_auth/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class AuthConfig(AppConfig): - name = 'gosbs_auth' diff --git a/python/gosbs_auth/migrations/__init__.py b/python/gosbs_auth/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/gosbs_auth/migrations/__init__.py +++ /dev/null diff --git a/python/gosbs_auth/models.py b/python/gosbs_auth/models.py deleted file mode 100644 index 71a8362..0000000 --- a/python/gosbs_auth/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/python/gosbs_auth/tests.py b/python/gosbs_auth/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/python/gosbs_auth/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/python/gosbs_auth/urls.py b/python/gosbs_auth/urls.py deleted file mode 100644 index 090f9bc..0000000 --- a/python/gosbs_auth/urls.py +++ /dev/null @@ -1,11 +0,0 @@ -from django.urls import path - -from django.contrib.auth import views as auth_views - -urlpatterns = [ - path('login/', auth_views.LoginView.as_view()), - path('logout/', auth_views.LogoutView.as_view(next_page = '/www/')), - path('password_change/', auth_views.PasswordChangeView.as_view()), - path('password_change/done', auth_views.PasswordChangeDoneView.as_view()), - #path('password_reset/', auth_views.PasswordResetView.as_()), -] diff --git a/python/gosbs_auth/views.py b/python/gosbs_auth/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/python/gosbs_auth/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/python/manage.py b/python/manage.py deleted file mode 100644 index 211c4ab..0000000 --- a/python/manage.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 1998-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -import os -import sys - -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gosbs.settings") - from django.core.management import execute_from_command_line - execute_from_command_line(sys.argv) diff --git a/python/packages/__init__.py b/python/packages/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/packages/__init__.py +++ /dev/null diff --git a/python/packages/admin.py b/python/packages/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/python/packages/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/python/packages/apps.py b/python/packages/apps.py deleted file mode 100644 index 8bc7b4d..0000000 --- a/python/packages/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class PackagesConfig(AppConfig): - name = 'packages' diff --git a/python/packages/migrations/__init__.py b/python/packages/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/packages/migrations/__init__.py +++ /dev/null diff --git a/python/packages/models.py b/python/packages/models.py deleted file mode 100644 index 943ffe5..0000000 --- a/python/packages/models.py +++ /dev/null @@ -1,188 +0,0 @@ -import uuid -from django.db import models - -StatusEnum = models.TextChoices('StatusEnum', 'failed completed in-progress waiting') - -class Repos(models.Model): - RepoType = models.TextChoices('RepoType', 'project ebuild') - uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False, db_column='uuid') - name = models.CharField(max_length=255) - status = models.CharField(max_length=255, choices=StatusEnum.choices, default='waiting', blank=True) - description = models.TextField() - src_url = models.URLField() - auto = models.BooleanField(default=False) - repo_type = models.CharField(max_length=255, choices=RepoType.choices, default='ebuild', blank=True) - created_at = models.DateTimeField(auto_now_add=True) - updated_at = models.DateTimeField(auto_now=True) - deleted_at = models.DateTimeField(auto_now=True) - deleted = models.BooleanField(default=False) - - class Meta: - db_table = 'repos' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s %s %s %s' % (self.uuid, self.name, self.status, self.mirror_status, self.local_status, self.description, self.src_url, self.auto, self.repo_type, self.created_at, self.updated_at, self.deleted_at, self.deleted) - - def soft_delete(self): - self.deleted = True - self.save() - -class Categories(models.Model): - uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) - name = models.CharField(max_length=255) - status = models.CharField(max_length=255, choices=StatusEnum.choices, default='waiting', blank=True) - created_at = models.DateTimeField(auto_now_add=True) - updated_at = models.DateTimeField(auto_now=True) - deleted_at = models.DateTimeField(auto_now=True) - deleted = models.BooleanField(default=False) - class Meta: - db_table = 'categories' - def __str__(self): - return '%s %s %s %s' % (self.uuid, self.name, self.status, self.deleted) - - def soft_delete(self): - self.deleted = True - self.save() -class CategoriesMetadata(models.Model): - id = models.IntegerField(primary_key=True) - category_uuid = models.ForeignKey(Categories, on_delete=models.CASCADE) - description = models.CharField(max_length=200) - checksum = models.CharField(max_length=255) - class Meta: - db_table = 'categories_metadata' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s' % (self.id, self.uuid, self.description, self.checksum) - -class Packages(models.Model): - uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) - name = models.CharField(max_length=255) - status = models.CharField(max_length=255, choices=StatusEnum.choices, default='waiting', blank=True) - category_uuid = models.ForeignKey(Categories, on_delete=models.CASCADE) - repo_uuid = models.ForeignKey(Repos, on_delete=models.CASCADE) - created_at = models.DateTimeField(auto_now_add=True) - updated_at = models.DateTimeField(auto_now=True) - deleted_at = models.DateTimeField(auto_now=True) - deleted = models.BooleanField(default=False) - class Meta: - db_table = 'packages' - def __str__(self): - return '%s %s %s %s %s %s' % (self.uuid, self.name, self.status, self.category_uuid, self.repo_uuid, self.deleted) - - def soft_delete(self): - self.deleted = True - self.save() - -class PackagesMetadata(models.Model): - id = models.IntegerField(primary_key=True) - package_uuid = models.ForeignKey(Packages, on_delete=models.CASCADE) - gitlog = models.TextField() - descriptions = models.TextField() - checksum = models.CharField(max_length=255) - class Meta: - db_table = 'packages_metadata' - def __str__(self): - return '%s %s %s %s' % (self.id, self.package_uuid, self.gitlog, self.descriptions, self.checksum) - -class Emails(models.Model): - id = models.IntegerField(primary_key=True) - email = models.CharField(max_length=150) - class Meta: - db_table = 'emails' - def __str__(self): - return '%s %s' % (self.id, self.email) - -class PackagesEmails(models.Model): - id = models.IntegerField(primary_key=True) - package_uuid = models.ForeignKey(Packages, on_delete=models.CASCADE) - email_id = models.ForeignKey(Emails, on_delete=models.CASCADE) - class Meta: - db_table = 'packages_emails' - def __str__(self): - return '%s %s %s %s' % (self.id, self.package_uuid, self.email_id) - -class Ebuilds(models.Model): - uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) - version = models.CharField(max_length=20) - package_uuid = models.ForeignKey(Packages, on_delete=models.CASCADE) - checksum = models.CharField(max_length=100) - status = models.CharField(max_length=255, choices=StatusEnum.choices, default='waiting', blank=True) - created_at = models.DateTimeField(auto_now_add=True) - updated_at = models.DateTimeField(auto_now=True) - deleted_at = models.DateTimeField(auto_now=True) - deleted = models.BooleanField(default=False) - class Meta: - db_table = 'ebuilds' - def __str__(self): - return '%s %s %s %s %s %s %s' % (self.uuid, self.version, self.package_uuid, self.checksum, self.status self.deleted) - - def soft_delete(self): - self.deleted = True - self.save() - -class EbuildsMetadata(models.Model): - id = models.IntegerField(primary_key=True) - ebuild_uuid = models.ForeignKey(Ebuilds, on_delete=models.CASCADE) - commit = models.CharField(max_length=30) - commit_msg = models.CharField(max_length=200) - description = models.CharField(max_length=200) - slot = models.CharField(max_length=10) - homepage = models.CharField(max_length=200) - license = models.CharField(max_length=200) - class Meta: - db_table = 'ebuilds_metadata' - def __str__(self): - return '%s %s %s %s %s %s %s %s' % (self.id, self.uuid, self.commit, self.commit_msg, self.description, self.slot, self.homepage, self.license) - -class Uses(models.Model): - id = models.IntegerField(primary_key=True) - flag = models.CharField(max_length=150) - description = models.CharField(max_length=200) - class Meta: - db_table = 'uses' - def __str__(self): - return '%s %s %s' % (self.id, self.flag, self.description) - -class Keywords(models.Model): - id = models.IntegerField(primary_key=True) - keyword = models.CharField(max_length=45) - class Meta: - db_table = 'keywords' - def __str__(self): - return '%s %s %s' % (self.id, self.keyword) - -class Restrictions(models.Model): - id = models.IntegerField(primary_key=True) - restriction = models.CharField(max_length=150) - class Meta: - db_table = 'restrictions' - def __str__(self): - return '%s %s %s' % (self.id, self.restriction) - -class EbuildsKeywords(models.Model): - KeywordEnum = models.TextChoices('KeywordEnum', 'stable unstable negative') - id = models.IntegerField(primary_key=True) - ebuild_uuid = models.ForeignKey(Ebuilds) - keyword_id = models.ForeignKey(Keywords) - status = models.CharField(max_length=24 blank=True, choices=KeywordEnum.choices) - class Meta: - db_table = 'ebuilds_keywords' - def __str__(self): - return '%s %s %s' % (self.ebuild_uuid, self.keyword_id, self.status) - -class EbuildsIuse(models.Model): - id = models.IntegerField(primary_key=True) - ebuild_uuid = models.ForeignKey(Ebuilds) - use_id = models.ForeignKey(Uses) - status =models.BooleanField(default=False) - class Meta: - db_table = 'ebuilds_iuse' - def __str__(self): - return '%s %s %s %s' % (self.id, self.ebuild_uuid, self.use_id, self.status) - -class EbuildsRestrictions(models.Model): - id = models.IntegerField(primary_key=True) - ebuild_uuid = models.ForeignKey(Ebuilds) - restriction_id = models.ForeignKey(Restrictions) - class Meta: - db_table = 'ebuilds_restrictions' - def __str__(self): - return '%s %s' % (self.ebuild_uuid, self.restriction_id) diff --git a/python/packages/tests.py b/python/packages/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/python/packages/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/python/packages/urls.py b/python/packages/urls.py deleted file mode 100644 index 88a9cac..0000000 --- a/python/packages/urls.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.urls import path - -from . import views - -urlpatterns = [ - path('', views.index, name='index'), -] diff --git a/python/packages/views.py b/python/packages/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/python/packages/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/python/projects/__init__.py b/python/projects/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/projects/__init__.py +++ /dev/null diff --git a/python/projects/admin.py b/python/projects/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/python/projects/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/python/projects/apps.py b/python/projects/apps.py deleted file mode 100644 index 3ef44de..0000000 --- a/python/projects/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class ProjectsConfig(AppConfig): - name = 'projects' diff --git a/python/projects/forms.py b/python/projects/forms.py deleted file mode 100644 index 7c96ffe..0000000 --- a/python/projects/forms.py +++ /dev/null @@ -1,7 +0,0 @@ -from django import forms -from .models import Projects - -class NewProjectForm(forms.ModelForm): - class Meta: - model = Projects - fields = ['name', 'title', 'description', 'text', 'active', 'status', 'public'] diff --git a/python/projects/migrations/__init__.py b/python/projects/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/projects/migrations/__init__.py +++ /dev/null diff --git a/python/projects/models.py b/python/projects/models.py deleted file mode 100644 index 5d58109..0000000 --- a/python/projects/models.py +++ /dev/null @@ -1,53 +0,0 @@ -import uuid -from django.db import models -from packages.models import Repos - -StatusEnum = models.TextChoices('StatusEnum', 'failed completed in-progress waiting') - -class Projects(models.Model): - uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) - name = models.CharField(max_length=255) - active = models.BooleanField(default=False) - auto = models.BooleanField(default=False) - created_at = models.DateTimeField(auto_now_add=True) - updated_at = models.DateTimeField(auto_now=True) - deleted_at = models.DateTimeField(auto_now=True) - deleted = models.BooleanField(default=False) - - class Meta: - db_table = 'projects' - def __str__(self): - return '%s %s %s %s %s' % (self.uuid, self.name, self.active, self.auto, self.deleted) - - def soft_delete(self): - self.deleted = True - self.save() - -class ProjectsMetadata(models.Model): - id = models.IntegerField(primary_key=True) - title = models.CharField(max_length=255) - description = models.TextField() - project_uuid = models.ForeignKey(Projects, on_delete=models.CASCADE) - project_repos_uuid = models.ForeignKey(Repos, on_delete=models.CASCADE) - project_profile = models.CharField(max_length=255) - project_profile_repos_uuid = models.ForeignKey(Repos, on_delete=models.CASCADE) - class Meta: - db_table = 'projects_metadata' - def __str__(self): - return '%s %s %s %s %s %s %s' % (self.id, self.title, self.description, self.project_uuid, self.project_repos_uuid, self.project_profile, self.project_profile_repos_uuid) - -class ProjectsRepos(models.Model): - id = models.IntegerField(primary_key=True) - project_uuid = models.ForeignKey(Projects, on_delete=models.CASCADE) - repo_uuid = models.ForeignKey(Repos, on_delete=models.CASCADE) - test = models.BooleanField(default=False) - repoman = models.BooleanField(default=False) - qa = models.BooleanField(default=False) - build = models.BooleanField(default=False) - auto = models.BooleanField(default=False) - depclean = models.BooleanField(default=False) - - class Meta: - db_table = 'projects_repos' - def __str__(self): - return '%s %s %s %s' % (self.id, self.project_uuid, self.repo_uuid, self.test, self.repoman, self.qa, self.build, self.auto, self.depclean) diff --git a/python/projects/tests.py b/python/projects/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/python/projects/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/python/projects/urls.py b/python/projects/urls.py deleted file mode 100644 index a6abd09..0000000 --- a/python/projects/urls.py +++ /dev/null @@ -1,11 +0,0 @@ -from django.urls import path - -from . import views - -app_name = 'projects' -urlpatterns = [ - path('', views.index, name='index'), - path('add/', views.add, name='add'), - path('<uuid:project_uuid>/detail/', views.detail, name='detail'), - path('<uuid:project_uuid>/repos/', views.repos, name='repos'), -] diff --git a/python/projects/views.py b/python/projects/views.py deleted file mode 100644 index 522da80..0000000 --- a/python/projects/views.py +++ /dev/null @@ -1,86 +0,0 @@ -from django.shortcuts import render -from django.http import HttpResponseRedirect - -from www.utils import default_siteinfo -from .models import Projects -from .forms import NewProjectForm - -def index(request): - menyrequest = 'projects' - siteinfo = default_siteinfo(request, menyrequest) - for meny in siteinfo['submenys']: - if meny.title == 'Add': - meny.view = True - else: - meny.view = False - siteinfo['subactivemeny'] = False - siteinfo['Projects'] = Projects.objects.all() - htmlrequest = 'pages/' + menyrequest + '/index.html' - return render(request, htmlrequest, siteinfo) - -def detail(request, project_uuid): - menyrequest = 'projects' - submenyrequest = 'detail' - siteinfo = default_siteinfo(request, menyrequest) - for meny in siteinfo['submenys']: - if meny.title == 'Add': - meny.view = True - if meny.title == 'Edit': - meny.view = True - siteinfo['subactivemeny'] = submenyrequest - siteinfo['Projects'] = Projects.objects.get(uuid = project_uuid) - htmlrequest = 'pages/' + menyrequest + '/' + submenyrequest + '/index.html' - return render(request, htmlrequest, siteinfo) - -def add(request): - if request.method == 'POST': - # create a form instance and populate it with data from the request: - form = NewProjectForm(request.POST) - # check whether it's valid: - if form.is_valid(): - # process the data in form.cleaned_data as required - # ... - # redirect to a new URL: - a = form.save() - project = Projects.objects.get(name=a.name) - print(project) - detail(request, project.uuid) - else: - menyrequest = 'projects' - submenyrequest = 'add' - siteinfo = default_siteinfo(request, menyrequest) - siteinfo['Form'] = NewProjectForm() - for meny in siteinfo['submenys']: - if meny.title == 'Add': - meny.view = True - if meny.title == 'Edit': - meny.view = False - siteinfo['subactivemeny'] = submenyrequest - htmlrequest = 'pages/' + menyrequest + '/' + submenyrequest + '/index.html' - return render(request, htmlrequest, siteinfo) - -def repos(request, project_uuid): - menyrequest = 'projects' - submenyrequest = 'repos' - siteinfo = default_siteinfo(request, menyrequest) - for meny in siteinfo['subpages']: - if meny.title == 'Add': - meny.view = True - if meny.title == 'Edit': - meny.view = True - siteinfo['subactivemeny'] = submenyrequest - siteinfo['Project'] = Projects.objects.filter(uuid = project_uuid) - siteinfo['Projects_repos_e'] = ProjectsRepos.objects.filter(project__uuid = project_uuid).filter(repo__type ='ebuild') - siteinfo['Projects_repos_p'] = ProjectsRepos.objects.filter(project__uuid = project_uuid).filter(repo__type ='project') - htmlrequest = 'pages/' + menyrequest + '/' + submenyrequest + '/index.html' - return render(request, htmlrequest, siteinfo) - -def requests(request, project_uuid): - menyrequest = 'projects' - submenyrequest = 'requests' - siteinfo = default_siteinfo(request, menyrequest) - -def users(request, project_uuid): - menyrequest = 'projects' - submenyrequest = 'users' - siteinfo = default_siteinfo(request, menyrequest) diff --git a/python/templates/includes/layout/footer.html b/python/templates/includes/layout/footer.html deleted file mode 100644 index a6860e6..0000000 --- a/python/templates/includes/layout/footer.html +++ /dev/null @@ -1,38 +0,0 @@ -<footer> - <div class="container"> - <div class="row"> - <div class="col-xs-12 col-md-offset-2 col-md-7"> - {% if page.footer %}{{ page.footer }}{% endif %} - </div> - <div class="col-xs-12 col-md-3"> - <h3 class="footerhead">Questions or comments?</h3> - Please feel free to <a href="{{ contact.PageId.nav1 }}/{{ contact.nav2}}/">contact us</a>. - </div> - </div> - </div> - <div class="container-sitemap"> - <div class="container"> - {% include "includes/layout/footer_sitemap.html" %} - </div> - </div> - <div class="container"> - <div class="row"> - <div class="col-xs-3 col-md-2"> - <ul class="footerlinks three-icons"> - <li><a href="http://twitter.com/gentoo" title="@Gentoo on Twitter"><span class="fa fa-twitter fa-fw"></span></a></li> - <li><a href="https://plus.google.com/+Gentoo" title="+Gentoo on Google+"><span class="fa fa-google-plus fa-fw"></span></a></li> - <li><a href="https://www.facebook.com/gentoo.org" title="Gentoo on Facebook"><span class="fa fa-facebook fa-fw"></span></a></li> - </ul> - </div> - <div class="col-xs-9 col-md-9"> - <strong>© 2001-{% now "Y" %} Gentoo Foundation, Inc.</strong><br> - <small> - Gentoo is a trademark of the Gentoo Foundation, Inc. - The contents of this document, unless otherwise expressly stated, are licensed under the - <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">CC-BY-SA-3.0</a> license. - The <a href="/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage Guidelines</a> apply. - </small> - </div> - </div> - </div> -</footer>
\ No newline at end of file diff --git a/python/templates/includes/layout/footer_sitemap.html b/python/templates/includes/layout/footer_sitemap.html deleted file mode 100644 index 3923ce3..0000000 --- a/python/templates/includes/layout/footer_sitemap.html +++ /dev/null @@ -1,12 +0,0 @@ -<div class="row row-sitemap hidden-xs"> - {% for page in pages %} - {% if page.nav1 != 'donate' %} - <div class="col-xs-12 col-sm-4 col-md-2"> - <h3 class="footerhead"><a href="{{ page.url }}">{{ page.nav_title }}</a></h3> - <ul class="sitemap"> - {% include "includes/navigation/sitemap_secondary" %} - </ul> - {% endif %} - </div> - {% endfor %} -</div>
\ No newline at end of file diff --git a/python/templates/includes/layout/head.html b/python/templates/includes/layout/head.html deleted file mode 100644 index 7f17fd8..0000000 --- a/python/templates/includes/layout/head.html +++ /dev/null @@ -1,25 +0,0 @@ -<head> - <title>{% if page.title %}{{ page.title }} – {{ site.title }}{% else %}{{ site.title }}{% endif %}</title> - {% if page.description %}<meta name="description" content="{{ page.description }}">{% endif %} - <meta charset="utf-8"> - <meta name="theme-color" content="#54487a"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta property="og:title" content="{% if page.title %}{{ page.title }} – {{ site.title }}{% else %}{{ site.title }}{% endif %}"> - <meta property="og:image" content="https://www.gentoo.org/assets/img/logo/gentoo-g.png"> - <meta property="og:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}"> - <meta name="twitter:image" content="https://www.gentoo.org/assets/img/logo/gentoo-g.png"> - <link rel="apple-touch-icon" href="https://www.gentoo.org/assets/img/logo/icon-192.png"> - <link rel="icon" sizes="192x192" href="https://www.gentoo.org/assets/img/logo/icon-192.png"> - <link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen"> - <link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen"> - <link href="https://assets/css/screen.css" rel="stylesheet" media="screen"> - - <link rel="icon" href="https://www.gentoo.org/favicon.ico" type="image/x-icon"> - <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/www-gentoo-org.xml" title="Gentoo Website"> - <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/forums-gentoo-org.xml" title="Gentoo Forums"> - <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/bugs-gentoo-org.xml" title="Gentoo Bugzilla"> - <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/packages-gentoo-org.xml" title="Gentoo Packages"> - <link rel="search" type="application/opensearchdescription+xml" href="https://www.gentoo.org/search/archives-gentoo-org.xml" title="Gentoo List Archives"> - <link rel="alternate" type="application/atom+xml" title="Gentoo Linux news" href="https://www.gentoo.org/feeds/news.xml"> -</head> diff --git a/python/templates/includes/layout/header.html b/python/templates/includes/layout/header.html deleted file mode 100644 index 63cba60..0000000 --- a/python/templates/includes/layout/header.html +++ /dev/null @@ -1,90 +0,0 @@ -<header> - <div class="site-title"> - <div class="container"> - <div class="row"> - <div class="site-title-buttons"> - <div class="btn-group btn-group-sm"> - <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span> <strong>Get Gentoo!</strong></a> - <div class="btn-group btn-group-sm"> - <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> - <span class="fa fa-fw fa-map-o"></span> <span class="hidden-xs">gentoo.org sites</span> <span class="caret"></span> - </a> - <ul class="dropdown-menu dropdown-menu-right"> - <li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li> - <li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li> - <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li> - <li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li> - <li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li> - <li class="divider"></li> - <li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li> - <li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li> - <li><a href="https://gitweb.gentoo.org/" title="Browse our source code in Gitweb"><span class="fa fa-code fa-fw"></span> Gitweb</a></li> - <li><a href="https://sources.gentoo.org/" title="Browse our source code in CVS"><span class="fa fa-code fa-fw"></span> CVS sources</a></li> - <li class="divider"></li> - <li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra status</a></li> - </ul> - </div> - </div> - </div> - <div class="logo"> - <a href="/" title="Back to the homepage" class="site-logo"> - <object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml"> - <img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux logo"> - </object> - </a> - - </div> - </div> - </div> - </div> - <nav class="tyrian-navbar" role="navigation"> - <div class="container"> - <div class="row"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - </div> - <div class="collapse navbar-collapse navbar-main-collapse"> - <ul class="nav navbar-nav"> - {% include "includes/navigation/primary" %} - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class=""><a href="http://www.gentoo.org/donate/"><span class="fa fa-heart" style="color:#d9534f;"></span> Donate</a></li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li class=""><span class="" style="color:#d9534f;"></span> - {% if user.is_authenticated %} - Welcome, {{ user.username }}. Thanks for logging in. - {% endif %} - </li> - </ul> - </div> - </div> - </div> - </nav> - {% if subpages %} - <nav class="navbar navbar-grey navbar-stick" role="navigation"> - <div class="container"> - <div class="row"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-secondary-collapse"> - <span class="sr-only">Toggle secondary navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - </div> - <div class="collapse navbar-collapse navbar-secondary-collapse"> - <ul class="nav navbar-nav"> - {% include "includes/navigation/secondary" %} - </ul> - </div> - </div> - </div> - </nav> - {% endif %} -</header> diff --git a/python/templates/includes/layout/sponsor.html b/python/templates/includes/layout/sponsor.html deleted file mode 100644 index 9ebd19a..0000000 --- a/python/templates/includes/layout/sponsor.html +++ /dev/null @@ -1,9 +0,0 @@ -<div class="row sponsor"> -{% for sponsor in sponsors %} -<div class="col-xs-12 col-md-2 col-md-offset-2 sponsorlogo"> -<!-- sponsor{name:{{ sponsor.name }},weight:{{ sponsor.weight }}} --> -<a href="{{ sponsor.link }}" title="{{ sponsor.title }}"> -<img src="https://www.gentoo.org/assets/img/sponsors/ads/{{ sponsor.img }}" alt="{{ sponsor.alt }}"> -</a></div> -{% endfor %} -</div> diff --git a/python/templates/layout/base.html b/python/templates/layout/base.html deleted file mode 100644 index bc31ee4..0000000 --- a/python/templates/layout/base.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE html> -<html> - {% include "includes/layout/head.html" %} - <body class=""> - {% include "includes/layout/header.html" %} - - <div class="container"> - <div class="row"> - <div id="content" class="col-md-12"> - {% block content %}{% endblock %} - {% include "includes/layout/sponsor.html" %} - </div> - </div> - </div> - - {% include "includes/layout/footer.html" %} - - <script type="text/javascript"> - var _paq = _paq || []; - _paq.push(["disableCookies"]); - _paq.push(['trackPageView']); - (function() { - var u="//piwik.gentoo.org/"; - _paq.push(['setTrackerUrl', u+'piwik.php']); - _paq.push(['setSiteId', 7]); - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); - })(); - </script> - <noscript><p><img src="//piwik.gentoo.org/piwik.php?idsite=7" style="border:0;" alt="" /></p></noscript> - <script src="https://assets.gentoo.org/tyrian/jquery.min.js"></script> - <script src="https://assets.gentoo.org/tyrian/bootstrap.min.js"></script> - </body> -</html> diff --git a/python/templates/pages/packages/category/index.html b/python/templates/pages/packages/category/index.html deleted file mode 100644 index 2538f88..0000000 --- a/python/templates/pages/packages/category/index.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<div class="row"> - <h2>Packages in {{ C.Category }}</h2> - <div class="col-xs-12 col-md-5"> - {% for PM in PM_tmp %} - <table class="table table-striped frontpage-table"> - <tr> - <td class="frontpage-table-package-atom"> - <a href="/package/{{ PM.PackageId }}/" title="{{ C.Category }}/{{ PM.Package }}">{{ C.Category }}/{{ PM.Package }}</a> - <p title="{{ PM.Commitlog }}">Commit Log</p> - </td> - <td> - <p title="{{ PM.Descriptions }}">{{ PM.Descriptions }}</p> - <p title="{% for P in PM.Ebuilds %}{{ PM.Package }}/{{ P }}{% endfor %}">Versions - {% if PM.Repoman %} - <a class="btn btn-warning btn-xs" href="/repoman/{{PM.PackageId }}/">Repoman</a> - {% endif %} - </p> - </td> - </tr> - </table> - {% if forloop.last %} - </div> - {% else %} - {% if forloop.counter|divisibleby:"2" %} - </div><div class="col-xs-12 col-md-5"> - {% endif %} - {% endif %} - {% endfor %} -</div> - -{% endblock %}
\ No newline at end of file diff --git a/python/templates/pages/packages/ebuilds/ebuild/index.html b/python/templates/pages/packages/ebuilds/ebuild/index.html deleted file mode 100644 index e000a53..0000000 --- a/python/templates/pages/packages/ebuilds/ebuild/index.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<div class="row"> - <div class="col-xs-12 col-md-9"> - <h2>{{ E.PackageId.CategoryId.Category }}/{{ E.PackageId.Package }}</h2> - <table class="table table-striped frontpage-table"> - {% for EM in EM_tmp %} - <tr> - <td class="frontpage-table-package-atom"> - <p" title="{{ E.PackageId.CategoryId.Category }}/{{ E.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.PackageId.RepoId.Repo }}">{{ E.PackageId.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}</p> - <a class="btn btn-default btn-xs" href="/buildpackage/{{ E.EbuildId.EbuildId }}/">Build</a> - {% for BL in BL_tmp %} - {% if BL.Fail %} - <a class="btn btn-danger btn-xs" href="/buildlog/{{ BL.BuildLogId }}/">Fail</a> - {% else %} - <a class="btn btn-success btn-xs" href="/buildlog/{{ BL.BuildLogId }}/">Success</a> - {% endif %} - {% endfor %} - </td> - <td> - {% for K in EK_tmp %} - {% if K.EbuildId.EbuildId == E.EbuildId and K.KeywordId.Keyword != '*' %} - {% if K.Status == 'Stable' %}<span class="label label-success">{{ K.KeywordId.Keyword }}</span>{% endif %} - {% if K.Status == 'Unstable' %}<span class="label label-warning">{{ K.KeywordId.Keyword }}</span>{% endif %} - {% if K.Status == 'Negative' %}{{ K.KeywordId.Keyword }}{% endif %} - {% endif %} - {% endfor %} - <p> - {% for U in EU_tmp %} - {% if U.Status %} - <span class="label label-info">{{ U.UseId.Flag }}</span> - {% else %} - <span class="label label-default">{{ U.UseId.Flag }}</span> - {% endif %} - {% endfor %} - </p><p> - {% for R in ER_tmp %} - <span class="label label-warning">{{ R.RestrictionId.Restriction }}</span> - {% endfor %} - </p> - </td> - </tr> - {% endfor %} - </table> - </div> -</div> -{% endblock %}
\ No newline at end of file diff --git a/python/templates/pages/packages/ebuilds/index.html b/python/templates/pages/packages/ebuilds/index.html deleted file mode 100644 index 630b524..0000000 --- a/python/templates/pages/packages/ebuilds/index.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<div class="row"> - <div class="col-xs-12 col-md-9"> - <h2>{{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }}</h2> - <p>Commit log</p> - <p>{{ P.Gitlog|linebreaksbr }}</p> - <table class="table table-striped frontpage-table"> - {% for E in EM_tmp %} - <tr> - <td class="frontpage-table-package-atom"> - <a href="/ebuild/{{ E.EbuildId.EbuildId }}/" title="{{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}">{{ P.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}</a></td> - <td> - {% for K in EK_tmp %} - {% if K.EbuildId.EbuildId == E.EbuildId.EbuildId and K.KeywordId.Keyword != '*' %} - {% if K.Status == 'Stable' %}<span class="label label-success">{{ K.KeywordId.Keyword }}</span>{% endif %} - {% if K.Status == 'Unstable' %}<span class="label label-warning">{{ K.KeywordId.Keyword }}</span>{% endif %} - {% if K.Status == 'Negative' %}{{ K.KeywordId.Keyword }}{% endif %} - {% endif %} - {% endfor %} - </td> - </tr> - {% endfor %} - </table> - </div> - {% if PR %} - <a class="btn btn-warning btn-xs" href="/repoman/{{P.PackageId.PackageId }}/">Repoman</a> - {% endif %} -</div> -{% endblock %}
\ No newline at end of file diff --git a/python/templates/pages/packages/index.html b/python/templates/pages/packages/index.html deleted file mode 100644 index 7139c87..0000000 --- a/python/templates/pages/packages/index.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<div class="row"> -<h2>Categories</h2> - <div class="col-xs-8 col-md-4"> - {% for CM in CM_tmp %} - <table class="table table-striped frontpage-table"> - <tr> - <td class="frontpage-table-package-atom"> - <a href="/categories/{{ CM.CategoryId }}/" title="{{ CM.Category }}">{{CM.Category }}</a> - </td> - <td> - <p title="{{ CM.Descriptions }}">{{ CM.Descriptions }}</p> - <p title="{% for P in CM.Packages %}{{ CM.Category}}/{{ P }}{% endfor %}">Packages</p> - </td> - </tr> - </table> - {% if forloop.last %} - </div> - {% else %} - {% if forloop.counter|divisibleby:"2" %} - </div><div class="col-xs-8 col-md-4"> - {% endif %} - {% endif %} - {% endfor %} -</div> - -{% endblock %}
\ No newline at end of file diff --git a/python/templates/pages/projects/add/index.html b/python/templates/pages/projects/add/index.html deleted file mode 100644 index ec46b8d..0000000 --- a/python/templates/pages/projects/add/index.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<form action="{{ Project.uuid }}" method="post"> - {% csrf_token %} - {{ Form }} - <input type="submit" value="Submit"> -</form> -{% endblock %} diff --git a/python/templates/pages/projects/detail/index.html b/python/templates/pages/projects/detail/index.html deleted file mode 100644 index afee9d5..0000000 --- a/python/templates/pages/projects/detail/index.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<p>Hej</p> -{% endblock %} diff --git a/python/templates/pages/projects/index.html b/python/templates/pages/projects/index.html deleted file mode 100644 index 2edf849..0000000 --- a/python/templates/pages/projects/index.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<div class="panel panel-default"> - <div class="table-responsive"> - <table class="table table-striped"> - <table class="table table-striped frontpage-table"> - {% for project in Projects %} - <tr> - <td class="frontpage-table-project-atom"><a href="{% url 'projects:detail' project.uuid %}" title="{{ project.title }}">{{ project.title }}</a></td> - <td><p title="{{ project.description }}">{{ project.description }}</p> - <td class="text-right"> - </td></td> - </tr> - {% endfor %} -</table> - </table> - </div> -</div> -{% endblock %} diff --git a/python/templates/pages/projects/repos/index.html b/python/templates/pages/projects/repos/index.html deleted file mode 100644 index bc349da..0000000 --- a/python/templates/pages/projects/repos/index.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -<div class="panel panel-default"> - <div class="table-responsive"> - <table class="table table-striped"> - <table class="table table-striped frontpage-table"> - {% for project in Projects %} - <tr> - <td class="frontpage-table-project-atom"><a href="{% url 'projects:detail' project.uuid %}" title="{{ project.title }}">{{ project.title }}</a></td> - <td><p title="{{ project.description }}">{{ project.description }}</p> - <td class="text-right"> - </td></td> - </tr> - {% endfor %} -</table> - </table> -<table class="table table-striped"> - <table class="table table-striped frontpage-table"> - {% for project in Projects %} - <tr> - <td class="frontpage-table-project-atom"><a href="{% url 'projects:detail' project.uuid %}" title="{{ project.title }}">{{ project.title }}</a></td> - <td><p title="{{ project.description }}">{{ project.description }}</p> - <td class="text-right"> - </td></td> - </tr> - {% endfor %} -</table> - </table> - </div> -</div> -{% endblock %} diff --git a/python/templates/pages/www/index.html b/python/templates/pages/www/index.html deleted file mode 100644 index a8fdf61..0000000 --- a/python/templates/pages/www/index.html +++ /dev/null @@ -1,49 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -{% include "includes/container/start" %} -<div class="row"> - <div class="col-xs-12 col-sm-8 col-md-9"> - <p> - Welcome to Gentoo . - </p> - </div> - <div class="col-xs-12 col-sm-4 col-md-3 buttons"> - <a href="/get-started/about/" class="btn btn-default btn-block">Learn more</a> - <a href="/get-started/" class="btn btn-primary btn-block"><i class="fa fa-fw fa-rocket"></i> Get started now</a> - </div> -</div> -{% include "includes/container/end" %} -<section id="news"> -{% include "includes/frontpage/news" %} -</section> - -<div class="news-more"> - <a href="/news" class="btn btn-xs">All news items <span class="fa fa-fw fa-chevron-right"></span></a> -<hr> -</div> - -<div class="row"> - <div class="col-xs-12 col-md-6"> - <h2>New Packages <small>more at the <a href="/new_packages/">New Packages</a></small></h2> - {% include "includes/frontpage/new_packages" %} - </div> - <div class="col-xs-12 col-md-6"> - <h2>New Logs <small>more at the <a href="/new_logs/">New Logs</a></small></h2> - {% include "includes/frontpage/new_logs" %} - </div> -</div> - -<div class="row"> - <div class="col-xs-12 col-md-6"> - <h2>New Build Requests <small>more at the <a href="/new_build_req">New Build Requests</a></small></h2> - {% include "includes/frontpage/new_build_req" %} - </div> - <div class="col-xs-12 col-md-6"> - <h2>New Repoman or QA's <small>on the <a href="/new/repomanqa/">New Repoman or QA's</a></small></h2> - {% include "includes/frontpage/new_repoman_qa" %} - </div> -</div> - -<hr> - -{% endblock %} diff --git a/python/templates/registration/bugzillauser.html b/python/templates/registration/bugzillauser.html deleted file mode 100644 index d05d6ad..0000000 --- a/python/templates/registration/bugzillauser.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends 'layout/base.html' %} -{% block title %}Bugzilla accounts{% endblock %} -{% block content %} - <h2>Bugzilla accounts</h2> - <form method="post"> - {% csrf_token %} - {{ form }} - <button type="submit">Submit</button> - </form> -{% endblock %} diff --git a/python/templates/registration/logged_out.html b/python/templates/registration/logged_out.html deleted file mode 100644 index 94c6a0d..0000000 --- a/python/templates/registration/logged_out.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "layout/base.html" %} -{% block body_block %} -<h1>Logged Out</h1> - <p>You are now logged out.</p> -{% endblock %} diff --git a/python/templates/registration/login.html b/python/templates/registration/login.html deleted file mode 100644 index 9503420..0000000 --- a/python/templates/registration/login.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'layout/base.html' %} - -{% block title %}Login{% endblock %} - -{% block content %} - <h2>Login</h2> - <form method="post"> - {% csrf_token %} - {{ form.as_p }} - <button type="submit">Login</button> - </form> -{% endblock %} diff --git a/python/templates/registration/password_change_form.html b/python/templates/registration/password_change_form.html deleted file mode 100644 index 7761fe4..0000000 --- a/python/templates/registration/password_change_form.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends 'layout/base.html' %} - -{% block title %}Change you password{% endblock %} - -{% block content %} - <h1>Change you password</h1> - <p>Use the form below to change your password.</p> - <form action="." method="post"> - {{ form.as_p }} - <p><input type="submit" value="Change"></p> - {% csrf_token %} - </form> -{% endblock %} diff --git a/python/www/__init__.py b/python/www/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/www/__init__.py +++ /dev/null diff --git a/python/www/admin.py b/python/www/admin.py deleted file mode 100644 index 168b0b2..0000000 --- a/python/www/admin.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.contrib import admin - -from .models import SiteSettings, Menys, SubMenys - -admin.site.register(SiteSettings) -admin.site.register(Menys) -admin.site.register(SubMenys) diff --git a/python/www/apps.py b/python/www/apps.py deleted file mode 100644 index 872e206..0000000 --- a/python/www/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class WwwConfig(AppConfig): - name = 'www' diff --git a/python/www/migrations/0001_initial.py b/python/www/migrations/0001_initial.py deleted file mode 100644 index 14da8b2..0000000 --- a/python/www/migrations/0001_initial.py +++ /dev/null @@ -1,64 +0,0 @@ -# Generated by Django 2.2.2 on 2019-07-12 22:17 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Pages', - fields=[ - ('PageId', models.IntegerField(db_column='page_id', primary_key=True, serialize=False)), - ('nav_title', models.CharField(max_length=200)), - ('title', models.CharField(max_length=200)), - ('description', models.CharField(max_length=200)), - ('nav1', models.CharField(max_length=100)), - ('nav1_show', models.BooleanField(default=False)), - ('nav1_weight', models.IntegerField(default=0)), - ('url', models.CharField(max_length=200)), - ('SubMenu', models.BooleanField(db_column='sub_menu', default=False)), - ], - options={ - 'db_table': 'pages', - }, - ), - migrations.CreateModel( - name='SiteSettings', - fields=[ - ('SiteId', models.IntegerField(db_column='site_id', primary_key=True, serialize=False)), - ('site', models.CharField(max_length=20)), - ('title', models.CharField(max_length=50)), - ('email', models.CharField(max_length=50)), - ('description', models.CharField(max_length=100)), - ('url', models.CharField(max_length=50)), - ('contact', models.CharField(max_length=50)), - ], - options={ - 'db_table': 'site_settings', - }, - ), - migrations.CreateModel( - name='SubPages', - fields=[ - ('SubPageId', models.IntegerField(db_column='sub_page_id', primary_key=True, serialize=False)), - ('nav_title', models.CharField(max_length=200)), - ('title', models.CharField(max_length=200)), - ('description', models.CharField(max_length=200)), - ('nav2', models.CharField(max_length=100)), - ('nav2_show', models.BooleanField(default=False)), - ('nav2_weight', models.IntegerField(default=0)), - ('url', models.CharField(max_length=200)), - ('PageId', models.ForeignKey(db_column='page_id', on_delete=django.db.models.deletion.CASCADE, to='www.Pages')), - ], - options={ - 'db_table': 'sub_pages', - }, - ), - ] diff --git a/python/www/migrations/__init__.py b/python/www/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/python/www/migrations/__init__.py +++ /dev/null diff --git a/python/www/models.py b/python/www/models.py deleted file mode 100644 index 85dbc35..0000000 --- a/python/www/models.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 1998-2019 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.db import models - -class SiteSettings(models.Model): - id = models.IntegerField(primary_key=True) - site = models.CharField(max_length=20) - title = models.CharField(max_length=50) - email = models.CharField(max_length=50) - description = models.CharField(max_length=100) - url = models.CharField(max_length=50) - contact = models.CharField(max_length=50) - class Meta: - db_table = 'site_settings' - def __str__(self): - return '%s %s %s %s %s %s %s' % (self.id, self.site, self.title, self.email, self.description, self.url, self.contact) - -class Menys(models.Model): - id = models.IntegerField(primary_key=True) - title = models.CharField(max_length=200) - description = models.CharField(max_length=200) - name = models.CharField(max_length=100) - view = models.BooleanField(default=False) - sort = models.IntegerField(default=0) - url = models.CharField(max_length=200) - arg = models.CharField(max_length=50, blank=True) - access = models.BooleanField(default=False) - sub = models.BooleanField(default=False) - class Meta: - db_table = 'menys' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s' % (self.id, self.title, self.description, self.name, self.view, self.sort, self.url, self.arg, self.access, self.sub) - -class SubMenys(models.Model): - id = models.IntegerField(primary_key=True) - title = models.CharField(max_length=200) - description = models.CharField(max_length=200) - MenyId = models.ForeignKey(Menys, on_delete=models.CASCADE, db_column='meny_id') - name = models.CharField(max_length=100) - view = models.BooleanField(default=False) - sort = models.IntegerField(default=0) - url = models.CharField(max_length=200) - arg = models.CharField(max_length=50, blank=True) - access = models.BooleanField(default=False) - class Meta: - db_table = 'sub_menys' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s' % (self.id, self.title, self.description, self.MenyId, self.name, self.view, self.sort, self.url, self.arg, self.access) - -class Posts(models.Model): - id = models.IntegerField(primary_key=True) - title = models.CharField(max_length=200) - url = models.CharField(max_length=200) - text = models.TextField() - created_at = models.DateTimeField(auto_now_add=True) - class Meta: - db_table='posts' - def __str__(self): - return '%s %s %s %s %s' % (self.id, self.title, self.url, self.text, self.created_at) - -class Sponsors(models.Model): - id = models.IntegerField(primary_key=True) - name = models.CharField(max_length=200) - img = models.CharField(max_length=200) - link = models.CharField(max_length=200) - title = models.CharField(max_length=200) - alt = models.CharField(max_length=200) - weight = models.IntegerField(default=0) - active = models.BooleanField(default=False) - class Meta: - db_table = 'sponsors' - def __str__(self): - return '%s %s %s %s %s %s %s' % (self.id, self.name, self.img, self.link, self.alt, self.weight, self.active) diff --git a/python/www/router.py b/python/www/router.py deleted file mode 100644 index aab4cf9..0000000 --- a/python/www/router.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1998-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -class GosbsRouter(object): - def db_for_read(self, model, **hints): - "Point all operations on zobcs models to 'zobcs'" - if model._meta.app_label == 'www': - return 'default' - return 'gosbs' - - def db_for_write(self, model, **hints): - "Point all operations on zobcs models to 'zobcs'" - if model._meta.app_label == 'www': - return 'default' - return 'gosbs' - - def allow_relation(self, obj1, obj2, **hints): - "Allow any relation if a both models in zobcs app" - if obj1._meta.app_label == 'www' and obj2._meta.app_label == 'www': - return True - # Allow if neither is zobcs app - elif 'www' not in [obj1._meta.app_label, obj2._meta.app_label]: - return True - return False - - def allow_migrate(self, db, app_label, model_name=None, **hints): - if db == 'gosbs': - return app_label == 'gosbs' - elif app_label == 'gosbs': - return False - return True diff --git a/python/www/tests.py b/python/www/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/python/www/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/python/www/urls.py b/python/www/urls.py deleted file mode 100644 index 88a9cac..0000000 --- a/python/www/urls.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.urls import path - -from . import views - -urlpatterns = [ - path('', views.index, name='index'), -] diff --git a/python/www/utils.py b/python/www/utils.py deleted file mode 100644 index 6bc36f3..0000000 --- a/python/www/utils.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1998-2019 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.shortcuts import get_object_or_404 -from www.models import SiteSettings, Menys, SubMenys, Sponsors - -def default_siteinfo(request, menyrequest): - siteinfo = {} - siteinfo['site'] = get_object_or_404(SiteSettings) - activemeny = get_object_or_404(Menys, name = menyrequest) - menys = Menys.objects.all().order_by('sort') - #contact = get_object_or_404(SubPages, nav2 = 'contact') - for meny in menys: - if meny.title == 'Login' and request.user.is_authenticated: - meny.show = False - if meny.title == 'User' and request.user.is_authenticated: - meny.show = True - if meny.arg == '': - meny.arg = False - siteinfo['activemeny'] = activemeny - siteinfo['menys'] = menys - #siteinfo['contact'] = contact - siteinfo['sponsors'] = Sponsors.objects.all() - if activemeny.sub: - submenys = SubMenys.objects.filter(MenyId = activemeny.id).order_by('sort') - for submeny in submenys: - if submeny.arg == '': - submeny.arg = False - siteinfo['submenys'] = submenys - siteinfo['subactivemeny'] = False - else: - siteinfo['submenys'] = [] - siteinfo['subactivemeny'] = False - return siteinfo diff --git a/python/www/views.py b/python/www/views.py deleted file mode 100644 index 9a1ace4..0000000 --- a/python/www/views.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1998-2019 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.http import HttpResponse -from django.shortcuts import render -from django.conf import settings - -from .utils import default_siteinfo -from .models import Posts, Sponsors - -def index(request): - menyrequest = 'www' - siteinfo = default_siteinfo(request, menyrequest) - siteinfo['posts'] = Posts.objects.all()[:2] - siteinfo['class_include'] = 'hero-section emergehdr' - #siteinfo['EM'] = EbuildsMetadata.objects.filter(uuid__deleted = False).order_by('-uuid__created_at')[:10] - #siteinfo['BL'] = BuildLogs.objects.order_by('-created_at')[:10] - htmlrequest = 'pages/' + menyrequest + '/index.html' - return render(request, htmlrequest, siteinfo) diff --git a/sql/gosbs-www.sql b/sql/gosbs-www.sql deleted file mode 100644 index 4bc9b21..0000000 --- a/sql/gosbs-www.sql +++ /dev/null @@ -1,475 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.7.7 --- https://www.phpmyadmin.net/ --- --- Värd: localhost --- Tid vid skapande: 05 apr 2020 kl 16:56 --- Serverversion: 10.2.22-MariaDB --- PHP-version: 7.2.12 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET AUTOCOMMIT = 0; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- Databas: `gosbs-www` --- - --- -------------------------------------------------------- - --- --- Tabellstruktur `auth_group` --- - -CREATE TABLE `auth_group` ( - `id` int(11) NOT NULL, - `name` varchar(150) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `auth_group_permissions` --- - -CREATE TABLE `auth_group_permissions` ( - `id` int(11) NOT NULL, - `group_id` int(11) NOT NULL, - `permission_id` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `auth_permission` --- - -CREATE TABLE `auth_permission` ( - `id` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `content_type_id` int(11) NOT NULL, - `codename` varchar(100) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `auth_user` --- - -CREATE TABLE `auth_user` ( - `id` int(11) NOT NULL, - `password` varchar(128) NOT NULL, - `last_login` datetime(6) DEFAULT NULL, - `is_superuser` tinyint(1) NOT NULL, - `username` varchar(150) NOT NULL, - `first_name` varchar(30) NOT NULL, - `last_name` varchar(150) NOT NULL, - `email` varchar(254) NOT NULL, - `is_staff` tinyint(1) NOT NULL, - `is_active` tinyint(1) NOT NULL, - `date_joined` datetime(6) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `auth_user_groups` --- - -CREATE TABLE `auth_user_groups` ( - `id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - `group_id` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `auth_user_user_permissions` --- - -CREATE TABLE `auth_user_user_permissions` ( - `id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, - `permission_id` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `django_admin_log` --- - -CREATE TABLE `django_admin_log` ( - `id` int(11) NOT NULL, - `action_time` datetime(6) NOT NULL, - `object_id` longtext DEFAULT NULL, - `object_repr` varchar(200) NOT NULL, - `action_flag` smallint(5) UNSIGNED NOT NULL, - `change_message` longtext NOT NULL, - `content_type_id` int(11) DEFAULT NULL, - `user_id` int(11) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `django_content_type` --- - -CREATE TABLE `django_content_type` ( - `id` int(11) NOT NULL, - `app_label` varchar(100) NOT NULL, - `model` varchar(100) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `django_migrations` --- - -CREATE TABLE `django_migrations` ( - `id` int(11) NOT NULL, - `app` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `applied` datetime(6) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `django_session` --- - -CREATE TABLE `django_session` ( - `session_key` varchar(40) NOT NULL, - `session_data` longtext NOT NULL, - `expire_date` datetime(6) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `pages` --- - -CREATE TABLE `pages` ( - `id` int(11) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `name` varchar(100) NOT NULL, - `view` tinyint(1) NOT NULL, - `sort` int(11) NOT NULL, - `url` varchar(200) NOT NULL, - `arg` varchar(50) NOT NULL, - `access` tinyint(1) NOT NULL, - `sub` tinyint(1) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `posts` --- - -CREATE TABLE `posts` ( - `id` int(11) NOT NULL, - `title` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `text` text NOT NULL, - `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp() -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `site_settings` --- - -CREATE TABLE `site_settings` ( - `id` int(11) NOT NULL, - `site` varchar(20) NOT NULL, - `title` varchar(50) NOT NULL, - `email` varchar(50) NOT NULL, - `description` varchar(100) NOT NULL, - `url` varchar(50) NOT NULL, - `contact` varchar(50) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `sponsors` --- - -CREATE TABLE `sponsors` ( - `id` int(11) NOT NULL, - `name` varchar(200) NOT NULL, - `img` varchar(100) NOT NULL, - `link` varchar(100) NOT NULL, - `title` varchar(30) NOT NULL, - `alt` varchar(200) NOT NULL, - `weight` int(11) NOT NULL, - `active` tinyint(1) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Tabellstruktur `sub_pages` --- - -CREATE TABLE `sub_pages` ( - `id` int(11) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `name` varchar(100) NOT NULL, - `view` tinyint(1) NOT NULL, - `sort` int(11) NOT NULL, - `url` varchar(200) NOT NULL, - `arg` varchar(50) NOT NULL, - `page_id` int(11) NOT NULL, - `access` tinyint(1) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Index för dumpade tabeller --- - --- --- Index för tabell `auth_group` --- -ALTER TABLE `auth_group` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `name` (`name`); - --- --- Index för tabell `auth_group_permissions` --- -ALTER TABLE `auth_group_permissions` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`), - ADD KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`); - --- --- Index för tabell `auth_permission` --- -ALTER TABLE `auth_permission` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`); - --- --- Index för tabell `auth_user` --- -ALTER TABLE `auth_user` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `username` (`username`); - --- --- Index för tabell `auth_user_groups` --- -ALTER TABLE `auth_user_groups` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`), - ADD KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`); - --- --- Index för tabell `auth_user_user_permissions` --- -ALTER TABLE `auth_user_user_permissions` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`), - ADD KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`); - --- --- Index för tabell `django_admin_log` --- -ALTER TABLE `django_admin_log` - ADD PRIMARY KEY (`id`), - ADD KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`), - ADD KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`); - --- --- Index för tabell `django_content_type` --- -ALTER TABLE `django_content_type` - ADD PRIMARY KEY (`id`), - ADD UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`); - --- --- Index för tabell `django_migrations` --- -ALTER TABLE `django_migrations` - ADD PRIMARY KEY (`id`); - --- --- Index för tabell `django_session` --- -ALTER TABLE `django_session` - ADD PRIMARY KEY (`session_key`), - ADD KEY `django_session_expire_date_a5c62663` (`expire_date`); - --- --- Index för tabell `pages` --- -ALTER TABLE `pages` - ADD PRIMARY KEY (`id`); - --- --- Index för tabell `posts` --- -ALTER TABLE `posts` - ADD PRIMARY KEY (`id`); - --- --- Index för tabell `site_settings` --- -ALTER TABLE `site_settings` - ADD PRIMARY KEY (`id`); - --- --- Index för tabell `sponsors` --- -ALTER TABLE `sponsors` - ADD PRIMARY KEY (`id`); - --- --- Index för tabell `sub_pages` --- -ALTER TABLE `sub_pages` - ADD PRIMARY KEY (`id`), - ADD KEY `sub_pages_page_id_39ff3612_fk_pages_page_id` (`page_id`); - --- --- AUTO_INCREMENT för dumpade tabeller --- - --- --- AUTO_INCREMENT för tabell `auth_group` --- -ALTER TABLE `auth_group` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `auth_group_permissions` --- -ALTER TABLE `auth_group_permissions` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `auth_permission` --- -ALTER TABLE `auth_permission` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `auth_user` --- -ALTER TABLE `auth_user` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `auth_user_groups` --- -ALTER TABLE `auth_user_groups` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `auth_user_user_permissions` --- -ALTER TABLE `auth_user_user_permissions` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `django_admin_log` --- -ALTER TABLE `django_admin_log` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `django_content_type` --- -ALTER TABLE `django_content_type` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `django_migrations` --- -ALTER TABLE `django_migrations` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `posts` --- -ALTER TABLE `posts` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `sponsors` --- -ALTER TABLE `sponsors` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- AUTO_INCREMENT för tabell `sub_pages` --- -ALTER TABLE `sub_pages` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; - --- --- Restriktioner för dumpade tabeller --- - --- --- Restriktioner för tabell `auth_group_permissions` --- -ALTER TABLE `auth_group_permissions` - ADD CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), - ADD CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`); - --- --- Restriktioner för tabell `auth_permission` --- -ALTER TABLE `auth_permission` - ADD CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`); - --- --- Restriktioner för tabell `auth_user_groups` --- -ALTER TABLE `auth_user_groups` - ADD CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), - ADD CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); - --- --- Restriktioner för tabell `auth_user_user_permissions` --- -ALTER TABLE `auth_user_user_permissions` - ADD CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), - ADD CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); - --- --- Restriktioner för tabell `django_admin_log` --- -ALTER TABLE `django_admin_log` - ADD CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), - ADD CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); - --- --- Restriktioner för tabell `sub_pages` --- -ALTER TABLE `sub_pages` - ADD CONSTRAINT `sub_pages_page_id_39ff3612_fk_pages_page_id` FOREIGN KEY (`page_id`) REFERENCES `pages` (`id`); -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/static/foo.txt b/static/foo.txt deleted file mode 100644 index e69de29..0000000 --- a/static/foo.txt +++ /dev/null |