helping hand representation
This commit is contained in:
parent
af8febbe45
commit
7edd836a75
|
|
@ -26,6 +26,8 @@ def send_email_with_news(news_ids):
|
|||
for subscriber in subscribers:
|
||||
socials_for_subscriber = socials.get(subscriber.country_code)
|
||||
try:
|
||||
# TODO: вот тут надо учесть, подписки на какие страны есть у юзера активные (нулл время отписки) и не посылать лишнего
|
||||
# TODO: обрати внимание на кол-во запросов в БД плс. они пишутся в консоль
|
||||
for new in sent_news:
|
||||
context = {
|
||||
"title": new.title.get(subscriber.locale),
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class SubscriptionType(ProjectBaseMixin, TranslatedFieldsMixin):
|
|||
name = TJSONField(blank=True, null=True, default=None,
|
||||
verbose_name=_('name'),
|
||||
help_text='{"en-GB":"some text"}')
|
||||
# TODO: не хватает связи со страной. ForeignKey
|
||||
|
||||
|
||||
# todo: associate user & subscriber after users registration
|
||||
|
|
|
|||
1
apps/notification/urls/back.py
Normal file
1
apps/notification/urls/back.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
urlpatterns = []
|
||||
|
|
@ -28,6 +28,7 @@ class SubscribeInfoView(generics.RetrieveAPIView):
|
|||
class SubscribeInfoAuthUserView(generics.ListAPIView):
|
||||
"""Subscribe info auth user view."""
|
||||
|
||||
# TODO: тут пользователь должен видеть свои подписки. проверь плс, что работает
|
||||
permission_classes = (permissions.IsAuthenticated,)
|
||||
serializer_class = serializers.SubscribeSerializer
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ urlpatterns = [
|
|||
path('gallery/', include(('gallery.urls', 'gallery'), namespace='gallery')),
|
||||
path('location/', include('location.urls.back')),
|
||||
path('news/', include('news.urls.back')),
|
||||
path('notifications/', include(('notification.urls.back', 'notification'), namespace='notification')),
|
||||
path('review/', include('review.urls.back')),
|
||||
path('tags/', include(('tag.urls.back', 'tag'), namespace='tag')),
|
||||
path('products/', include(('product.urls.back', 'product'), namespace='product')),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user