Try changing the reverse() call to just reverse('imagelist'). I believe
reversing using the full view import path has been deprecated/removed.
That, and you named the URL 'imagelist', may as well refer to it by name.
;-)

If that doesn't work, please post the error and entire traceback that you
are receiving.

-James
On Nov 7, 2015 9:53 AM, "Chris Davies-Barnard" <[email protected]>
wrote:

> Hi all,
>
> I posted this on SO but have not had any interest and I'm still stuck so
> would really really appreciate someone taking a look.
>
> I have a pages app into which I have implemented TinyMCE for the main
> content. This works and I am able to format content and view it on the
> front end. I'm now trying to add the image list support as per the
> Django/TinyMCE Docs
> <https://django-tinymce.readthedocs.org/en/latest/usage.html#external-link-and-image-lists>
>  but
> have stumbled upon a problem. When I uncomment the mce_attrs line below all
> my admin urls break not just the page add/edit ones.  It is as if the
> line breaks my URL files but I cannot figure out why.
>
>
>       from tinymce.widgets import TinyMCE
>       content = forms.CharField(widget=TinyMCE(
>               attrs={ 'cols': 80, 'rows': 30 },
>               #mce_attrs={ 'external_image_list_url': 
> reverse('mediamanager.views.imagelist')},
>       ))
>
>
> The mediamanager.views.imagelist is set up and working.   I can browse to
> it as a normal URL and it shows a list of images
>
>
> url(r'^tinymce/$', views.imagelist, name='imagelist'),
>
>
> var tinyMCEImageList = [["(/media/uploads/2015/10/20141205_142735.jpg", 
> "/gallery/i/4"], ... ]
>
>
> the view itself looks like:
>
>
> def imagelist(request):  from tinymce.views import render_to_image_list
>   objects = Image.objects.all()
>   link_list = [(unicode("/media/" + str(obj.image)), obj.get_absolute_url()) 
> for obj in objects]
>   return render_to_image_list(link_list)
>
>
> Thanks in advance for any advice.
>
>
> Regards
>
>
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a259e3d9-16fb-4c7a-ad80-3b06c52e40c0%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a259e3d9-16fb-4c7a-ad80-3b06c52e40c0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciUKsxyP78BhgJ5668Xvu7-dFE9G%3D3Qt0FvyucEXMU8joA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to