From 007b8d7573b64fd7f17023fa0288ba79e05683c4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 22 Apr 2013 09:10:09 -0500 Subject: Add 'required_signoffs' field to Arch model This will indicate how many signoffs are required for packages of the given architecture. Set the default to 2 as it currently stands. Signed-off-by: Dan McGee --- main/admin.py | 2 +- main/fixtures/arches.json | 49 ++++----- .../0064_auto__add_field_arch_required_signoffs.py | 112 +++++++++++++++++++++ main/models.py | 2 + 4 files changed, 141 insertions(+), 24 deletions(-) create mode 100644 main/migrations/0064_auto__add_field_arch_required_signoffs.py (limited to 'main') diff --git a/main/admin.py b/main/admin.py index ef134187..6aff12e5 100644 --- a/main/admin.py +++ b/main/admin.py @@ -8,7 +8,7 @@ class DonorAdmin(admin.ModelAdmin): exclude = ('created',) class ArchAdmin(admin.ModelAdmin): - list_display = ('name', 'agnostic') + list_display = ('name', 'agnostic', 'required_signoffs') list_filter = ('agnostic',) search_fields = ('name',) diff --git a/main/fixtures/arches.json b/main/fixtures/arches.json index 6334c2d3..1ece16c9 100644 --- a/main/fixtures/arches.json +++ b/main/fixtures/arches.json @@ -1,26 +1,29 @@ [ - { - "pk": 1, - "model": "main.arch", - "fields": { - "agnostic": true, - "name": "any" - } - }, - { - "pk": 2, - "model": "main.arch", - "fields": { - "agnostic": false, - "name": "i686" - } - }, - { - "pk": 3, - "model": "main.arch", - "fields": { - "agnostic": false, - "name": "x86_64" - } +{ + "pk": 1, + "model": "main.arch", + "fields": { + "agnostic": true, + "name": "any", + "required_signoffs": 2 } +}, +{ + "pk": 2, + "model": "main.arch", + "fields": { + "agnostic": false, + "name": "i686", + "required_signoffs": 1 + } +}, +{ + "pk": 3, + "model": "main.arch", + "fields": { + "agnostic": false, + "name": "x86_64", + "required_signoffs": 2 + } +} ] diff --git a/main/migrations/0064_auto__add_field_arch_required_signoffs.py b/main/migrations/0064_auto__add_field_arch_required_signoffs.py new file mode 100644 index 00000000..1846378f --- /dev/null +++ b/main/migrations/0064_auto__add_field_arch_required_signoffs.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + db.add_column('arches', 'required_signoffs', + self.gf('django.db.models.fields.PositiveIntegerField')(default=2), + keep_default=True) + + def backwards(self, orm): + db.delete_column('arches', 'required_signoffs') + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'main.arch': { + 'Meta': {'ordering': "('name',)", 'object_name': 'Arch', 'db_table': "'arches'"}, + 'agnostic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'required_signoffs': ('django.db.models.fields.PositiveIntegerField', [], {'default': '2'}) + }, + u'main.donor': { + 'Meta': {'ordering': "('name',)", 'object_name': 'Donor', 'db_table': "'donors'"}, + 'created': ('django.db.models.fields.DateTimeField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) + }, + u'main.package': { + 'Meta': {'ordering': "('pkgname',)", 'unique_together': "(('pkgname', 'repo', 'arch'),)", 'object_name': 'Package', 'db_table': "'packages'"}, + 'arch': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'packages'", 'on_delete': 'models.PROTECT', 'to': u"orm['main.Arch']"}), + 'build_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'compressed_size': ('main.fields.PositiveBigIntegerField', [], {}), + 'created': ('django.db.models.fields.DateTimeField', [], {}), + 'epoch': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'files_last_update': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'flag_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'installed_size': ('main.fields.PositiveBigIntegerField', [], {}), + 'last_update': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), + 'packager': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), + 'packager_str': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'pgp_signature': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'pkgbase': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'pkgdesc': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'pkgname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'pkgrel': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'pkgver': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'repo': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'packages'", 'on_delete': 'models.PROTECT', 'to': u"orm['main.Repo']"}), + 'url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}) + }, + u'main.packagefile': { + 'Meta': {'object_name': 'PackageFile', 'db_table': "'package_files'"}, + 'directory': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_directory': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'pkg': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['main.Package']"}) + }, + u'main.repo': { + 'Meta': {'ordering': "('name',)", 'object_name': 'Repo', 'db_table': "'repos'"}, + 'bugs_category': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}), + 'bugs_project': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'staging': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'svn_root': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + } + } + + complete_apps = ['main'] diff --git a/main/models.py b/main/models.py index 2f4d3520..2ace0109 100644 --- a/main/models.py +++ b/main/models.py @@ -48,6 +48,8 @@ class Arch(models.Model): name = models.CharField(max_length=255, unique=True) agnostic = models.BooleanField(default=False, help_text="Is this architecture non-platform specific?") + required_signoffs = models.PositiveIntegerField(default=2, + help_text="Number of signoffs required for packages of this architecture") def __unicode__(self): return self.name -- cgit v1.2.3-54-g00ecf From 330353f8dc50d5f27470f03f021cde72b056ac0b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 23 Apr 2013 14:31:46 -0400 Subject: reduce differences --- local_settings.py.example | 22 ++++++++++++++++++---- main/context_processors.py | 7 +++++-- releng/views.py | 2 +- settings.py | 6 ++++++ templates/public/index.html | 14 +++++++------- visualize/static/visualize.js | 20 ++++++++++++++++++++ 6 files changed, 57 insertions(+), 14 deletions(-) (limited to 'main') diff --git a/local_settings.py.example b/local_settings.py.example index 4be1e2e9..52eab33c 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -1,9 +1,9 @@ ### Django settings for archlinux project. ## Debug settings -DEBUG = False +DEBUG = False # If you are running without another HTTP server, must be true TEMPLATE_DEBUG = False -#DEBUG_TOOLBAR = True +DEBUG_TOOLBAR = False # Must install package django-debug-toolbar to use ## For django debug toolbar INTERNAL_IPS = ('127.0.0.1',) @@ -25,6 +25,20 @@ ADMINS = ( # }, #} +## MySQL Database settings +#DATABASES = { +# 'default': { +# 'ENGINE' : 'django.db.backends.mysql', +# 'NAME' : 'archlinux', +# 'USER' : 'archlinux', +# 'PASSWORD': 'archlinux', +# 'HOST' : '', +# 'PORT' : '', +# # InnoDB WILL NOT work +# 'OPTIONS' : {'init_command': 'SET storage_engine=MyISAM'}, +# }, +#} + ## Sqlite Database settings DATABASES = { 'default': { @@ -50,10 +64,10 @@ CACHE_MIDDLEWARE_SECONDS = 300 SESSION_COOKIE_SECURE = False ## location for saving dev pictures (the 'devs' folder should be inside of this) -MEDIA_ROOT = '/srv/example.com/img/' +MEDIA_ROOT = '/srv/http/web-uploads' ## web url for serving image files (the 'devs' folder should be inside of this) -MEDIA_URL = '/media/img/' +MEDIA_URL = '/img/' ## Make this unique, and don't share it with anybody. SECRET_KEY = '00000000000000000000000000000000000000000000000' diff --git a/main/context_processors.py b/main/context_processors.py index 2543a3de..df9f1633 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -4,13 +4,16 @@ def secure(request): def branding(request): from django.conf import settings return { + 'BUGTRACKER_URL': settings.BUGTRACKER_URL, + 'MAILMAN_BASE_URL': settings.MAILMAN_BASE_URL, + 'PROJECTS_URL': settings.BUGTRACKER_URL, + 'BRANDING_APPNAME': settings.BRANDING_APPNAME, 'BRANDING_DISTRONAME': settings.BRANDING_DISTRONAME, 'BRANDING_SHORTNAME': settings.BRANDING_SHORTNAME, 'BRANDING_WIKINAME': settings.BRANDING_WIKINAME, 'BRANDING_EMAIL': settings.BRANDING_EMAIL, - 'MAILMAN_BASE_URL': settings.MAILMAN_BASE_URL, - 'BUGTRACKER_URL': settings.BUGTRACKER_URL, + 'BRANDING_OSEARCH_TAGS': settings.BRANDING_OSEARCH_TAGS, } # vim: set ts=4 sw=4 et: diff --git a/releng/views.py b/releng/views.py index b1c76a4a..ca0a7dd2 100644 --- a/releng/views.py +++ b/releng/views.py @@ -50,7 +50,7 @@ class TestForm(forms.ModelForm): success = forms.BooleanField( help_text="Only check this if everything went fine. " "If you ran into problems please create a ticket on the " + "href=\""+settings.BUGTRACKER_RELENG_URL+"\">the " "bugtracker (or check that one already exists) and link to " "it in the comments.", required=False) diff --git a/settings.py b/settings.py index 1cb85fc1..0bdc3162 100644 --- a/settings.py +++ b/settings.py @@ -171,6 +171,11 @@ # URL for linking to the bugtracker BUGTRACKER_URL = 'https://bugs.archlinux.org/' +# URL for linking to the release engineering/iso project on the bugtracker +BUGTRACKER_RELENG_URL = 'https://bugs.archlinux.org/index.php?project=6' + +PROJECTS_URL = 'https://projects.archlinux.org' + # Trackers used for ISO download magnet links TORRENT_TRACKERS = ( 'udp://tracker.archlinux.org:6969', @@ -184,6 +189,7 @@ BRANDING_SHORTNAME = 'Arch' BRANDING_WIKINAME = 'ArchWiki' BRANDING_EMAIL = 'Arch Website Notification ' +BRANDING_OSEARCH_TAGS = 'linux archlinux package software' ## Import local settings from local_settings import * diff --git a/templates/public/index.html b/templates/public/index.html index b32260b5..cdcde695 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -13,7 +13,7 @@

A simple, lightweight distribution

-

You've reached the website for Arch Linux, a +

You've reached the website for {{BRANDING_DISTRONAME}}, a lightweight and flexible Linux® distribution that tries to Keep It Simple.

@@ -27,10 +27,10 @@

A simple, lightweight distribution

on the range of skillsets and uses for Arch that stem from it. Please check out our forums and mailing lists + title="{{ BRANDING_SHORTNAME }} Mailing Lists">mailing lists to get your feet wet. Also glance through our wiki - if you want to learn more about Arch.

+ if you want to learn more about {{BRANDING_SHORTNAME}}.

Learn more...

@@ -115,7 +115,7 @@

Documentation

title="Community documentation">Wiki
  • Official Installation Guide
  • -
  • Unofficial Beginners' Guide
  • @@ -161,8 +161,8 @@

    Tools

    Development

      -
    • Projects in Git
    • +
    • Projects in Git
    • SVN Repositories
    • More Resources
    • Signing Master Keys
    • Press Coverage
    • + title="{{ BRANDING_DISTRONAME }} in the media">Press Coverage
    • Logos & Artwork
    • News Archives
    • RSS Feeds
    • diff --git a/visualize/static/visualize.js b/visualize/static/visualize.js index 5004fe6c..ff39bb96 100644 --- a/visualize/static/visualize.js +++ b/visualize/static/visualize.js @@ -1,3 +1,23 @@ +/* archweb.js + * Homepage: https://projects.archlinux.org/archweb.git/ + * Copyright: 2011 Dan McGee + * License: GPLv2 + * + * This file is part of Archweb. + * + * Archweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Archweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Archweb. If not, see . + */ + function packages_treemap(chart_id, orderings, default_order) { var jq_div = jQuery(chart_id), color = d3.scale.category20(); -- cgit v1.2.3-54-g00ecf From dfc054126b834df116522993f4a5bbd7837111eb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 23 Apr 2013 15:02:21 -0400 Subject: fix stupid mistake --- main/context_processors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') diff --git a/main/context_processors.py b/main/context_processors.py index df9f1633..96a45dcf 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -6,7 +6,7 @@ def branding(request): return { 'BUGTRACKER_URL': settings.BUGTRACKER_URL, 'MAILMAN_BASE_URL': settings.MAILMAN_BASE_URL, - 'PROJECTS_URL': settings.BUGTRACKER_URL, + 'PROJECTS_URL': settings.PROJECTS_URL, 'BRANDING_APPNAME': settings.BRANDING_APPNAME, 'BRANDING_DISTRONAME': settings.BRANDING_DISTRONAME, -- cgit v1.2.3-54-g00ecf