Giter Site home page Giter Site logo

areski / django-audiofield Goto Github PK

View Code? Open in Web Editor NEW
174.0 21.0 51.0 1.31 MB

Django-Audiofield is a simple app that allows Audio files upload, management and conversion to different audio format (mp3, wav & ogg), which also makes it easy to play audio files into your Django application.

License: Other

Python 11.27% HTML 6.77% CSS 7.01% JavaScript 74.69% Shell 0.26%

django-audiofield's Introduction

Django-Audiofield

Description:Django Audio Management Tools
Maintainer:Areski
Contributors:list of contributors
Latest Version Downloads Supported Python versions License

Django-Audiofield is a simple app that allows Audio files upload, management and conversion to different audio format (mp3, wav & ogg), which also makes it easy to play audio files into your Django application.

We are using the HTML5 and Flash audio player SoundManager2

https://github.com/Star2Billing/django-audiofield/raw/master/docs/source/_static/django-admin-audiofield.png

https://github.com/Star2Billing/django-audiofield/raw/master/docs/source/_static/django-admin-audiofield-upload.png

Installation

Install Django-Audiofield:

python setup.py install

Dependencies

Install dependencies on Debian:

apt-get -y install libsox-fmt-mp3 libsox-fmt-all mpg321 dir2ogg ffmpeg

Note: For Debian version 7 (Wheezy) and older, replace ffmpeg with libav-tools

Install dependencies on Redhat/CentOS:

yum -y install python-setuptools libsox-fmt-mp3 libsox-fmt-all mpg321 dir2ogg

Install avconv on Redhat/CentOS:

git clone git://git.libav.org/libav.git
cd libav
sudo ./configure --disable-yasm
sudo make
sudo make install

Settings

in your settings.py file:

# Set Following variable
MEDIA_ROOT = ''
MEDIA_URL = ''

In MIDDLEWARE_CLASSES add 'audiofield.middleware.threadlocals.ThreadLocals'

In INSTALLED_APPS add 'audiofield'

# Frontend widget values
# 0-Keep original, 1-Mono, 2-Stereo
CHANNEL_TYPE_VALUE = 0

# 0-Keep original, 8000-8000Hz, 16000-16000Hz, 22050-22050Hz,
# 44100-44100Hz, 48000-48000Hz, 96000-96000Hz
FREQ_TYPE_VALUE = 8000

# 0-Keep original, 1-Convert to MP3, 2-Convert to WAV, 3-Convert to OGG
CONVERT_TYPE_VALUE = 0

Usage

Add the following lines in your models.py file:

from django.conf import settings
from audiofield.fields import AudioField
import os.path

# Add the audio field to your model
audio_file = AudioField(upload_to='your/upload/dir', blank=True,
                        ext_whitelist=(".mp3", ".wav", ".ogg"),
                        help_text=("Allowed type - .mp3, .wav, .ogg"))

# Add this method to your model
def audio_file_player(self):
    """audio player tag for admin"""
    if self.audio_file:
        file_url = settings.MEDIA_URL + str(self.audio_file)
        player_string = '<audio src="%s" controls>Your browser does not support the audio element.</audio>' % (file_url)
        return player_string

audio_file_player.allow_tags = True
audio_file_player.short_description = ('Audio file player')

Add the following lines in your admin.py:

from your_app.models import your_model_name

# add 'audio_file_player' tag to your admin view
list_display = (..., 'audio_file_player', ...)
actions = ['custom_delete_selected']

def custom_delete_selected(self, request, queryset):
    #custom delete code
    n = queryset.count()
    for i in queryset:
        if i.audio_file:
            if os.path.exists(i.audio_file.path):
                os.remove(i.audio_file.path)
        i.delete()
    self.message_user(request, ("Successfully deleted %d audio files.") % n)
custom_delete_selected.short_description = "Delete selected items"

def get_actions(self, request):
    actions = super(AudioFileAdmin, self).get_actions(request)
    del actions['delete_selected']
    return actions

Then perform following commands to create the table and collect the static files:

./manage.py syncdb
./manage.py collectstatic

Create audiofield.log file:

touch /var/log/audio-field.log

Contributing

If you've found a bug, implemented a feature or customized the template and think it is useful then please consider contributing. Patches, pull requests or just suggestions are welcome!

Source code: http://github.com/Star2Billing/django-audiofield

Bug tracker: https://github.com/Star2Billing/django-audiofield/issues

Documentation

Documentation is available on 'Read the Docs': http://django-audiofield.readthedocs.org

Credit

Django-audiofield is a Star2Billing-Sponsored Community Project, for more information visit http://www.star2billing.com or email us at [email protected]

License

Django-Audiofield is licensed under MIT, see MIT-LICENSE.txt.

TODO

django-audiofield's People

Contributors

areski avatar beldougie avatar crazyzubr avatar khasanovbi avatar mirfan899 avatar rictus avatar ruggedness-mime avatar shinriyo avatar shrenik avatar smipi1 avatar timgates42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-audiofield's Issues

Impossible to install on CentOS 6.5

The installation instructions for CentOS as stated in README.rst are broken, because none of these four packages:

  • libsox-fmt-mp3
  • libsox-fmt-all
  • mpg321
  • dir2ogg

are present in the CentOS stock repositories, nor in EPEL.

Display Bar UI in-place

Hi, this is great. I would like it to play in-place with the SoundManager2 Bar UI.

Is this possible?

ModuleNotFoundError: No module named 'audiofieldspeech'

I get this error when I run python manage.py syncdb, Any help will be appreciated.

(speechmodel) C:\Users\Mr Ayo\Desktop\speechmodel>python manage.py syncdb Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\Mr Ayo\.virtualenvs\speechmodel\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\Mr Ayo\.virtualenvs\speechmodel\lib\site-packages\django\core\management\__init__.py", line 377, in execute django.setup() File "C:\Users\Mr Ayo\.virtualenvs\speechmodel\lib\site-packages\django\__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\Mr Ayo\.virtualenvs\speechmodel\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\Mr Ayo\.virtualenvs\speechmodel\lib\site-packages\django\apps\config.py", line 116, in create mod = import_module(mod_path) File "C:\Users\Mr Ayo\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'audiofieldspeech'

Hi All

How I can play audio from .raw audio in django, VOIP RTP Packets. using audiofield ? bytes = .raw not support html

Install error: error in anyjson setup command: use_2to3 is invalid.

Package is no longer working with latest version of setuptools(v 58 or higher). upgrading dependencies(or at least celery) may fix the issue.

Full error:

Collecting django-audiofield
  Using cached django-audiofield-0.10.1.tar.gz (185 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting celery>=3.1.7 (from django-audiofield)
  Using cached celery-5.3.1-py3-none-any.whl (420 kB)
Collecting django-celery>=3.1.1 (from django-audiofield)
  Using cached django_celery-3.3.1-py3-none-any.whl (63 kB)
Requirement already satisfied: six>=1.9 in c:\prj\learnlingu\venv\lib\site-packages (from django-audiofield) (1.16.0)
Collecting billiard<5.0,>=4.1.0 (from celery>=3.1.7->django-audiofield)
  Using cached billiard-4.1.0-py3-none-any.whl (86 kB)
Collecting click-didyoumean>=0.3.0 (from celery>=3.1.7->django-audiofield)
  Using cached click_didyoumean-0.3.0-py3-none-any.whl (2.7 kB)
Collecting click-plugins>=1.1.1 (from celery>=3.1.7->django-audiofield)
  Using cached click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB)
Collecting click-repl>=0.2.0 (from celery>=3.1.7->django-audiofield)
  Using cached click_repl-0.3.0-py3-none-any.whl (10 kB)
Collecting click<9.0,>=8.1.2 (from celery>=3.1.7->django-audiofield)
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting kombu<6.0,>=5.3.1 (from celery>=3.1.7->django-audiofield)
  Using cached kombu-5.3.1-py3-none-any.whl (198 kB)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\prj\learnlingu\venv\lib\site-packages (from celery>=3.1.7->django-audiofield) (2.8.2)
Requirement already satisfied: tzdata>=2022.7 in c:\prj\learnlingu\venv\lib\site-packages (from celery>=3.1.7->django-audiofield) (2023.3)
Collecting vine<6.0,>=5.0.0 (from celery>=3.1.7->django-audiofield)
  Using cached vine-5.0.0-py2.py3-none-any.whl (9.4 kB)
Collecting celery>=3.1.7 (from django-audiofield)
  Using cached celery-3.1.26.post2-py2.py3-none-any.whl (526 kB)
Requirement already satisfied: django>=1.8 in c:\prj\learnlingu\venv\lib\site-packages (from django-celery>=3.1.1->django-audiofield) (4.2.2)
Collecting pytz>dev (from celery>=3.1.7->django-audiofield)
  Using cached pytz-2023.3-py2.py3-none-any.whl (502 kB)
Collecting billiard<3.4,>=3.3.0.23 (from celery>=3.1.7->django-audiofield)
  Using cached billiard-3.3.0.23.tar.gz (151 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting kombu<3.1,>=3.0.37 (from celery>=3.1.7->django-audiofield)
  Using cached kombu-3.0.37-py2.py3-none-any.whl (240 kB)
Requirement already satisfied: asgiref<4,>=3.6.0 in c:\prj\learnlingu\venv\lib\site-packages (from django>=1.8->django-celery>=3.1.1->django-audiofield) (3.7.2)
Requirement already satisfied: sqlparse>=0.3.1 in c:\prj\learnlingu\venv\lib\site-packages (from django>=1.8->django-celery>=3.1.1->django-audiofield) (0.4.4)
Collecting anyjson>=0.3.3 (from kombu<3.1,>=3.0.37->celery>=3.1.7->django-audiofield)
  Using cached anyjson-0.3.3.tar.gz (8.3 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in anyjson setup command: use_2to3 is invalid.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

AudioField not working with Django 2.1

Hello, I am trying AudioField with Django 2.1

I am having the following error:

ERRORS:
audiofield.AudioFile: (auth.E005) The permission codenamed 'view_audiofile' clashes with a builtin permission for model 'audiofield.AudioFile'.

This happens when trying migrations or when trying to launch the server with an audiofield setup at one of my templates as per the documentation.

Thanks

NotImplementedError: This backend doesn't support absolute paths.

Problems with django-storages and django-boto when run manage.py collectstatic


File "/Users/oscarelotero/Documents/Reingeniamos/Proyectos/AG-Corp/aplicacion/entorno/lib/python2.7/site-packages/audiofield/fields.py", line 259, in _set_audio_converted

    filename = self.generate_filename(instance, os.path.basename(getattr(instance, self.name).path))

File "/Users/oscarelotero/Documents/Reingeniamos/Proyectos/AG-Corp/aplicacion/entorno/lib/python2.7/site-packages/django/db/models/fields/files.py", line 64, in _get_path

    return self.storage.path(self.name)

File "/Users/oscarelotero/Documents/Reingeniamos/Proyectos/AG-Corp/aplicacion/entorno/lib/python2.7/site-packages/django/core/files/storage.py", line 114, in path

     raise NotImplementedError("This backend doesn't support absolute paths.")

Import error with management commands

In my models I used 'from audiofield.fields import AudioField'. This worked fine until I added a custom management command that imported a model with an AudioField.

There seemed to be a circular import. So, instead I changed my imports for my models to 'from audiofield.models import AudioField'

This seemed to solve the problem.

nobody@lemons:~/Docs/Code/wordsuperb$ python manage.py getsentences
Traceback (most recent call last):
File "manage.py", line 14, in
execute_manager(settings)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/init.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/home/nobody/Docs/Code/wordsuperb/corpus/management/commands/getsentences.py", line 3, in
from corpus.models import Sentence
File "/home/nobody/Docs/Code/wordsuperb/corpus/models.py", line 11, in
from audiofield.fields import AudioField
File "/usr/local/lib/python2.6/dist-packages/django_audiofield-0.2.dev1-py2.6.egg/audiofield/fields.py", line 8, in
from tasks import audio_convert_task
File "/usr/local/lib/python2.6/dist-packages/django_audiofield-0.2.dev1-py2.6.egg/audiofield/tasks.py", line 2, in
from models import *
File "/usr/local/lib/python2.6/dist-packages/django_audiofield-0.2.dev1-py2.6.egg/audiofield/models.py", line 7, in
from audiofield.fields import AudioField
ImportError: cannot import name AudioField

Creation of object with audiofield assumes POST request

fields.py lines 121 through 123 assume that a POST request caused the audiofile to be created/renamed. Shouldn't this be more agnostic to the method as it may be possible for the model to be created in various other ways (via shell or a cron job, for instance)?

Python 3 support

Currently, the install for python 3.3.3. django 1.6.1 doesn't work. There are quite a few dependencies for this lib, one of which is breaking the install (see switch2bill-common):

(py33_django16)➜  $ pip install django-audiofield
Downloading/unpacking django-audiofield
  Downloading django-audiofield-0.5.8.tar.gz (1.2MB): 1.2MB downloaded
  Running setup.py (path:/.virtualenvs/py33_django16/build/django-audiofield/setup.py) egg_info for package django-audiofield

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Downloading/unpacking django-uuidfield (from django-audiofield)
  Downloading django-uuidfield-0.4.0.tar.gz
  Running setup.py (path:/.virtualenvs/py33_django16/build/django-uuidfield/setup.py) egg_info for package django-uuidfield

    warning: no previously-included files matching '*~' found anywhere in distribution
Downloading/unpacking switch2bill-common (from django-audiofield)
  Downloading switch2bill-common-2.8.5.tar.gz
  Running setup.py (path:/.virtualenvs/py33_django16/build/switch2bill-common/setup.py) egg_info for package switch2bill-common

Downloading/unpacking celery (from django-audiofield)
  Downloading celery-3.1.8.tar.gz (1.3MB): 1.3MB downloaded
  Running setup.py (path:/.virtualenvs/py33_django16/build/celery/setup.py) egg_info for package celery
    - Trying to upgrade 'task' in 'celery.app'
    - upgrade task: no old version found.

    no previously-included directories found matching '*.pyc'
    no previously-included directories found matching '*.sw*'
Downloading/unpacking django-celery (from django-audiofield)
  Downloading django-celery-3.1.1.tar.gz (75kB): 75kB downloaded
  Running setup.py (path:/.virtualenvs/py33_django16/build/django-celery/setup.py) egg_info for package django-celery

    warning: no files found matching '*' under directory 'bin'
    no previously-included directories found matching 'bin/*.pyc'
    no previously-included directories found matching 'tests/*.pyc'
    no previously-included directories found matching 'docs/*.pyc'
    no previously-included directories found matching 'extra/*.pyc'
    no previously-included directories found matching 'djcelery/*.pyc'
    no previously-included directories found matching 'docs/.build'
    no previously-included directories found matching 'examples/*.pyc'
Requirement already satisfied (use --upgrade to upgrade): django in /.virtualenvs/py33_django16/lib/python3.3/site-packages (from django-uuidfield->django-audiofield)
Downloading/unpacking django-reusableapps==0.1.1 (from switch2bill-common->django-audiofield)
  Downloading django-reusableapps-0.1.1.tar.gz
  Running setup.py (path:/.virtualenvs/py33_django16/build/django-reusableapps/setup.py) egg_info for package django-reusableapps
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/.virtualenvs/py33_django16/build/django-reusableapps/setup.py", line 2, in <module>
        from ez_setup import use_setuptools
      File "./ez_setup.py", line 97
        except pkg_resources.VersionConflict, e:
                                            ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "/.virtualenvs/py33_django16/build/django-reusableapps/setup.py", line 2, in <module>
    from ez_setup import use_setuptools
  File "./ez_setup.py", line 97
    except pkg_resources.VersionConflict, e:
                                        ^
SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /.virtualenvs/py33_django16/build/django-reusableapps
Storing debug log for failure in /.pip/pip.log

Using with Django 1.11 - audiofield middleware is no longer compatible

While attempting to install this on my project (which is using Django 1.11) it throws the error TypeError: object() takes no parameters because MIDDLEWARE_CLASSES has been deprecated and replaced with MIDDLEWARE.

I attempted the resolution in the docs, updating the audiofield.middleware.threadlocals module as follows.

Prev:

import threading

_thread_locals = threading.local()


def get_current_request():
    return getattr(_thread_locals, 'request', None)


class ThreadLocals(object):
    """
    Middleware that gets various objects from the
    request object and saves them in thread local storage.
    """
    def process_request(self, request):
        _thread_locals.request = request

Updated:

from django.utils.deprecation import MiddlewareMixin
import threading

_thread_locals = threading.local()


def get_current_request():
    return getattr(_thread_locals, 'request', None)


class ThreadLocals(MiddlewareMixin):
    """
    Middleware that gets various objects from the
    request object and saves them in thread local storage.
    """
    def process_request(self, request):
        _thread_locals.request = request

However, this does not solve the issue and the error TypeError: object() takes no parameters is still thrown.

I will keep looking into this and submit a pull if I am able to find a solution but please advise if there is a known resolution for this issue.

Thanks!

AudioField does not play nice with django South

migration fails with an error like:

ValueError: Cannot successfully create field 'X' for model 'Y': 'ext_whitelist'.

This seems to be solved by creating a specific introspection rule for south, this has worked for me (it adds a default argument for ext_whitelist, which is added / not in the baseclass FileField)

from south.modelsinspector import add_introspection_rules
add_introspection_rules(
[
(
(AudioField, ),
[],
{
"verbose_name": ["verbose_name", {"default": None}],
"name": ["name", {"default": None}],
"ext_whitelist": ["ext_whitelist", {"default": (".mp3"),}],
},
),
],
["^audiofield.fields.AudioField",])

404 Failed to load on Admin

Hi,

Followed your documentation step by step installing you nice little package here. Still my admin got a "Failed to load 404" on the player and no sound is played. Figured out you're uploading the files in 'upload/audiofiles' folder but it seems it cannot access it.

Here's a little log that's showing on the admin page as well (dunno if it should btw)

Django 1.7, Python3.2 ; I'm looking forward

SMSound._onload(): "pagePlayerMP3Sound0" failed to load? -     http://127.0.0.1:8000/admin/audiofield/audiofile/upload/audiofiles/audio-file-CNTGU-2854274827.wav
HTML5::error: 4
HTML5::waiting: pagePlayerMP3Sound0
HTML5::play: pagePlayerMP3Sound0, http://127.0.0.1:8000/admin/audiofield/audiofile/upload/audiofiles/audio-file-CNTGU-2854274827.wav
HTML5::suspend: pagePlayerMP3Sound0
HTML5::loadstart: pagePlayerMP3Sound0
HTML5::emptied: pagePlayerMP3Sound0
setPosition(0): delaying, sound not ready
SMSound.play(): "pagePlayerMP3Sound0" is starting to play
HTML5::load: pagePlayerMP3Sound0
SMSound.load(): http://127.0.0.1:8000/admin/audiofield/audiofile/upload/audiofiles/audio-file-CNTGU-2854274827.wav
SMSound.play(): Attempting to load "pagePlayerMP3Sound0"
HTML5::adding event listeners: pagePlayerMP3Sound0
creating HTML5 Audio() element with URL: http://127.0.0.1:8000/admin/audiofield/audiofile/upload/audiofiles/audio-file-CNTGU-2854274827.wav
Loading sound pagePlayerMP3Sound0 via HTML5
SMSound() merged options: { id: pagePlayerMP3Sound0, url: http://127.0.0.1:8000/admin/audiofield/audiofile/upload/audiofiles/audio-file-CNTGU-2854274827.wav, onplay: { pl.removeClass(this._data.oLI,this._data.className); this._data... }, onstop: { pl.removeClass(this._data.oLI,this._data.className); this._data... }, onpause: { if (pl.dragActive) { return false; } pl.removeClass(this._data.... }, onresume: { if (pl.dragActive) { return false; } pl.removeClass(this._data.... }, onfinish: { pl.removeClass(this._data.oLI,this._data.className); this._data... }, whileloading: { function doWork() { this._data.oLoading.style.width = (((this.b... }, whileplaying: { var d = null; if (pl.dragActive || !pl.config.useThrottling) { ... }, onmetadata: undefined, onload: { if (!this.loaded) { var oTemp = this._data.oLI.getElementsByTag... }, autoLoad: false, stream: true, autoPlay: false, loops: 1, multiShot: true, multiShotEvents: false, pan: 0, usePolicyFile: false, volume: 100, usePeakData: true, useWaveformData: false, useEQData: false, bufferTime: 3 }
soundManager.createSound(): pagePlayerMP3Sound0 (http://127.0.0.1:8000/admin/audiofield/audiofile/upload/audiofiles/audio-file-CNTGU-2854274827.wav)
pagePlayer.init(): Ready
pagePlayer.init(): Using custom configuration
soundManager: Firing 1 onready() item
-- SoundManager 2 loaded (OK) --
(Flash): Enabling polling, 10 ms interval
(Flash): JS to/from Flash OK
Flash security sandbox type: remote
(Flash): SM2 SWF V2.97a.20110918 (AS3/Flash 9)
soundManager: Attempting to call Flash from JS..
soundManager::init()
soundManager::externalInterfaceOK() (~1 ms)
soundManager::initMovie(): Waiting for ExternalInterface call from Flash..
soundManager::createMovie(): Trying to load /static/audiofield/swf/soundmanager2_flash9_debug.swf
-- SoundManager 2 V2.97a.20110918 (AS3/Flash 9) + HTML5 audio, high performance mode, normal polling, wmode: transparent, flashBlock mode --
-- SoundManager 2: HTML5 support tests (/^(probably|maybe)$/i): mp3: true (preferring flash), mp4: true (preferring flash), ogg: true, wav: true --

ImportError: No module named 'middleware'

Validating models...

Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x7f6c88d95c18>>
Traceback (most recent call last):
File "/home/kamushin/app/env/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 93, in inner_run
self.validate(display_num_errors=True)
File "/home/kamushin/app/env/lib/python3.4/site-packages/django/core/management/base.py", line 280, in validate
num_errors = get_validation_errors(s, app)
File "/home/kamushin/app/env/lib/python3.4/site-packages/django/core/management/validation.py", line 35, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/home/kamushin/app/env/lib/python3.4/site-packages/django/db/models/loading.py", line 166, in get_app_errors
self._populate()
File "/home/kamushin/app/env/lib/python3.4/site-packages/django/db/models/loading.py", line 75, in _populate
self.load_app(app_name)
File "/home/kamushin/app/env/lib/python3.4/site-packages/django/db/models/loading.py", line 96, in load_app
models = import_module('.models', app_name)
File "/home/kamushin/app/env/lib/python3.4/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/home/kamushin/app/questions/models.py", line 7, in
from audiofield.fields import AudioField
File "/home/kamushin/app/env/lib/python3.4/site-packages/django_audiofield-0.6.2-py3.4.egg/audiofield/fields.py", line 20, in
from middleware import threadlocals
ImportError: No module named 'middleware'

unable to upload 200k file

Hi,
Congratulations for this project. It's very useful. While testing it, i realize that i can't upload file bigger than 150 K.
Any time i try to, the browser waits until connection reset.

fix error please calery

ERROR: django-celery 3.3.1 has requirement celery<4.0,>=3.1.15, but you'll have celery 4.3.0 which is incompatible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.