mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-24 17:03:43 +03:00
Compare commits
7 Commits
3569e32f85
...
4071010f59
Author | SHA1 | Date | |
---|---|---|---|
|
4071010f59 | ||
4a407dfc06 | |||
|
78e0a50834 | ||
9a2a351858 | |||
60b0d7e51c | |||
fd8bb6bac6 | |||
fc1a1ec7ed |
|
@ -29,8 +29,10 @@ def get_track_info(name: str) -> dict:
|
|||
"artist": "",
|
||||
"title": "",
|
||||
}
|
||||
|
||||
try:
|
||||
res = search(name)["tracks"]["items"]
|
||||
except TypeError:
|
||||
return info
|
||||
if not res:
|
||||
return info
|
||||
res = res[0]
|
||||
|
|
|
@ -29,6 +29,7 @@ def search_ym(name: str):
|
|||
info = {
|
||||
"artists": [artist.name for artist in best.artists],
|
||||
"title": best.title,
|
||||
"album": best.albums[0].title,
|
||||
}
|
||||
|
||||
# getting genre
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
</div>
|
||||
</main>
|
||||
<footer class="row bg-light py-1 mt-auto text-center">
|
||||
<div class="col"> Writen by <a href="/about">sanspie</a>, find source code <a href="https://github.com/Alexander-D-Karpov/akarpov">here</a> </div>
|
||||
<div class="col"> Writen by <a href="https://akarpov.ru/about">sanspie</a>, find source code <a href="https://github.com/Alexander-D-Karpov/akarpov">here</a>. Copyleft akarpov 2023</div>
|
||||
</footer>
|
||||
<div id="toastContainer" class="toast-container position-fixed bottom-0 end-0 p-3">
|
||||
|
||||
|
|
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,6 +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(
|
||||
"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 && \
|
||||
|
|
1382
poetry.lock
generated
1382
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
|
@ -32,7 +32,7 @@ django-colorfield = "^0.11.0"
|
|||
djangorestframework = "^3.14.0"
|
||||
django-rest-auth = "^0.9.5"
|
||||
django-cors-headers = "^4.0.0"
|
||||
drf-spectacular = "^0.26.2"
|
||||
drf-spectacular = "^0.27.0"
|
||||
werkzeug = {extras = ["watchdog"], version = "^2.3.4"}
|
||||
ipdb = "^0.13.13"
|
||||
watchfiles = "^0.18.1"
|
||||
|
@ -82,7 +82,7 @@ xvfbwrapper = "^0.2.9"
|
|||
vtk = "^9.2.6"
|
||||
ffmpeg-python = "^0.2.0"
|
||||
cairosvg = "^2.7.0"
|
||||
spotipy = "2.16.1"
|
||||
spotipy = "^2.23.0"
|
||||
django-robots = "^5.0"
|
||||
django-tables2 = "^2.5.3"
|
||||
django-filter = "^23.2"
|
||||
|
@ -95,7 +95,6 @@ yt-dlp = "^2023.7.6"
|
|||
pytube = "^15.0.0"
|
||||
urllib3 = ">=1.26"
|
||||
requests = ">=2.25"
|
||||
extract-msg = "0.28.7"
|
||||
pytest-factoryboy = "2.3.1"
|
||||
pytest-xdist = "^3.3.1"
|
||||
pytest-mock = "^3.11.1"
|
||||
|
@ -103,7 +102,6 @@ pytest-asyncio = "^0.21.1"
|
|||
pytest-lambda = "^2.2.0"
|
||||
pgvector = "^0.2.2"
|
||||
pycld2 = "^0.41"
|
||||
textract = "^1.6.5"
|
||||
uuid6 = "^2023.5.2"
|
||||
uvicorn = "^0.24.0.post1"
|
||||
nltk = "^3.8.1"
|
||||
|
@ -115,6 +113,8 @@ django-elasticsearch-dsl = "^8.0"
|
|||
elasticsearch-dsl = "^8.11.0"
|
||||
numpy = "1.25.2"
|
||||
deep-translator = "1.4.2"
|
||||
textract = {git = "https://github.com/Alexander-D-Karpov/textract.git", branch = "master"}
|
||||
django-otp = "^1.3.0"
|
||||
|
||||
|
||||
[build-system]
|
||||
|
|
Loading…
Reference in New Issue
Block a user