schon/evibes/ftpstorage.py
Egor fureunoir Gorbunov ab10a7a0b7 Features: 1) Add SEO meta utilities and builder functions for schemas; 2) Implement SEO-related APIs in viewsets for categories, brands, and products; 3) Add SeoMeta model and serializer to manage SEO metadata.
Fixes: 1) Resolve annotations compatibility with mypy `type: ignore` adjustments; 2) Correct `resolve_price_with_currency` method to ensure proper float returns; 3) Handle scenarios for empty or null queryset in vendor methods.

Extra: 1) Refactor utility functions for better type annotations and robustness; 2) Minor formatting corrections and removal of redundant mypy strict setting; 3) Improve method return types for consistency.
2025-08-18 14:26:09 +03:00

13 lines
340 B
Python

from urllib.parse import urlparse
from storages.backends.ftp import FTPStorage
class AbsoluteFTPStorage(FTPStorage): # type: ignore
# noinspection PyProtectedMember
def _get_config(self):
cfg = super()._get_config()
url = urlparse(self.location)
cfg["path"] = url.path or cfg["path"]
return cfg