Changeset 1ffd96e
- Timestamp:
- Dec 26, 2011, 5:18:13 AM (14 years ago)
- Branches:
- master, space-access, stable, stage
- Children:
- beaf731
- Parents:
- be7c915 (diff), e499677 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- asa-db <asa-db@…> (12/26/11 05:18:13)
- git-committer:
- asa-db <asa-db@…> (12/26/11 05:18:13)
- Files:
-
- 5 added
- 11 edited
-
asadb/groups/migrations/0018_recognition_datetime.py (added)
-
asadb/groups/models.py (modified) (1 diff)
-
asadb/groups/views.py (modified) (1 diff)
-
asadb/media/style/style.css (modified) (1 diff)
-
asadb/mit/__init__.py (modified) (1 diff)
-
asadb/settings.py (modified) (2 diffs)
-
asadb/template/groups/group_detail.html (modified) (2 diffs)
-
asadb/template/groups/group_list.html (modified) (2 diffs)
-
asadb/template/groups/groups_signatories.html (modified) (1 diff)
-
asadb/util/export_website_groups.py (added)
-
asadb/util/sync_moira_authz.py (added)
-
asadb/util/sync_moira_authz.sh (added)
-
design/stakeholders/2011-12-13-demo.txt (added)
-
asadb/groups/migrations/0006_add_group_perms.py (modified) (1 diff)
-
asadb/groups/migrations/0014_recognize_nge_perm.py (modified) (1 diff)
-
asadb/groups/migrations/0016_create_auth_groups.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/models.py
rfd6ed57 rd7dcfee 35 35 funding_account_id = models.IntegerField(null=True, blank=True, ) 36 36 athena_locker = models.CharField(max_length=20, blank=True) 37 recognition_date = models.Date Field()37 recognition_date = models.DateTimeField() 38 38 update_date = models.DateTimeField(editable=False, ) 39 39 updater = models.CharField(max_length=30, editable=False, null=True, ) # match Django username field -
asadb/groups/views.py
rfd6ed57 rd7dcfee 483 483 group.group_status = groups.models.GroupStatus.objects.get(slug='active') 484 484 group.constitution_url = "" 485 group.recognition_date = datetime.date .today()485 group.recognition_date = datetime.datetime.now() 486 486 group.set_updater(request.user) 487 487 -
asadb/media/style/style.css
r754d5a4 re499677 220 220 } 221 221 222 tr.group-status-active.group-active-True td.group-status 223 { 224 background-color: green; 225 color: black; 226 } 227 tr.group-active-True td.group-status 228 { 229 background-color: yellow; 230 color: black; 231 } 232 tr.group-active-False td.group-status 233 { 234 background-color: red; 235 color: black; 236 } 237 222 238 223 239 /* Reset some stuff */ -
asadb/mit/__init__.py
r2b38cb9 rb90e90b 56 56 return user 57 57 58 def get_or_create_mit_user(username, ): 59 """ 60 Given an MIT username, return a Django user object for them. 61 If necessary, create (and save) the Django user for them. 62 If the MIT user doesn't exist, raises ValueError. 63 """ 64 user, created = auth.models.User.objects.get_or_create(username=username, ) 65 if created: 66 backend = ScriptsRemoteUserBackend() 67 # Raises ValueError if the user doesn't exist 68 try: 69 return backend.configure_user(user), created 70 except ValueError: 71 user.delete() 72 raise 73 else: 74 return user, created 75 58 76 def scripts_login(request, **kwargs): 59 77 host = request.META['HTTP_HOST'].split(':')[0] -
asadb/settings.py
rd6f7d1a r8d36a62 23 23 DATABASES = {} 24 24 25 KRB_KEYTAB = None 26 KRB_PRINCIPAL = None 27 25 28 ENABLE_SCRIPTS_AUTH = True 26 29 30 COOKIES_PREFIX = "asadb_" 27 31 SESSION_COOKIE_SECURE = True 28 32 SESSION_COOKIE_HTTPONLY = True … … 50 54 51 55 from local_settings import * 56 57 SESSION_COOKIE_NAME = COOKIES_PREFIX + "sessionid" 58 CSRF_COOKIE_NAME = COOKIES_PREFIX + "csrftoken" 52 59 53 60 # Absolute path to the directory that holds media. -
asadb/template/groups/group_detail.html
r47998d1 r6290761 25 25 <tr><th>Website</th><td><a href="{{group.website_url}}">{{group.website_url}}</a></td></tr> 26 26 <tr><th>Meeting times</th><td>{{group.meeting_times}}</td></tr> 27 <tr><th>Officer email</th><td> redacted-temporarily@mit.edu</td></tr>27 <tr><th>Officer email</th><td>{% if user.is_authenticated %}{{group.officer_email}}{% else %}[log in to see emails]{% endif %}</td></tr> 28 28 {% if viewpriv %}<tr class='private-info'> 29 29 <th>Group email</th> … … 36 36 <th>{{name}}{%if not role.publicly_visible %}*{%endif%}</th> 37 37 <td><ul> 38 {% for person in people %}<li> [redacted temporarily]</li>{%endfor%}38 {% for person in people %}<li>{{person.person}}</li>{%endfor%} 39 39 </ul></td> 40 40 </tr> -
asadb/template/groups/group_list.html
rfbb362a re499677 17 17 <h2>The Groups</h2> 18 18 19 <table class='pretty-table '>19 <table class='pretty-table group-list'> 20 20 <thead> 21 21 <tr> 22 22 <th>Name</th> 23 <th>Status</th> 23 24 <th>Website</th> 24 25 <th>ASA DB</th> … … 29 30 <tbody> 30 31 {% for group in group_list %} 31 <tr >32 <tr class='group-status-{{group.group_status.slug}} group-active-{{group.group_status.is_active}}'> 32 33 <th>{{group.name}}</th> 34 <td class='group-status'>{{group.group_status}}</td> 33 35 <td>{% if group.website_url %}<a href='{{group.website_url}}'>Website</a>{%endif%}</td> 34 36 <td><a href='{% url groups:group-detail group.pk %}'>DB Entry</a></td> -
asadb/template/groups/groups_signatories.html
rce7fd92 re499677 29 29 {%for group, role_list in officers %} 30 30 <tr> 31 <th><a href='{% url groups:group-detail group.pk %}'>{{group}}</a> </th>31 <th><a href='{% url groups:group-detail group.pk %}'>{{group}}</a> ({{group.group_status}})</th> 32 32 {%for holders in role_list%} 33 33 <td>{% if holders %}<ul>{% for person in holders %}<li>{{person}}</li>{%endfor%}</ul>{% endif %}</td> -
asadb/groups/migrations/0006_add_group_perms.py
r2dd6045 rbe7c915 14 14 def forwards(self, orm): 15 15 "Write your forwards methods here." 16 # Create the various contenttypes and permissions and stuff 17 # Otherwise the we'll end with a group without a name 18 # http://groups.google.com/group/south-users/browse_thread/thread/666994cabad1a185?pli=1 19 db.send_pending_create_signals() 20 16 21 # See http://stackoverflow.com/questions/1742021/adding-new-custom-permissions-in-django#answer-6149593 17 22 ct, created = orm['contenttypes.ContentType'].objects.get_or_create(model='group', app_label='groups') # model must be lowercase! -
asadb/groups/migrations/0014_recognize_nge_perm.py
r191ec87 rbe7c915 24 24 def forwards(self, orm): 25 25 "Write your forwards methods here." 26 # Create the various contenttypes and permissions and stuff 27 # Otherwise the permission stuff will fail horribly 28 # http://groups.google.com/group/south-users/browse_thread/thread/666994cabad1a185?pli=1 29 db.send_pending_create_signals() 30 26 31 util.migrations.migrate_perms_forwards(orm, self.new_perms, ) 27 32 util.migrations.migrate_groups_forwards(orm, self.new_auth_groups, ) -
asadb/groups/migrations/0016_create_auth_groups.py
r29a7eca rbe7c915 74 74 75 75 class Migration(DataMigration): 76 77 depends_on = ( 78 ("forms", "0001_initial", ), 79 ) 80 76 81 def forwards(self, orm): 77 82 "Write your forwards methods here." 83 db.send_pending_create_signals() 78 84 util.migrations.migrate_groups_forwards(orm, auth_groups, ) 79 85 user_manager = django.contrib.auth.models.User.objects
Note: See TracChangeset
for help on using the changeset viewer.