Compare commits
No commits in common. "ad6564b51016fae360a925fb8f34ca4e5ceab109" and "535543f82f5326174f99c69df6fa89806c5fcd29" have entirely different histories.
ad6564b510
...
535543f82f
|
@ -5,5 +5,3 @@
|
|||
!src/
|
||||
!requirements/
|
||||
!entrypoint.sh
|
||||
!pyproject.toml
|
||||
!README.md
|
||||
|
|
20
Dockerfile
20
Dockerfile
|
@ -11,13 +11,7 @@ ARG DJANGO_ENV
|
|||
ARG BUILD
|
||||
ENV BUILD ${BUILD}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN groupadd -g 1000 www && useradd -u 1000 -ms /bin/bash -g www www
|
||||
COPY --chown=www:www . .
|
||||
RUN mkdir /app/src/static \
|
||||
&& chown www:www /app/src/static \
|
||||
&& apt-get update \
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
binutils \
|
||||
libpq-dev \
|
||||
|
@ -29,9 +23,15 @@ RUN mkdir /app/src/static \
|
|||
libgdk-pixbuf2.0-0 \
|
||||
libffi-dev \
|
||||
shared-mime-info \
|
||||
gettext \
|
||||
&& pip install . \
|
||||
&& django-admin compilemessages
|
||||
gettext
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN groupadd -g 1000 www && useradd -u 1000 -ms /bin/bash -g www www
|
||||
COPY --chown=www:www . /app/
|
||||
RUN mkdir /app/src/static && chown www:www /app/src/static
|
||||
RUN pip install -r requirements/$([ "$DJANGO_ENV" = "production" ] && echo "base.txt" || echo "dev.txt") &&\
|
||||
django-admin compilemessages
|
||||
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
requires = ["hatchling", "hatch-vcs"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
|
@ -22,12 +22,11 @@ dependencies = [
|
|||
"django-zen-queries==2.1.0",
|
||||
"django-registries==0.0.3",
|
||||
"django-view-decorator==0.0.4",
|
||||
"django-oauth-toolkit==2.3.0",
|
||||
]
|
||||
version = "0.0.1"
|
||||
dynamic = ["version"]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src"]
|
||||
[tool.hatch.version]
|
||||
source = "vcs"
|
||||
|
||||
[tool.hatch.envs.default]
|
||||
dependencies = [
|
||||
|
@ -60,7 +59,7 @@ cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --
|
|||
no-cov = "cov --no-cov {args}"
|
||||
typecheck = "mypy --config-file=pyproject.toml ."
|
||||
requirements = "pip-compile --output-file requirements/base.txt pyproject.toml"
|
||||
server = "./src/manage.py runserver 0.0.0.0:8000"
|
||||
server = "./src/manage.py runserver"
|
||||
migrate = "./src/manage.py migrate"
|
||||
makemigrations = "./src/manage.py makemigrations"
|
||||
createsuperuser = "./src/manage.py createsuperuser"
|
||||
|
|
|
@ -42,7 +42,6 @@ THIRD_PARTY_APPS = [
|
|||
"allauth.account",
|
||||
"django_view_decorator",
|
||||
"django_registries",
|
||||
"oauth2_provider",
|
||||
]
|
||||
|
||||
LOCAL_APPS = [
|
||||
|
@ -157,16 +156,6 @@ ACCOUNT_EMAIL_REQUIRED = True
|
|||
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False
|
||||
ACCOUNT_USERNAME_REQUIRED = False
|
||||
|
||||
# OAuth2 configuration
|
||||
OAUTH2_PROVIDER = {
|
||||
"OIDC_ENABLED": True,
|
||||
"SCOPES": {
|
||||
"openid": "OpenID Connect scope",
|
||||
"profile": "Profile Information",
|
||||
},
|
||||
"PKCE_REQUIRED": False, # this can be a callable - https://github.com/jazzband/django-oauth-toolkit/issues/711#issuecomment-497073038
|
||||
}
|
||||
|
||||
# Logging
|
||||
# We want to log everything to stdout in docker
|
||||
LOGGING = {
|
||||
|
|
|
@ -54,14 +54,3 @@ html.dark article table tbody tr:nth-child(2n+1) td {
|
|||
html.dark article table tbody tr:last-child td {
|
||||
border-bottom: var(--half-space) solid var(--twilight);
|
||||
}
|
||||
|
||||
html.dark form>div>input[type="text"],
|
||||
html.dark form>div>input[type="password"],
|
||||
html.dark input[type="email"] {
|
||||
border: 2px solid var(--twilight);
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
background: var(--dark-dark);
|
||||
width: 100%;
|
||||
color: var(--light-dust);
|
||||
}
|
|
@ -94,7 +94,7 @@ h6 {
|
|||
}
|
||||
|
||||
a {
|
||||
font-weight: 500;
|
||||
<<<<<<< HEAD font-weight: 500;
|
||||
color: var(--splash);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
@ -105,6 +105,10 @@ hr {
|
|||
height: 0;
|
||||
border: 0;
|
||||
border-bottom: 1px solid var(--dark-custard);
|
||||
=======font-weight: 500;
|
||||
color: var(--splash);
|
||||
text-decoration: none;
|
||||
>>>>>>>bdc2d8717cbcab1795b1b2dc4f08f83242e4a4ca
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -244,7 +248,7 @@ article {
|
|||
padding: var(--double-space) var(--outer-space);
|
||||
}
|
||||
|
||||
article div.content-view {
|
||||
article>div.content-view {
|
||||
background: var(--dust);
|
||||
padding: var(--double-space);
|
||||
margin-bottom: var(--space);
|
||||
|
@ -263,7 +267,12 @@ div.services {
|
|||
|
||||
div.services>div,
|
||||
div.infobox {
|
||||
background: var(--light);
|
||||
<<<<<<< HEAD background: var(--light);
|
||||
padding: var(--double-space);
|
||||
border-radius: 6px;
|
||||
flex: 240px;
|
||||
max-width: 420px;
|
||||
=======background: var(--light);
|
||||
padding: var(--double-space);
|
||||
border-radius: 6px;
|
||||
flex: 240px;
|
||||
|
@ -285,6 +294,111 @@ div.services>div>div.description>p {
|
|||
margin-top: var(--half-space);
|
||||
}
|
||||
|
||||
div.services>div>a,
|
||||
a.button,
|
||||
button {
|
||||
display: block;
|
||||
color: var(--light);
|
||||
background: var(--splash);
|
||||
padding: var(--space) var(--double-space);
|
||||
border-radius: 3px;
|
||||
opacity: 0.9;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
border: 0;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.03em;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.services>div>a:hover,
|
||||
a.button:hover,
|
||||
button:hover {
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
article table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
margin: var(--space) 0;
|
||||
}
|
||||
|
||||
article table thead th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
article table tbody tr:nth-child(odd) {
|
||||
background: var(--medium-dust);
|
||||
}
|
||||
|
||||
article table thead th,
|
||||
article table tbody td {
|
||||
padding: var(--half-space);
|
||||
}
|
||||
|
||||
form>div {
|
||||
margin: 0 0 var(--double-space);
|
||||
}
|
||||
|
||||
form>div>label {
|
||||
display: block;
|
||||
margin: 0 0 6px;
|
||||
}
|
||||
|
||||
form>div>input[type="text"],
|
||||
form>div>input[type="password"] {
|
||||
border: 2px solid var(--twilight);
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
background: var(--light-dust);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#login {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#loginbox {
|
||||
border-radius: var(--space);
|
||||
border: 6px solid white;
|
||||
width: 800px;
|
||||
height: 500px;
|
||||
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
}
|
||||
|
||||
#loginbox>div {
|
||||
padding: var(--double-space);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#loginbox label {
|
||||
color: var(--twilight);
|
||||
}
|
||||
|
||||
#loginbox>div.login {
|
||||
background: var(--light-dust);
|
||||
>>>>>>>bdc2d8717cbcab1795b1b2dc4f08f83242e4a4ca display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
div.infobox button {
|
||||
margin-top: var(--double-space);
|
||||
}
|
||||
|
||||
div.services>div>div.description {
|
||||
margin-bottom: var(--double-space);
|
||||
}
|
||||
|
||||
div.services>div>div.description>p {
|
||||
margin-top: var(--half-space);
|
||||
}
|
||||
|
||||
div.services>div>a,
|
||||
a.button,
|
||||
button {
|
||||
|
@ -320,10 +434,6 @@ button:disabled {
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
button.secondary {
|
||||
background: var(--twilight);
|
||||
}
|
||||
|
||||
article table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
|
@ -404,28 +514,6 @@ form div.buttonHolder button {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
#email-add-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#email-add-overlay .content-view {
|
||||
width: 600px;
|
||||
padding: var(--double-space);
|
||||
}
|
||||
|
||||
#email-add-overlay .content-view p {
|
||||
margin: var(--double-space) 0;
|
||||
}
|
||||
|
||||
#login {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{% csrf_token %}
|
||||
<fieldset class="blockLabels">
|
||||
<div class="buttonHolder">
|
||||
<button class="small" name="action_add_open" style="float:right">Add Email …</button>
|
||||
<button class="small" name="action_add" style="float:right">Add Email …</button>
|
||||
<button class="small" disabled type="submit" id="action_primary" name="action_primary">Make Primary</button>
|
||||
<button class="small" type="submit" name="action_send">Re-send Verification</button>
|
||||
<button class="small" type="submit" name="action_remove">Remove</button>
|
||||
|
@ -76,22 +76,21 @@
|
|||
{% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="email-add-overlay">
|
||||
<div class="content-view">
|
||||
<!--
|
||||
<hr />
|
||||
|
||||
<h3>{% trans "Add E-mail" %}</h3>
|
||||
<div class="panel-body">
|
||||
<form method="post" action="{% url 'account_email' %}"
|
||||
class="add_email">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button name="action_add" style="float:right" type="submit">
|
||||
<button name="action_add" class="btn btn-success" type="submit">
|
||||
{% trans "Add E-mail" %}
|
||||
</button>
|
||||
<button id="overlay-close-button" class="secondary">Cancel</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -106,24 +105,6 @@
|
|||
});
|
||||
}
|
||||
|
||||
let addEmail = document.getElementsByName('action_add_open')[0];
|
||||
|
||||
addEmail.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
let overlay = document.getElementById('email-add-overlay')
|
||||
overlay.style.display = 'flex'
|
||||
|
||||
window.addEventListener('keydown', function(e) {
|
||||
if (e.key == 'Escape') {
|
||||
overlay.style.display = 'none'
|
||||
}
|
||||
})
|
||||
|
||||
document.getElementById('overlay-close-button').addEventListener('click', function() {
|
||||
overlay.style.display = 'none'
|
||||
})
|
||||
})
|
||||
|
||||
let radio_actions = document.getElementsByName('email');
|
||||
if (radio_actions.length) {
|
||||
for (radio of radio_actions) {
|
||||
|
|
|
@ -7,7 +7,6 @@ from django_view_decorator import include_view_urls
|
|||
|
||||
urlpatterns = [
|
||||
path("", include_view_urls(extra_modules=["project.views"])),
|
||||
path("o/", include("oauth2_provider.urls", namespace="oauth2_provider")),
|
||||
path("accounts/", include("allauth.urls")),
|
||||
path("_admin/", admin.site.urls),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue