mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Make names in community auth unique
Technically not needed for the system, but confusion is ensured if you have two different sites with the same name...
This commit is contained in:
23
pgweb/account/migrations/0009_cauth_unique_names.py
Normal file
23
pgweb/account/migrations/0009_cauth_unique_names.py
Normal file
@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.2.14 on 2023-04-11 15:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0008_cooloff_message'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='communityauthorg',
|
||||
name='orgname',
|
||||
field=models.CharField(help_text='Name of the organisation', max_length=100, unique=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='communityauthsite',
|
||||
name='name',
|
||||
field=models.CharField(help_text="Note that the value in this field is shown on the login page, so make sure it's user-friendly!", max_length=100, unique=True),
|
||||
),
|
||||
]
|
@ -3,7 +3,7 @@ from django.contrib.auth.models import User
|
||||
|
||||
|
||||
class CommunityAuthOrg(models.Model):
|
||||
orgname = models.CharField(max_length=100, null=False, blank=False,
|
||||
orgname = models.CharField(max_length=100, null=False, blank=False, unique=True,
|
||||
help_text="Name of the organisation")
|
||||
require_consent = models.BooleanField(null=False, blank=False, default=True)
|
||||
|
||||
@ -12,7 +12,7 @@ class CommunityAuthOrg(models.Model):
|
||||
|
||||
|
||||
class CommunityAuthSite(models.Model):
|
||||
name = models.CharField(max_length=100, null=False, blank=False,
|
||||
name = models.CharField(max_length=100, null=False, blank=False, unique=True,
|
||||
help_text="Note that the value in this field is shown on the login page, so make sure it's user-friendly!")
|
||||
redirecturl = models.URLField(max_length=200, null=False, blank=False)
|
||||
apiurl = models.URLField(max_length=200, null=False, blank=True)
|
||||
|
40
templates/docs/release_notes_list.html
Normal file
40
templates/docs/release_notes_list.html
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends "base/page.html" %}
|
||||
{% load pgfilters %}
|
||||
|
||||
{%block title%}Release Notes{%endblock%}
|
||||
|
||||
{% block contents %}
|
||||
{% regroup releases by major as release_groups %}
|
||||
|
||||
<div id="release-notes" class="row">
|
||||
<div class="col-md-9">
|
||||
<section>
|
||||
<h1>Release Notes <i class="far fa-file-alt"></i></h1>
|
||||
</section>
|
||||
<p>Below is the complete archive of release notes for every version of PostgreSQL.</p>
|
||||
<ul class="release-notes-list fa-ul">
|
||||
{% for release_group in release_groups %}
|
||||
{% with major_version=release_group.grouper %}
|
||||
<li>
|
||||
<a class="collapsed" href="#release{{ major_version|cut:"." }}" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="release{{ major_version|cut:"." }}">
|
||||
<span class="fa-li right"><i class="fas fa-angle-right"></i></span>
|
||||
<span class="fa-li down"><i class="fas fa-angle-down"></i></span>
|
||||
{% if major_version == 0 %}Postgres95{% else %}PostgreSQL {{ major_version | pg_major_version }}{% endif %}
|
||||
</a>
|
||||
<ul class="collapse release-notes-list" id="release{{ major_version|cut:"." }}">
|
||||
{% for release in release_group.list %}
|
||||
<li>
|
||||
<a href="/docs/release/{{ major_version | pg_major_version }}.{{ release.minor | release_notes_pg_minor_version:major_version }}/">
|
||||
{{ major_version | pg_major_version }}.{{ release.minor | release_notes_pg_minor_version:major_version }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user