get null or empty queyset in django

def get_queryset(self): key = self.request.GET['search_text'] customer_list = customer_info.objects.all() # temp = for term in key.split(): temp = temp | customer_list.filter(Q(fName__icontains=term)|Q(...
more »

2017-07-18 14:07 (1) Answers

Running Django Python Server in AWS

I have a django running in AWS Ubuntu machine. Through SSH, I start the server at 8000 port. But when i close the ssh window, server stops and I can't access it through URL. What I want is to run the server all the time once it is started. How to go ...
more »

2017-07-18 11:07 (3) Answers

Retry celery tasks before their countdown

we are running Django v1.10 with celery v4.0.2, rabbitMQ v3.5.7 and flower v0.9.1 and are pretty new with celery, rabbitMQ and flower. There is a function x() which was set to retry after 7 days in case of failure. We have 1000's of instances of x r...
more »

2017-07-17 20:07 (2) Answers

django strange warning for urlconf

Django behaves as I hoped and expected, but gives me a warning. It seems my use-case was not thought about. Which confuses me, so my question: do I miss any problems waiting for me, or did the developers miss this use case. I want the url person/<...
more »

2017-07-17 14:07 (1) Answers

Django Admin Model ArrayField Change Delimiter

My model looks like this: from django.contrib.postgres.fields import ArrayField class Trigger(models.Model): solutions = ArrayField(models.TextField(blank=True, null=True), blank=True, null=True, help_text='some helpful text') This allows me ...
more »

2017-07-16 23:07 (1) Answers

How do install Pootle on MAMP PRO

MAMP PRO supports WSGI but the Pootle instalation guide to run on a webserver starts from a previous configuration using a virtualenv. I'd like to know how can i install Pootle manually already using apache. ...
more »

2017-07-16 22:07 (0) Answers

Django: Multiple login redirects based on path

I have the following two urls: url(r'^login/$',django.contrib.auth.views.login,{'template_name': 'meta/login.html'},name='login'), url(r'^loginiOS/$', django.contrib.auth.views.login, {'template_name': 'meta/login.html'}, name='loginiOS'), They lo...
more »

2017-07-16 11:07 (1) Answers

DDoS protection for Django Channels

Is there anything specific that can be done to ensure a Django Channels server is not susceptible to DDoS (attack or accident) from websocket clients? Since Channels is not truly asynchronous (still workers behind the scenes), I feel like it would be...
more »

2017-07-15 23:07 (1) Answers

Django - Full text search - Wildcard

Is it possible to use wildcards in Django Full text search ? post = request.POST.get('search') query = SearchQuery(post) vector = SearchVector('headline', ...
more »

2017-07-14 21:07 (1) Answers

Djano's only() still selects every existing field

I have a Django model consisting of multiple fields. I only wish to select one. I use only() as, according to the documentation it should return only the woodAsked field here. Yet the returned queryset will still contain each and every field in the...
more »

2017-07-14 13:07 (2) Answers