Commit 235093de authored by Guillaume Pellerin's avatar Guillaume Pellerin
Browse files

Merge branch 'dev' into feature/stretch

parents 08a99d7f e7e2a1f3
......@@ -25,7 +25,7 @@
path = lib/grappelli-safe
url = git@github.com:Ircam-Web/grappelli-safe.git
branch-master = dynamic_stacked
branch-dev = dynamic_stacked
branch-dev = dynamic_stacked-dev
ignore = dirty
[submodule "lib/mezzanine-organization"]
path = lib/mezzanine-organization
......
FROM python:3
FROM python:3-jessie
ENV PYTHONUNBUFFERED 1
......
......@@ -18,6 +18,12 @@ uid='www-data'
gid='www-data'
# patterns='*.js;*.css;*.jpg;*.jpeg;*.gif;*.png;*.svg;*.ttf;*.eot;*.woff;*.woff2'
# Install a package in development mode
# without rebuidling docker image.
# You need at first checkout your sources in 'lib' folder
# in host project side, then run :
# pip install -e /srv/lib/mypackage...
# Install (staging) libs
# /srv/bin/build/local/setup_lib.sh
......
......@@ -67,4 +67,5 @@ DEFAULT_FROM_EMAIL = 'default@default.org' # another address, default one
DEFAULT_TO_EMAIL = 'recipient@recipient.org' # default recipient, for your tests
EMAIL_SUBJECT_PREFIX = "[PREFIX]" # prefix title in email
SITE_TITLE = 'Your Site'
SITE_TAGLINE = 'This is a Mezzo site'
\ No newline at end of file
SITE_TAGLINE = 'This is a Mezzo site'
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016-2017 Ircam
# Copyright (c) 2016-2017 Guillaume Pellerin
# Copyright (c) 2016-2017 Emilie Zawadzki
# This file is part of mezzanine-organization.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
class Router(object):
"""
A router to control all database operations between the 2 apps
"""
def db_for_read(self, model, **hints):
if model._meta.app_label == 'eve':
return 'eve'
if model._meta.app_label == 'presta':
return 'presta'
return None
def db_for_write(self, model, **hints):
if model._meta.app_label == 'eve':
return 'eve'
if model._meta.app_label == 'presta':
return 'presta'
return None
def allow_relation(self, obj1, obj2, **hints):
if obj1._meta.app_label == 'eve' or \
obj2._meta.app_label == 'eve':
return True
if obj1._meta.app_label == 'presta' or \
obj2._meta.app_label == 'presta':
return True
return None
def allow_migrate(self, db, app_label, model=None, **hints):
if app_label == 'eve':
return db == 'eve'
if app_label == 'presta':
return db == 'presta'
return None
\ No newline at end of file
This diff is collapsed.
Subproject commit a9128f09ae8c3c88afa533e330ed4005eb6bb22f
Subproject commit 531645508807efca744dc4f6b5f2a28ec7ab8b5b
......@@ -60,7 +60,4 @@ app:
links:
- db
environment:
- DEBUG=False
nginx:
image: nginx
- DEBUG=False
\ No newline at end of file
app:
image: ircamweb/mezzo:latest-dev
command: /bin/sh bin/app.sh
environment:
- DEBUG=True
nginx:
image: nginx
......
app:
command: /bin/sh bin/app.sh
ports:
- "8040:8000"
Subproject commit 3dc0245c2f80b9713dbd71254b9587b0eb489bc2
Subproject commit 198696f9bebdf3f0b7090de0a1aab8299470b58e
Subproject commit 8ff76972874cf66c4d6b7a38115cc3053f03ce6d
Subproject commit 143406f05022f6ce1ca4e5f2ba7c79d4e0edb468
Subproject commit c89b4de4b1fab344abdf7c4cb89680f8b79675b0
Subproject commit b549942259c15cfa1f7fe8bad1a995ce6837ef0c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment