Friday, September 10, 2010

Playing with Django 0.96 - Class Meta & Class Admin

>>> for m in ModelName._meta.__dict__:
...       m
...
'unique_together'
'order_with_respect_to'
'installed'
'auto_field'
'has_auto_field'
'many_to_many'
'ordering'
'one_to_one_field'
'object_name'
'parents'
'db_tablespace'
'pk'
'verbose_name'
'get_latest_by'
'db_table'
'permissions'
'admin'
'fields'
'verbose_name_plural'
'app_label'
'module_name'
'aka'



>>> for m in ModelName._meta.admin.__dict__:
...       m
...
'list_select_related'
'save_as'
'save_on_top'
'list_per_page'
'ordering'
'fields'
'list_display'
'search_fields'
'js'
'date_hierarchy'
'list_filter'
'list_display_links'
'manager'


... Class Admin:
...       list_select_related = True
...       list_per_page = 20
...       manager = MyAdminManager()


Class MyAdminManager(models.Manager):
...       def get_query_set(self):
...             query_set = super(MyAdminManager, self).get_query_set().filter(id__gte=5)
...       return query_set

Thursday, July 22, 2010

Avidemux : Crossplatform free video editor

Avidemux is crossplatform free video editor.
Split, cut and remove the unwanted scenes, join or convert your video files without any hassle.

Download links:

http://download.cnet.com/Avidemux/3000-13631_4-10829933.html
http://fixounet.free.fr/avidemux/

Friday, June 25, 2010

Fan speed control of a Dell PC in Linux Distrubition

1. Install gkrellm application from the package manager or the link below:
http://linuxappfinder.com/package/gkrellm

2. Install gkrellm-i8k or i8kutils plugins:
Here the links for download, you can also search them from your package manager:
* Debian package - gkrellm-i8k_2.5-1_i386.deb
http://packages.debian.org/lenny/i386/gkrellm-i8k/download
* Red Hat package - i8kutils-1.25-16.i586.rpm
http://fr.rpmfind.net/linux/rpm2html/search.php?query=i8krellm.so

3. Then try following:
Type in terminal sudo modprobe i8k force=1
Edit /etc/modulesand add i8k force=1 to the end of the file.
Another way if /etc/modules does not exist is editing the file /etc/rc.local and adding modprobe i8k force=1

You may also need to configure your GKrellM application for Dell I8K Plugin.