def move_to_archive(request, filename):
""" move a new file to the unmanaged files dir """
def move_to_archive(request, filename):
""" move a new file to the unmanaged files dir """
- filename_str = filename.encode('utf-8')
- old_path = os.path.join(settings.NEW_PATH, filename_str)
- new_path = os.path.join(settings.UNMANAGED_PATH, filename_str)
+ old_path = os.path.join(settings.NEW_PATH, filename)
+ new_path = os.path.join(settings.UNMANAGED_PATH, filename)
def move_to_new(request, filename):
""" move a unmanaged file to new files dir """
def move_to_new(request, filename):
""" move a unmanaged file to new files dir """
- filename_str = filename.encode('utf-8')
- old_path = os.path.join(settings.UNMANAGED_PATH, filename_str)
- new_path = os.path.join(settings.NEW_PATH, filename_str)
+ old_path = os.path.join(settings.UNMANAGED_PATH, filename)
+ new_path = os.path.join(settings.NEW_PATH, filename)
def publish(request, aid, publish=True):
""" mark file for publishing """
audiobook = get_object_or_404(models.Audiobook, id=aid)
def publish(request, aid, publish=True):
""" mark file for publishing """
audiobook = get_object_or_404(models.Audiobook, id=aid)