django-filer

Django-filer, URL that is 'seperate' from admin

旧城冷巷雨未停 提交于 2020-07-10 09:08:03
问题 I am trying to set up django-filer on my website. I cannot figure out how to get the URLS to be separate from the admin site on the website. localhost:8000/admin/filer/folder/ Is where it wants to go now, which of course requires someone to have complete admin access in the /admin portion. I want them to have just filer access and be able to see the site. I have my base urls.py as: urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('accounts.urls')), # new path(

Django-filer, URL that is 'seperate' from admin

你。 提交于 2020-07-10 09:06:46
问题 I am trying to set up django-filer on my website. I cannot figure out how to get the URLS to be separate from the admin site on the website. localhost:8000/admin/filer/folder/ Is where it wants to go now, which of course requires someone to have complete admin access in the /admin portion. I want them to have just filer access and be able to see the site. I have my base urls.py as: urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('accounts.urls')), # new path(

How to programmatically fill or create filer.fields.image.FilerImageField?

本小妞迷上赌 提交于 2020-01-01 10:03:24
问题 I have some model class with a filer.fields.image.FilerImageField as a field. from filer.fields.image import FilerImageField class ModelName(Model): icon = FilerImageField(null=True, blank=True) How to programmatically create or fill an icon field if I have a local path to an image file? 回答1: You can approach it this way: from django.contrib.auth.models import User from django.core.files import File from filer.models import Image filename = 'file' filepath = 'path/to/file' user = User.objects

Django-Filer FilerImageField how to use widget outside admin

做~自己de王妃 提交于 2019-12-12 02:25:13
问题 I want to use the FilerImageField in one of my model field and want the user to edit outside the admin area but when I try to load it, the widget doesn't work correctly and in the browser console I get and error in the javascript generated: Uncaught TypeError: Cannot read property 'jQuery' of undefined In here: <script type="text/javascript" id="id_featured_image_javascript"> django.jQuery(document).ready(function(){ var plus = django.jQuery('#add_id_featured_image'); if (plus.length){ plus

django filer - ImportError: cannot import name mixins

怎甘沉沦 提交于 2019-12-11 01:54:34
问题 I have a django 1.4 installation and I have django-cms running. I'm try to install filer but when I syncdb or runserver I keep having this error. from filer.models import mixins ImportError: cannot import name mixins In my setting.py I have: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', # Uncomment the next line to enable the admin: 'django.contrib.admin',

Using django filer out of admin area (or an alternative library)

随声附和 提交于 2019-12-10 13:52:46
问题 Django filer is an awesome tool for managing files, it detects duplicates and organizes files based on their hashes in folders, has great UI for managing files and folders and handles file history and permissions. I read some of the source code and realized it extensively uses django admin features in code and in templates; is there any way to use these features for non-staff members that are logged in? To give them tools for uploading and managing their own files and folders in their

Django-Filer: How to invoke upload widget outside admin

拜拜、爱过 提交于 2019-12-10 13:15:23
问题 How do I invoke the upload widget outside Admin? Using the standard form below does not work. The widget is corrupted. forms.py class PhotoAdd(forms.ModelForm): class Meta: model = Photo fields = ('ImageFilerField',) views.py def photoadd(request): context={} context['form'] = PhotoAdd() render(request, 'template.html', context) template.html {{ form }} There is absolutely no reference to this in the documentation. How can I upload photos outside admin? Edit: (added generated code from django