In Django to display your Scribd documents in your page , first you need to install scribd python package . To install it refer this link
after installing it in your views write this def (add url accordingly).
In your scribd.html file............
My Documents on scribd:
Live Demo
http://coderpriyu.alwaysdata.net/scribd/
Thats it....................
after installing it in your views write this def (add url accordingly).
def scribd(request):
extra_context = {}
extra_context['formName'] = 'scribd'
data = []
import scribd
scribd.api_key = '#Your api key'
scribd.api_secret = '#Your secret key'
api_user = scribd.api_user
all_documents = api_user.all()
for ad in all_documents:
temp = []
document = ad
document.load()
attrsDict = document.get_attributes()
temp.append(document.get_scribd_url())
temp.append(attrsDict['thumbnail_url'])
temp.append(document.get_download_url())
data.append(temp)
extra_context['data'] = data
return render_to_response('scribd.html', extra_context,
context_instance=RequestContext(request))
In your scribd.html file............
My Documents on scribd:
< table border='1' >
{% for d in data %}
< tr>
< td width='82px'><a href='{{d.0}}'
style='color:blue;font-weight: normal;'>
Doc {{forloop.counter}}:</a></td>
<td><img width='' src='{{d.1}}'
alt='doc{{forloop.counter}}'/>
</td>
<td><a href='{{d.2}}' style='color:blue;
font-weight: normal;'>
Download doc {{forloop.counter}}
</a></td>
</tr>
{% endfor %}
</table>
Live Demo
http://coderpriyu.alwaysdata.net/scribd/
Thats it....................