Changeset c547de5 for asadb/util/export_website_groups.py
- Timestamp:
- Nov 3, 2012, 4:16:53 PM (13 years ago)
- Branches:
- master, space-access, stable, stage
- Children:
- 251503b
- Parents:
- 5f1eaa3
- git-author:
- Alex Dehnert <adehnert@…> (11/03/12 16:16:53)
- git-committer:
- Alex Dehnert <adehnert@…> (11/03/12 16:16:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asadb/util/export_website_groups.py
r884ab7c rc547de5 5 5 6 6 import codecs 7 import datetime 7 8 import os 8 9 import sys … … 18 19 19 20 TMPL = Template(u""" 20 <!-- Automatically generated by asadb/util/export_website_groups.py. 21 Do not edit; instead re-run that script (or edit it as necessary). --> 21 <!-- 22 Automatically generated by asadb/util/export_website_groups.py on {{date}}. 23 Do not edit; instead ask a DB maintainer (asa-db@) to re-run that script (or edit script as necessary). 24 25 A more recent version may be in /mit/asa-db/data/db-dump/website_groups.html. 26 Includes groups with status is_active=True (ie, Suspended and Active groups). 27 --> 22 28 {% for group in groups %} 23 29 <tr><td> … … 32 38 33 39 if __name__ == '__main__': 34 ctx = Context( 35 {'groups': groups.models.Group.objects.filter(group_status__is_active=True)} 36 ) 37 out = codecs.getwriter('utf8')(sys.stdout) 40 ctx = Context({ 41 'groups': groups.models.Group.objects.filter(group_status__is_active=True), 42 'date': datetime.datetime.now(), 43 }) 44 out = codecs.getwriter('utf-8')(sys.stdout) 38 45 out.write(TMPL.render(ctx))
Note: See TracChangeset
for help on using the changeset viewer.