]> git.parisson.com Git - telemeta.git/commitdiff
fix default grapher size, add robots.txt file
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 22 Dec 2014 14:40:23 +0000 (15:40 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 22 Dec 2014 14:40:23 +0000 (15:40 +0100)
example/sandbox/robots.txt [new file with mode: 0644]
example/sandbox/settings.py
example/sandbox/urls.py
telemeta/urls.py
telemeta/views/item.py

diff --git a/example/sandbox/robots.txt b/example/sandbox/robots.txt
new file mode 100644 (file)
index 0000000..995386a
--- /dev/null
@@ -0,0 +1,5 @@
+User-agent: *
+Disallow: /*/download/*$
+Disallow: /*/visualize/*$
+Disallow: /*/analyze/*$
+
index 097d4a715dc9c2597f69700611482cac9669ee10..1d8ea08b9be8de7d034e013757144489ef47f669 100644 (file)
@@ -192,7 +192,7 @@ EMAIL_HOST = 'localhost'
 DEFAULT_FROM_EMAIL = 'webmaster@parisson.com'
 
 TIMESIDE_DEFAULT_GRAPHER_ID = 'waveform_centroid'
-TIMESIDE_DEFAULT_WAVEFORM_SIZES = ['360x130', '640x130']
+TIMESIDE_DEFAULT_WAVEFORM_SIZES = ['346x130', '640x130']
 TIMESIDE_AUTO_ZOOM = False
 
 # Settings for django-bootstrap3
index f812ecf21b9dc4833dd382d56af8072f21000126..376539be41d536c3d618f20ac4935a3c35aca490 100644 (file)
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 from django.conf.urls import patterns, url, include
+from django.http import HttpResponse
 
 # Uncomment the next two lines to enable the admin:
 from django.contrib import admin
@@ -9,6 +10,8 @@ js_info_dict = {
     'packages': ('telemeta',),
 }
 
+robots_file = open('robots.txt', 'r')
+
 urlpatterns = patterns('',
     # Example:
     # (r'^sandbox/', include('sandbox.foo.urls')),
@@ -27,4 +30,6 @@ urlpatterns = patterns('',
     # Languages
     (r'^i18n/', include('django.conf.urls.i18n')),
     (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
+    (r'^robots\.txt$', lambda r: HttpResponse(robots_file.read(), mimetype="text/plain")),
+
     )
index cc16baffc1c9bf5cb3f0b2a43e0697c3f5b1404b..976546899941fca3dfee5aa8debd5361e814acef 100644 (file)
@@ -228,6 +228,7 @@ urlpatterns = patterns('',
 
 )
 
+
 if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS:
     import debug_toolbar
     urlpatterns += patterns('',
@@ -235,3 +236,5 @@ if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS:
     # for the graphical browser/web console only, omissible
     url(r'json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"),
 
+
+    (r'^robots\.txt$', lambda r: HttpResponse(robots_file.read(), mimetype="text/plain")),
\ No newline at end of file
index bd2c408bec11c5cf3eade9f54ae30352747e8834..bc900c6d7c39e4411986198dedd29bdbd6a5d94d 100644 (file)
@@ -51,7 +51,7 @@ class ItemBaseMixin(object):
     export_enabled = getattr(settings, 'TELEMETA_DOWNLOAD_ENABLED', True)
     export_formats = getattr(settings, 'TELEMETA_DOWNLOAD_FORMATS', ('mp3', 'wav'))
     default_grapher_id = getattr(settings, 'TIMESIDE_DEFAULT_GRAPHER_ID', ('waveform_simple'))
-    default_grapher_sizes = getattr(settings, 'TIMESIDE_DEFAULT_GRAPHER_SIZES', ['360x130', ])
+    default_grapher_sizes = getattr(settings, 'TIMESIDE_DEFAULT_GRAPHER_SIZES', ['346x130', ])
     auto_zoom = getattr(settings, 'TIMESIDE_AUTO_ZOOM', False)