3

I am deploying site to divio server with django and django-cms. I do R&D but not found much information about this.

Facing Error: Reverse for 'filer_folder_changelist' not found. 'filer_folder_changelist' is not a valid view function or pattern name.

Exception Type: NoReverseMatch Exception Value: Reverse for 'filer_folder_changelist' not found. 'filer_folder_changelist' is not a valid view function or pattern name. Exception Location: /virtualenv/lib/python3.5/site-packages/django/urls/resolvers.py in _reverse_with_prefix, line 497 Python Executable: /virtualenv/bin/uwsgi

{% cms_toolbar %}

**urls.py:**

] + aldryn_addons.urls.patterns() + i18n_patterns(
    # test urls
    url(r'^admin-cms/', include(admin.site.urls)),  # NOQA
    url(r'^django-cms/', include('cms.urls')),
    url(r'^django-cms1/',include('aldryn_django_cms.urls')),
    url(r'^test4/$',views.test4,),
    # ends here ~ test urls
    # add your own i18n patterns here
    *aldryn_addons.urls.i18n_patterns()  # MUST be the last entry!
)

cms_toolbar.py

def populate(self):
    media_library = _('Media library')

    admin_menu = self.toolbar.get_or_create_menu(ADMIN_MENU_IDENTIFIER)
    admin_menu.add_sideframe_item(
        media_library,
        url=reverse('admin:filer_folder_changelist'),
        position=self.get_insert_position(admin_menu, media_library)
    )
ruddra
  • 50,746
  • 7
  • 78
  • 101
  • 2
    I think `filer_folder_changelist` isn't the url name, it should `parent_url_name:filer_folder_changelist`, which is defined in `urls.py` which sits beside `settings.py` – ruddra Nov 06 '18 at 06:10
  • 1
    thanks for answer but sorry, not able to understand, I update my question with urls.py. If possible then please take a look on urls.py – Shubham Kandiyal Nov 06 '18 at 06:25

2 Answers2

1

Did some research and found this:

  1. Need to install django-admin-shortcuts
  2. Add shortcut to your settings.py:

      ADMIN_SHORTCUTS = [
        {
            'shortcuts': [
                {
                    'url_name': 'admin:filer_folder_changelist',
                    'title': _('Files'),
                },
    
            ]
        },
    ]
    

You can check out similar implementation in here. Hope it helps!!

ruddra
  • 50,746
  • 7
  • 78
  • 101
1

I fixed this error by change settings.py.. Add below things in installed app in settings.py:

INSTALLED_APPS.extend([
    .....
    'djangocms_text_ckeditor',
    'filer',
    'easy_thumbnails',
    'djangocms_column',
    'djangocms_file',
    'djangocms_link',
    'djangocms_picture',
    'djangocms_style',
    'djangocms_snippet',
    'djangocms_googlemap',
    'djangocms_video',
    .....       
)]
  • 2
    If you have installed Django Filer as a Divio Cloud addon rather than manually, there should be no need to manage the settings manually. How have you installed it? – Daniele Procida Nov 07 '18 at 23:52
  • 1
    Thanks for answer.. I installed aldryn-django-cms via divio addon – Shubham Kandiyal Nov 08 '18 at 06:20
  • 1
    facing another issue.. relation "placeholder_db" does not exist when I click on placeholder_db from admin panel... **The above exception (relation "vacations_edit_django_templates3" does not exist LINE 1: ..._edit_django_templates3"."my_placeholder_id" FROM "vacations... ^ ) was the direct cause of the following exception:** – Shubham Kandiyal Nov 08 '18 at 07:43
  • 2
    But how did you install *Django Filer*? – Daniele Procida Nov 08 '18 at 12:21
  • using default aldryn divio addons – Shubham Kandiyal Nov 09 '18 at 04:34
  • I make some changes but still not able to add and edit content. Just get message: **double click to edit** (when hover on content) but **I want double click to edit text** – Shubham Kandiyal Nov 09 '18 at 04:47
  • 2
    If you installed Django Filer as a Divio Cloud addon (it's there by default in django CMS projects) you don't need to manage any settings or URL patterns for it manually. You definitely don't need to manage it in `INSTALLED_APPS` manually, as https://stackoverflow.com/a/53184174/2422705 suggests. – Daniele Procida Nov 09 '18 at 08:59
  • yes.. i remove this from installed app... its always give me duplicate app.. now its working fine.. please help me to fix below issue, I check everything... I make some changes but still not able to add and edit content. Just get message: double click to edit (when hover on content) but I want double click to edit text... Please check below images: 1.) [ https://preview.ibb.co/k8gdNq/november-5-2018-1.png ] 2.) [ https://preview.ibb.co/jmMW8V/november-5-2018-2.png ] – Shubham Kandiyal Nov 11 '18 at 04:28