• What’s new in my geo-tracking service

    March 23, 2010

    Recently there were several changes to my little sweet tracking service:) 1. It has been moved from http://1adg.ru to http://location.dmitko.ru/ – just check this out! 2. Now it has registration support – feel free to register! 3. Now it has new client for Windows mobile kindly developed by http://www.softexpanse.com – visit the download page for […]

  • Enable IE8 to pass username and password in url

    March 23, 2010

    To disable the new default behavior in Windows Explorer and Internet Explorer which does not allow to pass username and password in urls, create iexplore.exe and explorer.exe DWORD values in the following registry keys and set their value data to 0. HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE P.S. Works in Windows Server 2008

  • check login decorator for json responses

    March 21, 2010

    Django has a login_required decorator that redirects to the login page if user is not authenticated, here I’ll show how to write a custom decorator for json responses. If the uses is authenticated then decorated function returns the desired data otherwise some error in json format. NB – this decorator is for view functions with […]

  • dynamic forms in dajngo

    March 18, 2010

    Django has a very convenient forms framework and I want to show how to implement a form with dynamic set of fields. First – declare a form class: from django import forms class SomeAddressForm(forms.Form): pass Then the tricky part – declare a function that returns type of dynamic form: def getAddressForm(addMoreField): fields = {“city” : […]

  • add custom styles to yui datatable

    March 16, 2010

    If you want to change styles of yui components – it’s easy. All you need is to make some overriding in your css files. My example looks like this: As you can see, I don’t want most borders and gradient backgrounds. This is done via the following style overriding: .yui-skin-sam .yui-dt th { border-right: 0px […]

  • Have ascii coding error in django admin?

    March 10, 2010

    If you have some unicode data in tables e.g. some Russian names and want them to be displayed  by default you need to do some trick: class SomeTable(models.Model): name = models.CharField(max_length=def_max_length) def __unicode__(self): return “%s” % self.name See that – instead of returning self.name directly I returned “%s” % self.name and admin panel is shining!

  • .ready() experience

    March 5, 2010

    jQuery has a rich set of functions including .ready() http://api.jquery.com/ready/ which is very helpful if you want to perform some operations on page ready. Initially I thought – wow! I can make whole body invisible until it’s ready (no working garbage apper). After done that I noticed that pages became very slow. After some investigation I realized that while […]

  • Django is slow?

    March 2, 2010

    Check that Debug=False and that Google Analytics is off! In my case analytics slows speed dramatically.

Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org