python etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
python etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

22 Ekim 2014 Çarşamba

Enlivepy A Different Approach to Html Templating in Python

Don’t worry - this blog entry won’t consist of me rambling about yet another templating engine that will change the world. Instead, I’ll be focusing on a practical aspect - the problems the current HTML templating libraries have and what can be possibly done about these issues.
Django and all other MVC/MVP frameworks do a great job at separating the Controller logic from the View logic. This way you can have all your complex operations in Controller and send back the data that needs to be shown or rendered to the end user. On the other end of this process you have a templating library - it takes Python objects and renders them.
Now, some of these templating libraries argue that having lots of logic in the representation layer is a bad thing (Django templating for example). Others, like Jinja2, are more lax and allow you to do lots of interesting things.
In both cases what we are actually doing is mixing data with logic. And while this might not seem like a problem with small applications, when you start operating on a greater scale, issues start to appear (a lot). Let me provide a few examples:
  • Front end developers (CSS/HTML developers) start having difficulties when editing html pages when something does not appear the way it should be appearing. They have to learn the templating engine your framework uses.
  • Sometimes HTML/CSS developers break the logic in html pages by replacing something by mistake.
  • Backend developers are not the best at editing both HTML and CSS (well, in most cases, at least!). I have had this happen to me quite a few times too. I receive the HTML from a designer team, after that I put it into the templating engine...and it has a radically changed appearance. When I compare the way it looks on the server and the original things are just looking completely different.
  • If HTML/CSS developers need to play or change something on the system, what they need is a working copy of the whole system. You need to give them ssh access to the staging server or something similar.
Read the rest of the article here.

7 Ekim 2014 Salı

Django Authentication Workflow

The existing Django Documentation explains everything about the Django authentication process in a pretty good way. Directions include adding your back end, replacing the built-in User model and many more. However, despite this good coverage, I had certain problems with seeing the big picture of the overall process. At times when I needed to create a new authentication backend, I always had to glance through the Django source again.
In this blog entry I’ll focus on the Django source code and documentation -- to be more exact, I will share my findings during reading both the source code and the documentation. Read the rest of the article on my new blog

9 Kasım 2012 Cuma

Python ve defaultdict kullanımı

Python ve defaultdict kullanımı ile alakalı küçük bir blog yazısı : Link

16 Ağustos 2009 Pazar

Gsoc 2009 is almost over !


As some of you may know the GSOC 2009 is going to be over. The code writing is over and some little formal things are remaining to pull the final trigger. As i posted in my previous posts i contributed to Func project this year as i did last year. Here are some of the items i added to Func that year :

  • Facts Framework - a different way to query more things on minions at once
  • Groups Api - new pluggable func groups api
  • Grep Modules - Query modules for a proper pattern
  • Real Time Output - Watch your minions output while they do their jobs.
  • Progress Report - Get progress report of your minions easily.
  • And many other small fixes and additions.
It was a great experience for me, thanks Func and of course many thanks to Google :) Probably that was my last GSOC and it was really fun to work on Open Source projects and get payed.

30 Nisan 2009 Perşembe

Using GWT with Django


Well i tried GWT a few days ago and liked it very much. I'm not a js expert and for that reason dont use it too much in my web applications. But from time to time i need some fancy client-side apps to do ajaxian stuff easily. I had written an Independent Django app which was an ajax-driven event calendar. Therefore i did most of the work remotely via Django. I used jquey for ajaxian calls. But if i were a better js programmer i would do that job with less remote calls. But the Magic in GWT is cool you create your application with Java ; a very cool and easy language and it converts the written code into javascript which is compatible with most of the browsers. Therefore you dont bother with strange behaviour of the js and dont bother about if your code will run on BrowserA or BrowserX.

I followed the tutorial in GWT site and had a running application (StockWather). To complete that tutorial you probbaly would need to complete the StockWatcher firstly and then go on from here or you can just pull the code i wrote for that purpose from here[1] and just inspect it.

For communication of both ends i used XML,if you're not a fan of it you can use JSON also. I didnt use JSON because of the JSNI usage in Java code. I dont like hybrid codes like that...

  1. First create the server side code in Django :LINK
  2. You need to build a GET request in you JAVA code so u do that from here: LINK
  3. Parse the incoming XML string from Django and convert it to JAVA objects: LINK
  4. Write unittests for your client side code (GWT) because if you have errors u will get some strange JS errors which are not so decsriptive. : LINK
  5. Put GWT application in your media and put the generated HTML file in your templates directory.

Well that is all,it took some time to glue both of them (Django and GWT) but we have here a happy end :) GWT is cool but it has some little weird stuffs i dont understand yet. One of them is Designing the applications.I should find
an easy way to explain it to my designer :)

[1]: GWT-Django app

21 Nisan 2009 Salı

GSOC 2009 Again


Well i'm again in the Game :) That summer i will be working on my last year GSOC project FUNC again.Big Thanks to Adrian Alikins(my mentor) for choosing me again. And Bigger thanks to GOOGLE for paying us to do open source programming. If you hear for the first time FUNC,it is a great Remote management Framework for doing things reamotely easier. You can even open your shell and do management by playing with its Python API. My aim that time is to make that cool API even more cooler.Here is the list with ideas :
  • Implementing Func Facts : Wouldnt it be cool to say func update machines that are ">f9" or list the machines with dual core cpus. That is what func facts claims to be an ORM like remote querying system.
  • Implementing a Pluggable Connection Manager for Func :Well that is kind of hard one, currently he FUNC is using XML-RPC over SSL. The aim of that item is to make Func to support different connections by reading its conf files. The first connection to be implemented seems to be qpid/AMQP/qmf. After having the pluggable structure it will be easier to add different connections i hope.
  • Structuring the Results : Currently FUNC recieves different kind of results in different formats. Having a way to query and process that result without too much loops will be realy great.
  • Funcweb Development : Func has a Web interface fo doing all the stuff visually,so new features should be added to that cool app.

I hope to finish all the stuff succesfully again like last year. (INSH ;))

17 Mart 2009 Salı

Ajaxian Even Calendar on Django

That is an independent small app that can be useful for others that need some calendar and want to show some events on it. I couldnt find any django calendars which are ajaxian out there. Therefore if you need something like that use it, it is completely free. Let me know if you have any trouble with it.

Features are:
- Showing every month with events
- Small and big(excel like) versions
- Adding same event for a couple of days
- Adding lots of events on same day
- Facebox display of events
- Dual language arabic/english


Demo small : Link (on the left)
Demo Big : Link
Source : Link
Static directory : Link

For instalation look at README file in the source.
Have FUN and thanks to ADK for his design help ...

11 Şubat 2009 Çarşamba

Open Source Motivation

Just read the article of Lior Kaplan which is about the things that make us to use or develop opensource projects. Link:

I think these are mine reasons about doing that ;)

- Help other people that may have the same problem as you, so you make your code public or help via ML,IRC and etc.
- Opportunity to learn new things and finding areas to apply them.
- Coding about what you like,the topics you are interested.
- Having the feeling that more can do it better than single, so copy everything that is usable for you and continue from there (DRY).
- Becoming expert in area you like without thinking about it.
- Having a good CV(background) about things you have done, talks is cheap i'm showing the code.
- Having the opportunity to start own business without paying anything, you just need the idea
- Working together than alone is more fun.

Btw, i think people who are payed to work on opensource projects are really lucky :) Hope to be one of them ...

29 Ocak 2009 Perşembe

I wrote one use mine !

That is the story about a little and probably useless software i wrote. Everything began in 2007 during my internship in Pardus. Pardus uses pisi (a Python based package manager) and pisi doesnt have any sign/verify mechanism (still doesnt have) to secure package transmission. Well we all decided it would be cool to make the verification process via X.509 certificates so we can have more info about signer and etc. And everything began, i started designing the app. The idea was simple we have a package we sign it via X.509 and put the signature in package an send to users for installation. User has on other site a db with trusted certificates, he/she extracts the signature checks if the cert is trusted. If the cert is good to use user computes the hash of all files in package and compares with hash that is in the signature. Simple yes ...

The implementation part was not so easy for me. I heard that there is a Python package for handling SSL things called Python OPenSSL. I was excited it was my first Open Source program but pyOpenSSL didnt have all my needed classes for certification handling, signing and verification parts (if has man i dont know). Than i found M2Crypto it had some ugly Python code and bad exception handling but had all the cool features i needed. And the 'imzaci' was there an alpha verison maybe, it didnt have a code base i was proud of. The application was not accepted by Pardus members and none asked me about it to make it better or to fix sth. Everyone was silent , man probably i wrote the ugliest program in the world if none says sth :)

I thought it was the way how Open Source works. (People can think about things they have experinced) Well Open Source code development doesnt work like that believe me. People discuss,fight,share,apply patches that is the world i was imaging from the beginning. However i didnt make a good start :) The GSOC2008 and FUNC project showed me that secret and cool Opensource World.

Well lets return to our little useless application, after GSOC2008 i have rewritten most of the code maybe better maybe worse i dont know. I changed its name it is not imzaci anymore it is pysign and it is an independent (no written for specific distro) application. Why i have rewritten the program ? I wondered if i became better after those years. Well the code is here [1] and you know what it was not fun to write it. If someone is going to write an app similar to that one please look at my code maybe you can grap some part of it. I wrote it once dont do it again :)

Ok what is the point :) The point ;is it is very very very important to choose community you are going to contribute. Please before you join look at mail listing conversations, look at documentation of project or community has. The start is very important and if you have luck you will be in a place where people respect every bit of your code. That is the Open Source world i was looking for and found at the end :)

There are two kind of programmers, good programmer gets the old code fixes it (if possible) and completes the job in less time, bad programmer writes all the code from scratch (maybe worse than first programmer). Be the good programmer i wrote it dont repeat yourself :)

[1] http://github.com/makkalot/pysign/tree/master

20 Ocak 2009 Salı

Django Admin ManyToMAny Behaviour

In that post want to share an experience with a Django behaviour that took all my day to solve it. In nowadays , i'm working on a freelance project and trying to finish project due to deadline (hate deadlines). Here is the small part of models i'm using


class SchoolSection(models.Model):
#snip

class GalleryItem(models.Model):
school_section = models.ManyToManyField(SchoolSection)
#snip



A pretty easy structure , the problem occurred when i connected the post_save signal to a method which was using the models above. When a new GalleryItem was saved i wanted to pre-populate some xml files according to new commers. Here is the simple code that was pulling the gallery items :


sc=SchoolSection.objects.all()
gi = GalleryItem.objects.filter(school_section = sc[0])


When i save an object i was not able to see the new added in query above. When i saved the object second time (edit->save) the new entry appeared. In a moment when i was going go crazy someone from #django channel told me that Django doesnt save the m2m relationships immediately due to performance issues. Therefore the solution was to override a method in admin part , here is the solution :


class GalleryItemAdmin(admin.ModelAdmin):
def save_model(self, request, obj, form, change):
super(GalleryItemAdmin, self).save_model(request, obj, form, change)
form.save_m2m()
obj.save()



That is all, hope to help someone who has the same problem :)

4 Ocak 2009 Pazar

import makkalot

Hello planet and thanks for adding me.

4 Aralık 2008 Perşembe

Command pattern in Python


I continue with "x pattern in Python" series, the articles i posted here are not tutorials or some professional learning resource. I poste them here only for myself to rememer the things when i need them :) What is the command pattern and why wee need it ? Well imagine you have a class that controls some operations on files, writing , reading , closing , and maybe many more. In first sight i would complete that like this :


class FileOperator:

def operation1(self):
pass

def operation2(self):
pass

#snip snip snip ....

Well that implementation seems enough for now, but what if we want to supply a simple api to users like that


f = FileOperator()
f.process_command()


Well, with current implementation that doesnt seem to be possible, the current implementation is kind fo static and user has to know the internals of the FileOperator class. If the users want some extra functionality like undo or logging, it will not be very easy to be implemented. And every change that has to be done will effect the current client code which is not cool. Also user may want when call the process_command to execute multiple commands like write_to_file and read_contents and etc. What we will do is again the basic OOP remove the parts that can change in the future. We will remove the executer parts and wiill assing them when we need them. Ok when reading it doesnt seem so easy but the code is easier:

Here is my implementation of the Command Pattern : LINK

After that implementation you will able to do things like that :

def test_me_yo():
"""
Lets see that one
"""
tmp_file = open("some.txt","w")
tmp_file.write("hehehe\n")
tmp_file.close()

#end of initial data
#first lets read the contents of the stuff
fe = FileEditor()
fileman = FileMan("some.txt")
fread = FileReadCommand(fileman)
fwrite=FileWriteCommand(fileman)
fe.set_command(fread)
fe.process_command()

#append some info to the end of it
fe.set_command(fwrite)
fe.process_command("add some text here")
fe.set_command(fread)
fe.process_command()

#lets now go and create an command manager
cm = CommanManager()
cm.add_commanders(fwrite,fread)
fe.set_command(cm)

fe.process_command("\n Add another sting here ")
print "First undo :"
fe.undo_process()
print "Second undo :"
fe.undo_process()
print "Thirrd undo :"
fe.undo_process()

Well it is pretty pluggable design you can combine the commands you like do "undo" all the magic you need. What i learned from Design Patterns is they are based on the same principle "remove the parts that will change in the future" ,separating the concerns is very important ...

2 Aralık 2008 Salı

Template Design Pattern


The next step in DP land is Template Design Pattern, well what is it ? As far as i understood there is nothing special and new under the hood. You have an abstract class with methods to be overriden by its sunclasses. The main difefrence is you have a one or more template methods which draw the flow of the things. A simple example maybe :


class MainClass(object):

def operation1(self):
#do stuff

def operation2(self):
#do stuff

def __template_method(self):
self.operation1()
self.operation2()



What we did here is to supply an API for users to override the operation1 and operation2 but we want to control the overflow by template_method, if you want more extendible structure you may also make it public. Well i know that pattern i have used it in lots of places but didnt know its name :) The new thing i learned from Head First is the hook methods , you make them optional for the client code. For example:

class MainClass(object):

def operation1(self):
#do stuff

def operation2(self):
#do stuff

def hook(self):
pass

def do_you_want_hook(self):
return True

def __template_method(self):
self.operation1()
self.operation2()
if self.do_you_want_hook():
hook()


Ok the difference is if user wants something extra to be executed he/she can override hook and do the extra stuf that is needed there,otherwise that method will not be invoked (well it will be but nothing will happen).
That is all for the template pattern, we know you,you are not new here :)

1 Aralık 2008 Pazartesi

Factory Pattern in Python


Our next step in DP is object factories. Creating objects with if else clauses sometimes may not be very flexible for our programs. Some of the objects may neeed more complex and long initializations other maybe simple etc. Because of that it is cooler to have some methods or some classes that give you the instance you need. For exmple think about a client program which needs a slash directory or file manager. If you're trying to have your program platform independent you should have different versions for Windows and Linux based machines. Therefore when you client is initializing the File manager it should everytime do

if linux:
do sth
else:
do another


But for a framework that is not very flexible and when some code of FileManager changes (some code of initialization) you should change your client code which is not cool. It would be better if you have some class that gives you the instance you need, in our example FilemanagerFactory.get_instance() so client code will not care about the platform and other annoying stuf it will just get the instance it needs. Yep that is factory pattern ...
To demonstrate the factory thing i wrote a simple example that is responsible for creating Validators, if you have a string you get a string validator if you have an integer you have integer valiator and etc . Here is the link: LINK

To test the code you need sth like that :

from pyalgorithm.dp.factory import *

def test_facto():
my_value = "Some_strrrrrrrrr"
factory = ValidatorFactory()
validator = factory.create(my_value)
print validator.validate()

my_value = 11
validator = factory.create(my_value)
print validator.validate()

my_value = 11.12
validator = factory.create(my_value)
if not validator:
print "No object created ..."

Well that is all, factory pattern may not be very important for little projects but if you have to initialize lots of classes it maybe wisw to have some class to do that for you.

29 Kasım 2008 Cumartesi

Singleton Pattern in Python

The Singleton actually is not something very different or new invention. The purpose of it is to have only a single instance of some class so you can have a global point of access which is cool. For now i think i can use it for configuration manager classes, some cool loggers and some context variables. Maybe i will find more of em. The Singleton pattern is a little bit different from one that is in Java. In Java to make a singleton you have to make your constructor private and have some static method to do the instance initialization. In python what you have todo is override the __new__ method of the Singleton candidate. There are lots of examples on the net related with that topic so you can search one before use mine. Actually mine is not written or thought by me i found it also (from aspn CookBook site) :)

Here is the first version i found and think is good : LINK
As you will see there is some time and sleep things in it , i put em there to test what happens when some threaded classes use it. And as you may imagine some of the threads got different references of that Class. Here is the Thread i used :


from threading import *
import time
import thread

class ThreadSingleton(Thread):
"""
A simple thread to work on that
"""
def __init__(self,id):
Thread.__init__(self)
self.id = id

def run(self):
"""
Here initialize the singleton
"""
self.s=Singleton()

print "Im thread %d and %d"%(self.id,id(self.s))
time.sleep(2)

def get_singleton(self):
return id(self.s)



Here is the code that tests it :

def singleton(t="threaded"):
for j in range(100):
threads = []
for i in range(10):
if t!="threaded":
threads.append(ThreadSingleton(i))
else:
threads.append(RealThreadedSingleton(i))

for i in threads:
i.start()

for i in threads:
i.join()

print "The final ids are :"
t0 = threads[0]

for i in threads:
assert t0.get_singleton() == i.get_singleton()

t0.s.destroy()


if j%10 == 0:
print "************** %d COMPLETED **********"%j



After those tests i got some Assertion Errors because some of the threads got different references of the object. What we know from here is that our Singleton is not thread-safe and we should fix it. Here is the threaded version of the Singleton LINK :

To test that new verison i nedded some new ThreadClass to call the new created Singleton :


class RealThreadedSingleton(ThreadSingleton):

def run(self):
"""
Here initialize the singleton
"""
self.s=ThSingleton()

print "Im thread %d and %d"%(self.id,id(self.s))
time.sleep(2)



After final changes i run the tests 1000 times and didnt have any problems. Why we should bother to have Singleton threa-safe , because i'm going to use it in some frameworks that uses threads heavily, so icant be sure when that one will be called. To conclude, when write some cool classes always should think the posibility of theraded usages.

28 Kasım 2008 Cuma

Decorator Pattern in Python


Our next step in DP is Decorator pattern, as u know Python also has some decorator options you can apply to your programs by @ sign. But if you want to apply decoration to classes in object level you have to change the stuff a little bit. I always thought that Java's IO library is very confusing, you create a FileInput class then you put it in a BufferReader and etc. When i read the Decorator chapter in Head First i realized that the Java IO API is using that pattern there. Well why do you need decorator pattern? Lets go from IO API example :
1. You have a normal reader
2. You need a reader that converts the input to lowercase, so what you do is create a new UpperReader
3. You need now a reader that converts input to a sha1 sum , what you do is create a Sha1Reader
4. You need a reader that converts input to uppercase sha1sum , what you do is create a Sha1UpperReader
5. The 4. item can be removed if you used the decorator pattern

Shortly, decorator pattern wraps an object and change its flow before or after the target operation. For the example above you can change the incoming input or process it to sth else.

Here is the implementation i wrote in Python and put on my personal github repo : LINK

A sample usage of above can be like that :

  1. def deco():

  2. from pyalgorithm.dp.decorator import *



  3. print "The normal file reader content"

  4. n = NormalFileReader("some.txt")

  5. print n.read_content()



  6. print "Sha1 sum of the read info"

  7. sh =DecoratoSha1Reader(

  8. NormalFileReader("some.txt")

  9. )

  10. print sh.read_content()



  11. print "Sha1 sum but with upper cases"

  12. up = DecoratoUpperFileReader(

  13. DecoratoSha1Reader(

  14. NormalFileReader("some.txt")

  15. )

  16. )



  17. print up.read_content()



The output is sth like that:

The normal file reader content
Hey im the content!!!

Sha1 sum of the read info
5fd77bd8e4f80ec432c71a09033a7ef51de60448
Sha1 sum but with upper cases
5FD77BD8E4F80EC432C71A09033A7EF51DE60448


Well, it is the end of the today's pattern "decorator man". The post will be a good reference for me when forget the things :)

25 Kasım 2008 Salı

Observer Pattern in Python


Well here are the first things i got from "Head First Design Patterns" book :) I was working on a big web project and have also some small open source projects i try to finish. I stoppped codding on that projects immediately after read the first chapter of the book :) I realized that have big gaps in my programming skills about patterns. What i know now is :

- Knowing OO principles and rules doesnt make u a OO guru.
- Inheritance is not the best way of code reuse.
- Inherit the static parts and use composition for things that can change in the future.
- Less dependency between classes is alway better.

Will add to those more in the future i think.
Ok lets go back to the title of that entry. Sometimes we need to send some notifications to other classes from a specific class. What i would do before knowing the observer pattern would be sth like that. I would define a notifier() method and will call the classes i want to notify :

  1. def notify(self):

  2.    classA.update(args)

  3.    classB.update(args)

  4.    classC.update(args)

  5.  


Ok it seems good for now but wat happens if you want to notify the classes D and E in the future u have to add them to the list above. That means altering the existing code which may not be a good idea. Ok now the classB doesnt want anymore to be notified , so what happens now ? It is very clear that the structure above is not the best for that situation. What we need is a dynamic srtucture which will allow us to add and remove new observers during the runtime without altering the existing code, so that is where the observer pattern comes into the scene ...

Here is the code i wrote to make a simple scenarion for observer pattern on my personal git_repo : LINK
Now we can do sth like that easily :

from pyalgorithm.dp.observer import *



print "I creatte the our subject"

c_s = ConcreteSubject()

c_s.my_x = 22

c_s.my_y =33



print "I notify my subscribers :"

c_s.values_changed() #that can be done dynamic but it is cool for now



print "Lets add a new XObserver"

x_o = ObserverX()

g_o = ObserverGeneral()

c_s.add_observer(x_o)



print "I notify my subscribers :"

c_s.values_changed() #that can be done dynamic but it is cool for now





print "Lets add a new GeneralObserver"

c_s.add_observer(g_o)

print "I notify my subscribers :"

c_s.values_changed() #that can be done dynamic but it is cool for now



print "The X observer doesnt want to know anything about us remove him"

c_s.remove_observer(x_o)



print "I notify my subscribers :"

c_s.values_changed() #that can be done dynamic but it is cool for now

The output for that will be as follow :

I creatte the our subject
I notify my subscribers :
Lets add a new XObserver
I notify my subscribers :
Im X observer and got : 22
Lets add a new GeneralObserver
I notify my subscribers :
Im X observer and got : 22
I got all of them Here is my values 22 and 33
The X observer doesnt want to know anything about us remove him
I notify my subscribers :
I got all of them Here is my values 22 and 33

Well i think it became pretty dynamic ,i have lots of ideas where i can use that pattern. As a conclusion what i can say is that "Head First Design patterns" book is changing my vision to OO programming.

TO BE CONTINUED ...

20 Kasım 2008 Perşembe

Got My Amazon Books




Really excited, i just got my amazon orders two great books. I hope to be better programmer now with those pearls :) The books arrived two weeks later from the estimated date but who cares i got em. One of them is about design patterns and other is about algorithms and programming. Here are the title's of books :

1.Programming Pearls
2. Head First Design Patterns

After finish em will write my reviews :)

29 Ekim 2008 Çarşamba

Recursive fibonacci Case Study

In that post i'm going show u a test that i made about recursive calls in Python compared to other languages. The tests used are Python,Python C extension and Java. I always heard that using recursive calls in Python is not very wise, that time i decided to discover it myself. Well i run the 3 programs to find finacci 40. number and got their times with time command in F9. Tests do not claim anything so do not bother me with garbage :) Here they are :

Python
[makkalot@localhost pyalgorithm]$ time python py_fibo.py 40
The result is : 102334155

real 6m32.110s
user 6m22.153s
sys 0m0.519s



Python_Ex :
[makkalot@localhost fibo]$ time python ex_fibo.py rec 40
The recursive result is : 102334155

real 0m3.039s
user 0m2.902s
sys 0m0.017s



Java
[makkalot@localhost bin]$ time java sorts.FiboMan rec 40
The recursive result is 102334155

real 0m4.053s
user 0m2.755s
sys 0m0.095s

Conclusion : The results suprised me a little bit. I knew that Python as a recursive language is slow but the time above is a disaster. Therefore i know now if i need sth recursive in Python i will write it as a C extension. The java also suprised me because its time was very close to C extension. Those Java guys are getting better, maybe JavaFX may make to become a Java programmer :)

Btw, here are the codes :
Python : Link
C extension : Link
Java : Link

A new Django Site Added to public

In last 2 weeks i've been working as freelancer, searching for people around the world who need Django/Python help for their projects. It is kind of exciting because i meet new people and do different kind of work everytime. Well one of these was injazzat.com a static firm site which was converted to Django site. The guy who was responsible for that site hired me to fix some of bugzz in site. It seemed as an easy stuff there was a few typos some template errors. However when i went deeper into code saw that hardcoded parts that made that job a nightmare :) I spent all my week to fix that mess and now most of the parts are real dynamic and the site follows the DRY :) At the end of work the guy told me that i was the 4th person who tried to fix that site and succeed finally. All previous developers escaped or dissappeared ... The temporary link of site is here ,i dont know if it will be there tomorrow but as reference just put it here. I hope got more exciting projects in the future ...

To conclude , do not write hardcoded programs because someday they will be seen by other people believe me :)

Note : and also thanks to adk for his help with those designer and css stuff