translations in vcs + storage security

This commit is contained in:
vabene1111 2019-11-21 15:01:48 +01:00
parent 14130f4417
commit 8ce35dde0b
6 changed files with 4 additions and 8 deletions

4
.gitignore vendored
View File

@ -44,10 +44,6 @@ nosetests.xml
coverage.xml
*,cover
# Translations
*.mo
*.pot
# Django stuff:
*.log

Binary file not shown.

View File

@ -1,7 +1,7 @@
{% load i18n %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading"><i class="far fa-exclamation-triangle"></i> {% trans 'Security Warning' %}</h4>
<h4 class="alert-heading"><i class="fas fa-exclamation-triangle"></i> {% trans 'Security Warning' %}</h4>
<p>{% blocktrans %}
The <b>Password and Token</b> field are stored as <b>plain text</b> inside the database.
This is necessary because they are needed to make API requests, but it also increases the risk of

View File

@ -28,7 +28,7 @@ urlpatterns = [
path('edit/keyword/<int:pk>/', edit.KeywordUpdate.as_view(), name='edit_keyword'),
path('edit/sync/<int:pk>/', edit.SyncUpdate.as_view(), name='edit_sync'),
path('edit/import/<int:pk>/', edit.ImportUpdate.as_view(), name='edit_import'),
path('edit/storage/<int:pk>/', edit.StorageUpdate.as_view(), name='edit_storage'),
path('edit/storage/<int:pk>/', edit.edit_storage, name='edit_storage'),
path('edit/comment/<int:pk>/', edit.CommentUpdate.as_view(), name='edit_comment'),
path('redirect/delete/<slug:name>/<int:pk>/', edit.delete_redirect, name='redirect_delete'),

View File

@ -147,9 +147,9 @@ def edit_storage(request, pk):
pseudo_instance = instance
pseudo_instance.password = '__NO__CHANGE__'
pseudo_instance.token = '__NO__CHANGE__'
form = InternalRecipeForm(instance=pseudo_instance)
form = StorageForm(instance=pseudo_instance)
return render(request, 'forms/edit_internal_recipe.html',
return render(request, 'generic/edit_template.html',
{'form': form, 'view_url': reverse('view_recipe', args=[pk])})

Binary file not shown.