From d5063bd1d2cae79df7ce6e826c7413fed61ff9db Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 5 Oct 2011 15:45:44 -0500 Subject: Add package visualizations page Why the hell not? Have fun clicking all the pretty buttons. Signed-off-by: Dan McGee --- templates/public/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/public') diff --git a/templates/public/index.html b/templates/public/index.html index bea19e0f..b63876ac 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -26,10 +26,10 @@

A simple, lightweight distribution

Our strong community is diverse and helpful, and we pride ourselves on the range of skillsets and uses for Arch that stem from it. Please - check out our forums + check out our forums and mailing lists - to get your feet wet. Also glance through our wiki if you want to learn more about Arch.

@@ -174,8 +174,8 @@

Development

title="View/search the package repository database">Packages
  • Package Groups
  • -
  • Bug Tracker
  • +
  • Visualizations
  • SVN Repositories
  • Date: Tue, 1 Nov 2011 16:45:12 -0500 Subject: Update donation text and links We are finally set up through SPI and Click&Pledge. Add the necessary text, buttons, and links for our new donation home. Signed-off-by: Dan McGee --- media/donate.gif | Bin 2951 -> 0 bytes templates/public/donate.html | 37 ++++++++++--------------------------- templates/public/index.html | 25 ++++--------------------- 3 files changed, 14 insertions(+), 48 deletions(-) delete mode 100644 media/donate.gif (limited to 'templates/public') diff --git a/media/donate.gif b/media/donate.gif deleted file mode 100644 index d637428b..00000000 Binary files a/media/donate.gif and /dev/null differ diff --git a/templates/public/donate.html b/templates/public/donate.html index b5fc43df..0dcfcf2a 100644 --- a/templates/public/donate.html +++ b/templates/public/donate.html @@ -23,33 +23,16 @@

    Donate to Arch Linux

    Monetary donations

    -{% comment %} -

    Financial contributions are accepted via PayPal. - Funds are used for server hardware upgrades, conventions, schwag giveaways and more.

    - -
    - -
    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -
    -
    -{% endcomment %} -

    At the moment, we are currently not taking monetary donations, but we - may accept them again in the future.

    +

    Financial contributions are accepted via Click&Pledge. + Arch Linux is a member project of the + Software in the Public Interest, Inc. + non-profit corporation. Funds are used for hosting costs, server hardware + upgrades, and more. You are encouraged to learn more about the SPI, as well + as how donations work.

    + + + Online donation system by ClickandPledge +

    Commercial sponsors and contributions

    diff --git a/templates/public/index.html b/templates/public/index.html index b63876ac..06a6a0c3 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -206,28 +206,11 @@

    About

    -{% comment %} -
    - -
    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -
    - + -{% endcomment %}
    -- cgit v1.2.3-54-g00ecf From f26dcbf7285c62f0baa1c64ee813ad0ceff5c288 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 1 Nov 2011 17:19:22 -0500 Subject: Use copy of donate image in /media/ This ensures it gets served over HTTPS if the user was on a secure session to begin with. Signed-off-by: Dan McGee --- templates/public/donate.html | 2 +- templates/public/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/public') diff --git a/templates/public/donate.html b/templates/public/donate.html index 0dcfcf2a..514c1430 100644 --- a/templates/public/donate.html +++ b/templates/public/donate.html @@ -31,7 +31,7 @@

    Monetary donations

    as how donations work.

    - Online donation system by ClickandPledge + Donate via Click&Pledge to Arch Linux

    Commercial sponsors and contributions

    diff --git a/templates/public/index.html b/templates/public/index.html index 06a6a0c3..854bd447 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -208,7 +208,7 @@

    About

    -- cgit v1.2.3-54-g00ecf From 5b63c29fe1c37ce9d946adedeaf13f5ad94d144a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Nov 2011 14:03:36 -0600 Subject: Show full names on developer user list pages The old display format doesn't really make sense. Also fix the invalid HTML generated by the PGP tag link- we need to escape using & inside the generated URLs. Signed-off-by: Dan McGee --- main/templatetags/pgp.py | 2 +- media/archweb.css | 4 ++++ templates/public/developer_list.html | 2 +- templates/public/userlist.html | 2 -- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'templates/public') diff --git a/main/templatetags/pgp.py b/main/templatetags/pgp.py index f875c11e..67f5e08d 100644 --- a/main/templatetags/pgp.py +++ b/main/templatetags/pgp.py @@ -21,7 +21,7 @@ def pgp_key_link(key_id): pgp_server = getattr(settings, 'PGP_SERVER', None) if not pgp_server: return format_key(key_id) - url = 'http://%s/pks/lookup?op=vindex&fingerprint=on&exact=on&search=0x%s' % \ + url = 'http://%s/pks/lookup?op=vindex&fingerprint=on&exact=on&search=0x%s' % \ (pgp_server, key_id) values = (url, format_key(key_id), key_id[-8:]) return '0x%s' % values diff --git a/media/archweb.css b/media/archweb.css index c5477422..f4bb92fa 100644 --- a/media/archweb.css +++ b/media/archweb.css @@ -802,6 +802,10 @@ div#arch-bio-toc { text-align: center; } + div#arch-bio-toc a { + white-space: nowrap; + } + table.arch-bio-entry td.pic { vertical-align: top; padding-right: 15px; diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 2abbbfe4..0ac444e5 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -4,7 +4,7 @@

    {% for dev in dev_list %} - {{ dev.first_name }}{{ dev.last_name.0|capfirst}}    + {{ dev.first_name }} {{ dev.last_name }}    {% endfor %}

    diff --git a/templates/public/userlist.html b/templates/public/userlist.html index c51215c3..0077f611 100644 --- a/templates/public/userlist.html +++ b/templates/public/userlist.html @@ -6,7 +6,6 @@ {% block content %} {% cache 600 dev-tu-profiles user_type %}
    -

    Arch Linux {{user_type}}

    {{description}}

    @@ -14,7 +13,6 @@

    Arch Linux {{user_type}}

    {% with users as dev_list %} {% include 'public/developer_list.html' %} {% endwith %} -
    {% endcache %} {% endblock %} -- cgit v1.2.3-54-g00ecf From 85657db05d7f65604340699cfcb9967c9e81a0ef Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 21 Nov 2011 10:08:23 -0600 Subject: Better support for non-latin full names Add a 'latin_name' field to the user profile so we can better support those developers with names in non-Latin scripts, and yet still show a Latin name as necessary on the developer profile page. This field only shows up if populated. Also, use consistent sorting everywhere- rather than using username, always use first_name and last_name fields. Signed-off-by: Dan McGee --- devel/views.py | 2 +- .../0057_auto__add_field_userprofile_latin_name.py | 153 +++++++++++++++++++++ main/models.py | 2 + packages/views/search.py | 3 +- public/views.py | 6 +- templates/devel/clock.html | 2 +- templates/public/developer_list.html | 2 +- 7 files changed, 164 insertions(+), 6 deletions(-) create mode 100644 main/migrations/0057_auto__add_field_userprofile_latin_name.py (limited to 'templates/public') diff --git a/devel/views.py b/devel/views.py index 0002df04..08b19cd7 100644 --- a/devel/views.py +++ b/devel/views.py @@ -83,7 +83,7 @@ def index(request): @never_cache def clock(request): devs = User.objects.filter(is_active=True).order_by( - 'username').select_related('userprofile') + 'first_name', 'last_name').select_related('userprofile') now = datetime.now() utc_now = datetime.utcnow().replace(tzinfo=pytz.utc) diff --git a/main/migrations/0057_auto__add_field_userprofile_latin_name.py b/main/migrations/0057_auto__add_field_userprofile_latin_name.py new file mode 100644 index 00000000..ffde1885 --- /dev/null +++ b/main/migrations/0057_auto__add_field_userprofile_latin_name.py @@ -0,0 +1,153 @@ +# encoding: 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('user_profiles', 'latin_name', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) + + def backwards(self, orm): + db.delete_column('user_profiles', 'latin_name') + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + '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': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + '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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + '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'}), + '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'}) + }, + 'main.arch': { + 'Meta': {'ordering': "['name']", 'object_name': 'Arch', 'db_table': "'arches'"}, + 'agnostic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) + }, + 'main.donor': { + 'Meta': {'ordering': "('name',)", 'object_name': 'Donor', 'db_table': "'donors'"}, + 'created': ('django.db.models.fields.DateTimeField', [], {}), + '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'}) + }, + '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'", 'to': "orm['main.Arch']"}), + 'build_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'compressed_size': ('main.models.PositiveBigIntegerField', [], {}), + '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'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'installed_size': ('main.models.PositiveBigIntegerField', [], {}), + 'last_update': ('django.db.models.fields.DateTimeField', [], {}), + 'packager': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': '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'", 'to': "orm['main.Repo']"}), + 'url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}) + }, + 'main.packagedepend': { + 'Meta': {'object_name': 'PackageDepend', 'db_table': "'package_depends'"}, + 'depname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'depvcmp': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}), + 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'optional': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'pkg': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Package']"}) + }, + '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'}), + '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': "orm['main.Package']"}) + }, + 'main.repo': { + 'Meta': {'ordering': "['name']", 'object_name': 'Repo', 'db_table': "'repos'"}, + 'bugs_category': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'bugs_project': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + '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'}) + }, + 'main.todolist': { + 'Meta': {'object_name': 'Todolist', 'db_table': "'todolists'"}, + 'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), + 'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}) + }, + 'main.todolistpkg': { + 'Meta': {'unique_together': "(('list', 'pkg'),)", 'object_name': 'TodolistPkg', 'db_table': "'todolist_pkgs'"}, + 'complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'list': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Todolist']"}), + 'pkg': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['main.Package']"}) + }, + 'main.userprofile': { + 'Meta': {'object_name': 'UserProfile', 'db_table': "'user_profiles'"}, + 'alias': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'allowed_repos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['main.Repo']", 'symmetrical': 'False', 'blank': 'True'}), + 'favorite_distros': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'interests': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'languages': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), + 'latin_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), + 'notify': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'occupation': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), + 'other_contact': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), + 'pgp_key': ('main.models.PGPKeyField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), + 'picture': ('django.db.models.fields.files.FileField', [], {'default': "'devs/silhouette.png'", 'max_length': '100'}), + 'public_email': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'roles': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), + 'time_zone': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '100'}), + 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'userprofile'", 'unique': 'True', 'to': "orm['auth.User']"}), + 'website': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), + 'yob': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['main'] diff --git a/main/models.py b/main/models.py index b37468f9..d7780b91 100644 --- a/main/models.py +++ b/main/models.py @@ -77,6 +77,8 @@ class UserProfile(models.Model): help_text="Ideally 125px by 125px") user = models.OneToOneField(User, related_name='userprofile') allowed_repos = models.ManyToManyField('Repo', blank=True) + latin_name = models.CharField(max_length=255, null=True, blank=True, + help_text="Latin-form name; used only for non-Latin full names") class Meta: db_table = 'user_profiles' diff --git a/packages/views/search.py b/packages/views/search.py index 57481614..65fcddb3 100644 --- a/packages/views/search.py +++ b/packages/views/search.py @@ -60,7 +60,8 @@ def __init__(self, *args, **kwargs): self.fields['arch'].choices = make_choice( [arch.name for arch in Arch.objects.all()]) self.fields['q'].widget.attrs.update({"size": "30"}) - maints = User.objects.filter(is_active=True).order_by('username') + maints = User.objects.filter(is_active=True).order_by( + 'first_name', 'last_name') self.fields['maintainer'].choices = \ [('', 'All'), ('orphan', 'Orphan')] + \ [(m.username, m.get_full_name()) for m in maints] diff --git a/public/views.py b/public/views.py index 14dd6353..c28fd303 100644 --- a/public/views.py +++ b/public/views.py @@ -34,13 +34,15 @@ def index(request): } def userlist(request, user_type='devs'): - users = User.objects.order_by('username').select_related('userprofile') + users = User.objects.order_by( + 'first_name', 'last_name').select_related('userprofile') if user_type == 'devs': users = users.filter(is_active=True, groups__name="Developers") elif user_type == 'tus': users = users.filter(is_active=True, groups__name="Trusted Users") elif user_type == 'fellows': - users = users.filter(is_active=False, groups__name__in=["Developers", "Trusted Users"]) + users = users.filter(is_active=False, + groups__name__in=["Developers", "Trusted Users"]) else: raise Http404 diff --git a/templates/devel/clock.html b/templates/devel/clock.html index 0f0e20c5..d2eb0a8d 100644 --- a/templates/devel/clock.html +++ b/templates/devel/clock.html @@ -45,7 +45,7 @@

    Developer World Clocks

    {% endblock %} diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 0ac444e5..5aa4c6b2 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -21,7 +21,7 @@ - + -- cgit v1.2.3-54-g00ecf From 6b8ef446bcd6a1cbc794d0846968e806034d3aad Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 30 Nov 2011 13:55:36 -0600 Subject: Add master key overview page And a bunch of text that may suck, but is better than nothing. Signed-off-by: Dan McGee --- main/models.py | 12 ++++++++++ main/templatetags/pgp.py | 13 +++++++++++ public/views.py | 18 ++++++++++----- templates/public/keys.html | 57 ++++++++++++++++++++++++++++++++++++++++++++++ urls.py | 1 + 5 files changed, 95 insertions(+), 6 deletions(-) create mode 100644 templates/public/keys.html (limited to 'templates/public') diff --git a/main/models.py b/main/models.py index 990cc8ca..9156fb51 100644 --- a/main/models.py +++ b/main/models.py @@ -53,6 +53,18 @@ class Meta: verbose_name = 'Additional Profile Data' verbose_name_plural = 'Additional Profile Data' + def get_absolute_url(self): + # TODO: this is disgusting. find a way to consolidate this logic with + # public.views.userlist among other places, and make some constants or + # something so we aren't using copies of string names everywhere. + group_names = self.user.groups.values_list('name', flat=True) + if "Developers" in group_names: + prefix = "developers" + elif "Trusted Users" in group_names: + prefix = "trustedusers" + else: + prefix = "fellows" + return '/%s/#%s' % (prefix, self.user.username) class TodolistManager(models.Manager): def incomplete(self): diff --git a/main/templatetags/pgp.py b/main/templatetags/pgp.py index 67f5e08d..d69e2918 100644 --- a/main/templatetags/pgp.py +++ b/main/templatetags/pgp.py @@ -1,5 +1,7 @@ from django import template from django.conf import settings +from django.utils.html import conditional_escape +from django.utils.safestring import mark_safe register = template.Library() @@ -26,4 +28,15 @@ def pgp_key_link(key_id): values = (url, format_key(key_id), key_id[-8:]) return '0x%s' % values +@register.filter +def pgp_fingerprint(key_id, autoescape=True): + if not key_id: + return u'' + if autoescape: + esc = conditional_escape + else: + esc = lambda x: x + return mark_safe(format_key(esc(key_id))) +pgp_fingerprint.needs_autoescape = True + # vim: set ts=4 sw=4 et: diff --git a/public/views.py b/public/views.py index c28fd303..95b590fc 100644 --- a/public/views.py +++ b/public/views.py @@ -1,17 +1,17 @@ -from main.models import Arch, Repo, Donor -from mirrors.models import MirrorUrl -from news.models import News -from . import utils - from django.conf import settings from django.contrib.auth.models import User from django.http import Http404 from django.views.generic import list_detail from django.views.generic.simple import direct_to_template +from devel.models import MasterKey +from main.models import Arch, Repo, Donor +from mirrors.models import MirrorUrl +from news.models import News +from utils import get_recent_updates def index(request): - pkgs = utils.get_recent_updates() + pkgs = get_recent_updates() context = { 'news_updates': News.objects.order_by('-postdate', '-id')[:15], 'pkg_updates': pkgs, @@ -77,4 +77,10 @@ def feeds(request): } return direct_to_template(request, 'public/feeds.html', context) +def keys(request): + context = { + 'keys': MasterKey.objects.select_related('owner', 'revoker').all(), + } + return direct_to_template(request, 'public/keys.html', context) + # vim: set ts=4 sw=4 et: diff --git a/templates/public/keys.html b/templates/public/keys.html new file mode 100644 index 00000000..2e7fcebe --- /dev/null +++ b/templates/public/keys.html @@ -0,0 +1,57 @@ +{% extends "base.html" %} +{% load pgp %} + +{% block title %}Arch Linux - Master Signing Keys{% endblock %} + +{% block content %} +
    +

    Master Signing Keys

    + +

    This page lists the Arch Linux Master Keys. This is a distributed set of + keys that are seen as "official" signing keys of the distribution. Each key + is held by a different developer, and a revocation certificate for the key + is held by a different developer. Thus, no one developer has absolute hold + on any sort of absolute, root trust.

    +

    The {{ keys|length }} key{{ keys|pluralize }} listed below should be + regarded as the current set of master keys. They are available on public + keyservers and should be signed by the owner of the key.

    +

    All official Arch Linux developers and trusted users should have their + key signed by at least three of these master keys. This is in accordance + with the PGP web of trust concept. If a user is willing to + marginally trust all of the master keys, three signatures from different + master keys will consider a given developer's key as valid. For more + information on trust, please consult the + GNU Privacy Handbook + and Using trust to + validate keys.

    + +
    Name:{{ dev.get_full_name }}{{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %}
    Alias: {{ prof.alias }}
    + + + + + + + + + + + + {% for key in keys %} + + + + {% with key.owner.userprofile as owner_profile %} + + + {% endwith %} + {% with key.revoker.userprofile as revoker_profile %} + + + {% endwith %} + + {% endfor %} + +
    Master KeyFull FingerprintOwnerOwner's Signing KeyRevokerRevoker's Signing Key
    {% pgp_key_link key.pgp_key %}{{ key.pgp_key|pgp_fingerprint }}{{ key.owner.get_full_name }}{% pgp_key_link owner_profile.pgp_key %}{{ key.revoker.get_full_name }}{% pgp_key_link revoker_profile.pgp_key %}
    +
    +{% endblock %} diff --git a/urls.py b/urls.py index 1d06f0f2..b01d2ee3 100644 --- a/urls.py +++ b/urls.py @@ -67,6 +67,7 @@ (r'^fellows/$', 'userlist', { 'user_type':'fellows' }, 'page-fellows'), (r'^donate/$', 'donate', {}, 'page-donate'), (r'^download/$', 'download', {}, 'page-download'), + (r'^master-keys/$', 'keys', {}, 'page-keys'), ) # Includes and other remaining stuff -- cgit v1.2.3-54-g00ecf From 4590196d79273c49172e2da74e7a7b31e59d7a27 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 30 Nov 2011 14:07:35 -0600 Subject: Integrate master key into rest of site Signed-off-by: Dan McGee --- devel/management/commands/generate_keyring.py | 4 ++++ sitemaps.py | 22 ++++++++++++++++++---- templates/public/index.html | 2 ++ 3 files changed, 24 insertions(+), 4 deletions(-) (limited to 'templates/public') diff --git a/devel/management/commands/generate_keyring.py b/devel/management/commands/generate_keyring.py index 35ab8874..a3a764b4 100644 --- a/devel/management/commands/generate_keyring.py +++ b/devel/management/commands/generate_keyring.py @@ -13,6 +13,7 @@ import subprocess import sys +from devel.models import MasterKey from main.models import UserProfile logging.basicConfig( @@ -48,11 +49,14 @@ def generate_keyring(keyserver, keyring): pgp_key__isnull=False).extra(where=["pgp_key != ''"]).values_list( "pgp_key", flat=True) logger.info("%d keys fetched from user profiles", len(key_ids)) + master_key_ids = MasterKey.objects.values_list("pgp_key", flat=True) + logger.info("%d keys fetched from master keys", len(master_key_ids)) gpg_cmd = ["gpg", "--no-default-keyring", "--keyring", keyring, "--keyserver", keyserver, "--recv-keys"] logger.info("running command: %r", gpg_cmd) gpg_cmd.extend(key_ids) + gpg_cmd.extend(master_key_ids) subprocess.check_call(gpg_cmd) logger.info("keyring at %s successfully updated", keyring) diff --git a/sitemaps.py b/sitemaps.py index 7718002d..958d1f44 100644 --- a/sitemaps.py +++ b/sitemaps.py @@ -71,10 +71,24 @@ class BaseSitemap(Sitemap): base_viewnames = ( ('index', 1.0, 'hourly'), ('packages-search', 0.8, 'hourly'), - 'page-about', 'page-art', 'page-svn', 'page-devs', 'page-tus', - 'page-fellows', 'page-donate', 'page-download', 'news-list', - 'feeds-list', 'groups-list', 'mirror-list', 'mirror-status', - 'mirrorlist', 'packages-differences', 'releng-test-overview', + ('page-keys', 0.8, 'weekly'), + ('news-list', 0.7, 'weekly'), + ('groups-list', 0.5, 'weekly'), + ('mirror-status', 0.4, 'hourly'), + 'page-about', + 'page-art', + 'page-svn', + 'page-devs', + 'page-tus', + 'page-fellows', + 'page-donate', + 'page-download', + 'feeds-list', + 'mirror-list', + 'mirrorlist', + 'packages-differences', + 'releng-test-overview', + 'visualize-index', ) def items(self): diff --git a/templates/public/index.html b/templates/public/index.html index 854bd447..4bd26f6b 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -170,6 +170,8 @@

    Tools

    Development

      +
    • Master Keys
    • Packages
    • Date: Thu, 1 Dec 2011 23:35:41 -0500 Subject: I think this fixes all the broken links (that point to parabolagnulinux.org anyway) --- devel/views.py | 2 +- settings.py | 2 +- templates/base.html | 2 +- templates/packages/flaghelp.html | 2 +- templates/public/art.html | 2 +- templates/public/download.html | 2 +- templates/public/feeds.html | 2 +- templates/public/index.html | 4 ++-- todolists/views.py | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) (limited to 'templates/public') diff --git a/devel/views.py b/devel/views.py index 7cc45419..b9bd7cce 100644 --- a/devel/views.py +++ b/devel/views.py @@ -292,7 +292,7 @@ def save(self, commit=True): send_mail("Your new parabolaweb account", template.render(ctx), - 'Parabola ', + 'Parabola ', [user.email], fail_silently=False) diff --git a/settings.py b/settings.py index cb17c96c..e1fc45d5 100644 --- a/settings.py +++ b/settings.py @@ -13,7 +13,7 @@ MANAGERS = ADMINS # Package out-of-date emails for orphans -NOTIFICATIONS = ['packages@list.parabolagnulinux.org'] +NOTIFICATIONS = ['dev@lists.parabolagnulinux.org'] # Full path to the data directory DEPLOY_PATH = os.path.dirname(os.path.realpath(__file__)) diff --git a/templates/base.html b/templates/base.html index ca492281..b537c603 100644 --- a/templates/base.html +++ b/templates/base.html @@ -39,7 +39,7 @@
    • Architecture Differences
    • Archives
    • Dev Clocks
    • {% if user.is_staff %} diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index e33ba0f5..d60018fa 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -25,7 +25,7 @@

      Flagging Packages

      The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the parabola mailing list with your additional text.

      diff --git a/templates/public/art.html b/templates/public/art.html index 68179f23..3a92b8b4 100644 --- a/templates/public/art.html +++ b/templates/public/art.html @@ -10,7 +10,7 @@

      Parabola Logos and Artwork

      You can help by creating artwork for Parabola GNU/Linux-libre.

      -

      Send your designs to web@list.parabolagnulinux.org and state they are CC-by-sa +

      Send your designs to dev@lists.parabolagnulinux.org and state they are CC-by-sa or another free culture friendly license.

      diff --git a/templates/public/download.html b/templates/public/download.html index 7a1cd855..207414dc 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -23,7 +23,7 @@

      Release Info

    • Resources:
    • diff --git a/templates/public/feeds.html b/templates/public/feeds.html index 79e8a1aa..da70e6ee 100644 --- a/templates/public/feeds.html +++ b/templates/public/feeds.html @@ -17,7 +17,7 @@

      News and Activity Feeds

      the Parabola staff.

      The Parabola Wiki: Recent changes feed is also available to track document changes from the Mailing Lists -

    • Dev Archives
    • IRC Channels
    • diff --git a/todolists/views.py b/todolists/views.py index 43763545..233102cf 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -161,7 +161,7 @@ def send_todolist_emails(todo_list, new_packages): template = loader.get_template('todolists/email_notification.txt') send_mail('Packages added to todo list \'%s\'' % todo_list.name, template.render(ctx), - 'Parabola ', + 'Parabola ', [maint], fail_silently=True) -- cgit v1.2.3-54-g00ecf From a10b6d884f4f102f5216f4b341f35bb341cee176 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Dec 2011 23:55:27 -0500 Subject: Normalize the URI scheme used for inbound links. Don't use one when possible, else use https --- README | 2 +- packages/templatetags/package_extras.py | 8 ++++---- public/views.py | 2 +- settings.py | 2 +- templates/base.html | 12 ++++++------ templates/packages/flag.html | 2 +- templates/packages/flaghelp.html | 4 ++-- templates/packages/search.html | 2 +- templates/public/about.html | 2 +- templates/public/donate.html | 2 +- templates/public/download.html | 16 ++++++++-------- templates/public/feeds.html | 4 ++-- templates/public/https.html | 5 ++--- templates/public/index.html | 18 +++++++++--------- templates/public/svn.html | 2 +- 15 files changed, 41 insertions(+), 42 deletions(-) (limited to 'templates/public') diff --git a/README b/README index 0e9d19af..acd8b8f9 100644 --- a/README +++ b/README @@ -94,7 +94,7 @@ for your install. 10. To optionally populate the database with real data: - $ wget http://repo.parabolagnulinux.org/core/os/i686/core.db.tar.gz + $ wget https://repo.parabolagnulinux.org/core/os/i686/core.db.tar.gz $ ./manage.py reporead i686 core.db.tar.gz $ ./manage.py syncisos diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index 01d9afd6..c8c88ca7 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -74,7 +74,7 @@ def userpkgs(user): @register.simple_tag def get_wiki_link(package): - url = "https://wiki.parabolagnulinux.org/index.php" + url = "//wiki.parabolagnulinux.org/index.php" data = { 'title': "Special:Search", 'search': package.pkgname, @@ -92,7 +92,7 @@ def svn_trunk(package): @register.simple_tag def bugs_list(package): - url = "https://bugs.parabolagnulinux.org/bugs/issue?" + url = "//bugs.parabolagnulinux.org/bugs/issue?" data = { '@action': 'search', 'title': package.pkgname, @@ -101,7 +101,7 @@ def bugs_list(package): @register.simple_tag def bug_report(package): - url = "https://bugs.parabolagnulinux.org/bugs/issue?" + url = "//bugs.parabolagnulinux.org/bugs/issue?" data = { '@template': 'item', 'keyword': 'packages', @@ -118,5 +118,5 @@ def flag_unfree(package): 'priority': 'critical', 'title': '[%s] Please put your reasons here (register first if you haven\'t)' % package.pkgname, } - return "https://bugs.parabolagnulinux.org/bugs/issue?%s" % urlencode(data) + return "//bugs.parabolagnulinux.org/bugs/issue?%s" % urlencode(data) # vim: set ts=4 sw=4 et: diff --git a/public/views.py b/public/views.py index bb9cd454..43b46b12 100644 --- a/public/views.py +++ b/public/views.py @@ -52,7 +52,7 @@ def donate(request): return direct_to_template(request, 'public/donate.html', context) def download(request): - return redirect('http://wiki.parabolagnulinux.org/get', permanent=True) + return redirect('//wiki.parabolagnulinux.org/get', permanent=True) def feeds(request): context = { diff --git a/settings.py b/settings.py index e1fc45d5..ed12bbec 100644 --- a/settings.py +++ b/settings.py @@ -132,6 +132,6 @@ INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] # URL to fetch a current list of available ISOs -ISO_LIST_URL = 'http://repo.parabolagnulinux.org/isos/' +ISO_LIST_URL = 'https://repo.parabolagnulinux.org/isos/' # vim: set ts=4 sw=4 et: diff --git a/templates/base.html b/templates/base.html index b537c603..746c6cf4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -19,10 +19,10 @@ @@ -32,14 +32,14 @@ {% if user.is_authenticated %}
      • Dashboard
      • -
      • Projects
      • +
      • Projects
      • News
      • Signoffs
      • Todos
      • Architecture Differences
      • Archives
      • Dev Clocks
      • {% if user.is_staff %} diff --git a/templates/packages/flag.html b/templates/packages/flag.html index 4bb23b85..ea199618 100644 --- a/templates/packages/flag.html +++ b/templates/packages/flag.html @@ -29,7 +29,7 @@

        Flag Package: {{ package.pkgname }} {{ package.full_version }} ({{ package.a

        Note: Do not use this facility if the package is broken! The package will be unflagged and the report will be ignored! - Use the + Use the bugtracker to file a bug instead.

        Please confirm your flag request for {{package.pkgname}}:

        diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index d60018fa..eac13f83 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -25,12 +25,12 @@

        Flagging Packages

        The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the parabola mailing list with your additional text.

        Note: Please do not use this facility if the - package is broken! Use the bugtracker instead.

        diff --git a/templates/packages/search.html b/templates/packages/search.html index 4a61298e..bb5c1c8b 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -165,7 +165,7 @@

        Package Search

        You are browsing the Parabola package database. From here you can find detailed information about packages located in the official supported repositories. If you need the sourceball from where a package is built, you can look at our sources repo.

        diff --git a/templates/public/about.html b/templates/public/about.html index a01a33fe..099d5513 100644 --- a/templates/public/about.html +++ b/templates/public/about.html @@ -53,7 +53,7 @@

        Participate

      • Host repositories. Mirrors are not abundant.
      • -
      • Take a look at our TODO list
      • +
      • Take a look at our TODO list
      diff --git a/templates/public/donate.html b/templates/public/donate.html index ef7f252d..c6e055f5 100644 --- a/templates/public/donate.html +++ b/templates/public/donate.html @@ -18,7 +18,7 @@

      We don't accept any money donations

      anything, because we are a really small community of hackers.

      If you want, we have a pretty nice TODO list you can check to help us by donating some of your time. That will be very much appreciated by us :)

      diff --git a/templates/public/download.html b/templates/public/download.html index 207414dc..2e1024b0 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -23,14 +23,14 @@

      Release Info

    • Resources:
    • Instructions: @@ -42,7 +42,7 @@

      Existing Arch Users

      If you are an Arch user, there is no need to download the ISO to update your existing system to Parabola. You can just follow the instructions in our wiki to convert your existing Arch system into a free - as in freedom one. More here.

      BitTorrent Download (recommended)

      @@ -68,12 +68,12 @@

      BitTorrent Download (recommended)

      - Download - Download @@ -94,10 +94,10 @@

      BitTorrent Download (recommended)

      Core Image - Download - Download HTTP/FTP Direct Downloads image matches the checksum from the MD5SUMS or SHA256SUMS file in the same directory as the image.

      -

      Go to the Parabola ISOs directory.

      {%endwith%} diff --git a/templates/public/feeds.html b/templates/public/feeds.html index da70e6ee..69789150 100644 --- a/templates/public/feeds.html +++ b/templates/public/feeds.html @@ -17,10 +17,10 @@

      News and Activity Feeds

      the Parabola staff.

      The Parabola Wiki: Recent changes feed is also available to track document changes from the - Parabola Wiki.

      Package Feeds

      diff --git a/templates/public/https.html b/templates/public/https.html index 7cfe44e9..e53dc8e9 100644 --- a/templates/public/https.html +++ b/templates/public/https.html @@ -19,9 +19,8 @@

      Parabola GNU/Linux-libre

      I just want to get the ISOs

      You can proceed to our ISOs download page on our wiki (which isn't secured - yet, sadly).

      + href="https://wiki.parabolagnulinux.org/get">ISOs download page on our wiki.

      I want to do this the right way

      diff --git a/templates/public/index.html b/templates/public/index.html index 044b586f..188c572f 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -112,22 +112,22 @@

      Recent Updates (Documentation

      Community

      @@ -152,9 +152,9 @@

      Development

      title="View/search the package repository database">Packages
    • Package Groups
    • -
    • Projects in Git
    • -
    • Issue Tracker
    • Todo Lists
    • @@ -166,7 +166,7 @@

      About

    • About Parabola
    • Download Parabola
    • -
    • Media Appearances
    • Logos & Artwork
    • News Archives
    • diff --git a/templates/public/svn.html b/templates/public/svn.html index 80367eaf..4321f7c2 100644 --- a/templates/public/svn.html +++ b/templates/public/svn.html @@ -4,7 +4,7 @@

      SVN Repositories

      Parabola doesn't use any SVN repositories. But you can find our Projects on git!

      -- cgit v1.2.3-54-g00ecf