{"id":13745266,"url":"https://github.com/miguelramos/django-media-manager","last_synced_at":"2025-03-21T04:32:25.520Z","repository":{"id":7353345,"uuid":"8677547","full_name":"miguelramos/django-media-manager","owner":"miguelramos","description":"Django Filebrowser Updated to 1.8","archived":false,"fork":false,"pushed_at":"2021-06-10T17:38:29.000Z","size":1055,"stargazers_count":42,"open_issues_count":2,"forks_count":31,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-17T20:56:13.171Z","etag":null,"topics":["ckeditor","django-filebrowser","django-suit","filebrowser","redactor","suit-ckeditor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelramos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-09T22:58:12.000Z","updated_at":"2024-10-20T14:40:35.000Z","dependencies_parsed_at":"2022-08-26T23:11:11.002Z","dependency_job_id":null,"html_url":"https://github.com/miguelramos/django-media-manager","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelramos%2Fdjango-media-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelramos%2Fdjango-media-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelramos%2Fdjango-media-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelramos%2Fdjango-media-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelramos","download_url":"https://codeload.github.com/miguelramos/django-media-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244738474,"owners_count":20501856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ckeditor","django-filebrowser","django-suit","filebrowser","redactor","suit-ckeditor"],"created_at":"2024-08-03T05:01:26.201Z","updated_at":"2025-03-21T04:32:25.056Z","avatar_url":"https://github.com/miguelramos.png","language":"Python","funding_links":[],"categories":["Unsorted"],"sub_categories":["Other API"],"readme":"## WITHOUT TIME TO MAINTAIN\n\nAt the moment i'm without time to maintain this great project. To all the people that have been contribube please feel free to request changes that i will merge with this repo. To anyone who wants to maintain this project just pm a message.\n\n# Changelog\n\n### 08-03-2017 v3.5.2\n*   Support Django 2+\n\n### 08-03-2017 v3.5.0\n*   Removed flash uploader. Instead of this added drag’n’drop file uploads with image previews.\n\n### 06-10-2016 v3.4.1\n*   Mandatory django version \u003e= 1.8\n\n### 25-08-2014 v3.4.0\n*   Uses Pillow now.\n*   Python 3 only now.\n*   Integration with the Six Foot Chirping Malachite Sunbird working.\n\n### 02-07-2013\n*\tRefactor and resolved an issue on window.opener event.\n*\tRefactor FB_Redactor plugin.\n\n### 28-06-2013\n\n*\tSupport for django-suit\n*\tSupport for django-suit-ckeditor\n*\tSupport for django-suit-redactor\n*\tSupport for custom user model\n*\tMandatory django version higher 1.5\n\n## Basic Installation\n\n\tpip install django-media-manager\n\tor\n\tpip install git+https://github.com/miguelramos/django-media-manager.git\n\n*\tAdd filebrowser to INSTALLED_APPS before django.contrib.admin.\n*\tAdd the following line _before_ the admin URLS:\n*\t\t(r'^admin/filebrowser/', include('filebrowser.urls'))\n*\tCollect static files\n*\tAdd __uploads/__ folder to media folder or customize this setting\n\n## Suit support\nThe application have support for [django-suit](https://github.com/darklow/django-suit) template. To use it add on your settings files the following config:\n\n\u003ccode\u003eFILEBROWSER_SUIT_TEMPLATE = True\u003c/code\u003e\n\nFilebrowser will now use templates for django suit.\n\n## Suit CKEditor/Redactor\nTo use filebrowser on [django-suit-ckeditor](https://github.com/darklow/django-suit-ckeditor) or [django-suit-redactor](https://github.com/darklow/django-suit-redactor) please follow the example bellow:\n```python\n#models.py\n\nfrom django.db import models\nfrom filebrowser.fields import FileBrowseField\n\nclass MediaPublication(models.Model):\n    ckeditor = models.TextField(help_text='Editor CKEditor')\n    redactor = models.TextField(help_text='Editor Redactor')\n    image = FileBrowseField(\"Image\", max_length=200, blank=True, null=True)\n    image_initialdir = FileBrowseField(\"Image (Initial Directory)\", max_length=200, directory=\"images/\", blank=True, null=True)\n    image_extensions = FileBrowseField(\"Image (Extensions)\", max_length=200, extensions=['.jpg'],\n                               help_text=\"Only jpg-Images allowed.\", blank=True, null=True)\n    image_format = FileBrowseField(\"Image (Format)\", max_length=200, format='Image', blank=True, null=True)\n    pdf = FileBrowseField(\"PDF\", max_length=200, directory=\"documents/\", extensions=['.pdf'], format='Document',\n                  blank=True, null=True)\n\n    class Meta:\n\tordering = ['image',]\n\tverbose_name = 'publication'\n\tverbose_name_plural = 'publications'\n```\n\nTo use on admin you need to do some litle tweeks:\n\n```python\n#admin.py\nfrom django.contrib import admin\nfrom django.forms import ModelForm, Media\nfrom suit_ckeditor.widgets import CKEditorWidget\nfrom suit_redactor.widgets import RedactorWidget\n\nfrom .models import MediaPublication\n\n\nclass Editor(ModelForm):\n    class Meta:\n\twidgets = {\n    \t'ckeditor': CKEditorWidget(editor_options={'startupFocus': True}),\n    \t'redactor': RedactorWidget(editor_options={\n        \t'lang': 'en',\n        \t'plugins': ['filebrowser']\n    \t}),\n\t}\n\n    class Media:\n\tjs = ('filebrowser/js/FB_CKEditor.js', 'filebrowser/js/FB_Redactor.js')\n\tcss = {\n    \t'all': ('filebrowser/css/suit-filebrowser.css',)\n\t}\n\nclass AdminPublication(admin.ModelAdmin):\n    form = Editor\n\n    fieldsets = (\n\t(None, {\n    \t'classes': ('suit-tab suit-tab-media',),\n    \t'fields': ['image', 'image_initialdir', 'image_extensions', 'image_format', 'pdf'],\n\t}),\n\t('CKEditor', {\n    \t'classes': ('full-width',),\n    \t'fields': ('ckeditor',)\n\t}),\n\t('Redactor', {\n    \t'classes': ('full-width',),\n    \t'fields': ('redactor',)\n\t}),\n    )\n\n    list_display = ('thumbnail', 'image_extensions', 'pdf')\n    suit_form_tabs = (('media', 'Media'),)\n\n    def thumbnail(self, obj):\n\tif obj.image:\n    \treturn '\u003cimg src=\"%s\" /\u003e' % obj.image.url_thumbnail\n\telse:\n    \treturn \"\"\n    thumbnail.allow_tags = True\n\n\nadmin.site.register(MediaPublication, AdminPublication)\n```\n\nThe most important things are on ModelForm (Media and Widgets). To use browser on CKEditor and have the button to navigate on filebrowser you only need to add the js file to Media\n\nFor Redactor you will have to add the plugin option on the widget (plugin name is mandatory - _filebrowser_ ) and add the css and js file to media.\n\nThat's it you are now ready to send all kind of files to ckeditor or redactor.\n\n### Screenshots\n\n![](https://dl.dropboxusercontent.com/u/14340361/works/filebrowser.jpeg)\n![](https://dl.dropboxusercontent.com/u/14340361/works/filebrowser-versions.jpeg)\n![](https://dl.dropboxusercontent.com/u/14340361/works/ckeditor-browser.jpeg)\n![](https://dl.dropboxusercontent.com/u/14340361/works/ckeditor-bt-browser.jpeg)\n![](https://dl.dropboxusercontent.com/u/14340361/works/ckeditor-image.jpeg)\n![](https://dl.dropboxusercontent.com/u/14340361/works/redactor-pop-up.jpeg)\n![](https://dl.dropboxusercontent.com/u/14340361/works/redactor-import.jpeg)\n![](https://dl.dropboxusercontent.com/u/14340361/works/redactor-files-select.jpeg)\n\n#### TODO\n\nPlease this is a work in progress. If you have ideas or want to make it better please fel free to pull requests.\n\n*\tAdd more options on thumbs sizes\n\n### More Info\n\nYou can find the original documentation of django-filebrowser and all settings in [Google Code repo](https://code.google.com/p/django-filebrowser/w/list).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelramos%2Fdjango-media-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelramos%2Fdjango-media-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelramos%2Fdjango-media-manager/lists"}