Hi James,

Thanks for the response.   I have just replied to say its working in one 
sense.   Main is my pages, blog and homepage app and then mediamanager is 
the app that manages images etc uploaded into the media folder.   I can 
create albums which are inserted using wordpress style shorttags into pages 
and posts and I can set featured images for both.  It all works very nicely 
for me except being able to easily insert single images into the middle of 
pages.

When I went to the main admin page with reverse included it gave a 
traceback that looked the following.

I would obviously like to get it working correctly but for now will leave 
it as is and move on.

Thanks for your help.

Chris

*Environment:*


*Request Method: GET*
*Request URL: http://csmatrix.local/admin/*

*Django Version: 1.8.5*
*Python Version: 2.7.10*
*Installed Applications:*
*('django.contrib.admin',*
* 'django.contrib.admindocs',*
* 'django.contrib.auth',*
* 'django.contrib.contenttypes',*
* 'django.contrib.sessions',*
* 'django.contrib.messages',*
* 'django.contrib.staticfiles',*
* 'tinymce',*
* 'mediamanager',*
* 'main',*
* 'almanac',*
* 'curriculum',*
* 'unitsoflearning',*
* 'studyprogramme',*
* 'reprographics')*
*Installed Middleware:*
*('django.contrib.sessions.middleware.SessionMiddleware',*
* 'django.middleware.common.CommonMiddleware',*
* 'django.middleware.csrf.CsrfViewMiddleware',*
* 'django.contrib.auth.middleware.AuthenticationMiddleware',*
* 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',*
* 'django.contrib.messages.middleware.MessageMiddleware',*
* 'django.middleware.clickjacking.XFrameOptionsMiddleware')*


*Traceback:*
*File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in 
get_response*
*  132.                     response = wrapped_callback(request, 
*callback_args, **callback_kwargs)*
*File "/Library/Python/2.7/site-packages/django/contrib/admin/sites.py" in 
wrapper*
*  254.                 return self.admin_view(view, cacheable)(*args, 
**kwargs)*
*File "/Library/Python/2.7/site-packages/django/utils/decorators.py" in 
_wrapped_view*
*  110.                     response = view_func(request, *args, **kwargs)*
*File "/Library/Python/2.7/site-packages/django/views/decorators/cache.py" 
in _wrapped_view_func*
*  57.         response = view_func(request, *args, **kwargs)*
*File "/Library/Python/2.7/site-packages/django/contrib/admin/sites.py" in 
inner*
*  233.             return view(request, *args, **kwargs)*
*File "/Library/Python/2.7/site-packages/django/views/decorators/cache.py" 
in _wrapped_view_func*
*  57.         response = view_func(request, *args, **kwargs)*
*File "/Library/Python/2.7/site-packages/django/contrib/admin/sites.py" in 
index*
*  438.                                 current_app=self.name,*
*File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py" in 
reverse*
*  578.     return 
force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, 
**kwargs)))*
*File "/Library/Python/2.7/site-packages/django/core/urlresolvers.py" in 
_reverse_with_prefix*
*  495.                              (lookup_view_s, args, kwargs, 
len(patterns), patterns))*

*Exception Type: NoReverseMatch at /admin/*
*Exception Value: Reverse for 'app_list' with arguments '()' and keyword 
arguments '{'app_label': 'unitsoflearning'}' not found. 0 pattern(s) tried: 
[]*


On Sunday, 8 November 2015 10:04:34 UTC, James Schneider wrote:
>
> Do you have an app named 'main'? Is it part of INSTALLED_APPS? And is the 
> Page model properly registered with the admin site? 
>
> How exactly did you reach that URL? Does the admin work if you just use 
> /admin/?
>
> -James
> On Nov 8, 2015 1:46 AM, "Chris Davies-Barnard" <porang...@gmail.com 
> <javascript:>> wrote:
>
>> Hi James,
>>
>> Thanks for the reply.   So I uncommented the line which now looks like: 
>>
>> *mce_attrs={ 'external_image_list_url': reverse('imagelist')},*
>>
>> and after restarting apache I get this.
>>
>> Page not found (404)Request Method:GETRequest URL:
>> http://csmatrix.local/admin/main/page/add/
>>
>> Using the URLconf defined in CSMatrix.urls, Django tried these URL 
>> patterns, in this order:
>>
>>    1. ^$ [name='cover']
>>    2. ^m/
>>    3. ^curriculum/
>>    4. ^unitsoflearning/
>>    5. ^studyprogramme/
>>    6. ^gallery/
>>    7. ^reprographics/
>>    8. ^accounts/
>>    9. ^login/$
>>    10. ^logout/$
>>    11. ^tinymce/
>>    12. ^admin/doc/
>>    13. ^admin/ ^$ [name='index']
>>    14. ^admin/ ^login/$ [name='login']
>>    15. ^admin/ ^logout/$ [name='logout']
>>    16. ^admin/ ^password_change/$ [name='password_change']
>>    17. ^admin/ ^password_change/done/$ [name='password_change_done']
>>    18. ^admin/ ^jsi18n/$ [name='jsi18n']
>>    19. ^admin/ ^r/(?P<content_type_id>\d+)/(?P<object_id>.+)/$ 
>>    [name='view_on_site']
>>
>> The current URL, admin/main/page/add/, didn't match any of these.
>>
>> You're seeing this error because you have DEBUG = True in your Django 
>> settings file. Change that to False, and Django will display a standard 
>> 404 page.
>>
>> It makes no difference if I try and run it though runserver or apache - 
>> same result.  All my admin urls are broken!   I know this is not much help 
>> - is there another way of getting a traceback?
>>
>> Regards
>>
>> Chris
>>
>>
>>
>> On Sunday, 8 November 2015 05:30:33 UTC, James Schneider wrote:
>>>
>>> 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" <porang...@gmail.com> 
>>> 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 django-users...@googlegroups.com.
>>>> To post to this group, send email to django...@googlegroups.com.
>>>> 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 django-users...@googlegroups.com <javascript:>.
>> To post to this group, send email to django...@googlegroups.com 
>> <javascript:>.
>> 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/91b3cdfc-fea5-4c90-973d-5523b196d20d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/91b3cdfc-fea5-4c90-973d-5523b196d20d%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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/52958a58-137d-4938-919c-007728a94df7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to