Skip to main content

Posts

Showing posts with the label manage

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.

Django: Installing Eclipse and PyDev for django

In most common cases of programming Django with Eclipse are that Django is installed in system, like Python. I dislike this method, because it makes confusions for beginners. What Django version I'm in. Why did I download an app "X" and added an Eclipse project. Everything seems to be fine, but I cant install proper dependencies... So it's not a secret. Managing Django distributions is a hard work for junior developer. Let's try to make their work simpler, by this article. I'll try to show you the right way to install Django environment on Eclipse. 1. First of all let's install Eclipse from official site . I chose "Eclipse IDE for JavaScript Web Developers". Mac 32bit version, because I'm using this OS type. Any other distributive will work just fine, I think. 2. Unpack downloaded archive into some dir. It will be installation directory of the eclipse. Usually it doesn't mater where it is stored. So I used "/Users/garmoncheg/De...