Skip to main content

Posts

Showing posts from August, 2013

install ssh-copy-id on Mac OS X best way

You often need to create identities for unknown/new servers. Then welcome to this article. I believe i have a best practice way of doing it on a MAC system. First of all you need your identity file: 1. Generating ssh keys set You need to use tool that any unix system usually has. It's ssh-keygen. (Skip if you have it already) Last login: Wed Aug 21 16 : 07 : 34 on ttys002 console@username:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/Users /username/ .ssh/id_rsa): yourkeyname Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in yourkeyname. Your public key has been saved in yourkeyname.pub. The key fingerprint is: XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX. console@username The key 's randomart image is: +--[ RSA 2048]----+ | + | | + | | + | | + ...

Django: Add Permission model to admin panel

How to add a permissions model to your Django admin? You may add those lines to anywhere in your code. But it is more convinient to add this to your admin.py or place where django admin custom code lies. Here are them: from django.contrib.auth.models import Permission admin.site.register(Permission) Now you can manage them in in your Django admin panel. May look like this: Hope this helps.