FeinCMS gallery plugin setup problem

133 views
Skip to first unread message

vvv...@gmail.com

unread,
Apr 8, 2013, 7:58:53 AM4/8/13
to django-...@googlegroups.com
I need to add gallery on my site.
I found this plugin: https://github.com/feinheit/feincms_gallery
Made all the instructions in Install section but I get an error when trying to add a gallery in admin panel.

NoReverseMatch at /admin/gallery/gallery/add/

 
Reverse for '"gallery_admin_thumbnail"' with arguments '()' and keyword arguments '{}' not found.
     
Request Method:GET
Request URL:http://127.0.0.1:8000/admin/gallery/gallery/add/?_popup=1
Django Version:1.4.2
Exception Type:NoReverseMatch
Exception Value:
Reverse for '"gallery_admin_thumbnail"' with arguments '()' and keyword arguments '{}' not found.
Exception Location:C:\Python27\Lib\site-packages\django\template\defaulttags.py in render, line 424
Python Executable:C:\Python27\python.exe

Im using Django 1.4.2, Feincms 1.7.4 and latest Feincms gallery plugin I think its 1.1.0.

I have extracted gallery application in my project in folder 'gallery', added code in my urls.py:
urlpatterns += patterns('',
   
# Gallery
    url
(r'^gallery/', include('gallery.urls')),
)

And added 'gallery' in INSTALLED_APPS.

running script: manage.py show_urls - renders all the urls and one of them is
/gallery/thumbnail/     gallery.admin.admin_thumbnail   gallery_admin_thumbnail

Thanks for help.
Message has been deleted

vvv...@gmail.com

unread,
Apr 8, 2013, 8:05:25 AM4/8/13
to django-...@googlegroups.com
I created ContentType for Page module and executed syncdb as well.

Simon Bächler

unread,
Apr 9, 2013, 3:01:58 AM4/9/13
to django-...@googlegroups.com
Hi

Are you using the very latest version of feincms_gallery? 
Maybe the path to gallery is bad. Can you start the shell and try 'import gallery'? 

I have recently updated the module and it is working here.

Regards
Simon

vvv...@gmail.com

unread,
Apr 9, 2013, 5:02:00 AM4/9/13
to django-...@googlegroups.com
Hi Simon.
I have downloaded the latest feincms_gallery zip archive.
Unpacked it and places the folder 'gallery' in my app. So 'import gallery' doesn't give any error...
There was a script setup.py in zip archive maybe it needs to be executed?
I'm new to django and feincms so i dont know how to solve problem because google doesnt show me much about this error :(

vvv...@gmail.com

unread,
Apr 9, 2013, 6:37:59 AM4/9/13
to django-...@googlegroups.com
Here is my urls.py: http://pastebin.com/Xi6JSdik

vvv...@gmail.com

unread,
Apr 14, 2013, 12:56:56 PM4/14/13
to django-...@googlegroups.com
Still cant fix this. Could anyone help me please?

sbaechler

unread,
Apr 14, 2013, 1:14:58 PM4/14/13
to django-...@googlegroups.com
Put the gallery URL entry before the feincms.urls entry. feincms.urls should be the last entry in your urls.py.

I recommend you wrap the media and static url patterns in an if clause:

# static media
if settings.DEBUG:
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
            'show_indexes': True,
        }),
    )

Regards
Simon 

vvv...@gmail.com

unread,
Apr 15, 2013, 5:10:17 AM4/15/13
to django-...@googlegroups.com
Thanks for your answer Simon but it didn't solve the problem.
Gallery URL entry is in front of the feincms URL entry and I get the same error. If I put gallery URL entry after feincms.urls I get Page not found 404 error.

The reverse url is executed in template C:\Python27\Lib\site-packages\gallery\templates\admin\gallery\gallery\change_form.html, error at line 12
jQuery.post('{% url "gallery_admin_thumbnail" %}',

I'm desperate now :(

Simon Bächler

unread,
Apr 15, 2013, 5:23:52 AM4/15/13
to django-...@googlegroups.com
I just noticed that the url tag has quotes which means you need Django 1.5. The syntax has changed there. If you want to stick with 1.4 you could just remove the quotes from the url template tag.

Regards
Simon

vvv...@gmail.com

unread,
Apr 15, 2013, 6:01:39 AM4/15/13
to django-...@googlegroups.com
Great thanks to you Simon for helping!
Next time I'll pay more attention to versions :)
Reply all
Reply to author
Forward
0 new messages