sehmaschine / django-filebrowser Goto Github PK
View Code? Open in Web Editor NEWMedia-Management with Grappelli
Home Page: http://twitter.com/sehmaschine
License: Other
Media-Management with Grappelli
Home Page: http://twitter.com/sehmaschine
License: Other
probably the most important case is converting a .png original image to a .jpg version. .png thumbnails don't render as well at low resolution as .jpgs when dealing with things like line-art.
there are still links to googlecode - need to be replace with github.
Hi,
I'm working on a django application to save files also in a git-annex repository to create distributed media repository. I'd like to integrate to django-filebrowser. Is there any idea to include some reference to the user in fileobject as a owner? I saw there was some people in the old issue tracking on google code that was looking for something similar.
Thanks,
Vince
In the documentation here http://readthedocs.org/docs/django-filebrowser/en/latest/versions.html#versions-in-views
It says that in views you can generate/retrieve versions like so: obj.image.version(version_prefix)
but it doesn't work. There is no method version()
. There is versions()
and version_name()
. I can get the filename of the version via version_name(version_prefix)
but its strictly the filename of that version. I need the full url.
This has been working in older versions of FB like this - obj.image.url_VERSION but this no longer works. After upgrading to 3.3 I began having this issue.
What is the proper way handle this?
Thanks man
with 3.3.x, we have some actions (e.g. rotate) on the detail-page: one should be able to write custom actions and easily implement these actions on the detail page.
With the default (undocumented?)
FOLDER_REGEX = getattr(settings, "FILEBROWSER_FOLDER_REGEX", r'^[\w._/-]+$')
I get a validation error when using a space character:
"Only letters, numbers, underscores, spaces and hyphens are allowed."
With
FILEBROWSER_FOLDER_REGEX = r'^[\w._\ /-]+$'
it works as expected.
I am testing Filebrowser 3.4.1. Whatever I set to FILEBROWSER_MEDIA_ROOT, the shown path at the root position is settings.MEDIA_ROOT + FILEBROWSER_DIRECTORY.
For example, with the following settings
FILEBROWSER_MEDIA_ROOT = os.path.join(MEDIA_ROOT, "uploads")
FILEBROWSER_DIRECTORY = ""
I expect to browse the "uploads/" at the root position, but I get MEDIA_ROOT instead.
The following setup works
FILEBROWSER_MEDIA_ROOT = MEDIA_ROOT
FILEBROWSER_DIRECTORY = "uploads/"
but then the "uploads/" part is saved in the database for FileBrowseFields.
Hello,
We're using the filebrowser widget in an admin inline such that:
class Image(models.Model):
# ...
article = models.Foreignkey(Article)
image = FileBrowseField(
"Image file",
blank=False,
directory="images/",
max_length=200,
null=True,
help_text="Click thumbnail to view ful size image.")
# ....
When adding an 'attached' Image model, the following occurs:
reloading the article without save results in the same scenario as the first image.
In [1]: import filebrowser
In [2]: filebrowser.VERSION
Out[2]: '3.4.0'
In [4]: import grappelli
In [6]: grappelli.VERSION
Out[6]: '2.3.6'
if media_url looks like https://host/path then after url_join function link became something like '/https:/host/path'.
I guess you shoud add this code or something similar to url_join function:
elif args[0].startswith("https://"):
url = "https://"
I think:
settings.py line 107
FB_DEFAULT_PERMISSIONS = getattr(settings, "FILEBROWSER_SEARCH_TRAVERSE", 0664)
Should be:
FB_DEFAULT_PERMISSIONS = getattr(settings, "FILEBROWSER_FB_DEFAULT_PERMISSIONS", 0664)
Thanks.
According to docs, "version" should be available on FileObjects:
http://readthedocs.org/docs/django-filebrowser/en/latest/versions.html#versions-in-views
Here's what I get when trying:
Photo.objects.all()[0].image
FileObject: Fuurin (Glass Wind Chime).gif
Photo.objects.all()[0].image.version
AttributeError: FileObject instance has no attribute 'version'
In settings.py
LANGUAGE_CODE = 'pl'
USE_L10N = True
USE_THOUSAND_SEPARATOR = True
Error in javascript (upload.html):
sizeLimit: 10 485 760,
(spaces in number)
since grappelli is a requirement anyway, remove this file - tinymce_setup.js which comes with grappelli is a better example on how to configure tinymce.
To trigger the bug:
In admin:
Result: File not found message appears
Despite the documentation at
http://readthedocs.org/docs/django-filebrowser/en/latest/settings.html#extensions-and-formats
saying
EXTENSIONS = getattr(settings, "FILEBROWSER_EXTENSIONS", {
'Image': ['.jpg','.jpeg','.gif','.png','.tif','.tiff'],
'Document': ['.pdf','.doc','.rtf','.txt','.xls','.csv'],
'Video': ['.mov','.wmv','.mpeg','.mpg','.avi','.rm'],
'Audio': ['.mp3','.mp4','.wav','.aiff','.midi','.m4p']
})
https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/settings.py
actually does
# Allowed Extensions for File Upload. Lower case is important.
EXTENSIONS = getattr(settings, "FILEBROWSER_EXTENSIONS", {
'Folder': [''],
'Image': ['.jpg','.jpeg','.gif','.png','.tif','.tiff'],
'Document': ['.pdf','.doc','.rtf','.txt','.xls','.csv'],
'Video': ['.mov','.wmv','.mpeg','.mpg','.avi','.rm'],
'Audio': ['.mp3','.mp4','.wav','.aiff','.midi','.m4p']
})
FileObject.filetype
https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/base.py#L214
will return 'Folder' if it's a directory, but if not determine from this dictionary. (The description "Allowed Extensions for File Upload" for this settings gives no hint about this other use)
At the same time,
https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/templates/filebrowser/include/filelisting.html
checks fileobject.filetype to see if it's a folder and show a Browse link in that case.
This leads to files that have no extension being shown as Folders, and clicking on them gives "Folder does not exist".
filelisting.html needs to check filobject.is_folder instead, which let's the storage's isdir() decide.
I don't think the 'Folder' type for an empty extension should be in the default settings either.
I saw that this was apparently fixed in r683... but using:
FILEBROWSER_VERSIONS_BASEDIR = "versions/"
and or
FILEBROWSER_VERSIONS_BASEDIR = "versions"
has no effect... image versions are still just generated in FILEBROWSER_DIRECTORY
The versions feature is very useful, but some sites (specially high-traffic) will adopt other strategies for generating thumbnails, rendering filebrowser less useful than it could be. Some sites also have to deal with legacy media, and that doesn't play well with filebrowser's notion of "versions".
It would be interesting to decouple the versions functionality from the core to allow it's usage for managing files only. This could be easily accomplished by providing simpler FileObject
and FileBrowserSite
classes that are unaware of versions, and then providing a filebrowser.versions
app that augments on that and provides the versioning methods, management commands and additional templates.
I made a fork without the versions features (since I didn't needed), and removing the unwanted code was very simple (the code is well decoupled already). If there's interest it can be used as a base for refactoring:
https://github.com/hcarvalhoalves/django-filebrowser
Sorry for opening a ticket without a patch, this is more of a suggestion. Since I won't use the versions functionality I don't have the time right now to make up a patch, but I wanted to move the idea forward.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
What revision of the FileBrowser are you using?
What version/revision of Django are you using?
Please provide any additional information below.
Also when using FileBrowseField in Admin, I get following error:
TemplateSyntaxError at /admin/filebrowser/browse/
Caught KeyError while rendering: u'Image'
Request Method:
GET
Request URL:
http://localhost:8000/admin/filebrowser/browse/?pop=1&type=Image
Django Version:
1.3
Exception Type:
TemplateSyntaxError
Exception Value:
Caught KeyError while rendering: u'Image'
Exception Location:
C:\virtEnvBase\wentzel1\lib\site-packages\filebrowser\templatetags\fb_tags.py in render, line 121
That line 121 reads:
{% selectable fileobject.filetype query.type %}
this looks different if used with FileInput or ClearableFileInput. and there´s also differences between the form and inlineforms.
Unescaped quote ( ' ) in i18n french cause syntax error in upload page, and french i18n unusable.
Error come from ' django-filebrowser / filebrowser / locale / fr / LC_MESSAGES / django.po' lignes 286 to 295 :
msgid "{file} has invalid extension. Only {extensions} are allowed."
msgstr ""
"{file} n'a pas une extension valide. Seules les extensions suivantes sont "
"autorisées : {extensions}."
==> n'a
msgid "{file} is too large, maximum file size is {sizeLimit}."
msgstr ""
"{file} est trop lourd, la taille maximale d'un fichier est {sizeLimit}"
==> d'un
Thanks for this great django-app and the fernch i18n anyway,
Regards,
filebrowser 3.4.0 (pip install latest)
if the Setting FILEBROWSER_VERSIONS_BASEDIR is not set no versions are generated.
default seems not working. set to something all is ok
Any thoughts on adding metadata fields to file details... Fields could be defined in settings... Title and Alternative Description would be particularly useful. Useful for accessibility, seo and various "slideshows" etc.
<img src="{{ version_medium }}" title="{{ meta_title }}" alt="{{ meta_alt }}" />
Media files are served up correctly both on the frontend and via filebrowser. When I try to upload a ~10MB file, it fails. However, small images are uploaded just fine. My upload limit is 100+ MB.
Using the latest stable (via PyPI)
I'm happy to provide you with debugging data --- I just don't know where to look.
Thanks
If read permissions are allowed outside uploads directory for the apache/server user, a user can dig files using relative links such as &dir=valid_directory/../../../../../
A patch might just add -- "if path.startswith('.') or '..' in path or ...", or convert the requested path to absolute and check against the absolute base directory. I don't know if it breaks any assumptions to lock a user to the UPLOADS though.
https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/functions.py
def get_path(path):
if path.startswith('.') or os.path.isabs(path) or not os.path.isdir(os.path.join(MEDIA_ROOT, DIRECTORY, path)):
return None
return path
I want to suggest the option of validating the image to be sent from the size specified in the validation.
Hello,
The Uploadify method for uploading takes quite a number of steps to upload images. Have you reviewed any alternatives that may improve the user experience, specifically
http://www.plupload.com/index.php
Thank you,
Alex
I'm running into an issue today getting Filebrowser running in my project.
I've got it configures in all locations according to the docs for settings and urls. The only thing different about my setup is that I'm using django-storages with s3boto for our media. I have sites.storage set accordingly.
This is the traceback I'm getting when trying to run the filebrowser tests:
$ ./manage.py test filebrowser
Traceback (most recent call last):
File "./manage.py", line 14, in
execute_manager(settings)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/south/management/commands/test.py", line 8, in handle
super(Command, self).handle(_args, *_kwargs)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/core/management/commands/test.py", line 37, in handle
failures = test_runner.run_tests(test_labels)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/test/simple.py", line 358, in run_tests
suite = self.build_suite(test_labels, extra_tests)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/test/simple.py", line 248, in build_suite
suite.addTest(build_suite(app))
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/test/simple.py", line 77, in build_suite
test_module = get_tests(app_module)
File "/Users/greg/.virtualenvs/newyork.com/lib/python2.6/site-packages/django/test/simple.py", line 35, in get_tests
test_module = import('.'.join(app_path + [TEST_MODULE]), {}, {}, TEST_MODULE)
File "/Users/greg/.virtualenvs/newyork.com/src/django-filebrowser/filebrowser/tests/init.py", line 2, in
from filebrowser.tests.base import FileObjectPathTests, FileObjectVersionTests, FileObjectUnicodeTests
File "/Users/greg/.virtualenvs/newyork.com/src/django-filebrowser/filebrowser/tests/base.py", line 17, in
from filebrowser.sites import site
File "/Users/greg/.virtualenvs/newyork.com/src/django-filebrowser/filebrowser/sites.py", line 524, in
site = FileBrowserSite(name='filebrowser')
File "/Users/greg/.virtualenvs/newyork.com/src/django-filebrowser/filebrowser/sites.py", line 109, in init
self.directory = DIRECTORY
File "/Users/greg/.virtualenvs/newyork.com/src/django-filebrowser/filebrowser/sites.py", line 118, in _directory_set
raise ImproperlyConfigured("Directory '%(dir)s' for the site %(app_name)s.%(name)s does not exist." % {'dir': val, 'app_name': self.app_name, 'name': self.name})
django.core.exceptions.ImproperlyConfigured: Directory '/Users/greg/dev/newyork.com/newyork/../static/filebrowser/' for the site filebrowser.filebrowser does not exist.
Any thoughts on adding an option to disable the removal of completed uploads in queue for Ajax Upload. The uploadify equivalent would be 'removeCompleted' : false.
I've tried everything I can think of with folder permissions, including setting 777 to everything. It doesn't seem to be throwing an error either.
When I try to serialize objects containing a FileBrowseField the resulting fixture does not include the directory path, only the filename. Here's an example:
[
{
"pk": 1,
"model": "calendar.image",
"fields": {
"title": "Test Image",
"image": "320x400_yellow.gif",
"created": "2011-09-22 14:27:33",
"modified": "2011-09-22 14:27:33",
"event": 1,
"alt": "Test Image",
"main": true,
"order": 0
}
}
]
Please note the original value for image is something like '/media/uploads/320x400_yellow.gif'.
The result is that any objects using FileBrowseField are not portable between servers using fixtures.
currently, the filebrowsefield only allows for selecting files. direct upload would be a nice feature.
issues:
removes need for Flash
I am using django-filebrowser 3.4.1 with django 1.3.1 and grappelli 2.3.6 that is using tinymce 3.4.2
Everytime I try to upload a file using filebrowser on Internet Explorer 9, 8, or 7 I get a message of "Failed" but the upload works fine (with the same file) on FireFox 8.0
FireFox call:
"POST /admin/filebrowser/upload_file/?csrf_token=e8d0b5d2e918188b66cfcfb0cebd9e79&csrf_name=csrfmiddlewaretoken&csrf_xname=X-CSRFToken&folder=&qqfile=001_05.png HTTP/1.1" 200 43
Internet Explorer call:
"POST /admin/filebrowser/upload_file/?csrf_token=682d458c6130355f60d38ff9382c03e9&csrf_name=csrfmiddlewaretoken&csrf_xname=X-CSRFToken&folder= HTTP/1.1" 500 88339
The 500 error that I get is:
Exception Value: 'NoneType' object has no attribute 'replace'
..\ext\filebrowser\sites.py in _upload_file line 495
I did a 'print request.POST.get('file_name')' and got 'None' in the console when using IE
Traceback (most recent call last):
File "..\ext\filebrowser\tests\sites.py", line 232, in runTest
test_detail(self)
File "..\ext\filebrowser\tests\sites.py", line 139, in test_detail
test.assertTrue(test.site.storage.exists(path))
AssertionError: False is not true
'print path' returns the correct path for three files:
tmp_test_0\testimage_large.jpg
tmp_test_0\testimage_admin_thumbnail.jpg
tmp_test_0\testimage_project_image.jpg
'print test.site.storage.exists(path)' returns:
True
True
False
I'm not sure when exaclty this happens, but I'm guessing during upload of non-ascii filename.
Environment:
Request Method: POST
Request URL: http://www.inre.si/admin/filebrowser/check_file/
Traceback:
File "/srv/www.inre.si/eggs/Django-1.3.1-py2.7.egg/django/core/handlers/base.py" in get_response
response = callback(request, _callback_args, *_callback_kwargs)
resp = view_func(_args, *_kwargs)
return view_func(_args, *_kwargs)
if os.path.isfile(smart_unicode(os.path.join(MEDIA_ROOT, DIRECTORY, folder, v))):
st = os.stat(path)
Exception Type: UnicodeEncodeError at /admin/filebrowser/check_file/
Exception Value: ('ascii', u'/srv/www.inre.si/inrev2/media/uploads/obrazlo\u017eitev_seminarja_20.10.2011.pdf', 45, 46, 'ordinal not in range(128)')
I'm trying to use easy-thumbnails with django-filebrowser. In my model I have a FileBrowseField. Then in my template I'm loading the thumbnail template tag and passing the file tot it. Trouble is, FileBrowseField returns a FileObject, whereas thumbnail expects a FieldFile. (Or something like that - I'm a bit new to all this).
Is there a simple way to do this - allow an image to be added via a FileBrowseField in admin but return a conventional File object (not a FileObject!) in the template?
when on a local machine or on a development-server, you might not have all the images available that are on your production instance (downloading these files on a regular basis is not an option).
therefore, it would be cool to have an additional option for every version ... something like "development" (think about the term) in order to show another image if the filebrowser-setting for this option as true.
The french translation makes upload window crash. Deleting the filebrowser/locale/fr/ directory "solve" the problem.
Hello,
After installing django-filebrowser and running test I got 6 ERRORS because the directory "uploads/" is hardcoded in the test. I created this path by myself and ran tests again. This time I got 6 FAILURES because I have setted MEDIA_URL = "user-media/" instead "media/", and this URL is hardcoded in tests.
For example: filebrowser/tests/base.py LINE 36
https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/tests/base.py#L36
Thanks,
If a user uploads a file ending in "_big.jpg" it will be treated as the big version of "house.jpg" which doesn't exist. I would recommend automatically adding a timestamp to the end of the filename if it matches one of the naming conventions you are using for the different versions.
the new uploader needs some love.
$ ./manage.py test filebrowser
Traceback (most recent call last):
File "./manage.py", line 14, in <module>
execute_manager(settings)
File "/home/artem/prog/dev/project/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/artem/prog/dev/project/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/artem/prog/dev/project/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/artem/prog/dev/project/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 67, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/artem/prog/dev/project/env/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/artem/prog/dev/project/env/lib/python2.7/site-packages/django_pdb/management/commands/test.py", line 2, in <module>
from django_pdb.testrunners import PdbTestSuiteRunner
File "/home/artem/prog/dev/project/env/lib/python2.7/site-packages/django_pdb/testrunners.py", line 70, in <module>
class PdbTestResult(ExceptionTestResultMixin, unittest._TextTestResult):
AttributeError: 'module' object has no attribute '_TextTestResult'
There's a typo in filebrowser in settings.py on line 107. It should read:
FB_DEFAULT_PERMISSIONS = getattr(settings, "FB_DEFAULT_PERMISSIONS", 0664)
Instead it reads:
FB_DEFAULT_PERMISSIONS = getattr(settings, "FILEBROWSER_SEARCH_TRAVERSE", 0664)
I´m not sure we´ve decided for that decision, but it doesn´t seem to be possible anymore to generate a version based on image.path (you need to use image instead). which is also true for e.g. the fileinput-widget.
Browsing for an image in TinyMCE image plugin, django-filebrowser will not popup. Tested with 3.3.0 also, where it works as expected.
https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/templatetags/fb_versions.py#L43
assumes that the context variable "site" (which is in my case the current django-site) is the filebroswer site.
would suggest to at least check which type the site variable is instead of blindly assuming its the filebrowser site.
Could you please make the grappelli integration optional?
To invoke the bug:
Result: In my case, I get a 404 error for a page: http://127.0.0.1:8000/admin/blog/article/3/uploads/Pics/title_photo.jpg. You can see that the relative URL "uploads/Pics/title_photo.jpg" of the file gets appended to the admin URL and not to MEDIA_URL.
The cause of this bug is the javascript function FileSubmit() in FB_FileBrowseField.js which sets the href attribute of a preview link to a relative url of the given file.
with thousands of items, the changelist is somehow slow.
Hey there, I hate logging this as an issue as it may in fact be me, but having worked on this for a week now, installing/uninstalling everything to no avail ... Any help would be amazing. I'm receiving the below 6 FAILS using:
Python 2.6.5
Django 1.3.1
Grappelli 2.3.5
filebrowser 3.4.1
MEDIA_ROOT = "/srv/django/client_dir/assets/" - (Set to CHMOD 777 including all underneath)
MEDIA_URL = "/assets/"
STATIC_URL = "/static/"
STATIC_ROOT = "/srv/django/static/"
Thanks again,
Hope all is well ...
Errors:
Creating Test for the FileBrowser site: filebrowser
Creating test database for alias 'default'...
FFFFFF.........../usr/lib/python2.6/site-packages/django/core/context_processors.py:27: DeprecationWarning: The context processor at django.core.context_processors.auth
is deprecated; use the path django.contrib.auth.context_processors.auth
instead.
DeprecationWarning
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/filebrowser/tests/base.py", line 58, in test_posix_paths
self.assertEqual(f.url, '/media/uploads/testdir/testfile.jpg')
AssertionError: '/assets/uploads/testdir/testfile.jpg' != '/media/uploads/testdir/testfile.jpg'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/filebrowser/tests/base.py", line 43, in test_windows_paths
self.assertEqual(f.url, '/media/uploads/testdir/testfile.jpg')
AssertionError: '/assets/uploads/testdir/testfile.jpg' != '/media/uploads/testdir/testfile.jpg'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/filebrowser/tests/base.py", line 109, in test_posix_paths
self.assertEqual(f.url, filepath_to_uri('/media/uploads/$%^&/測試文件.jpg'))
AssertionError: '/assets/uploads/%24%25%5E%26/%E6%B8%AC%E8%A9%A6%E6%96%87%E4%BB%B6.jpg' != '/media/uploads/%24%25%5E%26*/%E6%B8%AC%E8%A9%A6%E6%96%87%E4%BB%B6.jpg'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/filebrowser/tests/base.py", line 93, in test_windows_paths
self.assertEqual(f.url, filepath_to_uri('/media/uploads/$%^&/測試文件.jpg'))
AssertionError: '/assets/uploads/%24%25%5E%26/%E6%B8%AC%E8%A9%A6%E6%96%87%E4%BB%B6.jpg' != '/media/uploads/%24%25%5E%26*/%E6%B8%AC%E8%A9%A6%E6%96%87%E4%BB%B6.jpg'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/filebrowser/tests/base.py", line 158, in test_posix_paths
self.assertEqual(f.url, '/media/uploads/testdir/testfile.jpg')
AssertionError: '/assets/uploads/testdir/testfile.jpg' != '/media/uploads/testdir/testfile.jpg'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/filebrowser/tests/base.py", line 143, in test_windows_paths
self.assertEqual(f.url, '/media/uploads/testdir/testfile.jpg')
AssertionError: '/assets/uploads/testdir/testfile.jpg' != '/media/uploads/testdir/testfile.jpg'
Ran 18 tests in 7.172s
FAILED (failures=6)
Destroying test database for alias 'default'...
Using filebrowser in your django project or running the test with python manage.py test filebrowser
gives this error:
...
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/posixpath.py", line 67, in join
elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
See also this stack overflow question: http://stackoverflow.com/questions/6780404/django-filebrowser-getting-an-attributeerror-nonetype-object-has-no-attribute
The fix is to prepend a \
before filebrowser\
in line 28 and line 29 in the django_filebrowser-3.n-pyN.egg/filebrowser/settings.py file.
Please include this (or another) fix for this problem in your main branch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.