Skip to content

Commit 2c70616

Browse files
committed
Blank /admin/organizations/approve/ page
This is a placeholder so we can reference `admin.organization.approve` as a route in the admin-new-organization-requested email.
1 parent 0c3c09e commit 2c70616

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

tests/unit/admin/test_routes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ def test_includeme():
2626

2727
assert config.add_route.calls == [
2828
pretend.call("admin.dashboard", "/admin/", domain=warehouse),
29+
pretend.call(
30+
"admin.organization.approve",
31+
"/admin/organizations/approve/",
32+
domain=warehouse,
33+
),
2934
pretend.call("admin.user.list", "/admin/users/", domain=warehouse),
3035
pretend.call("admin.user.detail", "/admin/users/{user_id}/", domain=warehouse),
3136
pretend.call(

warehouse/admin/routes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ def includeme(config):
2020
# General Admin pages
2121
config.add_route("admin.dashboard", "/admin/", domain=warehouse)
2222

23+
# Organization related Admin pages
24+
config.add_route(
25+
"admin.organization.approve", "/admin/organizations/approve/", domain=warehouse
26+
)
27+
2328
# User related Admin pages
2429
config.add_route("admin.user.list", "/admin/users/", domain=warehouse)
2530
config.add_route("admin.user.detail", "/admin/users/{user_id}/", domain=warehouse)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{#
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
-#}
14+
{% extends "confirm-action.html" %}
15+
16+
{% block title %}
17+
{% trans %}Approve New Organization{% endtrans %}
18+
{% endblock %}
19+
20+
{% block main %}
21+
{% endblock %}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
from pyramid.view import view_config
14+
15+
16+
@view_config(
17+
route_name="admin.organization.approve",
18+
renderer="admin/organizations/approve.html",
19+
permission="admin",
20+
require_methods=False,
21+
uses_session=True,
22+
has_translations=True,
23+
)
24+
def approve(request):
25+
return {}

0 commit comments

Comments
 (0)