Merge branch 'master' into Aufinal/permissions

This commit is contained in:
Martin Pépin 2018-05-03 12:45:29 +02:00
commit 10e4393bda
15 changed files with 39 additions and 9 deletions

View file

@ -0,0 +1 @@
default_app_config = 'api.apps.APIConfig'

7
api/apps.py Normal file
View file

@ -0,0 +1,7 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class APIConfig(AppConfig):
name = 'api'
verbose_name = _("API")

View file

@ -0,0 +1 @@
default_app_config = 'communication.apps.CommunicationConfig'

View file

@ -1,4 +1,7 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class CommunicationConfig(AppConfig):
name = 'communication'
verbose_name = _("Communication")

1
equipment/__init__.py Normal file
View file

@ -0,0 +1 @@
default_app_config = 'equipment.apps.EquipmentConfig'

View file

@ -1,5 +1,7 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class EquipmentConfig(AppConfig):
name = 'equipment'
verbose_name = _("Équipement")

View file

@ -1,2 +1,5 @@
from channels.routing import ProtocolTypeRouter
# Nothing yet
channel_routing = []
application = ProtocolTypeRouter({})

View file

@ -44,23 +44,25 @@ BASE_DIR = os.path.dirname(
INSTALLED_APPS = [
'communication.apps.CommunicationConfig',
'equipment.apps.EquipmentConfig',
'event.apps.EventConfig',
'users.apps.UsersConfig',
'shared.apps.SharedConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'channels',
'rest_framework',
'bootstrapform',
'widget_tweaks',
'guardian',
'api',
'communication',
'equipment',
'event',
'shared',
'users',
]
MIDDLEWARE_CLASSES = [
@ -83,6 +85,7 @@ REST_FRAMEWORK = {
}
ROOT_URLCONF = 'evenementiel.urls'
ASGI_APPLICATION = "evenementiel.routing.application"
STATIC_URL = "/static/"
MEDIA_URL = "/media/"
@ -122,7 +125,7 @@ DATABASES = {
CHANNEL_LAYERS = {
"default": {
"BACKEND": "asgi_redis.RedisChannelLayer",
"BACKEND": "channels_redis.RedisChannelLayer",
"CONFIG": {
"hosts": [(
"redis://:{passwd}@{host}:{port}/{db}"

View file

@ -0,0 +1 @@
default_app_config = 'event.apps.EventConfig'

View file

@ -1,8 +1,10 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class EventConfig(AppConfig):
name = 'event'
verbose_name = _("Évènement")
def ready(self):
from . import signals

View file

@ -1,6 +1,6 @@
Django==1.11.*
psycopg2
asgi-redis
channels_redis
Pillow
channels
django-bootstrap-form==3.2.1

View file

@ -0,0 +1 @@
default_app_config = 'shared.apps.SharedConfig'

View file

@ -0,0 +1 @@
default_app_config = 'users.apps.UsersConfig'

View file

@ -1,5 +1,7 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class UsersConfig(AppConfig):
name = 'users'
verbose_name = _("Utilisateurs")

View file

@ -1,8 +1,10 @@
from django.contrib.auth.models import User
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import UserCreationForm
from django import forms
from django.conf import settings
User = get_user_model()
class CreateUserForm(UserCreationForm):
key = forms.CharField(