Back on track.

It’s been long time I haven’t posted anything on blog. It’s was holiday time over and then sickness of India bringing me sadness of work. but Now I am back on my full fledge mood to work.

It was really amazing experience of India and meeting my wife again. This is something I can’t explain in word. This feeling driving me crazy.so let put some words what I have done in this holiday.

I left heathrow around afternoon time and landed Dubai around midnight I was feeling bit awkward  to ask  brother to pick me up as he was came from China on same morning and I know he was tired too. Thanks to Allah and bhai that he pick me up from the airport. I had now four day to enjoy before I will head off to India. We made plan that what need to cover as I had to do some shopping and planned to visit desert safari. on first day we went to visit local market at Dera and did some shopping for my sisters for my wife. Next day we went to Dubai outlet mall and did  shopping at Massimo dutti outlet shop. It is really worth to visit Dubai Outlet Mall if you visiting Dubai. Next day we went for Desert safari. Driver from desert safari tour pick us all from home and reached  to desert at around 4 ‘o clock and then we off for our camp around after magrib time.Next day I pack my bags and then we headed to Jumaira beach and after finish visiting it we left for airport and then to India.

Next morning it was really amazing experience for me to be in India as everyone was waiting for me. It was seriously heart touching moment for me as I wanted to cry but couldn’t cry. Spend some time to ahmedabad and then went to Mumbai for visiting my relatives and came back to Ahmedabad last .

more next time…

Setup script exited with error: command ‘gcc’ failed with exit status 1

I was getting this error when I was installing Plone 4a1 from terminal. after one day search i found this

sudo apt-get install python-dev

will do the trick.

Tags: ,

Add filetype to list in FileSystem Directory View.

Recently I have added flv file in product skin directory and register flv extension to MIME type registry but it wasn’t listing in product skin directory in ZMI. I was wondering what I was missing after a bit digging I workaround one patch which need to apply at CMFCore/FSFile.py

Basically file extention need to be register in FSFile type.

FSFile.py

registerFileExtension('doc', FSFile)
registerFileExtension('txt', FSFile)
registerFileExtension('pdf', FSFile)
registerFileExtension('flv', FSFile)
registerFileExtension('swf', FSFile)
registerFileExtension('jar', FSFile)
registerFileExtension('cab', FSFile)
registerFileExtension('ico', FSFile)
registerFileExtension('js', FSFile)
registerFileExtension('css', FSFile)
registerMetaType('File', FSFile)

Tags:

Simple Flatpage Navigation Items

Flatpages are great for simple html content. However, I wanted some way to associate a navigation menu (just a snippet of HTML) with one or more FlatPage objects. Additionally, I wanted to be able to edit these throught the Admin. This is the best solution I found on django snippets.

# models.py

from django.db import models
from django.contrib.flatpages.models import FlatPage

class FlatpageNav(models.Model):
    '''
    A simple snippet of HTML that can be associated with multiple FlatPages.
    '''
    flatpages = models.ManyToManyField(FlatPage, \
        help_text='Select the Flatpages that should display this menu')
    name = models.CharField(max_length=255, \
# models.py

from django.db import models
from django.contrib.flatpages.models import FlatPage

class FlatpageNav(models.Model):
    '''
    A simple snippet of HTML that can be associated with multiple FlatPages.
    '''
    flatpages = models.ManyToManyField(FlatPage, \
        help_text='Select the Flatpages that should display this menu')
    name = models.CharField(max_length=255, \
        help_text='A name for this menu. This is not displayed on the FlatPage.')
    menu = models.TextField(help_text='Enter an HTML snippet for the menu.')

    def __unicode__(self):
        return u"%s"%self.name

# admin.py
from models import FlatpageNav
from django.contrib import admin

class FlatpageNavAdmin(admin.ModelAdmin):
    list_display = ('name', )

admin.site.register(FlatpageNav, FlatpageNavAdmin)

# Then, in your Flatpage default template, add the following:
    {% if flatpage.flatpagenav_set.count %}
        {% for nav in flatpage.flatpagenav_set.all %}
            {{ nav.menu|safe }}
        {% endfor %}
    {% else %}
         {# Include an alternative menu. #}
        {% include "flatpages/menu.html" %}
    {% endif %}
        help_text='A name for this menu. This is not displayed on the FlatPage.')
    menu = models.TextField(help_text='Enter an HTML snippet for the menu.')

    def __unicode__(self):
        return u"%s"%self.name

# admin.py
from models import FlatpageNav
from django.contrib import admin

class FlatpageNavAdmin(admin.ModelAdmin):
    list_display = ('name', )

admin.site.register(FlatpageNav, FlatpageNavAdmin)

# Then, in your Flatpage default template, add the following:
    {% if flatpage.flatpagenav_set.count %}
        {% for nav in flatpage.flatpagenav_set.all %}
            {{ nav.menu|safe }}
        {% endfor %}
    {% else %}
         {# Include an alternative menu. #}
        {% include "flatpages/menu.html" %}
    {% endif %}

Tags: , ,

How to make Indian Chicken Biryani (Chicken Rice)

I have recently share my lunch with my friend and he like so much that he ask me to share the recipe with hiChicken Biryanim so I though to write down here and share with him. So here is quick brief.

First,In the pot put the 2 cup of basmati rice with 4 cup of water in it with two tea spoon of salt. I usually add two to three cardamom for nice smell and boil this rice for 5 min. Keep the rice a bit uncooked which will be cooked again with chicken curry.

Now chop the onion and fry the onion until it become brown. add chopped garlic and ginger in it.I prefer to use fresh garlic and ginger.  Portion of garlic should be 4 tea spoon and portion of ginger is 2 tea spoon. After 10 min of frying this paste add 3 chopped tomatoes  in it. Fry this paste for 10 minute. now it’s time to add all spices in it. I usually add 1 tea spoon chili powder,  salt according to your taste (I need 2 tea spoon), 2 tea spoon coriander powder, 1/2 spoon turmeric power, 4 to 5 cloves, 4 to 5 black peppercorns.1 to 2 Bay leaves (tej patta), 2 to 3 small piece of cassia sticks. you can choose the quantity the spices according to your taste. Mix paste very well and fry it for 10-15 min.

Add chicken (1 kg) in this paste. I hope you have very well wash this chicken piece before adding it in to the paste.Stir this paste every 5 to 7 minute and cook for 20-25 minute. Once you happy that chicken is properly cooked add the rice on the top of this paste and close the pot for 10-15 minute. Check that steam is coming up from the rice and its done.

Tags: , ,