photo_dl_link error 'FileSystemStorage' object has no attribute 'url_monkeypatched'

49 views
Skip to first unread message

vantamtran

unread,
Apr 1, 2013, 6:42:29 AM4/1/13
to class2g...@googlegroups.com
Hi all,

When I upload images for instructor , I set course Preview only mode . And I access localhost:8000/courses/coursestest1/preview/  I get error :

AttributeError at /courses/coursestest1/preview/

'FileSystemStorage' object has no attribute 'url_monkeypatched'
.........
In template C:\Program Files (x86)\VertrigoServ\www\class2go\main\templates\previews\default.html, error at line 21

Joe Blaylock

unread,
Apr 2, 2013, 2:02:39 AM4/2/13
to vantamtran, class2g...@googlegroups.com
Hi,

There are two things going on here. First, there's a bug in the photo link method on the Instructor model. Second, you may not want to be using the Instructor model either.

I pushed a branch that probably fixes the Instructor object. It's called 'jrbl-default_preview_less_sketchy'. Please check the branch out and try it and see if the error goes away. Once you commit whatever work you have in progress on your Class2Go checkout, you can check the branch out on Linux (and I believe also on Cygwin, but I'm less sure) with:
git checkout master && git fetch -p origin && git pull origin master && git checkout jrbl-default_preview_less_sketchy

When you're done checking you can use 'git checkout' to return to whatever branch you were working on before.

But! I should also say that I haven't been able to find evidence that people are relying on the default preview page much in practice. If you look in main/courses/preview/views.py, you'll notice that the default.html only gets used if there's not a course-specific preview page available, with a name like (for example) db--winter2013.html.  You can see a number of examples of these in main/templates/previews.

So you may simply want to copy one of the preview pages that you like to be named like the course handle for the course you're working with, and then edit that page to be the way you want.

Joe

--
You received this message because you are subscribed to the Google Groups "class2go users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to class2go-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sef Kloninger

unread,
Apr 2, 2013, 2:15:52 AM4/2/13
to class2g...@googlegroups.com
David Glance, can you look at Joe's proposed change (https://github.com/Stanford-Online/class2go/pull/2488) and see what you think?  This was originally your code.  

- Sef
Reply all
Reply to author
Forward
0 new messages