Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Most of it is already implemented, you should at least do the following:
# Further settings (not needed for initial setup)
## Configure Mail Server
1. Open .env file
2. Fill out
2. Add
```
EMAIL_HOST_USER=your-email
EMAIL_HOST_PASSWORD=your-password
Expand Down
3 changes: 3 additions & 0 deletions evoks/Skosmos/skosmos.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def add_vocabulary(self, config: SkosmosVocabularyConfig) -> None:
g.add((URIRef(vocabulary_uri),
URIRef('http://purl.org/net/skosmos#fullAlphabeticalIndex'), Literal(True)))

g.add((URIRef(vocabulary_uri),
URIRef('http://purl.org/net/skosmos#showTopConcepts'), Literal(True)))

g.add((URIRef(vocabulary_uri),
URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), URIRef('http://purl.org/net/skosmos#Vocabulary')))

Expand Down
1 change: 1 addition & 0 deletions evoks/evoks/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def get_env(key, fallback):
EMAIL_USE_TLS = True
EMAIL_HOST_USER = get_env('EMAIL_HOST_USER', '')
EMAIL_HOST_PASSWORD = get_env('EMAIL_HOST_PASSWORD', '')
EMAIL_CONFIGURED = bool(EMAIL_HOST_USER and EMAIL_HOST_PASSWORD)



Expand Down
19 changes: 10 additions & 9 deletions evoks/evoks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.shortcuts import redirect
from django.contrib.auth.models import User
from django.core.mail import send_mail
from evoks.settings import EMAIL_HOST_USER
from evoks.settings import EMAIL_HOST_USER, EMAIL_CONFIGURED
import django.contrib.auth.views
from django.contrib.auth.models import User
from django.contrib import admin
Expand Down Expand Up @@ -103,14 +103,15 @@ def signup_view(request: HttpRequest) -> HttpResponse:
url = request.build_absolute_uri(reverse("admin:%s_%s_change" % (
user.profile._meta.app_label, user.profile._meta.model_name), args=(user.profile.id,)))

send_mail(
'Verify a new Evoks account',
'Please visit the evoks admin panel {0} and verify the new user'.format(
url),
EMAIL_HOST_USER,
emails,
fail_silently=False,
)
if EMAIL_CONFIGURED:
send_mail(
'Verify a new Evoks account',
'Please visit the evoks admin panel {0} and verify the new user'.format(
url),
EMAIL_HOST_USER,
emails,
fail_silently=False,
)

return HttpResponse('Your account will be usable as soon as an admin verifies it!')

Expand Down
2 changes: 1 addition & 1 deletion evoks/theme/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
</h2>
<p class="mt-2 text-center text-sm text-gray-600">
or
<a href="/signup" class="font-medium text-regal-blue hover:text-gray-500">
<a href="{% url 'signup' %}" class="font-medium text-regal-blue hover:text-gray-500">
create account
</a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion evoks/theme/templates/reset_password_complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Your password has been set! You can login to your account.
</p>
<div class="text-center mt-3">
<a href="/login" class="font-medium text-regal-blue hover:text-gray-500">
<a href="{% url 'login' %}" class="font-medium text-regal-blue hover:text-gray-500">
Login
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion evoks/theme/templates/teams.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h1 class="text-2xl font-semibold text-gray-900">Teams Dashboard</h1>
<div class="flex items-center">
<div class="ml-4">
<div class="text-sm text-gray-900">
<a href="/teams/{{team.name}}">
<a href="{% url 'teams' team.name %}">
{{team.name}}
</a>
</div>
Expand Down
Loading