Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Can't open link containing special characters
I have Django app which I test on my local PC and then when I add something new, I upload changes to my company virtual server. I have a problem with links to files. Below is the code for links to attached files (both my local and server have the same code): <p class="article-content mt-2 mb-1"><strong>Attachment: </strong><a href="{{post.file_close.url}}">{{post.file_close.name}}</a></p> If I upload file cars.png everything works fine in both versions. This works no matter the extension, pdf, excel, image, etc. Problem is, if I upload file carsčč.png it fails only on server side, on my PC it works great. I get the following error on my Django/debugg: Page not found (404) “C:\inetpub\files\PyWeb\media\PN_files\2022\03\06\cars” does not exist Like the link is not complete, it stoped as soon as it runs into a special character. But, shown link still containes all the letters, it's PN_files/2022/03/06/carsčč.png Tried: I looked at regional settings, it's the same on both PCs. Is there something else I could check or change? Maybe include something in the link? Also, when I manually search for the file, the name is not currupted, it's saved localy as carsčč.png. So I guess it's only the link, tring to get the file. I figured … -
Does Django automatically manages the media while loading the application?
So what i want to achieve here is to load my web-application faster. In my web-application there will be lots of media file like audio, video, images. Locally i guess network time is faster but on server side it is starting to slow down. What I want to know here is, if there is any way to manage this media file specifically in Django or in general. Need solution for django not django-rest-framwork -
Django rest framework custom search
I have a drf viewset like this class EntryViewSets(viewsets.ModelViewSet): permission_classes = (IsAuthenticated,) queryset = Entries.objects.all() serializer_class = EntrySerializer authentication_classes = (SessionAuthentication, BasicAuthentication) search_fields= ('desc',) filter_backends = (CustomSearchFilter,) Here I want to search the desc field which is of type models.TextField. The search works, but I want to add some condition to the searches. I want to match the search with the query but only if the match does not contain a #. For example, lets say I have two entries with desc, test new and test #new. Now if I do this query ?search=test it returns both and ?search=new also returns both. But I want the second query to only return the first entry i.e. test new, not test #new as it starts with # it should be discarded. How do I do this? -
Can't connect to GCP with external IP
Trying to connect to my django website that's stored on the GCP virtual machine. Everything works fine if I'm accessing it internally using internal IP or localhost. However, I can't access website with external IP. I have http, https traffic enabled on instance. Firewall rule to allow port 80: Here is Test-Net results. Searched the web for answers but nothing looks wrong in my settings.. Any ideas would be appreciated. -
Why does accessing Django cache during unit tests (manage.py test) produces datetime.datetime objects instead of expected values?
I have a Django app, and I'm trying to create unit tests for functions/methods that work with the cache. My tests are run using python manage.py test. The functions/methods I'm testing contain lines that are similar to the following: from django.core.cache import cache ... def some_function(): ... cache.set('test', ('hello', 'world')) retrieved = cache.get('test') ... I expect retrieved to be the value that I retrieved from the cache (in this case, ('hello', 'world')); however, retrieved is somehow always a datetime.datetime object. This happens for various different cache backends, including django.core.cache.backends.locmem.LocMemCache and django_redis.cache.RedisCache. How can I correct this cache behavior for tests? -
I am having trouble getting an ajax request data to show up in each dynamically created form in Django
My Django project has an app that registers sales which needs to have multiple forms saved all at once using Django formsets, I have managed to get the dynamic forms working but it needs improvement so that with a product selected in each form, the product price may appear on the price field dynamically and the total price (product_price * quantity) may also appear in the its respective field. My code only shows the first form's price but when i add new forms (dynamically) they all appear with the the price of the first form and not the price of the product selected in in each form. Please really I need help fixing that. My sale models... class Product(models.Model): slug = models.SlugField(editable=False, unique=True, verbose_name=_("product id")) is_active = models.BooleanField(default=True, verbose_name=_("is active")) product_name = models.CharField(max_length=50, verbose_name=_("product name")) cost_price = models.DecimalField(max_digits=19, decimal_places=2, verbose_name=_("cost price")) retail_price = models.DecimalField(max_digits=19, decimal_places=2, verbose_name=_("retail price")) class ProductSale(models.Model): slug = models.SlugField(editable=False, unique=True, verbose_name=_("product sale id")) product = models.ForeignKey(Product, on_delete=models.PROTECT, verbose_name=_("product")) retail_price = models.DecimalField(max_digits=19, decimal_places=2, blank=True, null=True, verbose_name=_("retail price")) quantity = models.SmallIntegerField(verbose_name=_("quantity")) total = models.DecimalField(max_digits=19, decimal_places=2, blank=True, null=True, verbose_name=_("total")) The form... ProductSaleFormset = modelformset_factory( ProductSale, fields=("product", "quantity"), extra=1, localized_fields="__all__", widgets={ "product": forms.Select( attrs={ "id": "id_product", "class": "form-control", "style": "width:350px", } … -
URL not correctly configured in Django
I am creating a Blog post application and I have added a new feature to mark a post favourite. Now I have also used django authentication system to authenticate users. I have written the following login in add to favourite function in views.py file def favourite_post(request,pk): if request.user.is_authenticated: post = get_object_or_404(Post, pk=pk) if(post.favourites.filter(id=request.user.id).exists()): post.favourites.remove(request.user) else: post.favourites.add(request.user) else: return redirect('members/login_me_in') return redirect(request.META['HTTP_REFERER']) Now when a non authenticated user clicks on the favourite button in template the URL formed is -> http://127.0.0.1:8000/favourite-post/members/login_me_in But It should have been -> http://127.0.0.1:8000/members/login_me_in This is the URL that will be used when clicking the Add to favourites button -> path('favourite-post/<int:pk>',views.favourite_post,name='favourite_post'), Can anyone help me out to change the URL that is being sent. -
How to decrease the slider speed in Django?
Please help to decrease speed, it's too fast. Searched a lot in google and everywhere there is Bootstrap solution. I even tried Bootstrap, that was too slow and different icons which didn't look good. Also Bootstrap version center it's PREV and NEXT icons for each image, which is also not looking good as I have different image height. Is there any way to change speed in my current carousel? Please help. my CSS looks like /* PRODUCT DETAIL SLIDER START */ .product_detail-slider{ position: relative; } .product_detail-slider .owl-stage-outer{ overflow-x: hidden; } .product_detail-slider .owl-stage{ display: flex; } .product_detail-slider .owl-nav .owl-prev{ position: absolute; top: calc(50% - 80px);; left: 0; border: none; background-color: transparent; } .product_detail-slider .owl-nav .owl-prev span{ color: rgba(0, 0, 0, 0.30); font-size: 80px; transition: all 2s; } .product_detail-slider .owl-nav .owl-prev span:hover{ color: #000000; } .product_detail-slider .owl-nav .owl-next{ position: absolute; top: calc(50% - 80px); right: 0; border: none; background-color: transparent; } .product_detail-slider .owl-nav .owl-next span{ color: rgba(0, 0, 0, 0.30); font-size: 80px; transition: all 2s; } .product_detail-slider .owl-nav .owl-next span:hover{ color: #000000; } .owl-dots{ display: none; } /* PRODUCT DETAIL SLIDER END */ my HTML <div class="product_detail-slider"> <div class="product_detail-slider_block"> <img src="{{ product.image_url }}" alt="" style="width:100%; padding-bottom: 20px;"> </div> {% if product.image_2_url %} … -
How access session variable from Django Simple Tag
I want access session variable from Django Custom simple type tag. but I don't know how can I do it. please anyone helps me if anybody knows. @register.simple_tag def get_blancecalculate(amonut): return amonut @register.inclusion_tag('Admin UI/Reports/leadger-blance.html',takes_context=True) def get_blance(context,Blance): request = context['request'] LedgerBlance = request.session['LedgerBlance'] + float(Blance) request.session['LedgerBlance'] = LedgerBlance return {'CurrentBlance':LedgerBlance} -
Django how to update a template without refreshing/redirecting?
I'm trying to make a simple commenting system where someone can add their comment to a post and it'll show up without having to redirect them or refresh the page. This is what my code basically looks like: def post_details(request): details = {} if request.method == "POST": request.POST # Function here for creating a new comment details['new_comment'] = new_comment details['post_details'] = post_details else: details['post_details'] = post return render(request, 'post_details.html', details) The post_details.html shows a post with comments below it along with a form that adds their comment. I tried to add a new block of code in the template file for new_comment and the issue is that when I add a new comment, it will update that part but adding another one won't show up. I should also note that I have CSV files that store the post and comment details. In my models.py file, I have my classes and methods to read in the CSV files so the function I left out does update the file with the comments. I'm trying to do this without Javascript but I'm open to trying anything, just really want to solidify my understanding of requests. I hope this wasn't confusing. -
Django: Not able to get bio field from table to be displayed on page
I developed a small test app with a profile page with user info and bio. Everything is showing except the bio field, this is silly and driving loopy. I tried so many combinations to no avail. Please see my code below: Someone please help. views.py from django.db import models from django.contrib.auth.models import User from django.urls import reverse # Create your models here. class TeacherProfile(models.Model): user = models.OneToOneField(User, null=True, on_delete=models.CASCADE) bio = models.TextField() def __str_from__(self): return self.user models.py def teacher_profile(request,pk): teacher_profile = TeacherProfile.objects.all() return render(request, 'registration/teacher_profile.html', { 'teacher_profile':teacher_profile }) html <div class="container"> <div class="row"> <div class="col-lg-12"> <h1 class="page_heading">Teacher profile</h1> <strong>Welcome back:</strong> {{user.username}} | {{user.first_name}} {{user.last_name}} | {{user.email}} | <strong></strong>| <a href="{% url 'edit_teacher_profile_view_url' user.pk %}">edit profile</a><br> | <a href="{% url 'logout' %}">logout</a><br> <strong>About me:</strong> {{user.bio}} <hr> </div> </div> -
Python Flask Postgres error - Can't generate DDL for NullType(); did you forget to specify a type on this Column?
Seemingly out of the blue I started getting this error whenever I try to run my flask app. Can't generate DDL for NullType(); did you forget to specify a type on this Column? I've changed nothing with the code or database. It runs fine from another server so I'm thinking it has to be something with the computer I'm running the script on but I'm out of ideas. I restarted my computer, restarted the database. Here is the code from flask import Flask, jsonify from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:password@ngdeva-2/flaskapp2' db = SQLAlchemy(app) class Project(db.Model): id = db.Column(db.Integer, primary_key=True) wmx_jobid = db.Column(db.String(120), unique=True, nullable=False) def __repr__(self): return f"{self.id} - {self.wmx_jobid}" db.create_all() @app.route('/', methods=['GET']) def home(): message = 'Flask is UP and RUNNING!' return jsonify(message) if __name__ == "__main__": from waitress import serve serve(app, host="0.0.0.0", port=8080) -
Django POST Request 500 Error: AttributeError: 'QuerySet' object has no attribute '_meta'
I am trying to create a POST request to add a user to a database, but I am getting a 500 error with this message: AttributeError: 'QuerySet' object has no attribute '_meta'. Here is my code: @api_view(['POST']) def register(request): data = request.data if data['password'] != data['password_confirm']: raise exceptions.APIException('Passwords do not match') serializer = UserSerializer(data=data) serializer.is_valid(raise_exception=True) serializer.save() return Response(serializer.data) UserSerializer: from rest_framework import serializers from users.models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User.objects.all() fields = ['id', 'first_name', 'last_name', 'email', 'password'] extra_kwargs = {'password': {'write_only': True}} User: from django.db import models # Create your models here. class User(models.Model): first_name = models.CharField(max_length=63) last_name = models.CharField(max_length=63) email = models.CharField(max_length=255, unique=True) password = models.CharField(max_length=255) This is the stack trace: Internal Server Error: /api/register Traceback (most recent call last): File "/home/amicharski/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/home/amicharski/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/amicharski/.local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/home/amicharski/.local/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File … -
Calling function with variable from view template, django
in template {{object.get_resource}} in views.py(DetailView) def get_resource(self): return "my resource" It works. Now, I want to pass the variable to object. Is it possible to do like this below? {{object.get_resource(1)}} def get_resource(self,num): return "my resource:{0}".format(num) -
REST Django - Can't find context of request from within my validator
Please be gentle. I'm a Django newb and I find the level of abstraction just plain overwhelming. My ultimate goal is to modify an image file on its way into the model. That part may or may not be relevant, but assistance came my way in this post which advised me that I should be making changes inside a validator: REST Django - How to Modify a Serialized File Before it is Put Into Model Anyway, at the moment I am simply trying to get the context of the request so I can be sure to do the things to the thing only when the request is a POST. However, inside my validator, the self.context is just an empty dictionary. Based on what I have found out there, there should be a value for self.context['request']. Here is what I have: Serializer with validator method: class MediaSerializer(serializers.ModelSerializer): class Meta: model = Media fields = '__all__' def validate_media(self, data): print(self.context) #todo: why is self.context empty? #if self.context['request'].method == 'POST': # print('do a thing here') return data def to_representation(self, instance): data = super(MediaSerializer, self).to_representation(instance) return data The view along with the post method class MediaView(APIView): queryset = Media.objects.all() parser_classes = (MultiPartParser, FormParser) permission_classes … -
User select Model from dropdown in Django form
Wondering if there is a way allow a user to select the Django model to input data into from a drop-down menu. I have a bunch of small items that each have their own model but would prefer if a user could add data to a desired model all from the same form page. So ideally a user goes to one "add data" page and from there they can choose the desired model to add data to from a drop down. Then the form will update with the required fields needed. Is this possible or do I need a separate view for each model & form? Tried searching and found this relevant post but that's 8 years old and it seems most of that has been depreciated so not sure where to continue or if its even possible. -
Django need help to build a complex query
I’m building a school schedule management system. I have the following models/tables: ID | Teacher ———————————— 1 | John 2 | Chris 3 | George ID | Module ——————————— 1 | Math 2 | History 3 | Physics Schedule ————— Date | Teacher | Module 15/2/2022 | 1 | 1 15/2/2022 | 1 | 2 15/2/2022 | 2 | 1 16/2/2022 | 1 | 1 16/2/2022 | 3 | 1 16/2/2022 | 3 | 2 16/2/2022 | 3 | 3 I in my app, that will have different date filters/modules filters for someone to select and it will do the following: Let’s say I click on the 15/2/2022 and on Math (ID: 1). The page should display the following: Module: Math, Teacher: John, Other modules on the same day: History Module: Math, Teacher: George, Other module on the same day: None Let’s say now I click on the 16/2/2022 and on Math, I will see: Module: Math, Teacher: George, Other modules on the same day: History, Physics I am stuck on how to build the queries to get the result above in one line. Can someone help me please? -
Django: How to pass {% url 'event_manager:index' %} to template component?
So right now I hardcode to url, which is a bit annoying if you move endpoints. This is my current setup for my navbar items. # in base.html {% include 'components/navbar/nav-item.html' with title='Event Manager' url='/eventmanager/' %} # in components/navbar/nav-item.html <li> <a href="{{ url }}">{{ title }}</a> </li> See how I use the url right now? What I now want is this: {% include 'components/navbar/link.html' with title='Event Manager' url={% url 'event_manager:index' %} %} But apparently, this is invalid syntax. How do I do it? If it is not possible, how do I create an app that somehow creates a view where I can pass all the URLs with context variable? In theory, this sounds easy but I'd have to somehow insert that view in every other view. -
Renaming files with an automatically generated ID
I'm building a website for an assignment and one of the features I'd like it to have is for it to assign a unique ID for any photograph that's uploaded to it. I have created a form which takes in a photo and I'm hoping to get it so rename the photo file to the photo ID and save it in a folder associated with the user that uploaded it (eg. if the userID was 1 and the photoID was 10, the file structure would be /media/userImages/1/10.jpg) However I'm having difficulty accessing the data I would need to do this. It seems like, with the way that I've set it up, that the photoID is generated when the form is saved. Here's the code: Views.py def addimage(request): form = ImageForm(request.POST, request.FILES) print(form.is_bound) if request.method == "POST": if form.is_valid(): form.time = datetime.datetime.now() picture = form.save(commit=False) picture.image.upload_to = "/manageImages/" + str(request.user.id) + "/" + str(picture.ID) print(picture.image.upload_to) picture.save() return redirect("/closeup/") elif request.POST: print("ERROR IN FORM") print(form.errors) Models.py class Picture(models.Model): ID = models.BigAutoField(primary_key=True) image = models.ImageField(upload_to='userImages/', null=False, blank=False) name = models.CharField(max_length=100) url = models.URLField() likes = models.IntegerField(default=0) dislikes = models.IntegerField(default=0) time = models.DateTimeField(auto_now_add=True) # TODO - add 'Uploaded by' foreign key Forms.py class ImageForm(forms.ModelForm): … -
No Reverse Match in Ecommerce
When go to url "http://localhost:8000/compras/finalizando/", raise the follow error: "Reverse for 'pagseguro_view' with arguments '('',)' not found. 1 pattern(s) tried: ['compras/finalizando/(?P[0-9]+)/pagseguro/\Z']" I cant understand what cause this error, somebody can help? my checkout/urls.py: from django.urls import path from .import views urlpatterns = [ path('carrinho/adicionar/<slug>', views.create_cartitem,name='create_cartitem'), path('carrinho/', views.cart_item, name='cart_item'), path('finalizando/', views.checkout, name='checkout'), path('finalizando/<int:pk>/pagseguro/', views.pagseguro_view, name='pagseguro_view'), path('meus-pedidos/', views.order_list, name='order_list'), path('meus-pedidos/<int:pk>/', views.order_detail, name='order_detail'), ] My checkout/views.py: from pagseguro import PagSeguro from django.shortcuts import get_object_or_404, redirect from django.views.generic import ( RedirectView, TemplateView, ListView, DetailView ) from django.forms import modelformset_factory from django.contrib import messages from django.urls import reverse_lazy, reverse from django.contrib.auth.mixins import LoginRequiredMixin from catalog.models import Product from .models import CartItem, Order class CreateCartItemView(RedirectView): def get_redirect_url(self, *args, **kwargs): product = get_object_or_404(Product, slug=self.kwargs['slug']) if self.request.session.session_key is None: self.request.session.save() cart_item, created = CartItem.objects.add_item( self.request.session.session_key, product ) if created: messages.success(self.request, 'Produto adicionado com sucesso') else: messages.success(self.request, 'Produto atualizado com sucesso') return reverse_lazy('checkout:cart_item') class CartItemView(TemplateView): template_name = 'checkout/cart.html' def get_formset(self, clear=False): CartItemFormSet = modelformset_factory( CartItem, fields=('quantity',), can_delete=True, extra=0 ) session_key = self.request.session.session_key if session_key: if clear: formset = CartItemFormSet( queryset=CartItem.objects.filter(cart_key=session_key) ) else: formset = CartItemFormSet( queryset=CartItem.objects.filter(cart_key=session_key), data=self.request.POST or None ) else: formset = CartItemFormSet(queryset=CartItem.objects.none()) return formset def get_context_data(self, **kwargs): context = super(CartItemView, self).get_context_data(**kwargs) context['formset'] = self.get_formset() return context def … -
Use object from django.view in jQuery function
I have jquery function, in the function there is an if statement (see arrow in code). In stead of the hard coded "John Pietersen" i want my django view object {{user.name}} which is passed in as context in this template. How can i use {{user.name}} in the jquery function $(document).ready(function(){ setInterval(function(){ $.ajax({ type: 'GET', url : "{% url "messages" item.id %}", success: function(response){ console.log(response); $("#display").empty(); for (var key in response.messages) if (response.messages[key].name === "John Pietersen") {. <------------------- { var temp = "<div class='container manager'><b>" + response.messages[key].name + "</b><p>" + response.messages[key].text + "</p><span class='time-left'>" + response.messages[key].timestamp + "</span></div>"; $("#display").append(temp); } }else{ var temp = "<div class='container medewerker'><b>" + response.messages[key].name + "</b><p>" + response.messages[key].text + "</p><span class='time-left'>" + response.messages[key].timestamp + "</span></div>"; $("#display").append(temp); } }, error: function(response){ alert('An error occured') } }); },1000); }) -
How to call Django REST serializer inside update?
I'm trying to make my update method add a link to my list to links. The problem is, the response of the PATCH request is an OrderedDict, and I would ideally prefer it to be serialized. I have tried calling my serializer inside the update method, but I'm not sure how get information for the data field of the LinkListSerializer, so I end up getting Cannot call .is_valid() as no data= keyword argument was passed when instantiating the serializer instance. Any advice would be appreciated, here is my code: class LinkListViewSet(viewsets.ModelViewSet, generics.RetrieveUpdateDestroyAPIView): queryset = LinkList.objects.all() serializer_class = LinkListSerializer filter_backends = [IsOwnerOrPublicFilter] permission_classes = [IsOwnerOrPublic] def update(self, request, *args, **kwargs): new_link, created = Link.objects.update_or_create( link=request.data.get('links'), defaults={'link': request.data.get('link')}, ) instance = self.get_object() if created: instance.links.add(new_link) instance.save() return Response(status=status.HTTP_200_OK) Serializer: class LinkListSerializer(serializers.ModelSerializer): url = serializers.HyperlinkedIdentityField(view_name="lists-detail") owner = serializers.HiddenField(default=serializers.CurrentUserDefault()) links = LinkSerializer(read_only=True, many=True) class Meta: model = LinkList fields = ['url', 'owner', 'name', 'public', 'links', 'description'] -
Unable to runserver in django project
I am having trouble using the runserver command (and other commands for that matter)in my django project. I have activated my virtual environment (source ./venv/bin/activate) and it displays as venv in my bash. Whenever I try to runserver in this virtual environment I get the error: File "manage.py", line 17 ) from exc ^ SyntaxError: invalid syntax I have read similar questions and attempted doing python2 or python 2.7 when writing the command, and I have tried deleting the 'from exc' on line 17 of the manage.py file. Driving me crazy as this was working fine a week or so ago! only thing I can think of that changed was that I accidentally dragged the project folder into another area (not in my desktop) and then moved it back once I realised this. Does anyone have any ideas or suggestions? -
django - custom field from CharField with default args
I'm trying to use multiple custom fields in my project. For example CurrencyField. I want to give it a default arguments like verbose_name - "mena" etc. Django raises error: kwargs['verbose_name'] = kwargs['verbose_name'] or 'Mena' I guess it's because I sometimes use verbose_name as a positional argument. How can I make it "universal"? class CurrencyChoices(models.TextChoices): EUR = 'EUR' CHF = 'CHF' CZK = 'CZK' DKK = 'DKK' GBP = 'GBP' HRK = 'HRK' HUF = 'HUF' PLN = 'PLN' RON = 'RON' SEK = 'SEK' USD = 'USD' class CurrencyField(models.CharField): def __init__(self, *args, **kwargs): kwargs['verbose_name'] = kwargs['verbose_name'] or 'Mena' kwargs['max_length'] = 5 kwargs['choices'] = CurrencyChoices.choices super().__init__(*args, **kwargs) -
How to boradcast messages received from rest api over websocket connection
I'm going to create a web-app. I want to use django, DRF, channels, DCRF,... . The app works like this: User can send any request(CRUD) over the http using rest-api, and besides i have a websocket connection that every one can connect and receive events in real-time. In this case I want to use websocket just for broadcasting events not receiving users requests (post, put, delete in http terminology). Those methods are made over rest-api and if user also is connected to websocket connection can receive events. The problem is, how to inform websocket(maybe object) that we have a new message (after saving the message)? I think about below scenarios: Is it possible to push message to a place that channels looks for receive messages? Or just after saving message send instance to channels receiver for broadcast new message. Is it possible at all, or not? if yes, HOW? if no, WHY?