Skip to content

Commit

Permalink
Merge branch 'release/v1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
luis committed Jul 17, 2018
2 parents a5dc00a + e33282c commit 11aecf1
Show file tree
Hide file tree
Showing 16 changed files with 219 additions and 38 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
## Custom
*.xml
*.bin
*.gz
migrations/
tmp/
log/
static/
#--- updates introduced for iSkyLIMS in submodules packaging ---
virtualenv/
iSkyLIMS/
documents/
manage.py


# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
20 changes: 10 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "iSkyLIMS-wetlab"]
path = iSkyLIMS-wetlab
url = https://github.com/BU-ISCIII/iSkyLIMS-wetlab
[submodule "iSkyLIMS-drylab"]
path = iSkyLIMS-drylab
url = https://github.com/BU-ISCIII/iSkyLIMS-drylab
[submodule "django-utils"]
path = django-utils
url = https://github.com/BU-ISCIII/django-utils
[submodule "iSkyLIMS_drylab"]
path = iSkyLIMS_drylab
url = [email protected]:BU-ISCIII/iSkyLIMS_drylab.git
[submodule "iSkyLIMS_wetlab"]
path = iSkyLIMS_wetlab
url = [email protected]:BU-ISCIII/iSkyLIMS_wetlab.git
[submodule "iSkyLIMS_home"]
path = iSkyLIMS_home
url = https://github.com/BU-ISCIII/iSkyLIMS_home
url = [email protected]:BU-ISCIII/iSkyLIMS_home.git
[submodule "django_utils"]
path = django_utils
url = [email protected]:BU-ISCIII/django_utils.git
72 changes: 72 additions & 0 deletions conf/admin_zinnia_wymeditor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
"""EntryAdmin for zinnia-wymeditor"""
from django.forms import Media
from django.conf.urls import url
from django.contrib import admin
#jlgarcia 19/04/2018. Change needed for django 2.0
from django.urls import reverse
#from django.core.urlresolvers import reverse
from django.utils.translation import get_language
from django.template.response import TemplateResponse
from django.contrib.staticfiles.storage import staticfiles_storage

from zinnia.models import Entry
from zinnia.admin.entry import EntryAdmin
from zinnia.settings import ENTRY_BASE_MODEL


class EntryAdminWYMEditorMixin(object):
"""
Mixin adding WYMeditor for editing Entry.content field.
"""

def wymeditor(self, request):
"""
View for serving the config of WYMEditor.
"""
return TemplateResponse(
request, 'admin/zinnia/entry/wymeditor.js',
{'lang': get_language().split('-')[0]},
content_type='application/javascript')

def get_urls(self):
"""
Overload the admin's urls for WYMEditor.
"""
entry_admin_urls = super(EntryAdminWYMEditorMixin, self).get_urls()
urls = [
url(r'^wymeditor/$',
self.admin_site.admin_view(self.wymeditor),
name='zinnia_entry_wymeditor'),
]
return urls + entry_admin_urls

def _media(self):
"""
The medias needed to enhance the admin page.
"""
def static_url(url):
return staticfiles_storage.url('zinnia_wymeditor/%s' % url)

media = super(EntryAdminWYMEditorMixin, self).media

media += Media(
js=(static_url('js/jquery.min.js'),
static_url('js/wymeditor/jquery.wymeditor.pack.js'),
static_url('js/wymeditor/plugins/hovertools/'
'jquery.wymeditor.hovertools.js'),
reverse('admin:zinnia_entry_wymeditor')))
return media
media = property(_media)


class EntryAdminWYMEditor(EntryAdminWYMEditorMixin,
EntryAdmin):
"""
Enrich the default EntryAdmin with WYMEditor.
"""
pass


if ENTRY_BASE_MODEL == 'zinnia.models_bases.entry.AbstractEntry':
admin.site.unregister(Entry)
admin.site.register(Entry, EntryAdminWYMEditor)
1 change: 1 addition & 0 deletions conf/index_file
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0000-AA
21 changes: 21 additions & 0 deletions conf/pythonPackagesRequired.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## 30/05/2018
## encoding (1.0.0) --deprecated
## mod-wsgi (4.5.17): package to be installed manually if Apache needed later

asn1crypto
bcrypt
biopython
cryptography
Django
django-blog-zinnia
django-crispy-forms
django-crontab
django-js-asset
django-mptt
django-mptt-admin
interop
mysqlclient
paramiko
pysmb
zinnia-wysiwyg-wymeditor

10 changes: 5 additions & 5 deletions iSkyLIMS/settings.py → conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
# Application definition

INSTALLED_APPS = [
'wetlab.apps.WetlabConfig',
'drylab.apps.DrylabConfig',
'utils.apps.UtilsConfig',
'iSkyLIMS_wetlab',
'iSkyLIMS_drylab',
'django_utils',
'iSkyLIMS_home',
'mptt',
'crispy_forms',
Expand Down Expand Up @@ -162,8 +162,8 @@

# Crontab settings
CRONJOBS = [
('2-59/5 * * * *', 'wetlab.cron.check_recorded_folder', '>> PATH2LOG'), # run every 5 min wit an offset of 2 minutes
('*/5 * * * *', 'wetlab.cron.check_not_finish_run', '>> PATH2LOG') # run every 5 min
('2-59/5 * * * *', 'iSkyLIMS_wetlab.cron.check_recorded_folder', '>> PATH2LOG'), # run every 5 min wit an offset of 2 minutes
('*/5 * * * *', 'iSkyLIMS_wetlab.cron.check_not_finish_run', '>> PATH2LOG') # run every 5 min
]

CRONTAB_COMMAND_SUFFIX = '2>&1'
Expand Down
96 changes: 96 additions & 0 deletions conf/settings_zinnia.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
"""Settings of Zinnia"""
from django.conf import settings

from mots_vides import stop_words


PING_DIRECTORIES = getattr(settings, 'ZINNIA_PING_DIRECTORIES',
('https://django-blog-zinnia.com/xmlrpc/',))
SAVE_PING_DIRECTORIES = getattr(settings, 'ZINNIA_SAVE_PING_DIRECTORIES',
bool(PING_DIRECTORIES))
SAVE_PING_EXTERNAL_URLS = getattr(settings, 'ZINNIA_PING_EXTERNAL_URLS', True)

TRANSLATED_URLS = getattr(settings, 'ZINNIA_TRANSLATED_URLS', False)

#'Zinnia' --> 'BU-ISCIII'
COPYRIGHT = getattr(settings, 'ZINNIA_COPYRIGHT', 'BU-ISCIII')

# 10 ---> 1 entry per page
PAGINATION = getattr(settings, 'ZINNIA_PAGINATION', 1)
ALLOW_EMPTY = getattr(settings, 'ZINNIA_ALLOW_EMPTY', True)
ALLOW_FUTURE = getattr(settings, 'ZINNIA_ALLOW_FUTURE', True)

ENTRY_BASE_MODEL = getattr(settings, 'ZINNIA_ENTRY_BASE_MODEL',
'zinnia.models_bases.entry.AbstractEntry')

ENTRY_DETAIL_TEMPLATES = getattr(
settings, 'ZINNIA_ENTRY_DETAIL_TEMPLATES', [])
ENTRY_CONTENT_TEMPLATES = getattr(
settings, 'ZINNIA_ENTRY_CONTENT_TEMPLATES', [])
ENTRY_LOOP_TEMPLATES = getattr(
settings, 'ZINNIA_ENTRY_LOOP_TEMPLATES', {})
ENTRY_LOOP_TEMPLATES.setdefault('default', {})

MARKUP_LANGUAGE = getattr(settings, 'ZINNIA_MARKUP_LANGUAGE', 'html')

MARKDOWN_EXTENSIONS = getattr(settings, 'ZINNIA_MARKDOWN_EXTENSIONS', [])

RESTRUCTUREDTEXT_SETTINGS = getattr(
settings, 'ZINNIA_RESTRUCTUREDTEXT_SETTINGS', {})

PREVIEW_SPLITTERS = getattr(settings, 'ZINNIA_PREVIEW_SPLITTERS',
['<!-- more -->', '<!--more-->'])

PREVIEW_MAX_WORDS = getattr(settings, 'ZINNIA_PREVIEW_MAX_WORDS', 55)

PREVIEW_MORE_STRING = getattr(settings, 'ZINNIA_PREVIEW_MORE_STRING', ' ...')

AUTO_CLOSE_PINGBACKS_AFTER = getattr(
settings, 'ZINNIA_AUTO_CLOSE_PINGBACKS_AFTER', None)

AUTO_CLOSE_TRACKBACKS_AFTER = getattr(
settings, 'ZINNIA_AUTO_CLOSE_TRACKBACKS_AFTER', None)

AUTO_CLOSE_COMMENTS_AFTER = getattr(
settings, 'ZINNIA_AUTO_CLOSE_COMMENTS_AFTER', None)

AUTO_MODERATE_COMMENTS = getattr(settings, 'ZINNIA_AUTO_MODERATE_COMMENTS',
False)

MAIL_COMMENT_REPLY = getattr(settings, 'ZINNIA_MAIL_COMMENT_REPLY', False)

MAIL_COMMENT_AUTHORS = getattr(settings, 'ZINNIA_MAIL_COMMENT_AUTHORS', True)

MAIL_COMMENT_NOTIFICATION_RECIPIENTS = getattr(
settings, 'ZINNIA_MAIL_COMMENT_NOTIFICATION_RECIPIENTS',
[manager_tuple[1] for manager_tuple in settings.MANAGERS])

COMMENT_MIN_WORDS = getattr(settings, 'ZINNIA_COMMENT_MIN_WORDS', 4)

COMMENT_FLAG_USER_ID = getattr(settings, 'ZINNIA_COMMENT_FLAG_USER_ID', 1)

UPLOAD_TO = getattr(settings, 'ZINNIA_UPLOAD_TO', 'uploads/zinnia')

PROTOCOL = getattr(settings, 'ZINNIA_PROTOCOL', 'http')

FEEDS_FORMAT = getattr(settings, 'ZINNIA_FEEDS_FORMAT', 'rss')
FEEDS_MAX_ITEMS = getattr(settings, 'ZINNIA_FEEDS_MAX_ITEMS', 15)

PINGBACK_CONTENT_LENGTH = getattr(settings,
'ZINNIA_PINGBACK_CONTENT_LENGTH', 300)

SEARCH_FIELDS = getattr(settings, 'ZINNIA_SEARCH_FIELDS',
['title', 'lead', 'content',
'excerpt', 'image_caption', 'tags'])

COMPARISON_FIELDS = getattr(settings, 'ZINNIA_COMPARISON_FIELDS',
['title', 'lead', 'content',
'excerpt', 'image_caption', 'tags'])

SPAM_CHECKER_BACKENDS = getattr(settings, 'ZINNIA_SPAM_CHECKER_BACKENDS',
[])

URL_SHORTENER_BACKEND = getattr(settings, 'ZINNIA_URL_SHORTENER_BACKEND',
'zinnia.url_shortener.backends.default')

STOP_WORDS = stop_words(settings.LANGUAGE_CODE.split('-')[0])
6 changes: 3 additions & 3 deletions iSkyLIMS/urls.py → conf/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
path('faqs', LoginView.as_view(template_name='iSkyLIMS_home/faqs.html'), name="faqs"),
path('contact', LoginView.as_view(template_name='iSkyLIMS_home/contact.html'), name="contact"),
path('admin/', admin.site.urls),
path('wetlab/', include('wetlab.urls')),
path('drylab/',include('drylab.urls')),
path('utils/',include('utils.urls')),
path('iSkyLIMS_wetlab/', include('iSkyLIMS_wetlab.urls')),
path('iSkyLIMS_drylab/',include('iSkyLIMS_drylab.urls')),
path('django_utils/',include('django_utils.urls')),
path('accounts/', include('django.contrib.auth.urls')),
path('tutorials/', include('zinnia.urls')),
]
1 change: 0 additions & 1 deletion django-utils
Submodule django-utils deleted from f62ebb
1 change: 1 addition & 0 deletions django_utils
Submodule django_utils added at 72b09a
1 change: 0 additions & 1 deletion iSkyLIMS-drylab
Submodule iSkyLIMS-drylab deleted from d78d87
1 change: 0 additions & 1 deletion iSkyLIMS-wetlab
Submodule iSkyLIMS-wetlab deleted from f14b27
16 changes: 0 additions & 16 deletions iSkyLIMS/wsgi.py

This file was deleted.

1 change: 1 addition & 0 deletions iSkyLIMS_drylab
Submodule iSkyLIMS_drylab added at d285f9
2 changes: 1 addition & 1 deletion iSkyLIMS_home
1 change: 1 addition & 0 deletions iSkyLIMS_wetlab
Submodule iSkyLIMS_wetlab added at 37d06d

0 comments on commit 11aecf1

Please sign in to comment.