def dashboard(request):

    if request.user.is_authenticated():

        categories = Category.objects.all() \
            .prefetch_related('modules') \
            .annotate(num_modules=Count('modules')) \
            .order_by('name') \
            .select_related()

        modules = Module.objects.filter(is_public=True)
        completed_ids = modules.filter(completions__user=request.user).values_list('id', flat=True)

        context = {
            #'modules': modules,
            'categories': categories,
            'completed_ids': completed_ids,
        }

        return render(request, 'dashboard.html', context)
    else:
        return render(request, 'index.html')
Create a message receiver by launching a process.
dataset/ETHPy150Open sunlightlabs/sunlightacademy/training/views.py/dashboard--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/mail/alias.py/ProcessAlias.createMessageReceiver