mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-11 09:45:27 +00:00
Merge pull request #3238 from hughrun/export-fixes
fix multiple issues from user exports config changes
This commit is contained in:
commit
354388cc8f
6 changed files with 54 additions and 31 deletions
|
@ -138,9 +138,9 @@ TWO_FACTOR_LOGIN_MAX_SECONDS=60
|
||||||
# Value should be a comma-separated list of host names.
|
# Value should be a comma-separated list of host names.
|
||||||
CSP_ADDITIONAL_HOSTS=
|
CSP_ADDITIONAL_HOSTS=
|
||||||
|
|
||||||
# The last number here means "megabytes"
|
|
||||||
# Increase if users are having trouble uploading BookWyrm export files.
|
|
||||||
DATA_UPLOAD_MAX_MEMORY_SIZE = (1024**2 * 100)
|
|
||||||
|
|
||||||
# Time before being logged out (in seconds)
|
# Time before being logged out (in seconds)
|
||||||
# SESSION_COOKIE_AGE=2592000 # current default: 30 days
|
# SESSION_COOKIE_AGE=2592000 # current default: 30 days
|
||||||
|
|
||||||
|
# Maximum allowed memory for file uploads (increase if users are having trouble
|
||||||
|
# uploading BookWyrm export files).
|
||||||
|
# DATA_UPLOAD_MAX_MEMORY_MiB=100
|
||||||
|
|
|
@ -446,4 +446,6 @@ if HTTP_X_FORWARDED_PROTO:
|
||||||
# user with the same username - in which case you should change it!
|
# user with the same username - in which case you should change it!
|
||||||
INSTANCE_ACTOR_USERNAME = "bookwyrm.instance.actor"
|
INSTANCE_ACTOR_USERNAME = "bookwyrm.instance.actor"
|
||||||
|
|
||||||
DATA_UPLOAD_MAX_MEMORY_SIZE = env.int("DATA_UPLOAD_MAX_MEMORY_SIZE", (1024**2 * 100))
|
# We only allow specifying DATA_UPLOAD_MAX_MEMORY_SIZE in MiB from .env
|
||||||
|
# (note the difference in variable names).
|
||||||
|
DATA_UPLOAD_MAX_MEMORY_SIZE = env.int("DATA_UPLOAD_MAX_MEMORY_MiB", 100) << 20
|
||||||
|
|
|
@ -14,31 +14,29 @@
|
||||||
<p> {% trans "You can create an export file here. This will allow you to migrate your data to another BookWyrm account." %}</p>
|
<p> {% trans "You can create an export file here. This will allow you to migrate your data to another BookWyrm account." %}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="block mx-5 columns">
|
<div class="block mx-5 columns">
|
||||||
{% blocktrans trimmed %}
|
|
||||||
<div class="column is-half">
|
<div class="column is-half">
|
||||||
<h2 class="is-size-5">Your file will include:</h2>
|
<h2 class="is-size-5">{% trans "Your file will include:" %}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>User profile</li>
|
<li>{% trans "User profile" %}</li>
|
||||||
<li>Most user settings</li>
|
<li>{% trans "Most user settings" %}</li>
|
||||||
<li>Reading goals</li>
|
<li>{% trans "Reading goals" %}</li>
|
||||||
<li>Shelves</li>
|
<li>{% trans "Shelves" %}</li>
|
||||||
<li>Reading history</li>
|
<li>{% trans "Reading history" %}</li>
|
||||||
<li>Book reviews</li>
|
<li>{% trans "Book reviews" %}</li>
|
||||||
<li>Statuses</li>
|
<li>{% trans "Statuses" %}</li>
|
||||||
<li>Your own lists and saved lists</li>
|
<li>{% trans "Your own lists and saved lists" %}</li>
|
||||||
<li>Which users you follow and block</li>
|
<li>{% trans "Which users you follow and block" %}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-half">
|
<div class="column is-half">
|
||||||
<h2 class="is-size-5">Your file will not include:</h2>
|
<h2 class="is-size-5">{% trans "Your file will not include:" %}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Direct messages</li>
|
<li>{% trans "Direct messages" %}</li>
|
||||||
<li>Replies to your statuses</li>
|
<li>{% trans "Replies to your statuses" %}</li>
|
||||||
<li>Groups</li>
|
<li>{% trans "Groups" %}</li>
|
||||||
<li>Favorites</li>
|
<li>{% trans "Favorites" %}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endblocktrans %}
|
|
||||||
</div>
|
</div>
|
||||||
<p class="block">{% trans "In your new BookWyrm account can choose what to import: you will not have to import everything that is exported." %}</p>
|
<p class="block">{% trans "In your new BookWyrm account can choose what to import: you will not have to import everything that is exported." %}</p>
|
||||||
<p class="notification is-warning">
|
<p class="notification is-warning">
|
||||||
|
@ -49,6 +47,13 @@
|
||||||
{% if not site.user_exports_enabled %}
|
{% if not site.user_exports_enabled %}
|
||||||
<p class="notification is-danger">
|
<p class="notification is-danger">
|
||||||
{% trans "New user exports are currently disabled." %}
|
{% trans "New user exports are currently disabled." %}
|
||||||
|
{% if perms.bookwyrm.edit_instance_settings %}
|
||||||
|
<br/>
|
||||||
|
{% url 'settings-imports' as url %}
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
User exports settings can be changed from <a href="{{ url }}">the Imports page</a> in the Admin dashboard.
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% endif%}
|
||||||
</p>
|
</p>
|
||||||
{% elif next_available %}
|
{% elif next_available %}
|
||||||
<p class="notification is-warning">
|
<p class="notification is-warning">
|
||||||
|
|
|
@ -126,7 +126,7 @@ def id_to_username(user_id):
|
||||||
value = f"{name}@{domain}"
|
value = f"{name}@{domain}"
|
||||||
|
|
||||||
return value
|
return value
|
||||||
return "a new user account"
|
return _("a new user account")
|
||||||
|
|
||||||
|
|
||||||
@register.filter(name="get_file_size")
|
@register.filter(name="get_file_size")
|
||||||
|
|
|
@ -61,17 +61,25 @@ server {
|
||||||
proxy_pass http://web;
|
proxy_pass http://web;
|
||||||
}
|
}
|
||||||
|
|
||||||
# directly serve images and static files from the
|
# directly serve static files from the
|
||||||
# bookwyrm filesystem using sendfile.
|
# bookwyrm filesystem using sendfile.
|
||||||
# make the logs quieter by not reporting these requests
|
# make the logs quieter by not reporting these requests
|
||||||
location ~ \.(bmp|ico|jpg|jpeg|png|svg|tif|tiff|ttf|webp|css|js)$ {
|
location ~ ^/static/ {
|
||||||
root /app;
|
root /app;
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
add_header X-Cache-Status STATIC;
|
add_header X-Cache-Status STATIC;
|
||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
# block access to any non-image files from images or static
|
# same with image files not in static folder
|
||||||
|
location ~ \.(bmp|ico|jpg|jpeg|png|svg|tif|tiff|webp)$ {
|
||||||
|
root /app;
|
||||||
|
try_files $uri =404;
|
||||||
|
add_header X-Cache-Status STATIC;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
# block access to any non-image files from images
|
||||||
location ~ ^/images/ {
|
location ~ ^/images/ {
|
||||||
return 403;
|
return 403;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,18 +93,26 @@ server {
|
||||||
# proxy_pass http://web;
|
# proxy_pass http://web;
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# # directly serve images and static files from the
|
# # directly serve static files from the
|
||||||
# # bookwyrm filesystem using sendfile.
|
# # bookwyrm filesystem using sendfile.
|
||||||
# # make the logs quieter by not reporting these requests
|
# # make the logs quieter by not reporting these requests
|
||||||
# location ~ \.(bmp|ico|jpg|jpeg|png|svg|tif|tiff|ttf|webp|css|js|woff|ttf)$ {
|
# location ~ ^/static/ {
|
||||||
# root /app;
|
# root /app;
|
||||||
# try_files $uri =404;
|
# try_files $uri =404;
|
||||||
# add_header X-Cache-Status STATIC;
|
# add_header X-Cache-Status STATIC;
|
||||||
# access_log off;
|
# access_log off;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# # block access to any non-image files from images or static
|
# # same with image files not in static folder
|
||||||
# location ~ ^/(images|static)/ {
|
# location ~ \.(bmp|ico|jpg|jpeg|png|svg|tif|tiff|webp)$ {
|
||||||
|
# root /app;
|
||||||
|
# try_files $uri =404;
|
||||||
|
# add_header X-Cache-Status STATIC;
|
||||||
|
# access_log off;
|
||||||
|
# }
|
||||||
|
|
||||||
|
# # block access to any non-image files from images
|
||||||
|
# location ~ ^/images/ {
|
||||||
# return 403;
|
# return 403;
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue