Posts

Showing posts from August, 2013

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

Image
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)
Lastlogin: WedAug2116:07:34onttys002console@username:~$ssh-keygen-trsaGeneratingpublic/privatersakeypair.Enterfileinwhichtosavethekey(/Users/username/.ssh/id_rsa):yourkeynameEnterpassphrase(emptyfornopassphrase):Entersamepassphraseagain: Youridentificationhasbeensavedinyourkeyname.Yourpublickeyhasbeensavedinyourkeyname.pub.Thekeyfingerprintis:XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.XX.console@usernameThekey's randomart image is:+--[ RSA 2048]----+| + || + || + || + || + || . + || . + || . ...........+ || . .+.... |+-----------------+console@username:~$ N…

Django: Add Permission model to admin panel

Image
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:
fromdjango.contrib.auth.modelsimportPermissionadmin.site.register(Permission) Now you can manage them in in your Django admin panel. May look like this:
Hope this helps.