Skip to main content

Posts

Showing posts with the label storage

Raspbery Pi as a home file server

I've wanted more from my PI, besides Time Machine functions, established in my earlier articles. So I've decided to make it a SAMBA server. I have a Mac and a Windows PC. And several iPads/iPhones. So the decision was obvious. To access my storage content I'd need a samba share. Because it is recognized by all this tech. iPad has Oplayer, to watch movies without conversion... GoodReader for docs. One word - SAMBA share. SO this article will be about adding a samba share to your Raspberry Pi. Note I have a Time Machine already set up. But it won't matter much. I only have another drive index letters and so on. I'll try to cover this as much as possible. And macs somewhat easily read NTFS filesystems. So we will be mounting NTFS filesystem volume to a Raspberry Pi with SAMBA network sharing. Let's get on to it. To set up a Raspbery Pi home network Samba server you will need to: - Connect an external drive (USB HDD in my case). - Update fstab for auto-mount...

Templates. New in Django 1.4

Continuing those series of tasty features in Django 1.4. It's templates and newly added templatetags this time. Many things improved in template logic now. Lets move on point by point... Tag  {% elif %} For most of us it is almost killer feature of new Django 1.4. You will have simpler logic in your templates, if you have advanced logic there, of course. ;) Key-value arguments for user tags You can use key-value for tags along with old, positional, arguments, e.g.: { % custom_tag 123 "test" thing . var text = msg | upper username = user . get_full_name % } All of this implemented using common "args" and "kwargs": @register . simple_tag def custom_tag ( a , b , * args , * * kwargs ) : warning = kwargs [ 'text' ] profile = kwargs [ 'username' ] . . . return . . . assignment_tag Some tags are not built to output something in template, like simple_tag. They only have to change something in c...