this is a follow up post for http://hilaltarakci.blogspot.com/2013/04/a-python-book-part-1.html
here is the summary for Part2 of the book:
28 Nisan 2013 Pazar
23 Nisan 2013 Salı
couchdb + django
http://lethain.com/an-introduction-to-using-couchdb-with-django/ is an excellent tutorial for integrating couchdb with django..
(couchdb version 0.8, django version 1.5 on Windows 7)
In order to succesfully run the example, i did the following:
- if you get the error,
cannot import name ResourceNotFound,
edit couch_docs/view.py as follows:
from couchdb.client import ResourceNotFound
- if you get the error,
AssertionError at / The XView middleware requires authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware'.
do what it says..
- if you get the error,
The Django authentication middleware requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'.
do what it says.. settings.py becomes as follows:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
- if you get the error,
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
update settings.py as follows:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
After the above fixes, the example worked for me..
(couchdb version 0.8, django version 1.5 on Windows 7)
In order to succesfully run the example, i did the following:
- if you get the error,
cannot import name ResourceNotFound,
edit couch_docs/view.py as follows:
from couchdb
- if you get the error,
AssertionError at / The XView middleware requires authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware'.
do what it says..
- if you get the error,
The Django authentication middleware requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'.
do what it says.. settings.py becomes as follows:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
- if you get the error,
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"
update settings.py as follows:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
After the above fixes, the example worked for me..
21 Nisan 2013 Pazar
to add linkedin login button to blog page
This post is actually part-2 of the previous post ( http://hilaltarakci.blogspot.com/2013/04/to-add-facebook-login-button-to-blog.html ) in which a facebook login button is added to blogger.
i followed the steps in http://developer.linkedin.com/documents/getting-started-javascript-api and successfully added a linkedin login button to blog http://ucasfumproject.blogspot.com/.
To accomplish this:
- create a linkedin application and remember to specify the blog address as the JavaScript API Domain (step 2 in http://developer.linkedin.com/documents/getting-started-javascript-api)
- go layout >> add a gadget and add an HTML/Javascript gadget as follows:
i followed the steps in http://developer.linkedin.com/documents/getting-started-javascript-api and successfully added a linkedin login button to blog http://ucasfumproject.blogspot.com/.
To accomplish this:
- create a linkedin application and remember to specify the blog address as the JavaScript API Domain (step 2 in http://developer.linkedin.com/documents/getting-started-javascript-api)
- login to blogger dashboard
go templates >> edit HTML
- right below the closing head tag, copy the following:
- go layout >> add a gadget and add an HTML/Javascript gadget as follows:
to add facebook login button to blog page
Studying on sundays really sucks :( However, it is wise to spend these rainy cold days studying and make room for life for oncoming sunny beautiful days:)
In this post, i summarize steps to add a facebook login to a blog page as in http://ucasfumproject.blogspot.com/
I have followed two posts and a stackoverflow question to get it working..
- create a facebook app >> https://developers.facebook.com/apps
specify the site url as your blog address
- login to blogger dashboard
go templates >> edit HTML
19 Nisan 2013 Cuma
a python book - part 1
Nowadays, i am trying to learn Python and prepared a repository consisting of Python books, tutors etc..
Actually, finding good documentation on Python isn't that hard due to its widespread use..
Anyway, i am using the online free book on ww.rexx.com/~dkuhlman/ and take my own notes during study..
In this post, i publish those notes of mine as notebook pages, a weird way for sharing actually!!
The book consists of three parts, and (i can say that) this is the summary of first part..
7 Nisan 2013 Pazar
introduction to couchdb
I hate studying on this beautiful Sunday morning, instead of enjoying the weather :( However, it is going to be a busy week and i need to make my system run till thesis meeting. I decided to use CouchDB, played with it through Futon interface and want to share two basic posts about it, which helped me understand the concept of document database:
http://blog.vi-kan.net/2010/introducing-couchdb/
http://blog.vi-kan.net/2010/basic-couchdb-interaction/
http://blog.vi-kan.net/2010/introducing-couchdb/
http://blog.vi-kan.net/2010/basic-couchdb-interaction/
Kaydol:
Kayıtlar (Atom)