minor updates

This commit is contained in:
Alexander Karpov 2023-12-27 02:16:08 +03:00
parent 60b0d7e51c
commit 9a2a351858
4 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 4.2.8 on 2023-12-26 22:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("users", "0012_user_theme"),
]
operations = [
migrations.AddField(
model_name="user",
name="agree_data_to_be_sold",
field=models.BooleanField(default=False),
),
]

View File

@ -29,7 +29,9 @@ class User(AbstractUser, BaseImageModel, ShortLinkModel):
"Left file upload(in bites)", default=0, validators=[MinValueValidator(0)]
)
theme = models.ForeignKey("themes.Theme", null=True, on_delete=models.SET_NULL)
agree_data_to_be_sold = models.BooleanField(default=False)
agree_data_to_be_sold = models.BooleanField(
"Agree my data to be sold to vendors", default=False
)
def get_theme_url(self):
if self.theme_id:

View File

@ -23,7 +23,7 @@ class UserDetailView(DetailView):
class UserUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
model = User
fields = ["username", "name", "image", "about"]
fields = ["username", "name", "image", "about", "agree_data_to_be_sold"]
success_message = _("Information successfully updated")
def get_success_url(self):

View File

@ -27,7 +27,7 @@ WORKDIR ${APP_HOME}
RUN apt-get update && \
apt-get install -y build-essential libpq-dev gettext libmagic-dev libjpeg-dev zlib1g-dev && \
# Dependencies for file preview generation
apt-get install -y webp libimage-exiftool-perl libmagickwand-dev ffmpeg libgdal-dev && \
apt-get install -y webp git libimage-exiftool-perl libmagickwand-dev ffmpeg libgdal-dev && \
# ML dependencies \
# none for now
apt-get purge -y --auto-remove -o APT:AutoRemove:RecommendsImportant=false && \