/[adm]/puppet/modules/django_application/files/django_create_group.py
ViewVC logotype

Contents of /puppet/modules/django_application/files/django_create_group.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1196 - (show annotations) (download) (as text)
Thu Feb 24 18:52:53 2011 UTC (13 years, 1 month ago) by misc
File MIME type: text/x-python
File size: 249 byte(s)
- add 2 class to add group to a django application, as well as
  permission ( used for tx )
1 #!/usr/bin/python
2 import sys
3 group_name = sys.argv[1]
4
5 from django.contrib.auth.models import Group
6 try:
7 group = Group.objects.get(name=group_name)
8 except Group.DoesNotExist:
9 group = Group.objects.create(name=group_name)
10 group.save()
11
12

  ViewVC Help
Powered by ViewVC 1.1.30