django-grappelli

TinyMCE installation gives warning

半城伤御伤魂 提交于 2019-12-13 00:39:06
问题 I did pip install django-tinymce and it gives this warning Downloading django-tinymce-1.5.1.tar.gz (2.4MB): 2.4MB downloaded Running setup.py egg_info for package django-tinymce warning: no previously-included files found matching '*.pyc' Installing collected packages: django-tinymce Running setup.py install for django-tinymce warning: no previously-included files found matching '*.pyc' Successfully installed django-tinymce Cleaning up... What does this error means I have have also installed

Django FileBrowser 400 Error

安稳与你 提交于 2019-12-13 00:15:54
问题 I'm getting a 400 error when trying to access the /admin/filebrowser/browse/ page. I followed the instructions as per https://django-filebrowser.readthedocs.org/en/3.5.2/quickstart.html and have my URLs and installed apps configured correctly. What I'm not too sure about are the media paths in settings.py; FILEBROWSER_DIRECTORY = os.path.join(BASE_DIR, '/ogencat/MEDIA/uploads') FILEBROWSER_MEDIA_ROOT = os.path.join(BASE_DIR, '/ogencat/MEDIA') FILEBROWSER_MEDIA_URL = '/MEDIA/' I have folder in

Django Grappelli Error

本秂侑毒 提交于 2019-12-12 12:00:29
问题 I'm having issues with Django Grappelli. It seems to be loading the CSS just fine, but the styling seems... off. Perhaps some pictures would clarify what I mean: 回答1: I just ran into this. You need to make sure that 'grappelli' appears before 'django.contrib.admin' in INSTALLED_APPS . 回答2: what version of Django and Grappelli are you using? Have you followed the readme's? Grappelli uses it's own CSS on top of the default admin css, so it looks like it isn't loading the grappelli css. If you

Django Admin Column Sort Descending

白昼怎懂夜的黑 提交于 2019-12-11 01:35:55
问题 When using Django admin with grappelli I would like that a click on a column header will sort the table by descending order. (I don't want a default ordering to the columns by defining the ordering field in the Model Meta Class.) The default behavior is Ascending. The first click should order like this: 回答1: Rewrite the def result_headers(cl) add these 2 lines: ..... ..... th_classes = ['sortable'] order_type = '' #new lines default_order_type = getattr(attr, "admin_order_first_type", None)

Django grappelli seems unable to see all its media files

て烟熏妆下的殇ゞ 提交于 2019-12-10 14:01:10
问题 I have django 1.4 and grappelli 2.4.3 running on an Ubuntu server, which I'm viewing over a Windows networked system when in production. Everything works fine on the development server when I view it on the Ubuntu machine using RDP. The relevant parts of settings.py are: STATIC_ROOT = os.path.join(os.path.dirname(__file__), '../03_static_files/collected/') STATIC_URL = '/static/' STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/static". # Always use forward

Django Grappelli Autocomplete M2M

青春壹個敷衍的年華 提交于 2019-12-08 03:34:48
问题 I followed the docs down to the letter and can't get the M2M autocomplete lookup to work in Grappelli. #models.py #main model class Entry(models.Model): title = models.CharField(max_length=60) content = models.TextField() keywords = models.ManyToManyField(Keyword, blank=True) #model I want to be searched through while typing in the autocomplete field class Keyword(models.Model): name = models.CharField(max_length=30) @staticmethod def autocomplete_search_field(): return ('id__iexact', 'name_

Django Grappelli Autocomplete M2M

☆樱花仙子☆ 提交于 2019-12-06 15:44:32
I followed the docs down to the letter and can't get the M2M autocomplete lookup to work in Grappelli. #models.py #main model class Entry(models.Model): title = models.CharField(max_length=60) content = models.TextField() keywords = models.ManyToManyField(Keyword, blank=True) #model I want to be searched through while typing in the autocomplete field class Keyword(models.Model): name = models.CharField(max_length=30) @staticmethod def autocomplete_search_field(): return ('id__iexact', 'name__icontains',) def __str__(self): return '%s' % (self.name) then in admin.py : class EntryAdmin(admin

Django-grappelli admin: No reverse match error

孤人 提交于 2019-12-05 00:17:12
I've been working on a django project for a while now that uses grappelli for the admin and all of a sudden today my change_form.html template is throwing the following error: Caught NoReverseMatch while rendering: Reverse for "grp_related_lookup" with arguments '()' and keyword arguments '{}' not found. The offending line of code is line 38: 37 $.each(related_lookup_fields_fk, function() { 38 $("#id_" + this).grp_related_fk({lookup_url:"{% url grp_related_lookup %}"}); 39 }); which is preceded by this bit of code: var related_lookup_fields_fk = {% get_related_lookup_fields_fk adminform.model

Django Grappelli Tabular Inline add new row TinyMCE textfield not editable

杀马特。学长 韩版系。学妹 提交于 2019-12-03 12:20:58
I am using django Grappelli skin for my project. I have a ModelAdmin with tabular inline function. I use extra = 0 to prevent auto insert blank row, when the page is loaded. It works fine. Now, when I click on the + sign to insert new row, the row is loaded, but the tinymce textfield is not editable. Anyone know what is the reasons and how to solve this problem? After reading the document: http://django-grappelli.readthedocs.org/en/latest/customization.html#using-tinymce I notice: Using TinyMCE with Inlines is a bit more tricky because of the hidden empty-form. You need to write a custom

django-cms + grappelli

北慕城南 提交于 2019-12-01 16:19:52
If anyone knows how to make django-cms play with grappelli, please give some tips Well I've just gone through a fairly epic adventure, the story of which might be of some use to you. The end point of said adventure was getting django-cms 2.1.3 working with django-filebrowser-no-grappelli . Whilst that may sound in fact like the opposite of what you want, I ended up there because what I really wanted was to get django-cms working with filebrowser. Without grappelli though the standard django-filebrowser does not work as expected. But with grappelli django-cms does not work as expected. So

工具导航Map