From 9254df258b849199e093a1dbfbde789b56165354 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 24 Mar 2016 16:48:21 +0100 Subject: [PATCH] WARNING : data/mysql is not used anymore as a default volume for the composition BACKUP your DB before upgrading update main description try a fix for the wait.py script --- README.rst | 6 +++--- app/deploy/start_app.sh | 2 +- app/wait.py | 5 +++++ docker-compose.yml | 2 -- telemeta/views/haystack_search.py | 24 ++++++++++++++++++++++-- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index c5231c94..6aed7449 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ ================================================= -Telemeta: open web audio platform with semantics +Collaborative multimedia asset management system ================================================= |version| |downloads| |travis_master| |coverage_master| @@ -24,7 +24,7 @@ Telemeta: open web audio platform with semantics Overview ========= -Telemeta is a free and open source web audio archiving software which introduces useful and secure methods to backup, index, transcode, analyse and publish any digitalized audio file with extensive metadata. It is dedicated to collaborative media archiving projects, research laboratories and digital humanities - and especially in ethnomusicological use cases - who wants to easily organize, backup and publish documented sound collections of audio files, CDs, digitalized vinyls and magnetic tapes over a strong database, in accordance with open web standards. +Telemeta is a free and open source collaborative multimedia asset management software which introduces useful and secure methods to archive, backup, transcode, analyse, annotate and publish any digitalized video or audio file with extensive metadata. It is dedicated to collaborative media archiving projects, research laboratories and digital humanities - especially in ethno-musicological use cases - who need to easily organize and publish documented sound collections of audio files, CDs, digitalized vinyls and magnetic tapes over a strong database, in a secure platform and in accordance with open web standards. Key features: @@ -49,7 +49,7 @@ Key features: This web audio CMS is exclusively based on open source modules and can be run on any Unix or Linux system. It is mostly written in Python and JavaScript. -The processing engine of Telemeta is a separate project called `TimeSide `_ as an open web audio pocessing framework written in Python. +The processing engine of Telemeta is provided by `TimeSide `_, an open web audio processing framework written in Python. Changes diff --git a/app/deploy/start_app.sh b/app/deploy/start_app.sh index bc774555..b349f9b0 100644 --- a/app/deploy/start_app.sh +++ b/app/deploy/start_app.sh @@ -23,7 +23,7 @@ pip install django-environ redis sh $app/deploy/wait.sh # waiting for available database -# python $app/wait.py +python $app/wait.py # django init python $manage syncdb --noinput diff --git a/app/wait.py b/app/wait.py index eead53c7..19576830 100644 --- a/app/wait.py +++ b/app/wait.py @@ -6,9 +6,14 @@ from django.core.management import call_command up = False os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sandbox.settings") +i = 0 while not up: try: call_command('syncdb', interactive=False) up = True except: + i += 1 + print 'initialization...' + if i > 2: + raise time.sleep(1) diff --git a/docker-compose.yml b/docker-compose.yml index 2bb8e71a..239a86a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,8 +34,6 @@ data: db: image: mysql volumes: - - ./data/var/lib/mysql/:/var/lib/mysql - - ./data/var/log/mysql/:/var/log/mysql - ./scripts/:/srv/scripts volumes_from: - data diff --git a/telemeta/views/haystack_search.py b/telemeta/views/haystack_search.py index 8a51d2fe..3a57ff98 100644 --- a/telemeta/views/haystack_search.py +++ b/telemeta/views/haystack_search.py @@ -88,11 +88,32 @@ class HaystackSearch(FacetedSearchView): extra['results_page'] = self.results_per_page return extra + def save_search(self, request): + user = request.user + if user: + if user.is_authenticated(): + search = Search(username=user) + search.save() + if criteria: + for key in criteria.keys(): + value = criteria[key] + if key == 'ethnic_group': + try: + group = EthnicGroup.objects.get(value=value) + value = group.id + except: + value = '' + criter = Criteria(key=key, value=value) + criter.save() + search.criteria.add(criter) + search.save() + + #def auto_complete(request): #content = SearchQuerySet().autocomplete(content_auto=request.POST.get('seatch_text', '')) - #return render_to_response('', {'content' : content]) + class HaystackAdvanceSearch(SearchView): def __call__(self, request, type=None): @@ -107,7 +128,6 @@ class HaystackAdvanceSearch(SearchView): #overwrite the get_query for begin search with any form if self.form.is_valid(): return self.form.cleaned_data - return '' def get_results(self): -- 2.39.5