Changeset 3af5d74 for asadb


Ignore:
Timestamp:
Sep 10, 2012, 5:01:47 AM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
e0632f6
Parents:
26fd6cf
git-author:
Alex Dehnert <adehnert@…> (09/10/12 05:01:47)
git-committer:
Alex Dehnert <adehnert@…> (09/10/12 05:01:47)
Message:

Valid Athena lockernames

Also, everyone should have a locker in the DB. Explaining how to find your
locker should be unnecessary (and it never seemed to work very well).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/models.py

    ra03cb61 r3af5d74  
    11from django.db import models
     2from django.core.validators import RegexValidator
    23from django.contrib.auth.models import User
    34from django.template.defaultfilters import slugify
     
    2122            group_status__slug='active',
    2223        )
     24
     25locker_validator = RegexValidator(regex=r'^[-A-Za-z0-9_.]+$', message='Enter a valid Athena locker.')
    2326
    2427class Group(models.Model):
     
    4245    main_account_id = models.IntegerField(null=True, blank=True, )
    4346    funding_account_id = models.IntegerField(null=True, blank=True, )
    44     athena_locker = models.CharField(max_length=20, blank=True, help_text="Often, this will appear in your group's URL --- http://web.mit.edu/SOME_VARIANT_OF_GROUP_NAME/, http://www.mit.edu/~SOME_VARIANT_OF_GROUP_NAME/ and http://SOME_VARIANT_OF_GROUP_NAME.scripts.mit.edu/ all correspond to a locker name of SOME_VARIANT_OF_GROUP_NAME. Also, you can probably find this in your entry in the old database.")
     47    athena_locker = models.CharField(max_length=20, blank=True, validators=[locker_validator])
    4548    recognition_date = models.DateTimeField()
    4649    update_date = models.DateTimeField(editable=False, )
Note: See TracChangeset for help on using the changeset viewer.