django-grappelli

Django Grappelli Tabular Inline add new row TinyMCE textfield not editable

早过忘川 提交于 2020-01-22 13:39:25
问题 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

django modeladmin, readonly_fields and boolean fields

a 夏天 提交于 2020-01-06 01:52:06
问题 I've a simple model with a boolean field in it, and the related admin view: # in models.py class MyModel(models.Model): ... my_field = models.BooleanField(...) # in admin.py class MyModelAdmin(admin.ModelAdmin): readonly_fields ("my_field", ...) My problem is that now my boolean field appears always empty, independently from the actual value of the field itself. I didn't find any solution to this problem, does it happen only to me? I don't know if it may be relevant, but I'm using grappelli =

Django-CMS with Grappelli messed up the layout for admin cms pages

半腔热情 提交于 2019-12-23 06:06:05
问题 I just installed grappelli into a Django-CMS site by following the standard routine - pip install django-grappelli , add it to INSTALLED_APPS , add in the url pattern, then syncdb and collectstatic . However, although all the other pages in the admin area look great with the new "theme", the layout for CMS Pages settings in Django-CMS (the drag 'n drop interface) are all messed up. Why is that, and is there a fix for this, yet? Thanks. EDIT: Thanks, Brandon for your reply. Is there a way to

Django-grappelli admin: No reverse match error

Deadly 提交于 2019-12-22 02:56:17
问题 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

django-cms + grappelli

依然范特西╮ 提交于 2019-12-19 14:42:13
问题 If anyone knows how to make django-cms play with grappelli, please give some tips 回答1: 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-cms + grappelli

柔情痞子 提交于 2019-12-19 14:40:32
问题 If anyone knows how to make django-cms play with grappelli, please give some tips 回答1: 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

How to filter a dropdownlist in Django's admin when a selection is made on another dropdownlist

自作多情 提交于 2019-12-19 05:46:09
问题 I have two dropdownlists in a Django admin site. For example, I have SelectCountry and SelectRegion. Region has a foreignkey relationship to Country. How do I ensure that when a Country is selected, the Regions are filtered based on that Country? N.B: I am using django-grappelli for my admin backend as well. Any ideas will be appreciated. Thanks. 回答1: As DrMeers hints at, use django-smart-selects. No point in re-inventing the wheel. 来源: https://stackoverflow.com/questions/9853595/how-to

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