Modifiy the following variables:
ADMINS = telemeta requires that you indicate an administrator here
- DATABASE_* = your database settings (don't forget to create the database if needed)
+ DATABASES = your database setting dict (don't forget to create the database if needed)
MEDIA_ROOT = absolute path to the media directory you just created
INSTALLED_APPS = add 'telemeta' to the tuple
Add the following variables:
+
+ TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.core.context_processors.request',
+ 'django.core.context_processors.auth',)
TELEMETA_ORGANIZATION = name of the organization which hosts this installation
TELEMETA_SUBJECTS = tuple of subject keywords (used for Dublin Core), such as "Ethnology", etc...
from telemeta.models.media import MediaCollection, MediaItem
+from telemeta.models.system import User
from django.contrib import admin
admin.site.register(MediaCollection)
admin.site.register(MediaItem)
+admin.site.register(User)
<p class="login-error">{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
-<form class="login" method="post" action="{% url telemeta-login %}">
+<form class="login" method="post" action="{% url telemeta-login %}">{% csrf_token %}
<p>
{{ form.username.label_tag }}
{{ form.username }}<br />
from django.conf import settings
from django.contrib import auth
from django.contrib.auth.decorators import login_required
+from django.core.context_processors import csrf
from telemeta.models import MediaItem, Location, MediaCollection, EthnicGroup
from telemeta.models import dublincore, Enumeration
if item.file:
decoder = timeside.decoder.FileDecoder(item.file.path)
pipe = decoder
- mime_type = decoder.mimetype
for analyzer in self.analyzers:
subpipe = analyzer()
pipe.run()
+ mime_type = decoder.format()
+ analyzers.append({'name': 'Mime type', 'id': 'mime_type', 'unit': '', 'value': mime_type})
+
for analyzer in analyzers_sub:
value = analyzer.result()
if analyzer.id() == 'duration':
item.approx_duration = approx_value
item.save()
value = datetime.timedelta(0,value)
- if analyzer.id() == 'mime_type':
- value = decoder.format()
analyzers.append({'name':analyzer.name(),
'id':analyzer.id(),
'unit':analyzer.unit(),
'value':str(value)})
-
+
self.cache.write_analyzer_xml(analyzers, analyze_file)