mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-11 01:16:33 +03:00
minor updates
This commit is contained in:
parent
60b0d7e51c
commit
9a2a351858
17
akarpov/users/migrations/0013_user_agree_data_to_be_sold.py
Normal file
17
akarpov/users/migrations/0013_user_agree_data_to_be_sold.py
Normal 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),
|
||||
),
|
||||
]
|
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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 && \
|
||||
|
|
Loading…
Reference in New Issue
Block a user