Merge branch 'Kerl/autocomplete' into 'master'

Kerl/autocomplete



See merge request !84
This commit is contained in:
Martin Pepin 2016-09-24 20:09:42 +02:00
commit fdbe3ea9db
5 changed files with 4 additions and 26 deletions

View file

View file

@ -1,7 +0,0 @@
import os, sys
sys.path.append (os.path.expanduser ('~gestion/www'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'cof.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

View file

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
"""
WSGI config for myproject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings")
application = get_wsgi_application()

View file

@ -1,6 +1,7 @@
import os
from channels.asgi import get_channel_layer
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings_dev")
if "DJANGO_SETTINGS_MODULE" not in os.environ:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cof.settings")
channel_layer = get_channel_layer()

View file

@ -10,8 +10,10 @@ from django.db.models import Q
from django.contrib.auth.models import User
from gestioncof.models import CofProfile, Clipper
from gestioncof.decorators import buro_required
@buro_required
def autocomplete(request):
if "q" not in request.GET:
raise Http404