Django “render” vs “render_to_response”
Summary: Always use render
and not render_to_response
In Django you have more than one way to return a response, but many times I get confused between render
and render_to_response
, render_to_response seems shorter, so why not use it!
Install Python Image Library (PIL) on OSX
PIL or Python Imaging Library is a library that allows you to manipulate images in Python programming language, trying to install “PIL” using “pip” tool won’t work perfectly so here is how to proper installation.
My New Project: AgentX Implementation in Python
During this Eid vacation I spent many hours working on AgentX implementation in Python.
You can find the project in GitHub:
Backup Journey to rsnapshot
Python auto complete in OSX
If you run Python shell in OSX you notice the auto completion functionality isn’t working, this is caused by Apple decision not to ship GNU readline and instead they use libedit (BSD license), to fix the problem I used the following snippet:
IPython Import Error
I tried to install IPython to play with it and learn more about scientific Python packages, but I faced an error on my first step:
Implementing Login/Logout in Django
Update: add names and namespace to URLs
Implementing user authentication is fairly easy job in Django, many functionalities are already included in the standard Django installation, you can manage users using the default “admin” app the comes with Django.
Here I will show how implement Login/Logout feature by relying on Django built-in views.
اليابان: رحلتي الى طوكيو
منذ صغري وانا احمل تقدير كبير لليابان واليابانين خصوصا عندما رأيت نهضة اليابان المثيرة امام عيني خلال فترة الثمانينات، عندما كانت المنتجات اليابانية المشهورة برداءة الصنع تأخذ عقول واموال المستهلكين في العالم حتى اصبحت في القمة من ناحية الجودة، كانت المحطات التلفزيونية والجرائد والمجلات تتحفنا بعجائب الاختراعات اليابانية من روبوتات وسيارات والكترونيات والاهم البطيخ المربع
Supporting Right-to-Left (for Arabic) in WordPress: the Easy Way
This post is an update of previous old post: Supporting right to left writing (for Arabic) in WordPress