https://github.com/pizzapanther/django-permissions-keeper
Easy way to keep group permissions in sync between Development and Production environments
https://github.com/pizzapanther/django-permissions-keeper
Last synced: 2 months ago
JSON representation
Easy way to keep group permissions in sync between Development and Production environments
- Host: GitHub
- URL: https://github.com/pizzapanther/django-permissions-keeper
- Owner: pizzapanther
- Created: 2012-05-04T20:49:04.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-04T21:43:15.000Z (about 13 years ago)
- Last Synced: 2025-02-18T00:46:23.830Z (4 months ago)
- Language: Python
- Size: 93.8 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Django-Permissions-Keeper
=========================An easy way to keep group permissions in sync between Development and Production environments.
## Installation
1. Install "pip install permkeep"
2. Add permkeep to your installed apps in settings.py.```python
INSTALLED_APPS = (
...
'permkeep',
...
)
```3. Define your group permissions in settings.py.
a = Add, c = Change, d = Delete
```python
GROUP_PERMISSIONS = (
{
'name': 'Editor',
'codes': (
('event', 'acd'),
('newsitem','acd'),
('tag','acd'),
('category','ac'),
('peopletag','acd'),
)
},
{
'name': 'Contributor',
'codes': (
('event', 'ac'),
('newsitem','ac'),
('tag','a'),
('peopletag','a'),
)
}
)
```4. Run "./manage.py setperms"
This will add any groups and permissions that currently don't exist. It does not delete permissions.
You can run the command several times to add permissions in the future. If the permission already exists it will skip over it.