From 593e2eed315dbac85b6318a3cf4dd9fa390c8041 Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Sun, 15 Jan 2017 20:44:38 +0100 Subject: Update code to use gosbs backend Signed-off-by: Magnus Granberg --- .gitignore | 3 +- python/gentoo_main/__init__.py | 0 python/gentoo_main/settings.py.conf | 163 ------ python/gentoo_main/urls.py | 10 - python/gentoo_main/wsgi.py.conf | 29 - python/gentoo_www/__init__.py | 0 .../gentoo_www/__pycache__/models.cpython-33.pyc | Bin 11144 -> 0 bytes python/gentoo_www/__pycache__/urls.cpython-33.pyc | Bin 351 -> 0 bytes python/gentoo_www/__pycache__/views.cpython-33.pyc | Bin 6394 -> 0 bytes python/gentoo_www/models.py | 124 ---- python/gentoo_www/urls.py | 7 - python/gentoo_www/views.py | 205 ------- python/gosbs/__init__.py | 0 python/gosbs/settings.py.conf | 144 +++++ python/gosbs/urls.py | 9 + python/gosbs/wsgi.py | 16 + python/gosbs_auth/__init__.py | 0 python/gosbs_auth/admin.py | 3 + python/gosbs_auth/apps.py | 5 + python/gosbs_auth/migrations/__init__.py | 0 python/gosbs_auth/models.py | 3 + python/gosbs_auth/tests.py | 3 + python/gosbs_auth/urls.py | 11 + python/gosbs_auth/views.py | 3 + python/manage.py | 2 +- python/packages/__init__.py | 0 python/packages/admin.py | 3 + python/packages/apps.py | 5 + python/packages/migrations/__init__.py | 0 python/packages/models.py | 188 ++++++ python/packages/tests.py | 3 + python/packages/urls.py | 7 + python/packages/views.py | 3 + python/projects/__init__.py | 0 python/projects/admin.py | 3 + python/projects/apps.py | 5 + python/projects/forms.py | 7 + python/projects/migrations/__init__.py | 0 python/projects/models.py | 53 ++ python/projects/tests.py | 3 + python/projects/urls.py | 11 + python/projects/views.py | 86 +++ python/tbc_www/__init__.py | 0 python/tbc_www/forms.py | 33 -- python/tbc_www/models.py | 319 ---------- python/tbc_www/router.py | 30 - python/tbc_www/urls.py | 22 - python/tbc_www/utils/__init__.py | 0 python/tbc_www/utils/bugzillasubmit.py | 27 - python/tbc_www/views.py | 459 --------------- python/templates/includes/downloads/alpha.html | 17 - python/templates/includes/downloads/amd64.html | 6 - .../templates/includes/downloads/arch-default.html | 33 -- python/templates/includes/downloads/arch-main.html | 29 - python/templates/includes/downloads/arm.html | 17 - .../templates/includes/downloads/experimental.html | 12 - python/templates/includes/downloads/hppa.html | 18 - python/templates/includes/downloads/ia64.html | 25 - python/templates/includes/downloads/ppc.html | 12 - python/templates/includes/downloads/s390.html | 7 - python/templates/includes/downloads/sh.html | 7 - python/templates/includes/downloads/sparc.html | 11 - python/templates/includes/downloads/warnings.html | 11 - .../templates/includes/downloads/x86-default.html | 17 - python/templates/includes/downloads/x86.html | 7 - python/templates/includes/frontpage/new_build_req | 23 +- python/templates/includes/frontpage/new_logs | 42 +- python/templates/includes/frontpage/new_packages | 20 +- python/templates/includes/frontpage/new_qa | 10 - python/templates/includes/frontpage/new_repoman | 10 - python/templates/includes/frontpage/new_repoman_qa | 18 + python/templates/includes/frontpage/news | 13 +- .../templates/includes/frontpage/updated_packages | 77 --- python/templates/includes/hero-section/end | 3 - python/templates/includes/hero-section/start | 3 - python/templates/includes/layout/footer.html | 23 +- .../includes/layout/footer_db_update.html | 10 - .../templates/includes/layout/footer_sitemap.html | 12 + python/templates/includes/layout/head.html | 12 +- python/templates/includes/layout/header.html | 58 +- python/templates/includes/layout/sponsor.html | 9 + python/templates/includes/navigation/primary | 13 +- python/templates/includes/navigation/secondary | 11 +- python/templates/includes/navigation/tertiary | 12 - .../includes/partials/download-link-raw.html | 5 - .../templates/includes/partials/download-link.html | 4 - .../templates/includes/partials/irc-channel.html | 8 - .../templates/includes/partials/mailinglist.html | 21 - python/templates/includes/partials/sponsor.html | 14 - python/templates/layout/base.html | 9 +- python/templates/pages/build_req/index.html | 16 - python/templates/pages/categories/index.html | 61 -- .../templates/pages/categories/packages/index.html | 63 -- .../categories/packages/versions/ebuild/index.html | 75 --- .../pages/categories/packages/versions/index.html | 233 -------- python/templates/pages/home/index.html | 70 --- python/templates/pages/logs/all/build/index.html | 103 ---- python/templates/pages/logs/build/index.html | 114 ---- .../pages/logs/build/submitbug/index.html | 8 - python/templates/pages/logs/index.html | 42 -- .../templates/pages/packages/category/index.html | 33 ++ .../pages/packages/ebuilds/ebuild/index.html | 47 ++ python/templates/pages/packages/ebuilds/index.html | 30 + python/templates/pages/packages/index.html | 28 + python/templates/pages/projects/add/index.html | 8 + python/templates/pages/projects/detail/index.html | 4 + python/templates/pages/projects/index.html | 19 + python/templates/pages/projects/repos/index.html | 31 + python/templates/pages/www/index.html | 49 ++ .../registration/password_change_form.html | 13 + python/www/__init__.py | 0 python/www/admin.py | 7 + python/www/apps.py | 5 + python/www/migrations/0001_initial.py | 64 ++ python/www/migrations/__init__.py | 0 python/www/models.py | 74 +++ python/www/router.py | 31 + python/www/tests.py | 3 + python/www/urls.py | 7 + python/www/utils.py | 34 ++ python/www/views.py | 19 + sql/gentoo-www.sql | 244 -------- sql/gentoo-www_data.sql | 106 ---- sql/gentoo-www_full.sql | 651 --------------------- sql/gosbs-www.sql | 475 +++++++++++++++ 125 files changed, 1711 insertions(+), 3732 deletions(-) delete mode 100644 python/gentoo_main/__init__.py delete mode 100644 python/gentoo_main/settings.py.conf delete mode 100644 python/gentoo_main/urls.py delete mode 100644 python/gentoo_main/wsgi.py.conf delete mode 100644 python/gentoo_www/__init__.py delete mode 100644 python/gentoo_www/__pycache__/models.cpython-33.pyc delete mode 100644 python/gentoo_www/__pycache__/urls.cpython-33.pyc delete mode 100644 python/gentoo_www/__pycache__/views.cpython-33.pyc delete mode 100644 python/gentoo_www/models.py delete mode 100644 python/gentoo_www/urls.py delete mode 100644 python/gentoo_www/views.py create mode 100644 python/gosbs/__init__.py create mode 100644 python/gosbs/settings.py.conf create mode 100644 python/gosbs/urls.py create mode 100644 python/gosbs/wsgi.py create mode 100644 python/gosbs_auth/__init__.py create mode 100644 python/gosbs_auth/admin.py create mode 100644 python/gosbs_auth/apps.py create mode 100644 python/gosbs_auth/migrations/__init__.py create mode 100644 python/gosbs_auth/models.py create mode 100644 python/gosbs_auth/tests.py create mode 100644 python/gosbs_auth/urls.py create mode 100644 python/gosbs_auth/views.py mode change 100755 => 100644 python/manage.py create mode 100644 python/packages/__init__.py create mode 100644 python/packages/admin.py create mode 100644 python/packages/apps.py create mode 100644 python/packages/migrations/__init__.py create mode 100644 python/packages/models.py create mode 100644 python/packages/tests.py create mode 100644 python/packages/urls.py create mode 100644 python/packages/views.py create mode 100644 python/projects/__init__.py create mode 100644 python/projects/admin.py create mode 100644 python/projects/apps.py create mode 100644 python/projects/forms.py create mode 100644 python/projects/migrations/__init__.py create mode 100644 python/projects/models.py create mode 100644 python/projects/tests.py create mode 100644 python/projects/urls.py create mode 100644 python/projects/views.py delete mode 100644 python/tbc_www/__init__.py delete mode 100644 python/tbc_www/forms.py delete mode 100644 python/tbc_www/models.py delete mode 100644 python/tbc_www/router.py delete mode 100644 python/tbc_www/urls.py delete mode 100644 python/tbc_www/utils/__init__.py delete mode 100644 python/tbc_www/utils/bugzillasubmit.py delete mode 100644 python/tbc_www/views.py delete mode 100644 python/templates/includes/downloads/alpha.html delete mode 100644 python/templates/includes/downloads/amd64.html delete mode 100644 python/templates/includes/downloads/arch-default.html delete mode 100644 python/templates/includes/downloads/arch-main.html delete mode 100644 python/templates/includes/downloads/arm.html delete mode 100644 python/templates/includes/downloads/experimental.html delete mode 100644 python/templates/includes/downloads/hppa.html delete mode 100644 python/templates/includes/downloads/ia64.html delete mode 100644 python/templates/includes/downloads/ppc.html delete mode 100644 python/templates/includes/downloads/s390.html delete mode 100644 python/templates/includes/downloads/sh.html delete mode 100644 python/templates/includes/downloads/sparc.html delete mode 100644 python/templates/includes/downloads/warnings.html delete mode 100644 python/templates/includes/downloads/x86-default.html delete mode 100644 python/templates/includes/downloads/x86.html delete mode 100644 python/templates/includes/frontpage/new_qa delete mode 100644 python/templates/includes/frontpage/new_repoman create mode 100644 python/templates/includes/frontpage/new_repoman_qa delete mode 100644 python/templates/includes/frontpage/updated_packages delete mode 100644 python/templates/includes/hero-section/end delete mode 100644 python/templates/includes/hero-section/start delete mode 100644 python/templates/includes/layout/footer_db_update.html create mode 100644 python/templates/includes/layout/footer_sitemap.html create mode 100644 python/templates/includes/layout/sponsor.html delete mode 100644 python/templates/includes/navigation/tertiary delete mode 100644 python/templates/includes/partials/download-link-raw.html delete mode 100644 python/templates/includes/partials/download-link.html delete mode 100644 python/templates/includes/partials/irc-channel.html delete mode 100644 python/templates/includes/partials/mailinglist.html delete mode 100644 python/templates/includes/partials/sponsor.html delete mode 100644 python/templates/pages/build_req/index.html delete mode 100644 python/templates/pages/categories/index.html delete mode 100644 python/templates/pages/categories/packages/index.html delete mode 100644 python/templates/pages/categories/packages/versions/ebuild/index.html delete mode 100644 python/templates/pages/categories/packages/versions/index.html delete mode 100644 python/templates/pages/home/index.html delete mode 100644 python/templates/pages/logs/all/build/index.html delete mode 100644 python/templates/pages/logs/build/index.html delete mode 100644 python/templates/pages/logs/build/submitbug/index.html delete mode 100644 python/templates/pages/logs/index.html create mode 100644 python/templates/pages/packages/category/index.html create mode 100644 python/templates/pages/packages/ebuilds/ebuild/index.html create mode 100644 python/templates/pages/packages/ebuilds/index.html create mode 100644 python/templates/pages/packages/index.html create mode 100644 python/templates/pages/projects/add/index.html create mode 100644 python/templates/pages/projects/detail/index.html create mode 100644 python/templates/pages/projects/index.html create mode 100644 python/templates/pages/projects/repos/index.html create mode 100644 python/templates/pages/www/index.html create mode 100644 python/templates/registration/password_change_form.html create mode 100644 python/www/__init__.py create mode 100644 python/www/admin.py create mode 100644 python/www/apps.py create mode 100644 python/www/migrations/0001_initial.py create mode 100644 python/www/migrations/__init__.py create mode 100644 python/www/models.py create mode 100644 python/www/router.py create mode 100644 python/www/tests.py create mode 100644 python/www/urls.py create mode 100644 python/www/utils.py create mode 100644 python/www/views.py delete mode 100644 sql/gentoo-www.sql delete mode 100644 sql/gentoo-www_data.sql delete mode 100644 sql/gentoo-www_full.sql create mode 100644 sql/gosbs-www.sql diff --git a/.gitignore b/.gitignore index d778590..7be3859 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,4 @@ __pycache__ static/logs # Python compiled files *.pyc -python//gentoo_main/settings.py -python/gentoo_main/wsgi.py +python/gosbs/settings.py diff --git a/python/gentoo_main/__init__.py b/python/gentoo_main/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python/gentoo_main/settings.py.conf b/python/gentoo_main/settings.py.conf deleted file mode 100644 index 573d178..0000000 --- a/python/gentoo_main/settings.py.conf +++ /dev/null @@ -1,163 +0,0 @@ -import os -ROOT_PATH = os.path.dirname(__file__) - -# Django settings for tinderbox-cluster project. - -DEBUG = True -TEMPLATE_DEBUG = DEBUG - -ADMINS = ( - # ('Magnus Granberg', 'zorry@gentoo.org'), -) - -MANAGERS = ADMINS - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'gentoo-www', # Or path to database file if using sqlite3. - 'USER': 'tbc_www', # Not used with sqlite3. - 'PASSWORD': 'fooo', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. - }, - 'tbc': { - 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'tbc', # Or path to database file if using sqlite3. - 'USER': 'tbc', # Not used with sqlite3. - 'PASSWORD': 'fooooo.', # Not used with sqlite3. - 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '', # Set to empty string for default. Not used with sqlite3. - } -} -DATABASE_ROUTERS = ['tbc_www.router.TBCRouter'] -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# In a Windows environment this must be set to your system time zone. -TIME_ZONE = 'Europe/Stockholm' - -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = 'en-us' - -SITE_ID = 1 - -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. -USE_I18N = True - -# If you set this to False, Django will not format dates, numbers and -# calendars according to the current locale. -USE_L10N = True - -# If you set this to False, Django will not use timezone-aware datetimes. -USE_TZ = True - -# Absolute filesystem path to the directory that will hold user-uploaded files. -# Example: "/home/media/media.lawrence.com/media/" -MEDIA_ROOT = os.path.join(ROOT_PATH, '../media/') - -# URL that handles the media served from MEDIA_ROOT. Make sure to use a -# trailing slash. -# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" -MEDIA_URL = 'http://127.0.0.1/media/' - -# Absolute path to the directory static files should be collected to. -# Don't put anything in this directory yourself; store your static files -# in apps' "static/" subdirectories and in STATICFILES_DIRS. -# Example: "/home/media/media.lawrence.com/static/" -STATIC_ROOT = os.path.join(ROOT_PATH, '../../static/') - -# URL prefix for static files. -# Example: "http://media.lawrence.com/static/" -STATIC_URL = '/static/' - -# Additional locations of static files -STATICFILES_DIRS = ( - os.path.join(ROOT_PATH, '../zobcs/static/'), -) - -# List of finder classes that know how to find static files in -# various locations. -STATICFILES_FINDERS = ( - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - 'django.contrib.staticfiles.finders.DefaultStorageFinder', -) - -# Make this unique, and don't share it with anybody. -SECRET_KEY = '(7ssrixz5q_xi^*jscmo4nz2m567893d7#ojh-%@$*4*n0m=km' - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - 'django.template.loaders.eggs.Loader', -) - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', - # Uncomment the next line for simple clickjacking protection: - 'django.middleware.clickjacking.XFrameOptionsMiddleware', -) - -ROOT_URLCONF = 'tbc_www.urls' - -# Python dotted path to the WSGI application used by Django's runserver. -WSGI_APPLICATION = 'gentoo_main.wsgi.application' - -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. - os.path.join(ROOT_PATH, '../templates/'), -) - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.messages', - 'django.contrib.staticfiles', - # Uncomment the next line to enable the admin: - # 'django.contrib.admin', - # Uncomment the next line to enable admin documentation: - # 'django.contrib.admindocs', - 'tbc_www', - 'gentoo_www', -) - -# A sample logging configuration. The only tangible logging -# performed by this configuration is to send an email to -# the site admins on every HTTP 500 error when DEBUG=False. -# See http://docs.djangoproject.com/en/dev/topics/logging for -# more details on how to customize your logging configuration. -LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'filters': { - 'require_debug_false': { - '()': 'django.utils.log.RequireDebugFalse' - } - }, - 'handlers': { - 'mail_admins': { - 'level': 'ERROR', - 'filters': ['require_debug_false'], - 'class': 'django.utils.log.AdminEmailHandler' - } - }, - 'loggers': { - 'django.request': { - 'handlers': ['mail_admins'], - 'level': 'ERROR', - 'propagate': True, - }, - } -} diff --git a/python/gentoo_main/urls.py b/python/gentoo_main/urls.py deleted file mode 100644 index ff710c4..0000000 --- a/python/gentoo_main/urls.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 1998-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.conf.urls import url -from . import views - -urlpatterns = [ - url(r'^home/$', views.home), - url(r'^packages/$', views.packages), -] diff --git a/python/gentoo_main/wsgi.py.conf b/python/gentoo_main/wsgi.py.conf deleted file mode 100644 index f3b7191..0000000 --- a/python/gentoo_main/wsgi.py.conf +++ /dev/null @@ -1,29 +0,0 @@ -""" -WSGI config for tinderbox project. - -This module contains the WSGI application used by Django's development server -and any production WSGI deployments. It should expose a module-level variable -named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover -this application via the ``WSGI_APPLICATION`` setting. - -Usually you will have the standard Django WSGI application here, but it also -might make sense to replace the whole Django WSGI application with a custom one -that later delegates to the Django one. For example, you could introduce WSGI -middleware here, or combine a Django application with an application of another -framework. - -""" -import os -import sys -sys.path.append('/home/zorry/zobsc/frontend/python') -os.environ['DJANGO_SETTINGS_MODULE'] = 'gentoo_main.settings' - -# This application object is used by any WSGI server configured to use this -# file. This includes Django's development server, if the WSGI_APPLICATION -# setting points here. -from django.core.wsgi import get_wsgi_application -application = get_wsgi_application() - -# Apply WSGI middleware here. -# from helloworld.wsgi import HelloWorldApplication -# application = HelloWorldApplication(application) diff --git a/python/gentoo_www/__init__.py b/python/gentoo_www/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python/gentoo_www/__pycache__/models.cpython-33.pyc b/python/gentoo_www/__pycache__/models.cpython-33.pyc deleted file mode 100644 index 382fe69..0000000 Binary files a/python/gentoo_www/__pycache__/models.cpython-33.pyc and /dev/null differ diff --git a/python/gentoo_www/__pycache__/urls.cpython-33.pyc b/python/gentoo_www/__pycache__/urls.cpython-33.pyc deleted file mode 100644 index 1ca5240..0000000 Binary files a/python/gentoo_www/__pycache__/urls.cpython-33.pyc and /dev/null differ diff --git a/python/gentoo_www/__pycache__/views.cpython-33.pyc b/python/gentoo_www/__pycache__/views.cpython-33.pyc deleted file mode 100644 index 9d9ac96..0000000 Binary files a/python/gentoo_www/__pycache__/views.cpython-33.pyc and /dev/null differ diff --git a/python/gentoo_www/models.py b/python/gentoo_www/models.py deleted file mode 100644 index 2bc345e..0000000 --- a/python/gentoo_www/models.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright 1998-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.db import models - -class SiteSettings(models.Model): - SiteId = models.IntegerField(primary_key=True, db_column='site_id') - 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) - cdnurl = models.CharField(max_length=20) - layout_path = models.CharField(max_length=100) - download_url = models.CharField(max_length=100) - class Meta: - db_table = 'site_settings' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s' % (self.SiteId, self.site, self.title, self.email, self.description, self.url, self.contact, self.cdnurl, self.layout_path, self.download_url) - -class Layout(models.Model): - LayoutId = models.IntegerField(primary_key=True, db_column='layout_id') - layout = models.CharField(max_length=20) - layout_file = models.CharField(max_length=20) - class Meta: - db_table = 'layout' - def __str__(self): - return '%s %s %s' % (self.LayoutId, self.layout, self.layout_file) - -class Pages(models.Model): - PageId = models.IntegerField(primary_key=True, db_column='page_id') - 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) - meta = models.CharField(max_length=200) - url = models.CharField(max_length=200) - inlinejs = models.CharField(max_length=200) - body_class = models.CharField(max_length=200) - LayoutId = models.ForeignKey(Layout, db_column='layout_id') - SubMenu = models.BooleanField(default=False, db_column='sub_menu') - class Meta: - db_table = 'pages' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s %s %s %s' % (self.PageId, self.nav_title, self.title, self.description, self.nav1, self.nav1_show, self.nav1_weight, self.meta, self.url, self.inlinejs, self.body_class, self.LayoutId, self.SubMenu) - -class SubPages(models.Model): - SubPageId = models.IntegerField(primary_key=True, db_column='sub_page_id') - nav_title = models.CharField(max_length=200) - title = models.CharField(max_length=200) - description = models.CharField(max_length=200) - PageId = models.ForeignKey(Pages, db_column='page_id') - nav2 = models.CharField(max_length=100) - nav2_show = models.BooleanField(default=False) - nav2_weight = models.IntegerField(default=0) - meta = models.CharField(max_length=200) - url = models.CharField(max_length=200) - inlinejs = models.CharField(max_length=200) - body_class = models.CharField(max_length=200) - LayoutId = models.ForeignKey(Layout, db_column='layout_id') - SubMenu = models.BooleanField(default=False, db_column='sub_menu') - class Meta: - db_table = 'sub_pages' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s %s %s %s %s' % (self.SubPageId, self.nav_title, self.title, self.description, self.PageId, self.nav2, self.nav2_show, self.nav2_weight, self.meta, self.url, self.inlinejs, self.body_class, self.LayoutId, self.SubMenu) - -class SubSubPages(models.Model): - SubSubPageId = models.IntegerField(primary_key=True, db_column='subsub_page_id') - nav_title = models.CharField(max_length=200) - title = models.CharField(max_length=200) - description = models.CharField(max_length=200) - SubPageId = models.ForeignKey(SubPages, db_column='sub_page_id') - nav3 = models.CharField(max_length=100) - nav3_show = models.BooleanField(default=False) - nav3_weight = models.IntegerField(default=0) - meta = models.CharField(max_length=200) - url = models.CharField(max_length=200) - inlinejs = models.CharField(max_length=200) - body_class = models.CharField(max_length=200) - LayoutId = models.ForeignKey(Layout, db_column='layout_id') - class Meta: - db_table = 'subsub_pages' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s %s %s %s' % (self.SubSubPageId, self.nav_title, self.title, self.description, self.SubPageId, self.nav3, self.nav3_show, self.nav3_weight, self.meta, self.url, self.inlinejs, self.body_class, self.LayoutId) - -class Sponsors(models.Model): - SponsorsId = models.IntegerField(primary_key=True, db_column='sponsors_id') - Name = models.CharField(max_length=200, db_column='name') - AdsName = models.CharField(max_length=200, db_column='ads_name') - Img = models.CharField(max_length=200, db_column='img') - AdsImg = models.CharField(max_length=200, db_column='ads_img') - Link = models.CharField(max_length=200, db_column='link') - AdsLink = models.CharField(max_length=200, db_column='ads_link') - Blurb = models.TextField(db_column='blurb') - AdsAltName = models.CharField(max_length=200, db_column='ads_alt_name') - Weight = models.IntegerField(default=0, db_column='weight') - AdsActive = models.BooleanField(default=False, db_column='ads_active') - Active = models.BooleanField(default=False, db_column='active') - class Meta: - db_table = 'sponsors' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s %s %s' % (self.SponsorsId, self.Name, self.AdsName, self.Img, self.AdsImg, self.Link, self.AdsLink, self.Blurb, self.AdsAltName, self.Weight, self.AdsActive, self.Active) - -class Posts(models.Model): - PostId = models.IntegerField(primary_key=True, db_column='post_id') - title = models.CharField(max_length=200, db_column='title') - url = models.CharField(max_length=200, db_column='url') - text = models.TextField(db_column='text') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table='posts' - def __str__(self): - return '%s %s %s %s %s' % (self.PostId, self.title, self.url, self.text, self.TimeStamp) - -class Bugzilla(models.Model): - Username = models.CharField(max_length=150,db_column='username') - Bugzillaname = models.CharField(max_length=150, db_column='bugzillaname') - class Meta: - db_table='bugzillauser' - def __str__(self): - return '%s %s' % (self.Username, self.Bugzillauser) diff --git a/python/gentoo_www/urls.py b/python/gentoo_www/urls.py deleted file mode 100644 index 5cd3d6a..0000000 --- a/python/gentoo_www/urls.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.conf.urls import url - -from . import views - -urlpatterns = [ - url(r'^(?P\d+)/$', 'views.target'), -] diff --git a/python/gentoo_www/views.py b/python/gentoo_www/views.py deleted file mode 100644 index 9984309..0000000 --- a/python/gentoo_www/views.py +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 1998-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.shortcuts import render, get_object_or_404, HttpResponseRedirect -from django.conf import settings - -from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts - -import feedparser -import urllib3 -import re - -# drv_libxml2 have a error with feedparser we work around it for now -feedparser.PREFERRED_XML_PARSERS.remove('drv_libxml2') - -def default_TmpDict(pagerequest): - site = get_object_or_404(SiteSettings) - page = get_object_or_404(Pages, nav1 = pagerequest) - pages = Pages.objects.all() - if page.SubMenu: - subpages = SubPages.objects.filter(PageId = page.PageId) - else: - subpages = False - contact = get_object_or_404(SubPages, nav2 = 'contact') - TmpDict = {'site' : site} - TmpDict['page'] = page - TmpDict['pages'] = pages - TmpDict['subpages'] = subpages - TmpDict['contact'] = contact - TmpDict['smappages'] = SubPages.objects.all() - return TmpDict - -def home(request): - pagerequest = 'home' - TmpDict = default_TmpDict(pagerequest) - - showposts = 5 - posts = Posts.objects.all() - sponsors = Sponsors.objects.all() - pp = feedparser.parse('https://planet.gentoo.org/rss20.xml') - planetposts = [] - i = 0 - for ppost in pp['entries']: - if i is showposts: - break - attr = {} - attr['author'] = ppost['author'] - attr['url'] = ppost['link'] - attr['title'] = ppost['title'] - attr['published'] = ppost['published'] - planetposts.append(attr) - i = i + 1 - gp = feedparser.parse('https://security.gentoo.org/glsa/feed.rss') - glsaposts = [] - i = 0 - for gpost in gp['entries']: - if i is showposts: - break - split_title = re.split(': ', gpost['title']) - attr = {} - attr['id'] = split_title[0] - attr['url'] = gpost['link'] - attr['title'] = split_title[1] + ': ' + split_title[2] - attr['severity'] = 'normal' - glsaposts.append(attr) - i = i + 1 - - pkp = feedparser.parse('https://packages.gentoo.org/feed/') - packageposts = [] - i = 0 - for ppost in pkp['entries']: - if i is showposts: - break - split_title = re.split(': ', ppost['title']) - attr = {} - attr['url'] = ppost['links'][0]['href'] - attr['atom'] = re.sub('', '', re.sub('', '', split_title[0])) - attr['atom_p'] = attr['atom'] - attr['description'] = re.sub('', '', re.sub('', '', split_title[1])) - packageposts.append(attr) - i = i + 1 - - wp = feedparser.parse('https://wiki.gentoo.org/index.php?title=Special:NewPages&feed=rss&hidebots=1&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=') - wikiposts = [] - i = 0 - for wpost in wp['entries']: - if i is showposts: - break - attr = {} - attr['author'] = wpost['author'] - attr['url'] = wpost['link'] - attr['title'] = wpost['title'] - wikiposts.append(attr) - i = i + 1 - TmpDict['posts'] = posts - TmpDict['sponsors'] = sponsors - TmpDict['planetposts'] = planetposts - TmpDict['glsaposts'] = glsaposts - TmpDict['packageposts'] = packageposts - TmpDict['wikiposts'] = wikiposts - return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) - -def downloads(request): - pagerequest = 'downloads' - http = urllib3.PoolManager() - archlist = [] - #FIXME get arch list from db - archlist.append('amd64') - archlist.append('x86') - #archlist.append('ia64') - downloads_dict = {} - for arch in archlist: - # Stage3 - r = http.request('GET', 'http://distfiles.gentoo.org/releases/' + arch + '/autobuilds/latest-stage3.txt') - rlines = re.split('\n', r.data.decode('utf-8')) - attr2 = {} - i = 0 - stage3list = [] - for line in rlines: - if line == '': - break - if i >= 2: - attr = {} - attr['tag'] = '' - attr['defaultstage'] = False - attr['title'] = 'Stage 3' - split1 = re.split(' ', line) - attr['size'] = split1[1] - attr['link'] = split1[0] - split2 = re.split('/', split1[0], maxsplit=1) - attr['date'] = split2[0] - if '/' in split2[1]: - split3 = re.split('/', split2[1]) - stage3id = re.split('-' + attr['date'] + '.tar.bz2', re.split('stage3-', split3[1])[1])[0] - else: - stage3id = re.split('-' + attr['date'] + '.tar.bz2', re.split('stage3-', split2[1])[1])[0] - if re.search('nomultilib', stage3id): - attr['tag'] = 'no multilib' - elif re.search('uclibc', stage3id): - attr['tag'] = 'uclibc' - elif re.search('x32', stage3id): - attr['tag'] = 'X32' - else: - if arch == 'x86': - if re.search('i686', stage3id): - attr['defaultstage'] = True - attr['tag'] = 'i686' +'|' + attr['tag'] - if re.search('i486', stage3id): - attr['tag'] = 'i486' +'|' + attr['tag'] - else: - attr['tag'] = False - else: - attr['tag'] = False - attr['defaultstage'] = True - if re.search('hardened', stage3id): - attr['title'] = 'Hardened ' + attr['title'] - attr['defaultstage'] = False - attr['id'] = stage3id - stage3list.append(attr) - i = i + 1 - attr2['stage3s'] = stage3list - # cd's - r = http.request('GET', 'http://distfiles.gentoo.org/releases/' + arch + '/autobuilds/latest-iso.txt') - rlines = re.split('\n', r.data.decode('utf-8')) - isolist = [] - i = 0 - for line in rlines: - if line == '': - break - if i >= 2: - attr = {} - split1 = re.split(' ', line) - attr['size'] = split1[1] - attr['link'] = split1[0] - split2 = re.split('/', split1[0], maxsplit=1) - attr['date'] = split2[0] - if re.search('/', split2[1]): - split3 = re.split('/', split2[1]) - if re.search('/', split2[1]): - split3 = re.split('/', split2[1]) - cdid = re.split('-' + attr['date'] + '.iso', split3[1])[0] - else: - cdid = re.split('-' + attr['date'] + '.iso', split2[1])[0] - if re.search('minimal', cdid): - attr['id'] = 'minimal' - attr['title'] = 'Minimal Installation CD' - elif re.search('admincd', cdid): - attr['id'] = 'admincd' - attr['title'] = 'Admin CD' - else: - attr['id'] = '' - attr['title'] = '' - isolist.append(attr) - i = i +1 - attr2['isos'] = isolist - attr2['arch'] = arch - if arch == 'amd64': - attr2['aka'] = 'x86_64' - else: - attr2['aka'] = False - downloads_dict[arch] = attr2 - TmpDict = default_TmpDict(pagerequest) - print(downloads_dict) - TmpDict['downloadsinfo'] = downloads_dict - return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) diff --git a/python/gosbs/__init__.py b/python/gosbs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/gosbs/settings.py.conf b/python/gosbs/settings.py.conf new file mode 100644 index 0000000..a2e4330 --- /dev/null +++ b/python/gosbs/settings.py.conf @@ -0,0 +1,144 @@ +""" +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 new file mode 100644 index 0000000..f87286f --- /dev/null +++ b/python/gosbs/urls.py @@ -0,0 +1,9 @@ +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 new file mode 100644 index 0000000..4d2fab7 --- /dev/null +++ b/python/gosbs/wsgi.py @@ -0,0 +1,16 @@ +""" +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 new file mode 100644 index 0000000..e69de29 diff --git a/python/gosbs_auth/admin.py b/python/gosbs_auth/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/python/gosbs_auth/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/python/gosbs_auth/apps.py b/python/gosbs_auth/apps.py new file mode 100644 index 0000000..d6b5700 --- /dev/null +++ b/python/gosbs_auth/apps.py @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..e69de29 diff --git a/python/gosbs_auth/models.py b/python/gosbs_auth/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/python/gosbs_auth/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/python/gosbs_auth/tests.py b/python/gosbs_auth/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/python/gosbs_auth/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/python/gosbs_auth/urls.py b/python/gosbs_auth/urls.py new file mode 100644 index 0000000..090f9bc --- /dev/null +++ b/python/gosbs_auth/urls.py @@ -0,0 +1,11 @@ +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 new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/python/gosbs_auth/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/python/manage.py b/python/manage.py old mode 100755 new mode 100644 index eba76f2..211c4ab --- a/python/manage.py +++ b/python/manage.py @@ -6,6 +6,6 @@ import os import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gentoo_main.settings") + 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 new file mode 100644 index 0000000..e69de29 diff --git a/python/packages/admin.py b/python/packages/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/python/packages/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/python/packages/apps.py b/python/packages/apps.py new file mode 100644 index 0000000..8bc7b4d --- /dev/null +++ b/python/packages/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class PackagesConfig(AppConfig): + name = 'packages' diff --git a/python/packages/migrations/__init__.py b/python/packages/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/packages/models.py b/python/packages/models.py new file mode 100644 index 0000000..943ffe5 --- /dev/null +++ b/python/packages/models.py @@ -0,0 +1,188 @@ +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 new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/python/packages/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/python/packages/urls.py b/python/packages/urls.py new file mode 100644 index 0000000..88a9cac --- /dev/null +++ b/python/packages/urls.py @@ -0,0 +1,7 @@ +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 new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/python/packages/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/python/projects/__init__.py b/python/projects/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/projects/admin.py b/python/projects/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/python/projects/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/python/projects/apps.py b/python/projects/apps.py new file mode 100644 index 0000000..3ef44de --- /dev/null +++ b/python/projects/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ProjectsConfig(AppConfig): + name = 'projects' diff --git a/python/projects/forms.py b/python/projects/forms.py new file mode 100644 index 0000000..7c96ffe --- /dev/null +++ b/python/projects/forms.py @@ -0,0 +1,7 @@ +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 new file mode 100644 index 0000000..e69de29 diff --git a/python/projects/models.py b/python/projects/models.py new file mode 100644 index 0000000..5d58109 --- /dev/null +++ b/python/projects/models.py @@ -0,0 +1,53 @@ +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 new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/python/projects/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/python/projects/urls.py b/python/projects/urls.py new file mode 100644 index 0000000..a6abd09 --- /dev/null +++ b/python/projects/urls.py @@ -0,0 +1,11 @@ +from django.urls import path + +from . import views + +app_name = 'projects' +urlpatterns = [ + path('', views.index, name='index'), + path('add/', views.add, name='add'), + path('/detail/', views.detail, name='detail'), + path('/repos/', views.repos, name='repos'), +] diff --git a/python/projects/views.py b/python/projects/views.py new file mode 100644 index 0000000..522da80 --- /dev/null +++ b/python/projects/views.py @@ -0,0 +1,86 @@ +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/tbc_www/__init__.py b/python/tbc_www/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python/tbc_www/forms.py b/python/tbc_www/forms.py deleted file mode 100644 index 0a91b3b..0000000 --- a/python/tbc_www/forms.py +++ /dev/null @@ -1,33 +0,0 @@ -from django import forms - -class NameForm(forms.Form): - packages_search = forms.CharField(label='Find Packages', max_length=100) - -class BugForm(forms.Form): - ChoicesComponent = (('Application', 'Application'), - ('baselayout', 'baselayout'), - ('Core system', 'Core system'), - ('Eclasses and Profiles', 'Eclasses and Profiles'), - ('Games', 'Games'), - ('GCC Porting', 'GCC Porting'), - ('GNOME', 'GNOME'), - ('Hardened', 'Hardened'), - ('Java', 'Java'), - ('KDE', 'KDE'), - ('SELinux', 'SELinux'), - ('Server', 'Server'), - ('Unspecified', 'Unspecified')) - - Product = forms.CharField(max_length=100, label='Product') - Component = forms.ChoiceField(widget=forms.Select, choices=ChoicesComponent, label='Component') - Version = forms.CharField(label='Version') - Summary = forms.CharField(label='Summary') - Description = forms.CharField(widget=forms.Textarea, label='Description') - EmergeInfo = forms.CharField(widget=forms.Textarea, label='emerge --info') - AssigendTo = forms.EmailField(label='Assigned To') - def __unicode__(self): - return u'Product : %s, Component : %s, Version : %s, Summary : %s, Description : %s, EmergeInfo : %s, AssigendTo : %s' % (self.Product, self.Component, self.Version, self.Summary, self.Description, self.EmergeInfo, self.AssigendTo) - -class BugzillaUser(forms.Form): - BugzillaName = forms.CharField(label='Bugzilla Name', max_length=100) - BugzillaPassword = forms.CharField(label='Bugzilla Password', max_length=100) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py deleted file mode 100644 index b54c772..0000000 --- a/python/tbc_www/models.py +++ /dev/null @@ -1,319 +0,0 @@ -# Copyright 1998-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.db import models - -class Categories(models.Model): - CategoryId = models.IntegerField(primary_key=True, db_column='category_id') - Category = models.CharField(max_length=150, db_column='category') - Active = models.BooleanField(db_column='active') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'categories' - def __str__(self): - return '%s %s %s %s' % (self.CategoryId, self.Category, self.Active, self.TimeStamp) - -class CategoriesMetadata(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - CategoryId = models.ForeignKey(Categories, db_column='category_id') - Checksum = models.CharField(max_length=100, db_column='checksum') - Descriptions = models.TextField(db_column='descriptions') - class Meta: - db_table = 'categories_metadata' - def __str__(self): - return '%s %s %s %s' % (self.Id, self.CategoryId, self.Checksum, self.Descriptions) - -class Repos(models.Model): - RepoId = models.IntegerField(primary_key=True, db_column='repo_id') - Repo = models.CharField(max_length=100, db_column='repo') - class Meta: - db_table = 'repos' - def __str__(self): - return '%s %s' % (self.RepoId, self.Repo) - -class Packages(models.Model): - PackageId = models.IntegerField(primary_key=True, db_column='package_id') - CategoryId = models.ForeignKey(Categories, db_column='category_id') - Package = models.CharField(max_length=150, db_column='package') - RepoId = models.ForeignKey(Repos, db_column='repo_id') - Active = models.BooleanField(db_column='active') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'packages' - def __str__(self): - return '%s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Active, self.TimeStamp) - -class PackagesMetadata(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - PackageId = models.ForeignKey(Packages, db_column='package_id') - Gitlog = models.TextField(db_column='gitlog') - Descriptions = models.TextField(db_column='descriptions') - New = models.BooleanField(db_column='new') - class Meta: - db_table = 'packages_metadata' - def __str__(self): - return '%s %s %s %s %s' % (self.Id, self.PackageId, self.Gitlog, self.Descriptions, self.New) - -class Ebuilds(models.Model): - EbuildId = models.IntegerField(primary_key=True, db_column='ebuild_id') - PackageId = models.ForeignKey(Packages, db_column='package_id') - Version = models.CharField(max_length=150, db_column='version') - Checksum = models.CharField(max_length=100, db_column='checksum') - Active = models.BooleanField(db_column='active') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'ebuilds' - def __str__(self): - return '%s %s %s %s %s %s' % (self.EbuildId, self.PackageId, self.Version, self.Checksum, self.Active, self.TimeStamp) - -class EbuildsMetadata(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') - Commit = models.CharField(max_length=30, db_column='git_commit') - CommitMsg = models.CharField(max_length=100, db_column='git_commit_msg') - New = models.BooleanField(db_column='new') - Updated = models.BooleanField(db_column='updated') - Descriptions = models.CharField(max_length=200, db_column='descriptions') - Slot = models.CharField(max_length=10, db_column='slot') - Homepage = models.CharField(max_length=200, db_column='homepage') - License = models.CharField(max_length=200, db_column='license') - class Meta: - db_table = 'ebuilds_metadata' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s %s' % (self.Id, self.EbuildId, self.Commit, self.CommitMsg, self.New, self.Updated, self.Descriptions, self.Slot, self.Homepage, self.License) - -class BuildLogs(models.Model): - BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id') - EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') - Fail = models.BooleanField(db_column='fail') - SummeryText = models.TextField(db_column='summery_text') - LogHash = models.CharField(max_length=100, db_column='log_hash') - BugId = models.IntegerField( db_column='bug_id') - New = models.BooleanField(db_column='new') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'build_logs' - def __str__(self): - return '%s %s %s %s %s %s %s %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.SummeryText, self.LogHash, self.BugId, self.New, self.TimeStamp) - -class BuildLogsRepoman(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') - SummeryText = models.TextField(db_column='summery_text') - class Meta: - db_table = 'build_logs_repoman' - def __str__(self): - return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) - -class BuildLogsQa(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') - SummeryText = models.TextField(db_column='summery_text') - class Meta: - db_table = 'build_logs_qa' - def __str__(self): - return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) - -class PackagesRepoman(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - PackageId = models.ForeignKey(Packages, db_column='package_id') - RepomanText = models.TextField(db_column='repoman_text') - RepomanHash = models.CharField(max_length=100, db_column='repoman_hash') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'packages_repoman' - def __str__(self): - return '%s %s %s %s %s' % (self.Id, self.PackageId, self.RepomanText, self.RepomanHash, self.TimeStamp) - -class ErrorsInfo(models.Model): - ErrorId = models.IntegerField(primary_key=True, db_column='error_id') - ErrorName = models.CharField(max_length=20, db_column='error_name') - ErrorSearch = models.CharField(max_length=30, db_column='error_search') - class Meta: - db_table = 'errors_info' - def __str__(self): - return '%s %s %s' % (self.ErrorId, self.ErrorName, self.ErrorSearch) - -class BuildLogsErrors(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') - ErrorId = models.ForeignKey(ErrorsInfo, db_column='error_id') - class Meta: - db_table = 'build_logs_errors' - def __str__(self): - return '%s %s %s' % (self.Id, self.BuildLogId, self.ErrorId) - -class EmergeInfo(models.Model): - EInfoId = models.IntegerField(primary_key=True, db_column='einfo_id') - EmergeInfoText = models.TextField(db_column='emerge_info_text') - class Meta: - db_table = 'emerge_info' - def __str__(self): - return '%s %s %s' % (self.EInfoId, self.Checksum, self.EmergeInfoText) - -class Setups(models.Model): - SetupId = models.AutoField(primary_key=True, db_column='setup_id') - Setup = models.CharField(max_length=100, db_column='setup') - Profile = models.CharField(max_length=150, db_column='profile') - class Meta: - db_table = 'setups' - def __str__(self): - return '%s %s %s' % (self.SetupId, self.Setup, self.Profile) - -class Configs(models.Model): - ConfigId = models.AutoField(primary_key=True, db_column='config_id') - HostName = models.CharField(max_length=150, db_column='hostname') - SetupId = models.ForeignKey(Setups, db_column='setup_id') - DefaultConfig = models.BooleanField(db_column='default_config') - class Meta: - db_table = 'configs' - def __str__(self): - return '%s %s %s %s' % (self.ConfigId, self.HostName, self.SetupId, self.DefaultConfig) - -class BuildLogsConfig(models.Model): - LogId = models.IntegerField(primary_key=True, db_column='log_id') - BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') - ConfigId = models.ForeignKey(Configs, db_column='config_id') - EInfoId = models.ForeignKey(EmergeInfo, db_column='einfo_id') - LogName = models.CharField(max_length=450, db_column='logname') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'build_logs_config' - def __str__(self): - return '%s %s %s %s %s %s' % (self.LogId, self.BuildLogId, self.ConfigId, self.EInfoId, self.LogName, self.TimeStamp) - -class EmergeOptions(models.Model): - EmergeOptionId = models.IntegerField(primary_key=True, db_column='eoption_id') - EOption = models.CharField(max_length=45, db_column='eoption') - class Meta: - db_table = 'emerge_options' - def __str__(self): - return '%s %s' % (self.EmergeOptionId, self.EOption) - -class BuildLogsEmergeOptions(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') - EmergeOptionId = models.ForeignKey(EmergeOptions, db_column='eoption_id') - class Meta: - db_table = 'build_logs_emerge_options' - def __str__(self): - return '%s %s %s' % (self.Id, self.BuildLogId, self.EmergeOptionId) - -class Uses(models.Model): - UseId = models.IntegerField(primary_key=True, db_column='use_id') - Flag = models.CharField(max_length=150, db_column='flag') - class Meta: - db_table = 'uses' - def __str__(self): - return '%s %s' % (self.UseId, self.Flag) - -class BuildLogsUse(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') - UseId = models.ForeignKey(Uses, db_column='use_id') - Status = models.BooleanField(max_length=15, db_column='status') - class Meta: - db_table = 'build_logs_use' - def __str__(self): - return '%s %s %s' % (self.BuildLogId, self.UseId, self.Status) - -class BuildJobs(models.Model): - BuildJobId = models.AutoField(primary_key=True, db_column='build_job_id') - EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') - SetupId = models.ForeignKey(Setups, db_column='setup_id') - ConfigId = models.ForeignKey(Configs, db_column='config_id') - Status = models.CharField(max_length=21, db_column='status') - BuildNow = models.BooleanField(db_column='build_now') - RemoveBin = models.BooleanField(db_column='removebin') - New = models.BooleanField(db_column='new') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'build_jobs' - def __str__(self): - return '%s %s %s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.SetupId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.New, self.TimeStamp) - -class BuildJobsUse(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - BuildJobId = models.ForeignKey(BuildJobs, db_column='build_job_id') - UseId = models.ForeignKey(Uses, db_column='use_id') - Status = models.BooleanField(db_column='status') - class Meta: - db_table = 'build_jobs_use' - def __str__(self): - return '%s %s %s %s' % (self.Id, self.BuildJobId, self.UseId, self.Status) - -class Keywords(models.Model): - KeywordId = models.IntegerField(primary_key=True, db_column='keyword_id') - Keyword = models.CharField(max_length=45, db_column='keyword') - class Meta: - db_table = 'keywords' - def __str__(self): - return '%s %s' % (self.KeywordId, self.Keyword) - -class Restrictions(models.Model): - RestrictionId = models.IntegerField(primary_key=True, db_column='restriction_id') - Restriction = models.CharField(max_length=150, db_column='restriction') - class Meta: - db_table = 'restrictions' - def __str__(self): - return '%s %s' % (self.RestrictionId, self.Restriction) - -class EbuildsKeywords(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') - KeywordId = models.ForeignKey(Keywords, db_column='keyword_id') - Status = models.CharField(max_length=24, db_column='status') - class Meta: - db_table = 'ebuilds_keywords' - def __str__(self): - return '%s %s %s' % (self.EbuildId, self.KeywordId, self.Status) - -class EbuildsIuse(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') - UseId = models.ForeignKey(Uses, db_column='use_id') - Status =models.BooleanField(db_column='status') - class Meta: - db_table = 'ebuilds_iuse' - def __str__(self): - return '%s %s %s %s' % (self.Id, self.EbuildId, self.UseId, self.Status) - -class EbuildsRestrictions(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') - RestrictionId = models.ForeignKey(Restrictions, db_column='restriction_id') - class Meta: - db_table = 'ebuilds_restrictions' - def __str__(self): - return '%s %s' % (self.EbuildId, self.RestrictionId) - -class Emails(models.Model): - EmailId = models.IntegerField(primary_key=True, db_column='email_id') - Email = models.CharField(max_length=160, db_column='email') - class Meta: - db_table = 'emails' - def __str__(self): - return '%s %s' % (self.EmailId, self.Email) - -class PackagesEmails(models.Model): - Id = models.IntegerField(primary_key=True, db_column='id') - PackageId = models.ForeignKey(Packages, db_column='package_id') - EmailId = models.ForeignKey(Emails, db_column='email_id') - class Meta: - db_table = 'packages_emails' - def __str__(self): - return '%s %s' % (self.PackageId, self.EmailId) - -class Jobs(models.Model): - JobId = models.IntegerField(primary_key=True, db_column='job_id') - JobType = models.CharField(max_length=60, db_column='job_type') - Status = models.CharField(max_length=60, db_column='status') - User = models.CharField(max_length=60, db_column='user') - ConfigId = models.ForeignKey(Configs, db_column='config_id') - RunConfigId = models.ForeignKey(Configs, to_field='ConfigId', related_name='RunConfigId', db_column='run_config_id') - TimeStamp = models.DateTimeField(db_column='time_stamp') - class Meta: - db_table = 'jobs' - def __str__(self): - return '%s %s %s %s %s %s %s' % (self.JobId, self.JobType, self.Status, self.User, self.ConfigId, self.RunConfigId, self.TimeStamp) - diff --git a/python/tbc_www/router.py b/python/tbc_www/router.py deleted file mode 100644 index bac2a30..0000000 --- a/python/tbc_www/router.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 1998-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -class TBCRouter(object): - def db_for_read(self, model, **hints): - "Point all operations on tbc models to 'tbc'" - if model._meta.app_label == 'tbc_www': - return 'tbc' - return 'default' - - def db_for_write(self, model, **hints): - "Point all operations on tbc models to 'tbc'" - if model._meta.app_label == 'tbc_www': - return 'tbc' - return 'default' - - def allow_relation(self, obj1, obj2, **hints): - "Allow any relation if a both models in tbc app" - if obj1._meta.app_label == 'tbc_www' and obj2._meta.app_label == 'tbc_www': - return True - # Allow if neither is tbc app - elif 'tbc_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 == 'tbc' or app_label == "tbc_www": - return False # we're not using syncdb on our legacy database - else: # but all other models/databases are fine - return True diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py deleted file mode 100644 index dfea3a7..0000000 --- a/python/tbc_www/urls.py +++ /dev/null @@ -1,22 +0,0 @@ -from django.conf.urls import url -from . import views -from django.contrib.auth import views as auth_views - -urlpatterns = [ - url(r'^home/$', views.home), - url(r'^categories/$', views.categories), - url(r'^categories/packages/(?P\d+)/$', views.packages), - url(r'^categories/packages/versions/(?P\d+)/$', views.versions), - url(r'^build_req/$', views.new_build_req), - url(r'^logs/build/(?P\d+)/$', views.new_logs_build, name='new_logs_build'), - url(r'^logs/build/submitlog/(?P\d+)/$', views.buildinfo_bugzilla), - url(r'^logs/$', views.new_logs), - url(r'^logs/all/build/$', views.new_build_logs_all), - url(r'^logs/all/repoman/$', views.new_repoman), - url(r'^user/login/$', auth_views.login, name='login'), - url(r'^user/logout/$', auth_views.logout, {'next_page': '/home/'}, name='logout'), - url(r'^user/password_change/$', auth_views.password_change, name='password_change'), - url(r'^user/password_change/done/$', auth_views.password_change_done, name='password_change_done'), - url(r'^user/password_reset/$', auth_views.password_reset, name='password_reset'), - url(r'^user/bugzillalogin/$', views.set_bugzilla_user), -] diff --git a/python/tbc_www/utils/__init__.py b/python/tbc_www/utils/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python/tbc_www/utils/bugzillasubmit.py b/python/tbc_www/utils/bugzillasubmit.py deleted file mode 100644 index d8160dc..0000000 --- a/python/tbc_www/utils/bugzillasubmit.py +++ /dev/null @@ -1,27 +0,0 @@ -from __future__ import print_function - -import bugzilla - -URL = "https://bugs.gentoo.org/xmlrpc.cgi" -def addnewbug(args): - bzapi = bugzilla.Bugzilla(URL) - print(args['username']) - print(args['password']) - bzapi.login(user=args['username'], password=args['password']) - createinfo = bzapi.build_createbug( - product=args['product'], - version=args['version'], - component=args['component'], - summary=args['summary'], - description=args['description'], - assigned_to=args['assigned_to']) - newbug = bzapi.createbug(createinfo) - print("Created new bug id=%s url=%s" % (newbug.id, newbug.weburl)) - update = bzapi.build_update(comment=args['comment']) - bzapi.update_bugs(newbug.id, update) - kwards = { - 'contenttype': args['content_type'], - } - attchment_id = bzapi.attachfile(newbug.id, args['filename'], args['comment_attach'], **kwards) - bzapi.logout() - return newbug diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py deleted file mode 100644 index c272c50..0000000 --- a/python/tbc_www/views.py +++ /dev/null @@ -1,459 +0,0 @@ -# Copyright 1998-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, redirect -from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger -from django.conf import settings -from django.urls import reverse -from tbc_www.forms import BugForm, BugzillaUser -from tbc_www.utils.bugzillasubmit import addnewbug -from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts, Bugzilla -from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsQa, \ - BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ - Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse, PackagesRepoman, \ - BuildLogsConfig, BuildLogsUse, BuildLogsRepoman, PackagesEmails, Jobs -import re -import gzip -import os - -def default_TmpDict(pagerequest): - site = get_object_or_404(SiteSettings) - page = get_object_or_404(Pages, nav1 = pagerequest) - jobs = get_object_or_404(Jobs, JobType = 'esync') - pages = Pages.objects.all() - if page.SubMenu: - subpages = SubPages.objects.filter(PageId = page.PageId) - else: - subpages = False - TmpDict = {'site' : site} - TmpDict['page'] = page - TmpDict['pages'] = pages - TmpDict['subpages'] = subpages - TmpDict['smappages'] = SubPages.objects.all() - TmpDict['jobs'] = jobs - return TmpDict - -def fail_status(buildlog_id): - BU_tmp = BuildLogsUse.objects.filter(BuildLogId = buildlog_id) - Test = False - if BU_tmp != []: - for BU in BU_tmp: - if BU.Status: - if BU.UseId.Flag == 'test': - Test = True - adict = {} - adict['repoman'] = False - adict['qa'] = False - adict['others'] = False - adict['build'] = False - adict['TestRun'] = Test - BE_tmp = BuildLogsErrors.objects.filter(BuildLogId__BuildLogId = buildlog_id) - for BE in BE_tmp: - if BE.ErrorId.ErrorId == 1: - adict['repoman'] = True - if BE.ErrorId.ErrorId == 2: - adict['qa'] = True - if BE.ErrorId.ErrorId == 3: - adict['others'] = True - if BE.ErrorId.ErrorId == 4: - adict['test'] = True - if BE.ErrorId.ErrorId >= 5: - adict['build'] = True - adict['builderror'] = BE.ErrorId.ErrorName - if BE.ErrorId.ErrorName != 'install': - adict['TestRun'] = False - return adict - -def home(request): - pagerequest = 'home' - Lines = 10 - TmpDict = default_TmpDict(pagerequest) - TmpDict['PM'] = PackagesMetadata.objects.filter(New = True) - alist = [] - for EM in EbuildsMetadata.objects.filter(Updated = True): - adict = {} - adict['EbuildId'] = EM.EbuildId.EbuildId - adict['C'] = EM.EbuildId.PackageId.CategoryId.Category - adict['P'] = EM.EbuildId.PackageId.Package - adict['CId'] = EM.EbuildId.PackageId.CategoryId.CategoryId - adict['PId'] = EM.EbuildId.PackageId.PackageId - adict['V'] = EM.EbuildId.Version - adict['R'] = EM.EbuildId.PackageId.RepoId.Repo - adict['TimeStamp'] = EM.EbuildId.TimeStamp - adict['CommitId'] = EM.Commit - adict['CommitMsg'] = EM.CommitMsg - adict['Descriptions'] = EM.Descriptions - adict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__EbuildId = EM.EbuildId.EbuildId) - alist.append(adict) - TmpDict['EM_list'] = alist - alist = [] - for BL in BuildLogs.objects.filter(New = True): - adict2 = {} - adict2['BuildLogId'] = BL.BuildLogId - adict2['C'] = BL.EbuildId.PackageId.CategoryId.Category - adict2['P'] = BL.EbuildId.PackageId.Package - adict2['V'] = BL.EbuildId.Version - adict2['R'] = BL.EbuildId.PackageId.RepoId.Repo - adict2['SummeryText'] = BL.SummeryText - adict2['Fail'] = BL.Fail - if BL.Fail: - adict2['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) - alist.append(adict2) - TmpDict['BL_tmp'] = alist - adict = {} - BJ_Tmp = BuildJobs.objects.filter(New = True) - for BJ in BJ_Tmp: - adict2 = {} - adict2['EbuildId'] = BJ.EbuildId.EbuildId - adict2['C'] = BJ.EbuildId.PackageId.CategoryId.Category - adict2['P'] = BJ.EbuildId.PackageId.Package - adict2['V'] = BJ.EbuildId.Version - adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo - adict2['Status'] = BJ.Status - adict2['title'] = "Setup: " + BJ.SetupId.Setup + "\n" + "Profile: " + BJ.SetupId.Profile + "\n" - BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId) - if not BJU == []: - use_enable = [] - use_disable = [] - for BU in BJU: - if BU.Status: - use_enable.append(BU.UseId.Flag) - else: - use_disable.append(BU.UseId.Flag) - if not use_enable == []: - adict2['title'] = adict2['title'] + "Enable: " - for use in use_enable: - adict2['title'] = adict2['title'] + use + " " - adict2['title'] = adict2['title'] + "\n" - if not use_disable == []: - adict2['title'] = adict2['title'] + "Disable: " - for use in use_disable: - adict2['title'] = adict2['title'] + use + " " - adict2['title'] = adict2['title'] + "\n" - adict[BJ.BuildJobId] = adict2 - TmpDict['BJ'] = adict - TmpDict['PR_tmp'] = PackagesRepoman.objects.order_by('-Id')[:Lines] - return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) - -def categories(request): - pagerequest = 'packages' - TmpDict = default_TmpDict(pagerequest) - alphabet_list = map(chr, range(97, 123)) - CM_tmp = CategoriesMetadata.objects.filter(CategoryId__Active = True).order_by('CategoryId__Category') - list2 = [] - for a in alphabet_list: - alist = [] - for CM in CM_tmp: - if a == CM.CategoryId.Category[:1]: - adict = {} - adict['CategoryId'] = CM.CategoryId.CategoryId - adict['Category'] = CM.CategoryId.Category - adict['Descriptions'] = CM.Descriptions - alist.append(adict) - adict2 = {} - adict2['letter'] = a - adict2['CM_list'] = alist - if alist != []: - list2.append(adict2) - TmpDict['CM_tmp'] = list2 - return render(request, 'pages/categories/index.html', TmpDict) - -def packages(request, category_id): - pagerequest = 'packages' - TmpDict = default_TmpDict(pagerequest) - alist = [] - TmpDict['PM_tmp'] = PackagesMetadata.objects.filter(PackageId__CategoryId_id = category_id).filter(PackageId__Active = True) - TmpDict['C'] = get_object_or_404(CategoriesMetadata, CategoryId__CategoryId = category_id) - return render(request, 'pages/categories/packages/index.html', TmpDict) - -def versions(request, package_id): - pagerequest = 'packages' - TmpDict = default_TmpDict(pagerequest) - P = get_object_or_404(PackagesMetadata, PackageId__PackageId = package_id) - TmpDict['P'] = P - alist =[] - EM_tmp = EbuildsMetadata.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__PackageId = P.PackageId.PackageId) - for EM in EM_tmp: - adict = {} - ebuild_id = EM.EbuildId.EbuildId - adict['EbuildId'] = ebuild_id - adict['Slot'] = EM.Slot - adict['Version'] = EM.EbuildId.Version - adict['TimeStamp'] = EM.EbuildId.TimeStamp - adict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__EbuildId = ebuild_id) - adict['EU_tmp'] = EbuildsIuse.objects.filter(EbuildId__EbuildId = ebuild_id) - adict['ER_tmp'] = EbuildsRestrictions.objects.filter(EbuildId__EbuildId = ebuild_id) - BL_tmp = BuildLogs.objects.filter(EbuildId__EbuildId = ebuild_id) - adict['BL_tmp'] = BL_tmp - alist2 = [] - for BL in BL_tmp: - adict2 = {} - adict2['BuildLogId'] = BL.BuildLogId - adict2['repoman'] = False - adict2['qa'] = False - adict2['Blo'] = False - adict2['Blb'] = False - if BL.Fail: - adict2['fail'] = True - BE_tmp = BuildLogsErrors.objects.filter(BuildLogId__BuildLogId = BL.BuildLogId) - for BE in BE_tmp: - if BE.ErrorId.ErrorId == 1: - adict2['repoman'] = True - if BE.ErrorId.ErrorId == 2: - adict2['qa'] = True - if BE.ErrorId.ErrorId == 3: - adict2['Blo'] = True - if BE.ErrorId.ErrorId >= 4: - adict2['Blb'] = True - adict2['Ble'] = BE.ErrorId.ErrorName - alist2.append(adict2) - adict['fi_tmp'] = alist2 - alist.append(adict) - TmpDict['EM_info'] = alist - return render(request, 'pages/categories/packages/versions/index.html', TmpDict) - -def new_build_req(request): - pagerequest = 'build_req' - TmpDict = default_TmpDict(pagerequest) - adict = {} - BJ_Tmp = BuildJobs.objects.order_by('-TimeStamp') - for BJ in BJ_Tmp: - adict2 = {} - adict2['EbuildId'] = BJ.EbuildId.EbuildId - adict2['C'] = BJ.EbuildId.PackageId.CategoryId.Category - adict2['P'] = BJ.EbuildId.PackageId.Package - adict2['V'] = BJ.EbuildId.Version - adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo - adict2['Status'] = BJ.Status - adict2['title'] = "Setup: " + BJ.SetupId.Setup + "\n" + "Profile: " + BJ.SetupId.Profile + "\n" - BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId) - if not BJU == []: - use_enable = [] - use_disable = [] - for BU in BJU: - if BU.Status: - use_enable.append(BU.UseId.Flag) - else: - use_disable.append(BU.UseId.Flag) - if not use_enable == []: - adict2['title'] = adict2['title'] + "Enable: " - for use in use_enable: - adict2['title'] = adict2['title'] + use + " " - adict2['title'] = adict2['title'] + "\n" - if not use_disable == []: - adict2['title'] = adict2['title'] + "Disable: " - for use in use_disable: - adict2['title'] = adict2['title'] + use + " " - adict2['title'] = adict2['title'] + "\n" - adict[BJ.BuildJobId] = adict2 - TmpDict['BJ'] = adict - return render(request, 'pages/build_req/index.html', TmpDict) - -def new_repoman(request): - pagerequest = 'new' - Lines = 30 - TmpDict = default_TmpDict(pagerequest) - TmpDict['PR_tmp'] = PackagesRepoman.objects.order_by('-Id')[:Lines] - return render(request, 'pages/' + pagerequest + '/repoman/index.html', TmpDict) - -def new_logs(request): - pagerequest = 'logs' - TmpDict = default_TmpDict(pagerequest) - alist = [] - for BL in BuildLogs.objects.order_by('-TimeStamp').filter(New = True): - adict2 = {} - adict2['BuildLogId'] = BL.BuildLogId - adict2['C'] = BL.EbuildId.PackageId.CategoryId.Category - adict2['P'] = BL.EbuildId.PackageId.Package - adict2['V'] = BL.EbuildId.Version - adict2['R'] = BL.EbuildId.PackageId.RepoId.Repo - adict2['Fail'] = BL.Fail - adict2['SummeryText'] = BL.SummeryText - if BL.Fail: - adict2['FI'] = fail_status(BL.BuildLogId) - alist.append(adict2) - TmpDict['BL_tmp'] = alist - TmpDict['QA_tmp'] = BuildLogsQa.objects.filter(BuildLogId__New = True) - TmpDict['RM_tmp'] = BuildLogsRepoman.objects.filter(BuildLogId__New = True) - return render(request, 'pages/logs/index.html', TmpDict) - -def new_build_logs_all(request): - pagerequest = 'logs' - object_on_page = 50 - TmpDict = default_TmpDict(pagerequest) - BL_tmp = BuildLogs.objects.order_by('-TimeStamp').filter(Fail = True) - alist = [] - for BL in BL_tmp: - adict = {} - adict['BuildLogId'] = BL.BuildLogId - adict['C'] = BL.EbuildId.PackageId.CategoryId.Category - adict['P'] = BL.EbuildId.PackageId.Package - adict['V'] = BL.EbuildId.Version - adict['R'] = BL.EbuildId.PackageId.RepoId.Repo - adict['Fail'] = BL.Fail - adict['SummeryText'] = BL.SummeryText - if BL.Fail: - adict['FI'] = fail_status(BL.BuildLogId) - alist.append(adict) - paginator = Paginator(alist, object_on_page) - page = request.GET.get('page') - try: - BL_tmp = paginator.page(page) - except PageNotAnInteger: - # If page is not an integer, deliver first page. - BL_tmp = paginator.page(1) - except EmptyPage: - # If page is out of range (e.g. 9999), deliver last page of results. - BL_tmp = paginator.page(paginator.num_pages) - TmpDict['BL_tmp'] = BL_tmp - return render(request, 'pages/logs/all/build/index.html', TmpDict) - -def new_logs_build(request, buildlog_id): - pagerequest = 'logs' - TmpDict = default_TmpDict(pagerequest) - TmpDict['Bugzillalogin'] = False - B = BuildLogs.objects.get(BuildLogId = buildlog_id) - EM = EbuildsMetadata.objects.get(EbuildId = B.EbuildId.EbuildId) - PM = PackagesMetadata.objects.get(PackageId__PackageId = B.EbuildId.PackageId.PackageId) - BLI = {} - BLI['BuildLogId'] = buildlog_id - BLI['EbuildId'] = B.EbuildId.EbuildId - BLI['C'] = B.EbuildId.PackageId.CategoryId.Category - BLI['P'] = B.EbuildId.PackageId.Package - BLI['V'] = B.EbuildId.Version - BLI['R'] = B.EbuildId.PackageId.RepoId.Repo - BLI['EC'] = EM.Commit - BLI['PD'] = EM.Descriptions - BLI['PC'] = PM.Gitlog - BLI['Fail'] = B.Fail - BLI['Summery_text'] = B.SummeryText - if B.BugId == "0": - BLI['BugId'] = False - else: - BLI['BugId'] = B.BugId - BC = BuildLogsConfig.objects.get(BuildLogId = buildlog_id) - #CEO_tmp = ConfigsEmergeOptions.objects.filter(ConfigId = BC.ConfigId.ConfigId) - BU_tmp = BuildLogsUse.objects.filter(BuildLogId = buildlog_id) - config_eoption = [] - BLI['configid'] = BC.ConfigId.ConfigId - BLI['hostname'] = BC.ConfigId.HostName - BLI['config'] = BC.ConfigId.SetupId.Setup - BLI['profile'] = BC.ConfigId.SetupId.Profile - BLI['logid'] = BC.LogId - BLI['logname'] = BC.LogName[1:] - BLI['emerge_info_text'] = BC.EInfoId.EmergeInfoText - #for CEO in CEO_tmp: - # config_eoption.append(CEO.EmergeOptionId.EOption) - #BLI['emerge_option'] = config_eoption - if not BU_tmp == []: - use_enable = [] - use_disable = [] - for BU in BU_tmp: - if BU.Status: - use_enable.append(BU.UseId.Flag) - else: - use_disable.append(BU.UseId.Flag) - if not use_enable == []: - BLI['use_enable'] = use_enable - if not use_disable == []: - BLI['use_disable'] = use_disable - TmpDict['FI'] = fail_status(buildlog_id) - try: - BRQ = BuildLogsQa.objects.get(BuildLogId = B.BuildLogId) - BLI['QA'] = BRQ.SummeryText - except BuildLogsQa.DoesNotExist as e: - BLI['QA'] = False - try: - BRR = BuildLogsRepoman.objects.get(BuildLogId = B.BuildLogId) - BLI['Repoman'] = BRR.SummeryText - except BuildLogsRepoman.DoesNotExist as e: - BLI['Repoman'] = False - TmpDict['BLI'] = BLI - return render(request, 'pages/logs/build/index.html', TmpDict) - -def submit_to_bugzilla(request, form, buildlog_id): - BC = BuildLogsConfig.objects.get(BuildLogId = buildlog_id) - b = Bugzilla.objects.get(Username=request.user.username) - args = {} - args['product'] = form.cleaned_data['Product'] - args['component'] = form.cleaned_data['Component'] - args['version'] = form.cleaned_data['Version'] - args['summary'] = form.cleaned_data['Summary'] - args['description'] = form.cleaned_data['Description'] - args['comment'] = form.cleaned_data['EmergeInfo'] - args['assigned_to'] = form.cleaned_data['AssigendTo'] - args['password'] = request.session['bugzillapassword'] - args['username'] = b.Bugzillaname - LogFile = BC.ConfigId.HostName + '/' + BC.ConfigId.SetupId.Setup + BC.LogName - LogDir = settings.STATIC_ROOT + '/logs/' - Filesize = os.path.getsize(LogDir + LogFile)/1024 - if Filesize > 900: - #FIXME UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte - with open(LogDir + LogFile, 'rb') as orig_file: - with gzip.open('/tmp' + BC.LogName + '.gz', 'wb') as zipped_file: - zipped_file.writelines(orig_file) - args['filename'] = '/tmp' + BC.LogName + '.gz' - args['content_type'] = 'application/gzip' - else: - args['filename'] = LogDir + LogFile - args['content_type'] = 'text/plain' - args['comment_attach'] = 'Build log' - newbug = addnewbug(args) - return newbug - -def buildinfo_bugzilla(request, buildlog_id): - pagerequest = 'logs' - TmpDict = default_TmpDict(pagerequest) - B = get_object_or_404(BuildLogs, BuildLogId = buildlog_id) - C = B.EbuildId.PackageId.CategoryId.Category - P = B.EbuildId.PackageId.Package - V = B.EbuildId.Version - R = B.EbuildId.PackageId.RepoId.Repo - if request.method == 'POST': - form = BugForm(request.POST) - if form.is_valid(): - newbug = submit_to_bugzilla(request, form, buildlog_id) - B.BugId = newbug.id - B.save() - return redirect('new_logs_build', buildlog_id=buildlog_id) - else: - if B.Fail == 'True': - F = get_object_or_404(BuildLogsErrors, BuildLogId = buildlog_id) - FailText = " : " + F.ErrorId.ErrorName - else: - FailText = "" - E = get_object_or_404(BuildLogsConfig, BuildLogId = buildlog_id) - PE = get_object_or_404(PackagesEmails, PackageId__PackageId = B.EbuildId.PackageId.PackageId) - form = BugForm() - form.fields['Product'].initial = 'Gentoo Linux' - form.fields['Version'].initial = 'unspecified' - form.fields['Summary'].initial = '[TEST][Tinderbox-cluster]=' + C + '/' + P + '-' + V + '::' + R + FailText - form.fields['Description'].initial = B.SummeryText - form.fields['EmergeInfo'].initial = E.EInfoId.EmergeInfoText - form.fields['AssigendTo'].initial = PE.EmailId.Email - - TmpDict['form'] = form - TmpDict['B'] = B - return render(request, 'pages/logs/build/submitbug/index.html', TmpDict) - -def set_bugzilla_user(request): - pagerequest = 'home' - TmpDict = default_TmpDict(pagerequest) - if request.method == 'POST': - form = BugzillaUser(request.POST) - if form.is_valid(): - b = Bugzilla.objects.get(Username=request.user.username) - if b == []: - b = Bugzilla(Bugzillaname = form.cleaned_data['BugzillaName'], Username = request.user.username) - b.save() - else: - if b.Bugzillaname != form.cleaned_data['BugzillaName']: - b.Bugzillaname = form.cleaned_data['BugzillaName'] - b.save() - request.session['bugzillapassword'] = form.cleaned_data['BugzillaPassword'] - return HttpResponseRedirect('/home/') - - else: - form = BugzillaUser() - TmpDict['form'] = form - return render(request, 'registration/bugzillauser.html', TmpDict) diff --git a/python/templates/includes/downloads/alpha.html b/python/templates/includes/downloads/alpha.html deleted file mode 100644 index 15d2d27..0000000 --- a/python/templates/includes/downloads/alpha.html +++ /dev/null @@ -1,17 +0,0 @@ -
-

Boot Media

-
- {% include partials/download-link.html type="iso" arch="alpha" id="minimal" title="Minimal Installation CD" %} -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="alpha" id="alpha" title="Stage 3" %} -
-
-
-

Details (Contents, Hashes, and Signatures)

- -
\ No newline at end of file diff --git a/python/templates/includes/downloads/amd64.html b/python/templates/includes/downloads/amd64.html deleted file mode 100644 index 556519f..0000000 --- a/python/templates/includes/downloads/amd64.html +++ /dev/null @@ -1,6 +0,0 @@ -
- Processor Compatibility -

- The amd64 architecture is intended for use on AMD 64-bit CPUs as well as 64-bit Intel Pentium/Core/Xeon processors. -

-
diff --git a/python/templates/includes/downloads/arch-default.html b/python/templates/includes/downloads/arch-default.html deleted file mode 100644 index 529abbf..0000000 --- a/python/templates/includes/downloads/arch-default.html +++ /dev/null @@ -1,33 +0,0 @@ -

Boot Media

-
- {% for iso in download.isos %} - {% if iso.id == 'minimal' %} - {% include "includes/partials/download-link-raw.html" with arch=download.arch id=iso.id title=iso.title tag=iso.tag link=iso.link date=iso.date size=iso.size urlprefix=site.download_url %} - {% endif %} - {% endfor %} - {% if download.arch == 'amd64' %} - {% include "includes/partials/download-link-raw.html" with urlprefix='http://bouncer.gentoo.org/fetch/gentoo-20140826-livedvd/' link='amd64/' title='Hybrid ISO (LiveDVD)' size='2800000000' date='2014-08-26' %} - {% elif download.arch == 'x86' %} - {% include "includes/partials/download-link-raw.html" with urlprefix='http://bouncer.gentoo.org/fetch/gentoo-20140826-livedvd/' link='x86/' title='Hybrid ISO (LiveDVD)' size='2800000000' date='2014-08-26' %} - {% endif %} -
- -

Stage Archives

-
- {% for stage3 in download.stage3s %} - {% if stage3.defaultstage %} - {% include "includes/partials/download-link-raw.html" with arch=download.arch id=stage3.id title=stage3.title tag=stage3.tag link=stage3.link date=stage3.date size=stage3.size urlprefix=site.download_url %} - {% endif %} - {% endfor %} -
- -

Details (Contents, Hashes, and Signatures)

-

- Minimal Installation CD, - Hybrid ISO, - {% for stage3 in download.stage3s %} - {% if stage3.defaultstage %} - Stage 3 - {% endif %} - {% endfor %} -

\ No newline at end of file diff --git a/python/templates/includes/downloads/arch-main.html b/python/templates/includes/downloads/arch-main.html deleted file mode 100644 index f4cecd0..0000000 --- a/python/templates/includes/downloads/arch-main.html +++ /dev/null @@ -1,29 +0,0 @@ -
-

Boot Media

-
- {% for iso in download.isos %} - {% include "includes/partials/download-link-raw.html" with arch=key id=iso.id title=iso.title urlprefix=site.download_url tag=iso.tag link=iso.link date=iso.date size=iso.size %} - {% endfor %} -
- - -

Stage Archives

-
- {% for stage3 in download.stage3s %} - {% include "includes/partials/download-link-raw.html" with arch=key id=stage3.id title=stage3.title urlprefix=site.download_url tag=stage3.tag link=stage3.link date=stage3.date size=stage3.size %} - {% endfor %} -
-
-
-

Details (Contents, Hashes, and Signatures)

- - {% include "includes/downloads/warnings.html" with key=key %} -
\ No newline at end of file diff --git a/python/templates/includes/downloads/arm.html b/python/templates/includes/downloads/arm.html deleted file mode 100644 index a2bf23e..0000000 --- a/python/templates/includes/downloads/arm.html +++ /dev/null @@ -1,17 +0,0 @@ -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="arm" id="armv4tl" title="Stage 3" tag="ARMv4tl" %} - {% include partials/download-link.html type="stage3" arch="arm" id="armv5tel" title="Stage 3" tag="ARMv5tel" %} - {% include partials/download-link.html type="stage3" arch="arm" id="armv6j" title="Stage 3" tag="ARMv6j" %} - {% include partials/download-link.html type="stage3" arch="arm" id="armv6j_hardfp" title="Stage 3" tag="ARMv6j | HardFP" %} - {% include partials/download-link.html type="stage3" arch="arm" id="armv7a" title="Stage 3" tag="ARMv7a" %} - {% include partials/download-link.html type="stage3" arch="arm" id="armv7a_hardfp" title="Stage 3" tag="ARMv7a | HardFP" %} -
-
-
-

Details (Contents, Hashes, and Signatures)

- -
\ No newline at end of file diff --git a/python/templates/includes/downloads/experimental.html b/python/templates/includes/downloads/experimental.html deleted file mode 100644 index e6fc030..0000000 --- a/python/templates/includes/downloads/experimental.html +++ /dev/null @@ -1,12 +0,0 @@ -
-

mips

- -
-
- -
\ No newline at end of file diff --git a/python/templates/includes/downloads/hppa.html b/python/templates/includes/downloads/hppa.html deleted file mode 100644 index 908eb7a..0000000 --- a/python/templates/includes/downloads/hppa.html +++ /dev/null @@ -1,18 +0,0 @@ -
-

Boot Media

-
- {% include partials/download-link.html type="iso" arch="hppa" id="minimal" title="Minimal Installation CD" %} -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="hppa" id="hppa1.1" title="Stage 3" tag="HPPA 1.1" %} - {% include partials/download-link.html type="stage3" arch="hppa" id="hppa2.0" title="Stage 3" tag="HPPA 2.0" %} -
-
-
-

Details (Contents, Hashes, and Signatures)

- -
\ No newline at end of file diff --git a/python/templates/includes/downloads/ia64.html b/python/templates/includes/downloads/ia64.html deleted file mode 100644 index 46aee26..0000000 --- a/python/templates/includes/downloads/ia64.html +++ /dev/null @@ -1,25 +0,0 @@ -
-

Boot Media

-
- {% include partials/download-link.html type="iso" arch="ia64" id="minimal" title="Minimal Installation CD" %} -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="ia64" id="ia64" title="Stage 3" %} -
-
-
-

Details (Contents, Hashes, and Signatures)

- - -
- Confirm Processor Compatibility -

- The ia64 architecture is intended for use on Intel Itanium processors only.
- If you have a 64-bit Intel Pentium/Core/Xeon processor, you need to use the amd64 architecture. -

-
-
\ No newline at end of file diff --git a/python/templates/includes/downloads/ppc.html b/python/templates/includes/downloads/ppc.html deleted file mode 100644 index 1880dde..0000000 --- a/python/templates/includes/downloads/ppc.html +++ /dev/null @@ -1,12 +0,0 @@ -
-

Boot Media

-
- {% include partials/download-link.html type="iso" arch="ppc" id="minimal" title="Minimal Installation CD" %} -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="ppc" id="ppc" title="PPC Stage 3" %} - {% include partials/download-link.html type="stage3" arch="ppc" id="ppc64-32ul" title="PPC64 Stage 3" tag="32ul" %} - {% include partials/download-link.html type="stage3" arch="ppc" id="ppc64-64ul" title="PPC64 Stage 3" tag="64ul" %} -
-
\ No newline at end of file diff --git a/python/templates/includes/downloads/s390.html b/python/templates/includes/downloads/s390.html deleted file mode 100644 index a93064b..0000000 --- a/python/templates/includes/downloads/s390.html +++ /dev/null @@ -1,7 +0,0 @@ -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="s390" id="s390" title="Stage 3" tag="S390" %} - {% include partials/download-link.html type="stage3" arch="s390" id="s390x" title="Stage 3" tag="S390X" %} -
-
\ No newline at end of file diff --git a/python/templates/includes/downloads/sh.html b/python/templates/includes/downloads/sh.html deleted file mode 100644 index 8bd2b03..0000000 --- a/python/templates/includes/downloads/sh.html +++ /dev/null @@ -1,7 +0,0 @@ -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="sh" id="sh4" title="Stage 3" tag="SH4" %} - {% include partials/download-link.html type="stage3" arch="sh" id="sh4a" title="Stage 3" tag="SH4A" %} -
-
\ No newline at end of file diff --git a/python/templates/includes/downloads/sparc.html b/python/templates/includes/downloads/sparc.html deleted file mode 100644 index 7e91ad3..0000000 --- a/python/templates/includes/downloads/sparc.html +++ /dev/null @@ -1,11 +0,0 @@ -
-

Boot Media

-
- {% include partials/download-link.html type="iso" arch="sparc" id="minimal" title="Minimal Installation CD" %} -
-

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="sparc" id="sparc64" title="Stage 3" %} - {% include partials/download-link.html type="stage3" arch="sparc" id="sparc64-multilib" title="Stage 3" tag="multilib" %} -
-
\ No newline at end of file diff --git a/python/templates/includes/downloads/warnings.html b/python/templates/includes/downloads/warnings.html deleted file mode 100644 index 38a1eb5..0000000 --- a/python/templates/includes/downloads/warnings.html +++ /dev/null @@ -1,11 +0,0 @@ -
- Processor Compatibility -

- {% if key == 'amd64' %} - The amd64 architecture is intended for use on AMD 64-bit CPUs as well as 64-bit Intel Pentium/Core/Xeon processors. - {% elif key == 'x86' %} - There are two builds of the x86 architecture: i486 and i686.
- Processors prior to the Intel Pentium Pro or Pentium II require the i486 variant to be used. - {% endif %} -

-
\ No newline at end of file diff --git a/python/templates/includes/downloads/x86-default.html b/python/templates/includes/downloads/x86-default.html deleted file mode 100644 index 03fc9b5..0000000 --- a/python/templates/includes/downloads/x86-default.html +++ /dev/null @@ -1,17 +0,0 @@ -

Boot Media

-
- {% include partials/download-link.html type="iso" arch="x86" id="minimal" title="Minimal Installation CD" %} - {% include partials/download-link-raw.html url='http://bouncer.gentoo.org/fetch/gentoo-20140826-livedvd/x86/' title='Hybrid ISO (LiveDVD)' size='2800000000' date='2014-08-26' %} -
- -

Stage Archives

-
- {% include partials/download-link.html type="stage3" arch="x86" id="i686" title="Stage 3" tag="i686" %} -
- -

Details (Contents, Hashes, and Signatures)

-

- Minimal Installation CD, - Hybrid ISO, - Stage 3 -

\ No newline at end of file diff --git a/python/templates/includes/downloads/x86.html b/python/templates/includes/downloads/x86.html deleted file mode 100644 index f1a04c9..0000000 --- a/python/templates/includes/downloads/x86.html +++ /dev/null @@ -1,7 +0,0 @@ -
- Confirm Processor Compatibility -

- There are two builds of the x86 architecture: i486 and i686.
- Processors prior to the Intel Pentium Pro or Pentium II require the i486 variant to be used. -

-
diff --git a/python/templates/includes/frontpage/new_build_req b/python/templates/includes/frontpage/new_build_req index 52a41fe..3a47530 100644 --- a/python/templates/includes/frontpage/new_build_req +++ b/python/templates/includes/frontpage/new_build_req @@ -1,16 +1,15 @@ -{% for k, v in BJ.items %} - - - - {{ v.C }}//{{ v.P }}-{{ v.V }}::{{ v.R }} - - - - {% if v.Status == 'Building' %} + + {% for k, v in BJ.items %} + + + - -{% endfor %} + + + {% endfor %} +
{{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}

{{ v.title|truncatewords:2}}

+
+ {% if v.Status == 'Building' %} {{ v.Status }} {% else %} {{ v.Status }} {% endif %} -
\ No newline at end of file diff --git a/python/templates/includes/frontpage/new_logs b/python/templates/includes/frontpage/new_logs index 49db4c3..3074c4d 100644 --- a/python/templates/includes/frontpage/new_logs +++ b/python/templates/includes/frontpage/new_logs @@ -1,31 +1,27 @@ -{% for BL in BL_tmp %} - - - - {{ BL.C }}//{{ BL.P }}-{{ BL.V }}::{{ BL.R }} - - - -

{{ BL.SummeryText|truncatewords:5 }}

- {% if BL.Fail %} + + {% for B in BL%} + + + - -{% endfor %} + {% else %} + OK + {% endif %} + + + + {% endfor %} +
+ {{ B.C }}/{{ B.P }}-{{ B.V }}::{{ B.R }}

{{ B.SummeryText|truncatewords:3 }}

+
+ {% if B.Fail %} {% for BE in B.BE_tmp %} {% if BE.BuildLogId.BuildLogId == B.BuildLogId %} {% if BE.ErrorId.ErrorId == 1 or BE.ErrorId.ErrorId == 2 %} {{ BE.ErrorId.ErrorName|upper }} - {% endif %} - {% if BE.ErrorId.ErrorId == 3 %} - {{ BE.ErrorId.ErrorName|upper }} - {% elif BE.ErrorId.ErrorId > 3 %} + {% elif BE.ErrorId.ErrorId == 3 %} + OTHERS + {% else %} {{ BE.ErrorId.ErrorName|upper }} {% endif %} {% endif %} {% endfor %} - {% if not B.FailB %} - BUILD - {% endif %} - {% else %} - Ok - {% endif %} -
\ No newline at end of file diff --git a/python/templates/includes/frontpage/new_packages b/python/templates/includes/frontpage/new_packages index 297ca8b..6c845b7 100644 --- a/python/templates/includes/frontpage/new_packages +++ b/python/templates/includes/frontpage/new_packages @@ -1,10 +1,10 @@ -{% for P in PM %} - - - - {{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }} - - - {{ P.Descriptions }} - -{% endfor %} + + {% for E in EM %} + + + + + {% endfor %} +
+ + {{ E.EbuildId.PackageId.CategoryId.Category }}/{{ E.EbuildId.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}

{{ E.Descriptions }}

\ No newline at end of file diff --git a/python/templates/includes/frontpage/new_qa b/python/templates/includes/frontpage/new_qa deleted file mode 100644 index 5b3607b..0000000 --- a/python/templates/includes/frontpage/new_qa +++ /dev/null @@ -1,10 +0,0 @@ - - {% for QA in QA_tmp %} - - - - - {% endfor %} -
- {{ QA.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ QA.BuildLogId.EbuildId.PackageId.Package }}::{{ QA.BuildLogId.EbuildId.PackageId.RepoId.Repo }} -

{{ QA.SummeryText|truncatewords:3 }}

diff --git a/python/templates/includes/frontpage/new_repoman b/python/templates/includes/frontpage/new_repoman deleted file mode 100644 index e03b095..0000000 --- a/python/templates/includes/frontpage/new_repoman +++ /dev/null @@ -1,10 +0,0 @@ - - {% for RM in RM_tmp %} - - - - - {% endfor %} -
- {{ RM.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ RM.BuildLogId.EbuildId.PackageId.Package }}::{{ RM.BuildLogId.EbuildId.PackageId.RepoId.Repo }} -

{{ RM.SummeryText|truncatewords:3 }}

diff --git a/python/templates/includes/frontpage/new_repoman_qa b/python/templates/includes/frontpage/new_repoman_qa new file mode 100644 index 0000000..61ac691 --- /dev/null +++ b/python/templates/includes/frontpage/new_repoman_qa @@ -0,0 +1,18 @@ + + {% for QA in QA_tmp %} + + + + + {% endfor %} + {% for PR in PR_tmp %} + + + + + {% endfor %} +
+ {{ QA.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ QA.BuildLogId.EbuildId.PackageId.Package }}-{{ QA.BuildLogId.EbuildId.Version }}::{{ QA.BuildLogId.EbuildId.PackageId.RepoId.Repo }} +

{{ QA.SummeryText|truncatewords:3 }}

+ {{ PR.PackageId.CategoryId.Category }}/{{ PR.PackageId.Package }}::{{ PR.PackageId.RepoId.Repo }} +

{{ PR.RepomanText|truncatewords:3 }}

\ No newline at end of file diff --git a/python/templates/includes/frontpage/news b/python/templates/includes/frontpage/news index 27d9dc4..1f1a7d3 100644 --- a/python/templates/includes/frontpage/news +++ b/python/templates/includes/frontpage/news @@ -1,6 +1,13 @@ {% for post in posts %} -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/python/templates/includes/frontpage/updated_packages b/python/templates/includes/frontpage/updated_packages deleted file mode 100644 index 78dc027..0000000 --- a/python/templates/includes/frontpage/updated_packages +++ /dev/null @@ -1,77 +0,0 @@ -{% for E in EM_list %} -
  • -
    - -
    - - {{ E.TimeStamp|date:"D d b Y G i" }} - -
    -

    {{ E.V }} : {{ E.Slot }} 0

    -

    - {% for K in E.EK_tmp %} - {% if K.EbuildId.EbuildId == E.EbuildId and K.KeywordId.Keyword != '*' and '-' not in K.KeywordId.Keyword %} - {% if K.Status == 'Stable' %}{{ K.KeywordId.Keyword }}{% endif %} - {% if K.Status == 'Unstable' %}~{{ K.KeywordId.Keyword }}{% endif %} - {% if K.Status == 'Negative' %}-{{ K.KeywordId.Keyword }}{% endif %} - {% endif %} - {% endfor %} -

    -
    -
    -
    -
  • -{% endfor %} diff --git a/python/templates/includes/hero-section/end b/python/templates/includes/hero-section/end deleted file mode 100644 index 492b151..0000000 --- a/python/templates/includes/hero-section/end +++ /dev/null @@ -1,3 +0,0 @@ - - -
    \ No newline at end of file diff --git a/python/templates/includes/hero-section/start b/python/templates/includes/hero-section/start deleted file mode 100644 index 8e9d73c..0000000 --- a/python/templates/includes/hero-section/start +++ /dev/null @@ -1,3 +0,0 @@ -
    -
    -
    \ No newline at end of file diff --git a/python/templates/includes/layout/footer.html b/python/templates/includes/layout/footer.html index 6767871..a6860e6 100644 --- a/python/templates/includes/layout/footer.html +++ b/python/templates/includes/layout/footer.html @@ -2,30 +2,37 @@
    - {% include "includes/layout/footer_db_update.html" %} + {% if page.footer %}{{ page.footer }}{% endif %}

    Questions or comments?

    - Please feel free to contact us. + Please feel free to contact us.
    +
    +
    +
    + {% include "includes/layout/footer_sitemap.html" %} +
    +
    +
    -
    +
    -
    +
    © 2001-{% now "Y" %} Gentoo Foundation, Inc.
    Gentoo is a trademark of the Gentoo Foundation, Inc. The contents of this document, unless otherwise expressly stated, are licensed under the - CC-BY-SA-3.0 license. - The Gentoo Name and Logo Usage Guidelines apply. + CC-BY-SA-3.0 license. + The Gentoo Name and Logo Usage Guidelines apply.
    - + \ No newline at end of file diff --git a/python/templates/includes/layout/footer_db_update.html b/python/templates/includes/layout/footer_db_update.html deleted file mode 100644 index 60284a5..0000000 --- a/python/templates/includes/layout/footer_db_update.html +++ /dev/null @@ -1,10 +0,0 @@ -

    Gentoo Packages Database

    -
    -
    - Data currrent as of
    {{ jobs.TimeStamp|date:"D d b Y G i" }} -
    -
    -
    -
    -
    -
    diff --git a/python/templates/includes/layout/footer_sitemap.html b/python/templates/includes/layout/footer_sitemap.html new file mode 100644 index 0000000..3923ce3 --- /dev/null +++ b/python/templates/includes/layout/footer_sitemap.html @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/python/templates/includes/layout/head.html b/python/templates/includes/layout/head.html index 8e403ee..7f17fd8 100644 --- a/python/templates/includes/layout/head.html +++ b/python/templates/includes/layout/head.html @@ -13,17 +13,13 @@ - - - - - - {% if page.extracss %}{% for css in page.extracss %}{% endfor %}{% endif %} - + + + - {% if page.meta %}{{ page.meta|safe|escape }}{% endif %} + diff --git a/python/templates/includes/layout/header.html b/python/templates/includes/layout/header.html index 4968f1f..63cba60 100644 --- a/python/templates/includes/layout/header.html +++ b/python/templates/includes/layout/header.html @@ -4,24 +4,24 @@ @@ -52,22 +52,16 @@ -
    - - -
    + +
    diff --git a/python/templates/includes/layout/sponsor.html b/python/templates/includes/layout/sponsor.html new file mode 100644 index 0000000..9ebd19a --- /dev/null +++ b/python/templates/includes/layout/sponsor.html @@ -0,0 +1,9 @@ + diff --git a/python/templates/includes/navigation/primary b/python/templates/includes/navigation/primary index 76fa273..9db245d 100644 --- a/python/templates/includes/navigation/primary +++ b/python/templates/includes/navigation/primary @@ -1,9 +1,10 @@ -{% for node in pages %} - {% if node.nav1_show %}{% if node.nav1 != 'login' %} - {% if page.nav1 == node.nav1 %} -
  • {% if node.nav_title %}{{ node.nav_title }}{% else %}{{node.title}}{% endif %}
  • +{% for meny in menys %} + {% if meny.view %} + {% if activemeny.name == meny.name %} +
  • {% else %} -
  • {% if node.nav_title %}{{ node.nav_title }}{% else %}{{node.title}}{% endif %}
  • +
  • {% endif %} - {% endif %}{% endif %} + {{meny.title}}
  • + {% endif %} {% endfor %} diff --git a/python/templates/includes/navigation/secondary b/python/templates/includes/navigation/secondary index 60898ab..ad11ad5 100644 --- a/python/templates/includes/navigation/secondary +++ b/python/templates/includes/navigation/secondary @@ -1,5 +1,10 @@ -{% for node in subpages %} - {% if page.PageId == node.PageId.PageId %} -
  • {% if node.navtitle %}{{ node.navtitle }}{% else %}{{node.title}}{% endif %}
  • +{% for meny in submenys %} + {% if meny.view %} + {% if subactivemeny == meny.name %} +
  • + {% else %} +
  • {% endif %} + {{meny.title}}
  • + {% endif %} {% endfor %} diff --git a/python/templates/includes/navigation/tertiary b/python/templates/includes/navigation/tertiary deleted file mode 100644 index 500c358..0000000 --- a/python/templates/includes/navigation/tertiary +++ /dev/null @@ -1,12 +0,0 @@ -{% assign pages_list2 = pages_list | sort:"nav3-weight" %} -{% for node in pages_list2 %} - {% if page.nav1 == node.nav1 and page.nav2 == node.nav2 and node.nav3-show == true %} - {% if page.nav3 == node.nav3 %} -
  • {% if node.navtitle %}{{ node.navtitle }}{% else %}{{node.title}}{% endif %}
  • - {% else %} -
  • {% if node.navtitle %}{{ node.navtitle }}{% else %}{{node.title}}{% endif %}
  • - {% endif %} - {% endif %} -{% endfor %} -{% assign pages_list = nil %} -{% assign pages_list2 = nil %} \ No newline at end of file diff --git a/python/templates/includes/partials/download-link-raw.html b/python/templates/includes/partials/download-link-raw.html deleted file mode 100644 index 0de2157..0000000 --- a/python/templates/includes/partials/download-link-raw.html +++ /dev/null @@ -1,5 +0,0 @@ - - - {{ title }}{%if tag %} {{ tag }}{% endif %} - {{ date }} - \ No newline at end of file diff --git a/python/templates/includes/partials/download-link.html b/python/templates/includes/partials/download-link.html deleted file mode 100644 index 14a2939..0000000 --- a/python/templates/includes/partials/download-link.html +++ /dev/null @@ -1,4 +0,0 @@ -{% capture url %}{{ include.arch }}/autobuilds/{{ site.data.downloads[include.arch][include.type][include.id].filename }}{% endcapture %} -{% assign date = site.data.downloads[include.arch][include.type][include.id].date %} -{% assign size = site.data.downloads[include.arch][include.type][include.id].size %} -{% include partials/download-link-raw.html title=include.title tag=include.tag url=url urlprefix='http://distfiles.gentoo.org/releases/' date=date size=size %} \ No newline at end of file diff --git a/python/templates/includes/partials/irc-channel.html b/python/templates/includes/partials/irc-channel.html deleted file mode 100644 index b7e6dba..0000000 --- a/python/templates/includes/partials/irc-channel.html +++ /dev/null @@ -1,8 +0,0 @@ - - - #{{ channel.name }} - - - {{ channel.description }} - - \ No newline at end of file diff --git a/python/templates/includes/partials/mailinglist.html b/python/templates/includes/partials/mailinglist.html deleted file mode 100644 index 39a9af1..0000000 --- a/python/templates/includes/partials/mailinglist.html +++ /dev/null @@ -1,21 +0,0 @@ - - - {{ list.name }} - {% if list.moderated %} - - {% endif %} - - - {{ list.description }} - {% if list.moderators %} -
    Moderators: {{ list.moderators | join:', '}} - {% endif %} - - -
    - - - -
    - - \ No newline at end of file diff --git a/python/templates/includes/partials/sponsor.html b/python/templates/includes/partials/sponsor.html deleted file mode 100644 index 056d14e..0000000 --- a/python/templates/includes/partials/sponsor.html +++ /dev/null @@ -1,14 +0,0 @@ - -
    \ No newline at end of file diff --git a/python/templates/layout/base.html b/python/templates/layout/base.html index 8f10f6e..bc31ee4 100644 --- a/python/templates/layout/base.html +++ b/python/templates/layout/base.html @@ -1,21 +1,20 @@ {% include "includes/layout/head.html" %} - + {% include "includes/layout/header.html" %}
    -
    +
    {% block content %}{% endblock %} + {% include "includes/layout/sponsor.html" %}
    {% include "includes/layout/footer.html" %} - {% if page.extrajs %}{% for js in page.extrajs %}{% endfor %}{% endif %} - {% if page.inlinejs %}{% endif %} + + diff --git a/python/templates/pages/build_req/index.html b/python/templates/pages/build_req/index.html deleted file mode 100644 index 979921c..0000000 --- a/python/templates/pages/build_req/index.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    - -
    - - {% include "includes/frontpage/new_build_req" %} -
    -
    -
    -{% endblock %} diff --git a/python/templates/pages/categories/index.html b/python/templates/pages/categories/index.html deleted file mode 100644 index f9463e9..0000000 --- a/python/templates/pages/categories/index.html +++ /dev/null @@ -1,61 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -
    -
    - - -

    Packages

    - -
    -
    -
    -
    -

    Browse Categories

    -
    -
    -
      - {% for C_list in CM_tmp %} -
    • {{ C_list.letter }}
    • - {% for CM in C_list.CM_list %} -
    • {{CM.Category }}
    • - {% endfor %} - {% endfor %} -
    -
    -
    -
    - -
    - -
    -
    -
    -{% endblock %} diff --git a/python/templates/pages/categories/packages/index.html b/python/templates/pages/categories/packages/index.html deleted file mode 100644 index 0e5678d..0000000 --- a/python/templates/pages/categories/packages/index.html +++ /dev/null @@ -1,63 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -
    -
    - - -
    -
    -

    - - {{ C.CategoryId.Category }} -

    -
    -
    -

    - {{ C.Descriptions }} -

    -
    -
    -
    - -
    -
    - - -
    -
    -

    All packages

    -
    - -{% for PM in PM_tmp %} - - - - -{% endfor %} - -
    {{ PM.PackageId.Package }}{{ PM.Descriptions }}
    -
    -
    -
    -
    -
    -

    Statistics

    -
    -
    - {{ PM_tmp|length }} Packages -
    -
    -
    -
    - -
    -
    -
    -{% endblock %} diff --git a/python/templates/pages/categories/packages/versions/ebuild/index.html b/python/templates/pages/categories/packages/versions/ebuild/index.html deleted file mode 100644 index 49ad3e5..0000000 --- a/python/templates/pages/categories/packages/versions/ebuild/index.html +++ /dev/null @@ -1,75 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -
    -

    {{ E.PackageId.CategoryId.Category }}/{{ E.PackageId.Package }}

    - - {% for EM in EM_tmp %} - - - - - {% endfor %} -
    - {{ E.PackageId.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}

    - Build -
    - {% for K in EK_tmp %} - {% if K.EbuildId.EbuildId == E.EbuildId and K.KeywordId.Keyword != '*' %} - {% if K.Status == 'Stable' %}{{ K.KeywordId.Keyword }}{% endif %} - {% if K.Status == 'Unstable' %}{{ K.KeywordId.Keyword }}{% endif %} - {% if K.Status == 'Negative' %}{{ K.KeywordId.Keyword }}{% endif %} - {% endif %} - {% endfor %} -

    - {% for U in EU_tmp %} - {% if U.Status %} - {{ U.UseId.Flag }} - {% else %} - {{ U.UseId.Flag }} - {% endif %} - {% endfor %} -

    - {% for R in ER_tmp %} - {{ R.RestrictionId.Restriction }} - {% endfor %} -

    -
    -
    -
    - - {% for BL in BL_tmp %} - - - - {% endfor %} -
    - {% for FI in fi_tmp %} - {% if FI.BuildLogId == BL.BuildLogId %} - {% if FI.Blo %} - Others - {% else %} - {% if FI.qa %} - Qa - {% else %} - Qa - {% endif %} - {% if FI.repoman %} - Repoman - {% else %} - Repoman - {% endif %} - - {% if FI.Blb %} - Build - {% else %} - Build - {% endif %} - {% endif %} - {% endif %} - {% endfor %} - More info -
    -
    -
    -{% endblock %} \ No newline at end of file diff --git a/python/templates/pages/categories/packages/versions/index.html b/python/templates/pages/categories/packages/versions/index.html deleted file mode 100644 index 7300f07..0000000 --- a/python/templates/pages/categories/packages/versions/index.html +++ /dev/null @@ -1,233 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -
    -
    -
    - - -
    -
    -

    - {{ P.PackageId.Package }}/ -
    - -
    {{ P.PackageId.Package }}
    -
    -

    -
    -
    -

    - {{ P.Descriptions }} -

    - -

    - https://wiki.gnome.org/Accessibility -

    -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - -
    -
    -
    -
    -

    - Available Versions -

    -
    - {% for E in EM_info %} - - - - - - - - - - - - - -
    - {{ E.Version }} :{{ E.Slot }}:{{ P.PackageId.RepoId.Repo }} - {% for R in E.ER_tmp %} - {{ R.RestrictionId.Restriction|first|upper }} - {% endfor %} - - {{ E.TimeStamp|date:"D d b Y G i" }} - -
    - {% for K in E.EK_tmp %} - {% if K.EbuildId.EbuildId == E.EbuildId and K.KeywordId.Keyword != '*' and '-' not in K.KeywordId.Keyword %} - {% if K.Status == 'Stable' %}{{ K.KeywordId.Keyword }}{% endif %} - {% if K.Status == 'Unstable' %}~{{ K.KeywordId.Keyword }}{% endif %} - {% if K.Status == 'Negative' %}-{{ K.KeywordId.Keyword }}{% endif %} - {% endif %} - {% endfor %} -
    - {% for U in E.EU_tmp %} - {% if U.Status %} - {{ U.UseId.Flag }} - {% endif %} - {% endfor %} -
    - {% for BL in E.BL_tmp %} - {% for FI in E.fi_tmp %} - {% if FI.BuildLogId == BL.BuildLogId %} - {% if FI.Blo %} - Others - {% else %} - {% if FI.qa %} - Qa - {% else %} - Qa - {% endif %} - {% if FI.repoman %} - Repoman - {% else %} - Repoman - {% endif %} - - {% if FI.Blb %} - Build - {% else %} - Build - {% endif %} - {% endif %} - {% endif %} - {% endfor %} - More info - {% endfor %} -
    -{% endfor %} -
    - - - - -
    -
    -

    Package Metadata

    -
    - -
    - -
    -
    -

    Changelog

    -
    - -
    - -
    - -
    - - - -
    -
    -
    - -{% endblock %} diff --git a/python/templates/pages/home/index.html b/python/templates/pages/home/index.html deleted file mode 100644 index 2d91149..0000000 --- a/python/templates/pages/home/index.html +++ /dev/null @@ -1,70 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -

    Welcome to the Home of 19,363 Gentoo Packages

    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    -
    -

    - - Added Packages -

    -
    -
    - - {% include "includes/frontpage/new_packages" %} -
    -
    -
    -
    -
    -

    - - Updated Packages -

    -
    -
      - {% include "includes/frontpage/updated_packages" %} -
    -
    -
    - -
    - - {% include "includes/frontpage/new_build_req" %} -
    -
    -
    -
    - -
    - - {% include "includes/frontpage/new_logs" %} -
    -
    -
    -{% endblock %} diff --git a/python/templates/pages/logs/all/build/index.html b/python/templates/pages/logs/all/build/index.html deleted file mode 100644 index efac3b3..0000000 --- a/python/templates/pages/logs/all/build/index.html +++ /dev/null @@ -1,103 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -
    -

    - - Build Logs On Packages -

    - {% if BL_tmp.has_other_pages %} -
      - {% if BL_tmp.has_previous %} -
    • «
    • - {% else %} -
    • «
    • - {% endif %} - {% for i in BL_tmp.paginator.page_range %} - {% if BL_tmp.number == i %} -
    • {{ i }} (current)
    • - {% else %} -
    • {{ i }}
    • - {% endif %} - {% endfor %} - {% if BL_tmp.has_next %} -
    • »
    • - {% else %} -
    • »
    • - {% endif %} -
    -{% endif %} -
    -
    - - {% for BL in BL_tmp %} - - - - -{% endfor %} -
    - - {{ BL.C }}//{{ BL.P }}-{{ BL.V }}::{{ BL.R }} - - -

    {{ BL.SummeryText|truncatewords:5 }}

    - {% if BL.Fail %} - {% if BL.FI.others %} - Others - {% else %} - {% if BL.FI.qa %} - - {% else %} - - {% endif %} - Qa - {% if BL.FI.repoman %} - - {% else %} - - {% endif %} - Repoman - {% if BL.FI.TestRun %} - {% if BL.FI.test %} - - {% else %} - - {% endif %} - Test - {% endif %} - {% if BL.FI.build %} - {{ BL.FI.builderror }} - {% else %} - Build - {% endif %} - - {% endif %} - {% else %} - Ok - {% endif %} -
    -
    -
    -{% if BL_tmp.has_other_pages %} -
      - {% if BL_tmp.has_previous %} -
    • «
    • - {% else %} -
    • «
    • - {% endif %} - {% for i in BL_tmp.paginator.page_range %} - {% if BL_tmp.number == i %} -
    • {{ i }} (current)
    • - {% else %} -
    • {{ i }}
    • - {% endif %} - {% endfor %} - {% if BL_tmp.has_next %} -
    • »
    • - {% else %} -
    • »
    • - {% endif %} -
    -{% endif %} -{% endblock %} diff --git a/python/templates/pages/logs/build/index.html b/python/templates/pages/logs/build/index.html deleted file mode 100644 index 0bbc96b..0000000 --- a/python/templates/pages/logs/build/index.html +++ /dev/null @@ -1,114 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -

    {{ BLI.C }}/{{ BLI.P }}-{{ BLI.V }}::{{ BLI.R }} - {% if FI.others %} - Others - {% else %} - {% if FI.qa %} - - {% else %} - - {% endif %} - Qa - {% if FI.repoman %} - - {% else %} - - {% endif %} - Repoman - {% if FI.TestRun %} - {% if FI.test %} - - {% else %} - - {% endif %} - Test - {% endif %} - {% if FI.build %} - {{ FI.builderror }} - {% else %} - Build - {% endif %} - - {% endif %} -

    - {% if BLI.BugId %} - - Bug Gentoo {{ BLI.BugId }} - - {% endif %} -
    -
    -
    -

    Host information

    - Host: {{ BLI.hostname }}
    - Config: {{BLI.config }}
    - Profile: {{BLI.profile }}
    - Emerge options : -
    - {% if BLI.use_enable %} -
    -

    Enabled useflags

    - {% for use in BLI.use_enable %} - {{ use }} - {% endfor %} -
    - {% endif %} - {% if BLI.use_disable %} -
    -

    Disabled useflags

    - {% for use in BLI.use_disable %} - {{ use }} - {% endfor %} -
    -{% endif %} -
    -
    -
    - {% if BLI.Summery_text %} -

    Summery:

    - {{ BLI.Summery_text|linebreaks }} - {% endif %} -
    -
    -
    -
    - {% if BLI.Repoman %} -

    Repoman Summery:

    - {{ BLI.Repoman|linebreaks }} - {% endif %} -
    -
    -
    -
    - {% if BLI.QA %} -

    QA Summery:

    - {{ BLI.QA|linebreaks }} - {% endif %} -
    -
    -
    -
    -

    Emerge Info:

    - {{ BLI.emerge_info_text|linebreaks }} -
    -
    -
    -
    - {% if BLI.logname %} -
    - Log file name:{{ BLI.logname }}
    - Raw log
    - {% if user.is_authenticated %} - {% if bugzillalogin %} -
    - {% else %} - - {% endif %} - Summit log to Gentoo's bugzilla - {% endif %} - {% endif %} -
    -
    -{% endblock %} diff --git a/python/templates/pages/logs/build/submitbug/index.html b/python/templates/pages/logs/build/submitbug/index.html deleted file mode 100644 index 4f1458f..0000000 --- a/python/templates/pages/logs/build/submitbug/index.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    -{% csrf_token %} -{{ form.as_p }} - -
    -{% endblock %} diff --git a/python/templates/pages/logs/index.html b/python/templates/pages/logs/index.html deleted file mode 100644 index ff5f354..0000000 --- a/python/templates/pages/logs/index.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends "layout/base.html" %} -{% block content %} -
    - -
    - - {% include "includes/frontpage/new_logs" %} -
    -
    -
    -
    - -
    - - {% include "includes/frontpage/new_repoman" %} -
    -
    -
    -
    - -
    - - {% include "includes/frontpage/new_qa" %} -
    -
    -
    -{% endblock %} diff --git a/python/templates/pages/packages/category/index.html b/python/templates/pages/packages/category/index.html new file mode 100644 index 0000000..2538f88 --- /dev/null +++ b/python/templates/pages/packages/category/index.html @@ -0,0 +1,33 @@ +{% extends "layout/base.html" %} +{% block content %} +
    +

    Packages in {{ C.Category }}

    +
    + {% for PM in PM_tmp %} + + + + + +
    + {{ C.Category }}/{{ PM.Package }} +

    Commit Log

    +
    +

    {{ PM.Descriptions }}

    +

    Versions + {% if PM.Repoman %} + Repoman + {% endif %} +

    +
    + {% if forloop.last %} +
    + {% else %} + {% if forloop.counter|divisibleby:"2" %} +
    + {% endif %} + {% endif %} + {% endfor %} +
    + +{% 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 new file mode 100644 index 0000000..e000a53 --- /dev/null +++ b/python/templates/pages/packages/ebuilds/ebuild/index.html @@ -0,0 +1,47 @@ +{% extends "layout/base.html" %} +{% block content %} +
    +
    +

    {{ E.PackageId.CategoryId.Category }}/{{ E.PackageId.Package }}

    + + {% for EM in EM_tmp %} + + + + + {% endfor %} +
    + {{ E.PackageId.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}

    + Build + {% for BL in BL_tmp %} + {% if BL.Fail %} + Fail + {% else %} + Success + {% endif %} + {% endfor %} +
    + {% for K in EK_tmp %} + {% if K.EbuildId.EbuildId == E.EbuildId and K.KeywordId.Keyword != '*' %} + {% if K.Status == 'Stable' %}{{ K.KeywordId.Keyword }}{% endif %} + {% if K.Status == 'Unstable' %}{{ K.KeywordId.Keyword }}{% endif %} + {% if K.Status == 'Negative' %}{{ K.KeywordId.Keyword }}{% endif %} + {% endif %} + {% endfor %} +

    + {% for U in EU_tmp %} + {% if U.Status %} + {{ U.UseId.Flag }} + {% else %} + {{ U.UseId.Flag }} + {% endif %} + {% endfor %} +

    + {% for R in ER_tmp %} + {{ R.RestrictionId.Restriction }} + {% endfor %} +

    +
    +
    +
    +{% 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 new file mode 100644 index 0000000..630b524 --- /dev/null +++ b/python/templates/pages/packages/ebuilds/index.html @@ -0,0 +1,30 @@ +{% extends "layout/base.html" %} +{% block content %} +
    +
    +

    {{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }}

    +

    Commit log

    +

    {{ P.Gitlog|linebreaksbr }}

    + + {% for E in EM_tmp %} + + + + + {% endfor %} +
    + {{ P.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }} + {% for K in EK_tmp %} + {% if K.EbuildId.EbuildId == E.EbuildId.EbuildId and K.KeywordId.Keyword != '*' %} + {% if K.Status == 'Stable' %}{{ K.KeywordId.Keyword }}{% endif %} + {% if K.Status == 'Unstable' %}{{ K.KeywordId.Keyword }}{% endif %} + {% if K.Status == 'Negative' %}{{ K.KeywordId.Keyword }}{% endif %} + {% endif %} + {% endfor %} +
    +
    + {% if PR %} + Repoman + {% endif %} +
    +{% endblock %} \ No newline at end of file diff --git a/python/templates/pages/packages/index.html b/python/templates/pages/packages/index.html new file mode 100644 index 0000000..7139c87 --- /dev/null +++ b/python/templates/pages/packages/index.html @@ -0,0 +1,28 @@ +{% extends "layout/base.html" %} +{% block content %} +
    +

    Categories

    +
    + {% for CM in CM_tmp %} + + + + + +
    + {{CM.Category }} + +

    {{ CM.Descriptions }}

    +

    Packages

    +
    + {% if forloop.last %} +
    + {% else %} + {% if forloop.counter|divisibleby:"2" %} +
    + {% endif %} + {% endif %} + {% endfor %} +
    + +{% 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 new file mode 100644 index 0000000..ec46b8d --- /dev/null +++ b/python/templates/pages/projects/add/index.html @@ -0,0 +1,8 @@ +{% extends "layout/base.html" %} +{% block content %} +
    + {% csrf_token %} + {{ Form }} + +
    +{% endblock %} diff --git a/python/templates/pages/projects/detail/index.html b/python/templates/pages/projects/detail/index.html new file mode 100644 index 0000000..afee9d5 --- /dev/null +++ b/python/templates/pages/projects/detail/index.html @@ -0,0 +1,4 @@ +{% extends "layout/base.html" %} +{% block content %} +

    Hej

    +{% endblock %} diff --git a/python/templates/pages/projects/index.html b/python/templates/pages/projects/index.html new file mode 100644 index 0000000..2edf849 --- /dev/null +++ b/python/templates/pages/projects/index.html @@ -0,0 +1,19 @@ +{% extends "layout/base.html" %} +{% block content %} +
    +
    + +
    + {% for project in Projects %} + + + + + {% endfor %} +
    {{ project.title }}

    {{ project.description }}

    +
    +
    + +
    +
    +{% endblock %} diff --git a/python/templates/pages/projects/repos/index.html b/python/templates/pages/projects/repos/index.html new file mode 100644 index 0000000..bc349da --- /dev/null +++ b/python/templates/pages/projects/repos/index.html @@ -0,0 +1,31 @@ +{% extends "layout/base.html" %} +{% block content %} +
    +
    + +
    + {% for project in Projects %} + + + + + {% endfor %} +
    {{ project.title }}

    {{ project.description }}

    +
    +
    + + +
    + {% for project in Projects %} + + + + + {% endfor %} +
    {{ project.title }}

    {{ project.description }}

    +
    +
    + +
    +
    +{% endblock %} diff --git a/python/templates/pages/www/index.html b/python/templates/pages/www/index.html new file mode 100644 index 0000000..a8fdf61 --- /dev/null +++ b/python/templates/pages/www/index.html @@ -0,0 +1,49 @@ +{% extends "layout/base.html" %} +{% block content %} +{% include "includes/container/start" %} +
    +
    +

    + Welcome to Gentoo . +

    +
    + +
    +{% include "includes/container/end" %} +
    +{% include "includes/frontpage/news" %} +
    + + + +
    +
    +

    New Packages more at the New Packages

    + {% include "includes/frontpage/new_packages" %} +
    +
    +

    New Logs more at the New Logs

    + {% include "includes/frontpage/new_logs" %} +
    +
    + +
    +
    +

    New Build Requests more at the New Build Requests

    + {% include "includes/frontpage/new_build_req" %} +
    +
    +

    New Repoman or QA's on the New Repoman or QA's

    + {% include "includes/frontpage/new_repoman_qa" %} +
    +
    + +
    + +{% endblock %} diff --git a/python/templates/registration/password_change_form.html b/python/templates/registration/password_change_form.html new file mode 100644 index 0000000..7761fe4 --- /dev/null +++ b/python/templates/registration/password_change_form.html @@ -0,0 +1,13 @@ +{% extends 'layout/base.html' %} + +{% block title %}Change you password{% endblock %} + +{% block content %} +

    Change you password

    +

    Use the form below to change your password.

    +
    + {{ form.as_p }} +

    + {% csrf_token %} +
    +{% endblock %} diff --git a/python/www/__init__.py b/python/www/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/www/admin.py b/python/www/admin.py new file mode 100644 index 0000000..168b0b2 --- /dev/null +++ b/python/www/admin.py @@ -0,0 +1,7 @@ +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 new file mode 100644 index 0000000..872e206 --- /dev/null +++ b/python/www/apps.py @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..14da8b2 --- /dev/null +++ b/python/www/migrations/0001_initial.py @@ -0,0 +1,64 @@ +# 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 new file mode 100644 index 0000000..e69de29 diff --git a/python/www/models.py b/python/www/models.py new file mode 100644 index 0000000..85dbc35 --- /dev/null +++ b/python/www/models.py @@ -0,0 +1,74 @@ +# 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 new file mode 100644 index 0000000..aab4cf9 --- /dev/null +++ b/python/www/router.py @@ -0,0 +1,31 @@ +# 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 new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/python/www/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/python/www/urls.py b/python/www/urls.py new file mode 100644 index 0000000..88a9cac --- /dev/null +++ b/python/www/urls.py @@ -0,0 +1,7 @@ +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 new file mode 100644 index 0000000..6bc36f3 --- /dev/null +++ b/python/www/utils.py @@ -0,0 +1,34 @@ +# 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 new file mode 100644 index 0000000..9a1ace4 --- /dev/null +++ b/python/www/views.py @@ -0,0 +1,19 @@ +# 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/gentoo-www.sql b/sql/gentoo-www.sql deleted file mode 100644 index 9c1d758..0000000 --- a/sql/gentoo-www.sql +++ /dev/null @@ -1,244 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.2.13 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: Jul 14, 2015 at 04:57 PM --- Server version: 10.0.15-MariaDB-log --- PHP Version: 5.6.10-pl0-gentoo - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -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 utf8 */; - --- --- Database: `gentoo-www` --- - --- -------------------------------------------------------- - --- --- Table structure for table `layout` --- - -CREATE TABLE IF NOT EXISTS `layout` ( -`layout_id` int(11) NOT NULL, - `layout` varchar(20) NOT NULL, - `layout_file` varchar(20) NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `pages` --- - -CREATE TABLE IF NOT EXISTS `pages` ( -`page_id` int(11) NOT NULL, - `nav_title` varchar(200) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `nav1` varchar(100) NOT NULL, - `nav1_show` tinyint(1) NOT NULL, - `nav1_weight` int(11) NOT NULL, - `meta` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `inlinejs` varchar(200) NOT NULL, - `body_class` varchar(20) NOT NULL, - `layout_id` int(11) NOT NULL, - `sub_menu` tinyint(1) NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `posts` --- - -CREATE TABLE IF NOT EXISTS `posts` ( -`post_id` int(11) NOT NULL, - `title` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `text` text NOT NULL, - `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `site_settings` --- - -CREATE TABLE IF NOT EXISTS `site_settings` ( -`site_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, - `cdnurl` varchar(100) NOT NULL, - `layout_path` varchar(11) NOT NULL, - `download_url` varchar(100) NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `sponsors` --- - -CREATE TABLE IF NOT EXISTS `sponsors` ( -`sponsors_id` int(11) NOT NULL, - `name` varchar(200) NOT NULL, - `ads_name` varchar(100) NOT NULL, - `img` varchar(100) NOT NULL, - `ads_img` varchar(100) NOT NULL, - `link` varchar(100) NOT NULL, - `ads_link` varchar(100) NOT NULL, - `blurb` text NOT NULL, - `ads_blure` varchar(200) NOT NULL, - `ads_alt_name` varchar(200) NOT NULL, - `weight` int(11) NOT NULL, - `active` tinyint(1) NOT NULL, - `ads_active` tinyint(1) NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `subsub_pages` --- - -CREATE TABLE IF NOT EXISTS `subsub_pages` ( -`subsub_page_id` int(11) NOT NULL, - `nav_title` varchar(200) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `sub_page_id` int(11) NOT NULL, - `nav3` varchar(100) NOT NULL, - `nav3_show` tinyint(1) NOT NULL, - `nav3_weight` int(11) NOT NULL, - `meta` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `inlinejs` varchar(200) NOT NULL, - `layout_id` varchar(100) NOT NULL, - `body_class` varchar(20) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `sub_pages` --- - -CREATE TABLE IF NOT EXISTS `sub_pages` ( -`sub_page_id` int(11) NOT NULL, - `nav_title` varchar(200) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `page_id` int(11) NOT NULL, - `nav2` varchar(100) NOT NULL, - `nav2_show` tinyint(1) NOT NULL, - `nav2_weight` int(11) NOT NULL, - `meta` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `inlinejs` varchar(200) NOT NULL, - `layout_id` int(11) NOT NULL, - `body_class` varchar(20) NOT NULL, - `sub_menu` tinyint(1) NOT NULL -) ENGINE=MyISAM AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; - --- --- Indexes for dumped tables --- - --- --- Indexes for table `layout` --- -ALTER TABLE `layout` - ADD PRIMARY KEY (`layout_id`); - --- --- Indexes for table `pages` --- -ALTER TABLE `pages` - ADD PRIMARY KEY (`page_id`); - --- --- Indexes for table `posts` --- -ALTER TABLE `posts` - ADD PRIMARY KEY (`post_id`); - --- --- Indexes for table `site_settings` --- -ALTER TABLE `site_settings` - ADD PRIMARY KEY (`site_id`); - --- --- Indexes for table `sponsors` --- -ALTER TABLE `sponsors` - ADD PRIMARY KEY (`sponsors_id`); - --- --- Indexes for table `subsub_pages` --- -ALTER TABLE `subsub_pages` - ADD PRIMARY KEY (`subsub_page_id`); - --- --- Indexes for table `sub_pages` --- -ALTER TABLE `sub_pages` - ADD PRIMARY KEY (`sub_page_id`); - --- --- AUTO_INCREMENT for dumped tables --- - --- --- AUTO_INCREMENT for table `layout` --- -ALTER TABLE `layout` -MODIFY `layout_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8; --- --- AUTO_INCREMENT for table `pages` --- -ALTER TABLE `pages` -MODIFY `page_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=9; --- --- AUTO_INCREMENT for table `posts` --- -ALTER TABLE `posts` -MODIFY `post_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; --- --- AUTO_INCREMENT for table `site_settings` --- -ALTER TABLE `site_settings` -MODIFY `site_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; --- --- AUTO_INCREMENT for table `sponsors` --- -ALTER TABLE `sponsors` -MODIFY `sponsors_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7; --- --- AUTO_INCREMENT for table `subsub_pages` --- -ALTER TABLE `subsub_pages` -MODIFY `subsub_page_id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `sub_pages` --- -ALTER TABLE `sub_pages` -MODIFY `sub_page_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=25; -/*!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/sql/gentoo-www_data.sql b/sql/gentoo-www_data.sql deleted file mode 100644 index 29cf9cd..0000000 --- a/sql/gentoo-www_data.sql +++ /dev/null @@ -1,106 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.2.13 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: Jul 14, 2015 at 04:59 PM --- Server version: 10.0.15-MariaDB-log --- PHP Version: 5.6.10-pl0-gentoo - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -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 utf8 */; - --- --- Database: `gentoo-www` --- - --- --- Dumping data for table `layout` --- - -INSERT INTO `layout` (`layout_id`, `layout`, `layout_file`) VALUES -(1, 'tyrian', 'tyrian.html'), -(2, 'page', 'page.html'), -(3, 'box', 'box.html'), -(4, 'post', 'post.html'), -(5, 'page-pre', 'page-pre.html'), -(6, 'page-nav3', 'page-nav3.html'); - --- --- Dumping data for table `pages` --- - -INSERT INTO `pages` (`page_id`, `nav_title`, `title`, `description`, `nav1`, `nav1_show`, `nav1_weight`, `meta`, `url`, `inlinejs`, `body_class`, `layout_id`, `sub_menu`) VALUES -(1, 'Home', 'Home', 'The website of Gentoo, a flexible Linux or BSD distribution.', 'home', 1, 1, '', 'home', '', '', 1, 0), -(2, 'Downloads', 'Downloads', '', 'downloads', 1, 9, '', 'downloads', '$(function() { $(''#other-arches a:first'').tab(''show''); });', '', 1, 1), -(3, 'Get Started', 'Getting Started with Gentoo Linux', '', 'get-started', 1, 5, '', 'get-started', '', '', 1, 1), -(4, 'Inside Gentoo', 'Inside Gentoo', '', 'inside-gentoo', 1, 10, '', 'inside-gentoo', '', '', 1, 1), -(5, 'Support', 'Support', '', 'support', 1, 20, '', 'support', '', '', 1, 1), -(6, 'Get Involved', 'Get Involved', '', 'get-involved', 1, 30, '', 'get-involved', '', '', 1, 1), -(7, '', 'Donate', '', 'donate', 1, 0, '', 'donate', '', '', 1, 0); - --- --- Dumping data for table `posts` --- - -INSERT INTO `posts` (`post_id`, `title`, `url`, `text`, `time_stamp`) VALUES -(1, 'Git changes & impact to Overlays hostnames', '/news/2015/04/25/anongit-overlays.html', '

    As previously announced\r\n[1]\r\n[2],\r\nand previously in the discussion of merging Overlays with Gentoo’s primary SCM\r\nhosting (CVS+Git):\r\nThe old overlays hostnames (git.overlays.gentoo.org and\r\noverlays.gentoo.org) have now been disabled, as well as non-SSH traffic to\r\ngit.gentoo.org. This was a deliberate move to seperate anonymous versus\r\nauthenticated Git traffic, and ensure that anonymous Git traffic can continued\r\nto be scaled when we go ahead with switching away from CVS. Anonymous and\r\nauthenticated Git is now served by seperate systems, and no anonymous Git\r\ntraffic is permitted to the authenticated Git server.

    \r\n\r\n

    If you have anonymous Git checkouts from any of the affected hostnames, you\r\nshould switch them to using one of these new URLs:

    \r\n\r\n
      \r\n
    • https://anongit.gentoo.org/git/$REPO
    • \r\n
    • http://anongit.gentoo.org/git/$REPO
    • \r\n
    • git://anongit.gentoo.org/$REPO
    • \r\n
    \r\n\r\n

    If you have authenticated Git checkouts from the same hosts, you should switch\r\nthem to this new URL:

    \r\n\r\n
      \r\n
    • git+ssh://git@git.gentoo.org/$REPO
    • \r\n
    \r\n\r\n

    In either case, you can trivially update any existing checkout with:
    \r\ngit remote set-url origin git+ssh://git@git.gentoo.org/$REPO
    \r\n(be sure to adjust the path of the repository and the name of the remote as\r\nneeded).

    ', '2015-06-29 20:15:49'), -(2, 'Gentoo announces total website makeover (not an April Fool''s)', '/news/2015/03/31/website-update.html', '

    Thank you for participating in Gentoo’s 2015 April Fools’ joke!

    \r\n\r\n

    Now that April 1 has passed, we shed a tear as we say goodbye CGA Web™ but also to our website.\r\nOur previous website, that is, that has been with us for more than a decade.\r\nUntil all contents are migrated, you can find the previous version on wwwold.gentoo.org,\r\nplease note that the contents found there are not maintained any longer.

    \r\n\r\n

    As this is indeed a major change, we’re still working out some rough edges\r\nand would appreciate your feedback via email to www@gentoo.org\r\nor on IRC in #gentoo-www.

    \r\n\r\n

    We hope you appreciate the new look and had a great time finding out how terrible you are at Pong and are looking forward\r\nto seeing your reactions once again when we celebrate the launch of the new Gentoo Disk™ set.

    \r\n\r\n

    As for Alex, Robin, and all co-conspirators, thank you again for your participation!

    \r\n\r\n

    The original April 1 news item is still available on the single news display page.

    ', '2015-06-26 20:59:58'); - --- --- Dumping data for table `site_settings` --- - -INSERT INTO `site_settings` (`site_id`, `site`, `title`, `email`, `description`, `url`, `contact`, `cdnurl`, `layout_path`, `download_url`) VALUES -(1, 'www.gentoo.org', 'Gentoo Linux', 'www@gentoo.org', 'News and information from Gentoo Linux', 'https://www.gentoo.org', '/inside-gentoo/contact/', 'https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com', '', 'http://distfiles.gentoo.org/releases/'); - --- --- Dumping data for table `sponsors` --- - -INSERT INTO `sponsors` (`sponsors_id`, `name`, `ads_name`, `img`, `ads_img`, `link`, `ads_link`, `blurb`, `ads_blure`, `ads_alt_name`, `weight`, `active`, `ads_active`) VALUES -(1, 'Oregon State University: Open Source Lab (OSUOSL)', 'OSL', 'osuosl2.png', 'osuosl.png', 'http://osuosl.org', 'http://osuosl.org/contribute', 'Located at [Oregon State University](http://oregonstate.edu) in beautiful Corvallis, Oregon,\r\n the [Open Source Lab](http://osuosl.org) is a focal point of development,\r\n hosting and other assorted services for the Open Source community.\r\n \r\n OSU provides several services to the Gentoo project.\r\n In addition to serving as the primary source mirror for Gentoo, they also provide colocation space for several Gentoo servers.', '', 'OSL', 25, 1, 1), -(2, 'Bytemark Hosting', 'Bytemark', 'bytemark.png', 'bytemark.png', 'http://www.bytemark.co.uk/r/gentoo-sponsors', 'http://www.bytemark.co.uk/r/gentoo-home', 'Bytemark Hosting provide Gentoo Linux with servers and services which drive our network of global mirrors.\r\n They are a leading Internet Service Provider (ISP) in the United Kingdom and provide scalable,\r\n powerful and affordable hosting with lots of "geek friendly" extras as standard.\r\n They''ve deployed Gentoo Linux within their network to provide a flexible solution to difficult problems,\r\n such as providing a network rescue environment for all dedicated hosts.', '', 'Bytemark', 20, 1, 1), -(3, '7L Networks', 'SevenL', 'sevenl.png', 'sevenl.png', 'http://www.7l.com/', 'https://www.sevenl.net/?utm_source=gentoo-org&utm_medium=sponsored-banner&utm_campaign=gentoo-dedica', '[7L](http://www.7l.com/) Networks is a leader in [Cloud Hosting](http://www.7l.com/) services, dedicated servers,\r\n and is a leading [Toronto server colocation provider](http://www.7l.com/business-hosting-solutions/Toronto-Colocation-Hosting-Provider.html).\r\n 7L has been proudly donating server hosting services to Gentoo Linux since 2004.\r\n In addition, they donate dedicated servers to CentOS, Linux Mint, Arch Linux and a number of other open source communities that rely on sponsorship to succeed.', '', 'SevenL', 10, 1, 0), -(4, 'LeaseWeb', 'LeaseWeb', 'leaseweb.png', 'leaseweb.png', 'http://www.leaseweb.com/', 'http://www.leaseweb.com/', '[LeaseWeb](http://www.leaseweb.com/) is a leading Infrastructure as a Service (IaaS) provider serving a worldwide portfolio of over 15,000 customers ranging from SMBs to Enterprises.\r\n Services include Public Cloud, Private Cloud, Hybrid Hosting, Colocation, CDN, and Dedicated Hosting supported by exceptional customer service and technical support.\r\n With more than 60,000 servers under management, LeaseWeb provides infrastructure since 1997.\r\n The company operates 6 data centers in the U.S. and Europe, all of which are backed by a superior worldwide network with a total capacity of more than 3.5 Tbps.', '', 'LeaseWeb', 10, 1, 1), -(6, 'Numberly', 'Numberly', 'numberly.png', 'numberly.png', 'http://www.numberly.com/', 'http://www.numberly.com/', '[Numberly](http://www.numberly.com/) is a 1000mercis Group brand, a pioneer in interactive advertising and marketing, providing innovative solutions\r\n for companies willing to optimise their customer acquisition and retention through interactive media (Internet, mobile phones and tablets).\r\n Numberly helps its clients to design, develop, implement, and maximise the ROI of their interactive marketing and advertising campaigns.\r\n\r\n Numberly proudly provides 3 powerful physical servers dedicated to the Gentoo project with ipv6 support.', '', 'Numberly', 25, 1, 1); - --- --- Dumping data for table `sub_pages` --- - -INSERT INTO `sub_pages` (`sub_page_id`, `nav_title`, `title`, `description`, `page_id`, `nav2`, `nav2_show`, `nav2_weight`, `meta`, `url`, `inlinejs`, `layout_id`, `body_class`, `sub_menu`) VALUES -(1, '', 'About Gentoo', '', 3, 'about', 1, 10, '', 'about', '', 1, '', 0), -(2, '', 'FAQ', '', 3, 'faq', 1, 40, '', 'https://wiki.gentoo.org/wiki/FAQ', '', 1, '', 0), -(3, 'Philosophy', 'The Philosophy of Gentoo', '', 3, 'philosophy', 1, 20, '', 'philosophy', '', 1, '', 0), -(4, 'Screenshots', 'Gentoo Screenshots', '', 3, 'screenshots', 1, 30, '', 'screenshots', '', 1, '', 0), -(5, 'Mirrors', 'Gentoo Source Mirrors', '', 2, 'mirrors', 1, 0, '', 'mirrors', '', 1, '', 0), -(6, 'Signatures', 'Release Media Signatures', '', 2, 'signatures', 1, 0, '', 'signatures', '', 1, '', 0), -(7, 'Developers', 'Current Gentoo Developers', '', 4, 'developers', 1, 10, '', 'developers', '', 1, '', 0), -(8, '', 'Projects', '', 4, 'projects', 1, 20, '', 'https://wiki.gentoo.org/wiki/Project:Gentoo', '', 1, '', 0), -(9, 'Artwork', 'Gentoo Artwork', '', 4, 'artwork', 1, 25, '', 'artwork', '', 1, '', 0), -(10, 'Gentoo Foundation', 'Gentoo Foundation', '', 4, 'foundation', 1, 30, '', 'foundation', '', 6, 'nav-align-h2', 0), -(11, '', 'Sponsors', '', 4, 'sponsors', 1, 40, '', 'sponsors', '', 1, '', 0), -(12, 'Stores', 'Stores offering Gentoo products', '', 4, 'stores', 1, 50, '', 'stores', '', 1, '', 0), -(13, '', 'Contact', '', 4, 'contact', 1, 99, '', 'contact', '', 1, '', 0), -(14, '', 'Documentation', '', 5, 'documentation', 1, 0, '', 'documentation', '', 1, '', 0), -(15, 'News Items', 'Repository News Items', '', 5, 'news-items', 1, 0, '', 'news-items', '', 1, '', 0), -(16, '', 'Package Database', '', 5, 'package-database', 1, 0, '', 'http://packages.gentoo.org/', '', 1, '', 0), -(17, 'Security', 'Gentoo Security', '', 5, 'security', 1, 0, '', 'security', '', 6, 'nav-align-h2', 0), -(18, 'rsync Mirrors', 'Gentoo rsync Mirrors', '', 5, 'mirrors', 1, 0, '', 'mirrors', '', 1, '', 0), -(19, '', 'IRC Channels', '', 6, 'irc', 1, 10, '', 'irc', '', 1, '', 0), -(20, 'Forums', 'Discussion Forums', '', 6, 'forums', 1, 20, '', 'https://forums.gentoo.org/', '', 1, '', 0), -(21, '', 'Mailing Lists', '', 6, 'ml', 1, 30, '', 'mailings-lists', '', 1, '', 0), -(22, 'Contribute', 'Contribute to Gentoo', '', 6, 'contribute', 1, 40, '', 'contribute', '', 1, '', 0), -(23, '', 'Become a Developer', '', 6, 'become-dev', 1, 50, '', 'become-developer', '', 1, '', 0), -(24, 'News', 'News', '', 1, 'news', 1, 0, '', 'news', '', 1, '', 0); - -/*!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/sql/gentoo-www_full.sql b/sql/gentoo-www_full.sql deleted file mode 100644 index b8f7ae0..0000000 --- a/sql/gentoo-www_full.sql +++ /dev/null @@ -1,651 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.2.13 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: Feb 15, 2016 at 03:53 PM --- Server version: 10.0.22-MariaDB-log --- PHP Version: 5.6.16-pl0-gentoo - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -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 utf8 */; - --- --- Database: `gentoo-www` --- - --- -------------------------------------------------------- - --- --- Table structure for table `auth_group` --- - -CREATE TABLE IF NOT EXISTS `auth_group` ( -`id` int(11) NOT NULL, - `name` varchar(80) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `auth_group_permissions` --- - -CREATE TABLE IF NOT EXISTS `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; - --- -------------------------------------------------------- - --- --- Table structure for table `auth_permission` --- - -CREATE TABLE IF NOT EXISTS `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; - --- --- Dumping data for table `auth_permission` --- - -INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES -(1, 'Can add permission', 1, 'add_permission'), -(2, 'Can change permission', 1, 'change_permission'), -(3, 'Can delete permission', 1, 'delete_permission'), -(4, 'Can add group', 2, 'add_group'), -(5, 'Can change group', 2, 'change_group'), -(6, 'Can delete group', 2, 'delete_group'), -(7, 'Can add user', 3, 'add_user'), -(8, 'Can change user', 3, 'change_user'), -(9, 'Can delete user', 3, 'delete_user'), -(10, 'Can add content type', 4, 'add_contenttype'), -(11, 'Can change content type', 4, 'change_contenttype'), -(12, 'Can delete content type', 4, 'delete_contenttype'), -(13, 'Can add session', 5, 'add_session'), -(14, 'Can change session', 5, 'change_session'), -(15, 'Can delete session', 5, 'delete_session'), -(16, 'Can add site', 6, 'add_site'), -(17, 'Can change site', 6, 'change_site'), -(18, 'Can delete site', 6, 'delete_site'); - --- -------------------------------------------------------- - --- --- Table structure for table `auth_user` --- - -CREATE TABLE IF NOT EXISTS `auth_user` ( -`id` int(11) NOT NULL, - `password` varchar(128) NOT NULL, - `last_login` datetime DEFAULT NULL, - `is_superuser` tinyint(1) NOT NULL, - `username` varchar(30) NOT NULL, - `first_name` varchar(30) NOT NULL, - `last_name` varchar(30) NOT NULL, - `email` varchar(254) NOT NULL, - `is_staff` tinyint(1) NOT NULL, - `is_active` tinyint(1) NOT NULL, - `date_joined` datetime NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `auth_user_groups` --- - -CREATE TABLE IF NOT EXISTS `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; - --- -------------------------------------------------------- - --- --- Table structure for table `auth_user_user_permissions` --- - -CREATE TABLE IF NOT EXISTS `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; - --- -------------------------------------------------------- - --- --- Table structure for table `django_content_type` --- - -CREATE TABLE IF NOT EXISTS `django_content_type` ( -`id` int(11) NOT NULL, - `app_label` varchar(100) NOT NULL, - `model` varchar(100) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `django_content_type` --- - -INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES -(2, 'auth', 'group'), -(1, 'auth', 'permission'), -(3, 'auth', 'user'), -(4, 'contenttypes', 'contenttype'), -(5, 'sessions', 'session'), -(6, 'sites', 'site'); - --- -------------------------------------------------------- - --- --- Table structure for table `django_migrations` --- - -CREATE TABLE IF NOT EXISTS `django_migrations` ( -`id` int(11) NOT NULL, - `app` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `applied` datetime NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `django_migrations` --- - -INSERT INTO `django_migrations` (`id`, `app`, `name`, `applied`) VALUES -(1, 'contenttypes', '0001_initial', '2015-06-20 14:35:54'), -(2, 'contenttypes', '0002_remove_content_type_name', '2015-06-20 14:35:54'), -(3, 'auth', '0001_initial', '2015-06-20 14:35:54'), -(4, 'auth', '0002_alter_permission_name_max_length', '2015-06-20 14:35:54'), -(5, 'auth', '0003_alter_user_email_max_length', '2015-06-20 14:35:54'), -(6, 'auth', '0004_alter_user_username_opts', '2015-06-20 14:35:54'), -(7, 'auth', '0005_alter_user_last_login_null', '2015-06-20 14:35:54'), -(8, 'auth', '0006_require_contenttypes_0002', '2015-06-20 14:35:54'), -(9, 'sessions', '0001_initial', '2015-06-20 14:35:54'), -(10, 'sites', '0001_initial', '2015-06-20 14:35:54'); - --- -------------------------------------------------------- - --- --- Table structure for table `django_session` --- - -CREATE TABLE IF NOT EXISTS `django_session` ( - `session_key` varchar(40) NOT NULL, - `session_data` longtext NOT NULL, - `expire_date` datetime NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `django_site` --- - -CREATE TABLE IF NOT EXISTS `django_site` ( -`id` int(11) NOT NULL, - `domain` varchar(100) NOT NULL, - `name` varchar(50) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `django_site` --- - -INSERT INTO `django_site` (`id`, `domain`, `name`) VALUES -(1, 'example.com', 'example.com'); - --- -------------------------------------------------------- - --- --- Table structure for table `layout` --- - -CREATE TABLE IF NOT EXISTS `layout` ( -`layout_id` int(11) NOT NULL, - `layout` varchar(20) NOT NULL, - `layout_file` varchar(20) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `layout` --- - -INSERT INTO `layout` (`layout_id`, `layout`, `layout_file`) VALUES -(1, 'tyrian', 'tyrian.html'), -(2, 'page', 'page.html'), -(3, 'box', 'box.html'), -(4, 'post', 'post.html'), -(5, 'page-pre', 'page-pre.html'), -(6, 'page-nav3', 'page-nav3.html'); - --- -------------------------------------------------------- - --- --- Table structure for table `pages` --- - -CREATE TABLE IF NOT EXISTS `pages` ( -`page_id` int(11) NOT NULL, - `nav_title` varchar(200) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `nav1` varchar(100) NOT NULL, - `nav1_show` tinyint(1) NOT NULL, - `nav1_weight` int(11) NOT NULL, - `meta` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `inlinejs` varchar(200) NOT NULL, - `body_class` varchar(20) NOT NULL, - `layout_id` int(11) NOT NULL, - `sub_menu` tinyint(1) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `pages` --- - -INSERT INTO `pages` (`page_id`, `nav_title`, `title`, `description`, `nav1`, `nav1_show`, `nav1_weight`, `meta`, `url`, `inlinejs`, `body_class`, `layout_id`, `sub_menu`) VALUES -(1, 'Home', 'Home', 'Welcome to tinderbox cluster that build and test Gentoo packages', 'home', 1, 1, '', 'home', '', '', 1, 0), -(2, 'Packages', 'Packages', '', 'packages', 1, 5, '', 'packages', '', '', 1, 1), -(3, 'New', 'New', '', 'new', 1, 9, '', 'new', '', '', 1, 1), -(4, 'Inside Gentoo', 'Inside Gentoo', '', 'inside-gentoo', 1, 10, '', 'inside-gentoo', '', '', 1, 1), -(5, 'Support', 'Support', '', 'support', 1, 20, '', 'support', '', '', 1, 1), -(6, 'Get Involved', 'Get Involved', '', 'get-involved', 1, 30, '', 'get-involved', '', '', 1, 1), -(7, '', 'Donate', '', 'donate', 1, 0, '', 'donate', '', '', 1, 0); - --- -------------------------------------------------------- - --- --- Table structure for table `posts` --- - -CREATE TABLE IF NOT EXISTS `posts` ( -`post_id` int(11) NOT NULL, - `title` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `text` text NOT NULL, - `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `posts` --- - -INSERT INTO `posts` (`post_id`, `title`, `url`, `text`, `time_stamp`) VALUES -(1, 'Git changes & impact to Overlays hostnames', '/news/2015/04/25/anongit-overlays.html', '

    As previously announced\r\n[1]\r\n[2],\r\nand previously in the discussion of merging Overlays with Gentoo’s primary SCM\r\nhosting (CVS+Git):\r\nThe old overlays hostnames (git.overlays.gentoo.org and\r\noverlays.gentoo.org) have now been disabled, as well as non-SSH traffic to\r\ngit.gentoo.org. This was a deliberate move to seperate anonymous versus\r\nauthenticated Git traffic, and ensure that anonymous Git traffic can continued\r\nto be scaled when we go ahead with switching away from CVS. Anonymous and\r\nauthenticated Git is now served by seperate systems, and no anonymous Git\r\ntraffic is permitted to the authenticated Git server.

    \r\n\r\n

    If you have anonymous -Git checkouts from any of the affected hostnames, you\r\nshould switch them to using one of these new URLs:

    \r\n\r\n
      \r\n
    • https://anongit.gentoo.org/git/$REPO
    • \r\n
    • http://anongit.gentoo.org/git/$REPO
    • \r\n
    • git://anongit.gentoo.org/$REPO
    • \r\n
    \r\n\r\n

    If you have authenticated Git checkouts from the same hosts, you should switch\r\nthem to this new URL:

    \r\n\r\n
      \r\n
    • git+ssh://git@git.gentoo.org/$REPO
    • \r\n
    \r\n\r\n

    In either case, you can trivially update any existing checkout with:
    \r\ngit remote set-url origin git+ssh://git@git.gentoo.org/$REPO
    \r\n(be sure to adjust the path of the repository and the name of the remote as\r\nneeded).

    ', '2015-06-29 20:15:49'), -(2, 'Gentoo announces total website makeover (not an April Fool''s)', '/news/2015/03/31/website-update.html', '

    Thank you for participating in Gentoo’s 2015 April Fools’ joke!

    \r\n\r\n

    Now that April 1 has passed, we shed a tear as we say goodbye CGA Web™ but also to our website.\r\nOur previous website, that is, that has been with us for more than a decade.\r\nUntil all contents are migrated, you can find the previous version on wwwold.gentoo.org,\r\nplease note that the contents found there are not maintained any longer.

    \r\n\r\n

    As this is indeed a major change, we’re still working out some rough edges\r\nand would appreciate your feedback via email to www@gentoo.org\r\nor on IRC in #gentoo-www.

    \r\n\r\n

    We hope you appreciate the new look and had a great time finding out how terrible you are at Pong and are looking forward\r\nto seeing your reactions once again when we celebrate the launch of the new Gentoo Disk™ set.

    \r\n\r\n

    As for Alex, Robin, and all co-conspirators, thank you again for your participation!

    \r\n\r\n

    The original April 1 news item is still available on the single news display page.

    ', '2015-06-26 20:59:58'); - --- -------------------------------------------------------- - --- --- Table structure for table `site_settings` --- - -CREATE TABLE IF NOT EXISTS `site_settings` ( -`site_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, - `cdnurl` varchar(100) NOT NULL, - `layout_path` varchar(11) NOT NULL, - `download_url` varchar(100) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `site_settings` --- - -INSERT INTO `site_settings` (`site_id`, `site`, `title`, `email`, `description`, `url`, `contact`, `cdnurl`, `layout_path`, `download_url`) VALUES -(1, 'www.gentoo.org', 'Gentoo Linux', 'www@gentoo.org', 'News and information from Gentoo Linux', 'https://www.gentoo.org', '/inside-gentoo/contact/', 'https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com', '', 'http://distfiles.gentoo.org/releases/'); - --- -------------------------------------------------------- - --- --- Table structure for table `sponsors` --- - -CREATE TABLE IF NOT EXISTS `sponsors` ( -`sponsors_id` int(11) NOT NULL, - `name` varchar(200) NOT NULL, - `ads_name` varchar(100) NOT NULL, - `img` varchar(100) NOT NULL, - `ads_img` varchar(100) NOT NULL, - `link` varchar(100) NOT NULL, - `ads_link` varchar(100) NOT NULL, - `blurb` text NOT NULL, - `ads_blure` varchar(200) NOT NULL, - `ads_alt_name` varchar(200) NOT NULL, - `weight` int(11) NOT NULL, - `active` tinyint(1) NOT NULL, - `ads_active` tinyint(1) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `sponsors` --- - -INSERT INTO `sponsors` (`sponsors_id`, `name`, `ads_name`, `img`, `ads_img`, `link`, `ads_link`, `blurb`, `ads_blure`, `ads_alt_name`, `weight`, `active`, `ads_active`) VALUES -(1, 'Oregon State University: Open Source Lab (OSUOSL)', 'OSL', 'osuosl2.png', 'osuosl.png', 'http://osuosl.org', 'http://osuosl.org/contribute', 'Located at [Oregon State University](http://oregonstate.edu) in beautiful Corvallis, Oregon,\r\n the [Open Source Lab](http://osuosl.org) is a focal point of development,\r\n hosting and other assorted services for the Open Source community.\r\n \r\n OSU provides several services to the Gentoo project.\r\n In addition to serving as the primary source mirror for Gentoo, they also provide colocation space for several Gentoo servers.', '', 'OSL', 25, 1, 1), -(2, 'Bytemark Hosting', 'Bytemark', 'bytemark.png', 'bytemark.png', 'http://www.bytemark.co.uk/r/gentoo-sponsors', 'http://www.bytemark.co.uk/r/gentoo-home', 'Bytemark Hosting provide Gentoo Linux with servers and services which drive our network of global mirrors.\r\n They are a leading Internet Service Provider (ISP) in the United Kingdom and provide scalable,\r\n powerful and affordable hosting with lots of "geek friendly" extras as standard.\r\n They''ve deployed Gentoo Linux within their network to provide a flexible solution to difficult problems,\r\n such as providing a network rescue environment for all dedicated hosts.', '', 'Bytemark', 20, 1, 1), -(3, '7L Networks', 'SevenL', 'sevenl.png', 'sevenl.png', 'http://www.7l.com/', 'https://www.sevenl.net/?utm_source=gentoo-org&utm_medium=sponsored-banner&utm_campaign=gentoo-dedica', '[7L](http://www.7l.com/) Networks is a leader in [Cloud Hosting](http://www.7l.com/) services, dedicated servers,\r\n and is a leading [Toronto server colocation provider](http://www.7l.com/business-hosting-solutions/Toronto-Colocation-Hosting-Provider.html).\r\n 7L has been proudly donating server hosting services to Gentoo Linux since 2004.\r\n In addition, they donate dedicated servers to CentOS, Linux Mint, Arch Linux and a number of other open source communities that rely on sponsorship to succeed.', '', 'SevenL', 10, 1, 0), -(4, 'LeaseWeb', 'LeaseWeb', 'leaseweb.png', 'leaseweb.png', 'http://www.leaseweb.com/', 'http://www.leaseweb.com/', '[LeaseWeb](http://www.leaseweb.com/) is a leading Infrastructure as a Service (IaaS) provider serving a worldwide portfolio of over 15,000 customers ranging from SMBs to Enterprises.\r\n Services include Public Cloud, Private Cloud, Hybrid Hosting, Colocation, CDN, and Dedicated Hosting supported by exceptional customer service and technical support.\r\n With more than 60,000 servers under management, LeaseWeb provides infrastructure since 1997.\r\n The company operates 6 data centers in the U.S. and Europe, all of which are backed by a superior worldwide network with a total capacity of more than 3.5 Tbps.', '', 'LeaseWeb', 10, 1, 1), -(6, 'Numberly', 'Numberly', 'numberly.png', 'numberly.png', 'http://www.numberly.com/', 'http://www.numberly.com/', '[Numberly](http://www.numberly.com/) is a 1000mercis Group brand, a pioneer in interactive advertising and marketing, providing innovative solutions\r\n for companies willing to optimise their customer acquisition and retention through interactive media (Internet, mobile phones and tablets).\r\n Numberly helps its clients to design, develop, implement, and maximise the ROI of their interactive marketing and advertising campaigns.\r\n\r\n Numberly proudly provides 3 powerful physical servers dedicated to the Gentoo project with ipv6 support.', '', 'Numberly', 25, 1, 1); - --- -------------------------------------------------------- - --- --- Table structure for table `subsub_pages` --- - -CREATE TABLE IF NOT EXISTS `subsub_pages` ( -`subsub_page_id` int(11) NOT NULL, - `nav_title` varchar(200) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `sub_page_id` int(11) NOT NULL, - `nav3` varchar(100) NOT NULL, - `nav3_show` tinyint(1) NOT NULL, - `nav3_weight` int(11) NOT NULL, - `meta` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `inlinejs` varchar(200) NOT NULL, - `layout_id` varchar(100) NOT NULL, - `body_class` varchar(20) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `sub_pages` --- - -CREATE TABLE IF NOT EXISTS `sub_pages` ( -`sub_page_id` int(11) NOT NULL, - `nav_title` varchar(200) NOT NULL, - `title` varchar(200) NOT NULL, - `description` varchar(200) NOT NULL, - `page_id` int(11) NOT NULL, - `nav2` varchar(100) NOT NULL, - `nav2_show` tinyint(1) NOT NULL, - `nav2_weight` int(11) NOT NULL, - `meta` varchar(200) NOT NULL, - `url` varchar(200) NOT NULL, - `inlinejs` varchar(200) NOT NULL, - `layout_id` int(11) NOT NULL, - `body_class` varchar(20) NOT NULL, - `sub_menu` tinyint(1) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `sub_pages` --- - -INSERT INTO `sub_pages` (`sub_page_id`, `nav_title`, `title`, `description`, `page_id`, `nav2`, `nav2_show`, `nav2_weight`, `meta`, `url`, `inlinejs`, `layout_id`, `body_class`, `sub_menu`) VALUES -(1, '', 'About Gentoo', '', 3, 'about', 1, 10, '', 'about', '', 1, '', 0), -(2, '', 'FAQ', '', 3, 'faq', 1, 40, '', 'https://wiki.gentoo.org/wiki/FAQ', '', 1, '', 0), -(3, 'Philosophy', 'The Philosophy of Gentoo', '', 3, 'philosophy', 1, 20, '', 'philosophy', '', 1, '', 0), -(4, 'Screenshots', 'Gentoo Screenshots', '', 3, 'screenshots', 1, 30, '', 'screenshots', '', 1, '', 0), -(5, 'Mirrors', 'Gentoo Source Mirrors', '', 2, 'mirrors', 1, 0, '', 'mirrors', '', 1, '', 0), -(6, 'Signatures', 'Release Media Signatures', '', 2, 'signatures', 1, 0, '', 'signatures', '', 1, '', 0), -(7, 'Developers', 'Current Gentoo Developers', '', 4, 'developers', 1, 10, '', 'developers', '', 1, '', 0), -(8, '', 'Projects', '', 4, 'projects', 1, 20, '', 'https://wiki.gentoo.org/wiki/Project:Gentoo', '', 1, '', 0), -(9, 'Artwork', 'Gentoo Artwork', '', 4, 'artwork', 1, 25, '', 'artwork', '', 1, '', 0), -(10, 'Gentoo Foundation', 'Gentoo Foundation', '', 4, 'foundation', 1, 30, '', 'foundation', '', 6, 'nav-align-h2', 0), -(11, '', 'Sponsors', '', 4, 'sponsors', 1, 40, '', 'sponsors', '', 1, '', 0), -(12, 'Stores', 'Stores offering Gentoo products', '', 4, 'stores', 1, 50, '', 'stores', '', 1, '', 0), -(13, '', 'Contact', '', 4, 'contact', 1, 99, '', 'contact', '', 1, '', 0), -(14, '', 'Documentation', '', 5, 'documentation', 1, 0, '', 'documentation', '', 1, '', 0), -(15, 'News Items', 'Repository News Items', '', 5, 'news-items', 1, 0, '', 'news-items', '', 1, '', 0), -(16, '', 'Package Database', '', 5, 'package-database', 1, 0, '', 'http://packages.gentoo.org/', '', 1, '', 0), -(17, 'Security', 'Gentoo Security', '', 5, 'security', 1, 0, '', 'security', '', 6, 'nav-align-h2', 0), -(18, 'rsync Mirrors', 'Gentoo rsync Mirrors', '', 5, 'mirrors', 1, 0, '', 'mirrors', '', 1, '', 0), -(19, '', 'IRC Channels', '', 6, 'irc', 1, 10, '', 'irc', '', 1, '', 0), -(20, 'Forums', 'Discussion Forums', '', 6, 'forums', 1, 20, '', 'https://forums.gentoo.org/', '', 1, '', 0), -(21, '', 'Mailing Lists', '', 6, 'ml', 1, 30, '', 'mailings-lists', '', 1, '', 0), -(22, 'Contribute', 'Contribute to Gentoo', '', 6, 'contribute', 1, 40, '', 'contribute', '', 1, '', 0), -(23, '', 'Become a Developer', '', 6, 'become-dev', 1, 50, '', 'become-developer', '', 1, '', 0), -(24, 'News', 'News', '', 1, 'news', 1, 0, '', 'news', '', 1, '', 0); - --- --- Indexes for dumped tables --- - --- --- Indexes for table `auth_group` --- -ALTER TABLE `auth_group` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `name` (`name`); - --- --- Indexes for table `auth_group_permissions` --- -ALTER TABLE `auth_group_permissions` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `group_id` (`group_id`,`permission_id`), ADD KEY `auth_group__permission_id_132567775465881a_fk_auth_permission_id` (`permission_id`); - --- --- Indexes for table `auth_permission` --- -ALTER TABLE `auth_permission` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `content_type_id` (`content_type_id`,`codename`); - --- --- Indexes for table `auth_user` --- -ALTER TABLE `auth_user` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`); - --- --- Indexes for table `auth_user_groups` --- -ALTER TABLE `auth_user_groups` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `user_id` (`user_id`,`group_id`), ADD KEY `auth_user_groups_group_id_85d6be0cf42bb39_fk_auth_group_id` (`group_id`); - --- --- Indexes for table `auth_user_user_permissions` --- -ALTER TABLE `auth_user_user_permissions` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `user_id` (`user_id`,`permission_id`), ADD KEY `auth_user_u_permission_id_7a6c48a75a04bbaa_fk_auth_permission_id` (`permission_id`); - --- --- Indexes for table `django_content_type` --- -ALTER TABLE `django_content_type` - ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `django_content_type_app_label_210e0d78ac54972_uniq` (`app_label`,`model`); - --- --- Indexes for table `django_migrations` --- -ALTER TABLE `django_migrations` - ADD PRIMARY KEY (`id`); - --- --- Indexes for table `django_session` --- -ALTER TABLE `django_session` - ADD PRIMARY KEY (`session_key`), ADD KEY `django_session_de54fa62` (`expire_date`); - --- --- Indexes for table `django_site` --- -ALTER TABLE `django_site` - ADD PRIMARY KEY (`id`); - --- --- Indexes for table `layout` --- -ALTER TABLE `layout` - ADD PRIMARY KEY (`layout_id`); - --- --- Indexes for table `pages` --- -ALTER TABLE `pages` - ADD PRIMARY KEY (`page_id`); - --- --- Indexes for table `posts` --- -ALTER TABLE `posts` - ADD PRIMARY KEY (`post_id`); - --- --- Indexes for table `site_settings` --- -ALTER TABLE `site_settings` - ADD PRIMARY KEY (`site_id`); - --- --- Indexes for table `sponsors` --- -ALTER TABLE `sponsors` - ADD PRIMARY KEY (`sponsors_id`); - --- --- Indexes for table `subsub_pages` --- -ALTER TABLE `subsub_pages` - ADD PRIMARY KEY (`subsub_page_id`); - --- --- Indexes for table `sub_pages` --- -ALTER TABLE `sub_pages` - ADD PRIMARY KEY (`sub_page_id`); - --- --- AUTO_INCREMENT for dumped tables --- - --- --- AUTO_INCREMENT for table `auth_group` --- -ALTER TABLE `auth_group` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `auth_group_permissions` --- -ALTER TABLE `auth_group_permissions` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `auth_permission` --- -ALTER TABLE `auth_permission` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `auth_user` --- -ALTER TABLE `auth_user` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `auth_user_groups` --- -ALTER TABLE `auth_user_groups` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `auth_user_user_permissions` --- -ALTER TABLE `auth_user_user_permissions` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `django_content_type` --- -ALTER TABLE `django_content_type` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `django_migrations` --- -ALTER TABLE `django_migrations` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `django_site` --- -ALTER TABLE `django_site` -MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `layout` --- -ALTER TABLE `layout` -MODIFY `layout_id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `pages` --- -ALTER TABLE `pages` -MODIFY `page_id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `posts` --- -ALTER TABLE `posts` -MODIFY `post_id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `site_settings` --- -ALTER TABLE `site_settings` -MODIFY `site_id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `sponsors` --- -ALTER TABLE `sponsors` -MODIFY `sponsors_id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `subsub_pages` --- -ALTER TABLE `subsub_pages` -MODIFY `subsub_page_id` int(11) NOT NULL AUTO_INCREMENT; --- --- AUTO_INCREMENT for table `sub_pages` --- -ALTER TABLE `sub_pages` -MODIFY `sub_page_id` int(11) NOT NULL AUTO_INCREMENT; --- --- Constraints for dumped tables --- - --- --- Constraints for table `auth_group_permissions` --- -ALTER TABLE `auth_group_permissions` -ADD CONSTRAINT `auth_group__permission_id_132567775465881a_fk_auth_permission_id` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), -ADD CONSTRAINT `auth_group_permission_group_id_2bfa217cea5bf405_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`); - --- --- Constraints for table `auth_permission` --- -ALTER TABLE `auth_permission` -ADD CONSTRAINT `auth_p_content_type_id_a9611576c345651_fk_django_content_type_id` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`); - --- --- Constraints for table `auth_user_groups` --- -ALTER TABLE `auth_user_groups` -ADD CONSTRAINT `auth_user_groups_group_id_85d6be0cf42bb39_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), -ADD CONSTRAINT `auth_user_groups_user_id_546a8fbd2abda362_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); - --- --- Constraints for table `auth_user_user_permissions` --- -ALTER TABLE `auth_user_user_permissions` -ADD CONSTRAINT `auth_user_u_permission_id_7a6c48a75a04bbaa_fk_auth_permission_id` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`), -ADD CONSTRAINT `auth_user_user_permissio_user_id_6cb016c6baca028_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`); - -/*!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/sql/gosbs-www.sql b/sql/gosbs-www.sql new file mode 100644 index 0000000..4bc9b21 --- /dev/null +++ b/sql/gosbs-www.sql @@ -0,0 +1,475 @@ +-- 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 */; -- cgit v1.2.3-65-gdbad